Please help me to script such that negative trips aren't possible (due to a negative regression constant) and so that if the independent variable(s) is zero I don't get positive trips (due to a positive regression constant). what are the control statements and keywords to be used to do so?
I am not sure why you would get negative values unless the input values are not correct. Could you file a service request for this issue? https://communities.bentley.com/communities/other_communities/sign-in_assistance_and_web_services/w/wiki/47171/service-request-manager
For production/attraction equations, some zones have no value for independent variables associated with production/attraction equations. For some zones, independent variables values multiplied by coefficient result less than negative constants. Consequently, we will have negative trips in the output table. I want to script such that any values less than zero should equal zero, and; if the independent variable is zero, the number of trips has to be zero regardless of the positive constant in the regression equations.
You can use an IF statement such as IF (P[1] < 0) P[1]=0.
Thanks, I thought about it but how can I use it once for all attractions and productions not only P[1], similarly, if the independent variables are zero for a particular zone, how will the same IF statement be applied to have the productions and attractions zero?
You can create individual IF statements as below:
IF (P[1]<0) P[1]=0
IF (P[2]<0) P[2]=0
....