reset password
Author Message
rabbott
Posts: 1649
Posted 16:34 Mar 29, 2020 |

Lines 86, 97, and 106 all look like the title of this post. (The post title is line 106 of the NetLogo Braess Paradox model.)

In NetLogo, set is an assignment operator. The line above is equivalent to the following more traditional presentation.

middle = ((travel-time) + ((smoothing - 1) * middle)) / smoothing

The only difference among the three lines is that the first and second use the variables top and bottom instead of middle. Conceptually, they all do the same computation. 

(Don't forget:
      travel-time is an identifier, not a subtraction. It could have been written travel_time. 

   smoothing is a user-settable value. See the Interface.)

Can anyone explain what these three lines are doing?

Note that line 77 also performs the same computation as the other lines. In line 77, travel-time is to the right of the + sign, whereas it is to the left in the other lines. Since  + is commutative, that difference is not relevant. Also, in line 77 the variable smoothing is replaced by the constant 20.

-----------------------------------------------------------------

(Hint: You might find this article helpful.)

Last edited by rabbott at 17:01 Mar 29, 2020.