****Base model with scattering of cars

Speed and Status are traits of the car agent.
Speed ranges between 0.5 - 0.8 at start based on the randomness in setup.

Programmer notes:
1- We need to use "yield" in the setup code before calling the procedure. I think there must be an issue where brand-new agents aren't properly placed into the binning system for detection. The yield waits for the binning process to work.

2- No more than 10 cars can be used in this setup if we want the cars to scatter without overlap on the x-axis. We need to be careful with the scatter procedure - if we change the numbers to count within (for example) 10 steps > 0, we get an infinite loop because that number of cars cannot spread evenly into that amount of space. Count Cars within 5 steps > 0, and it looks very nicely spread out.

  • 0 (Current Version) View Project History
Engine speed5
Loading...
0%

Loading...