There is a stark difference between typical physics particle hopping models and the transportation models: in transportation, the particles are intelligent agents, meaning that they have individual and potentially complex rules of how they react to the environment. This means that in implementations some pointer to these complicated rule structures needs to be maintained when the particles move. This immediately excludes the use of single bit coding, since these pointers typically occupy 32 or even 64 bits of memory.
In consequence, a simple typical vehicle grid in a transportation looks as follows
which means that Road consists of 200 pointers pointing to
vehicles. Memory for the pointers is immediately allocated; memory for
the vehicles is only allocated when it is used. For
example, when the code decides to put a vehicle into cell number ii, the code fragment may look as
Movement is still done in a relatively standard way:
The big advantage of this is that all information belonging to the
vehicle is always being moved with it.
Clearly, many improvements to the above are possible or even recommended, such as using vectors instead of arrays, making clean definitions of constants such as ``200'', making IDs constant, explicitely defining constructors and destructors, etc.
The currently most important application of the agent technology in transportation simulations is that agents know where they are going. More precisely, it is possible to give each agent its full route, for example consisting of a sequence of nodes. A related but different area of research is to generate those strategic decisions for the agents. All this results in additional computational modules which are part of a complete transportation simulation package (e.g. [26]).