I want to write a simple traffic simulation with one road intersection. First I thought of a cellular automata in the model but it should not be limited by an underlying discrete grid system so the streets could be more independent to location or levels. Currently I can think of three approaches and I would like to get your thoughts on it.
1) Street as Entity An agent is part of this entity when it's driving on it.
2) Intersection (or Endpoint) as Entity An agent drives from endpoint A to B.
3) Intersection and Street as Entity Merged Point 1 and 2 in one system.
Street as Entity An agent is part of this entity when it's driving on it.
Intersection (or Endpoint) as Entity An agent drives from endpoint A to B.
Intersection and Street as Entity Merged Point 1 and 2 in one system.
This reminds me somehow about the benefit of a Moore vs Mealy machine (States vs. Transition). What do you think would be the best representation to go with. As mentioned, the entire system should be not just limited by discrete values because I would like to animate the transition of the agent from street A to B. Any ideas appreciated.