Next: Compiler error messages for
Up: Some programming recommendations
Previous: General
  Contents
Many programming languages are suitable to write traffic simulations.
Here are some comments about the most common ones:
- C - ``small'' language; fast; objects are available via struct but no further object support; in general very little support
for things that one needs for agent-based simulation
- C++ - ``big'' language that few people know completely (i.e.
significant risk that one writes code that nobody can read);
object-oriented language with decent support for agent-based
simulation; good support for high performance computing in particular
for object-oriented numerics; no standardized support for graphical
user interfaces.
- java - similar to C++; includes support for graphical user interfaces.
Well-written code in java is not necessarily slower than code in C++,
but there is in general less support for high performance computing
(parallel compilers; debugging of parallel code; object-oriented
numerics; ...).
- fortran - comes from the tradition of numerical analysis; newer
versions of fortran have some support for agent-based simulation but
no comparison to C++ or java
Recommendation: C++ or java, depending on own experience.
In the following, we will often give examples in
C++ style.
The
goal is not to push C++ to its limits (as said above, in our
experience very few people can read and maintain the resulting code)
but to end up with design patterns that hopefully help average
programmers. We will use the Standard Template Library (STL) where we
feel that this is helpful.
Next: Compiler error messages for
Up: Some programming recommendations
Previous: General
  Contents
2004-02-02