Next: Links, Simlinks, and Inheritance
Up: Modularization, inheritance, templates, and
Previous: Modularization, inheritance, templates, and
  Contents
As discussed in Chap. 2, transportation simulation
packages consist of many modules. So far, we have seen the traffic
simulation and the visualizer. The next module will be the router.
In contrast to the visualizer, our router will operate on a graph
similar to the traffic simulation. This means that it makes sense to
re-use some of the traffic simulation code. There are several
options:
- If your are working as part of a team and your task is the
router, then you can just delete the pieces of code that are specific
to the traffic simulation (example: the cell structure of the links)
and go from there.
- If you want one consistent piece of code but not many hassles in
terms of software design, then one option is to have the functionality
for the simulation and for the router combined in the same software.
A link for example would keep the cell structure, even when used by
the router.
This is quite inefficient both in terms of performance and in terms of
memory usage, but our experience is that for the examples discussed in
this text this is a workable solution. In this case, you do not
need to read this chapter.
- It is possible to separate the general purpose pieces of the
network reading and network construction from the simulation specific
pieces.
It is the last point that will be discussed in this chapter.
Next: Links, Simlinks, and Inheritance
Up: Modularization, inheritance, templates, and
Previous: Modularization, inheritance, templates, and
  Contents
2004-02-02