Simple taxi / personal rapid transit (PRT) model.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ext
lib
test/si_taxi
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.rdoc
Rakefile.rb
si_taxi.gemspec

README.rdoc

si_taxi

Some simple taxi/Personal Rapid Transit simulations.

The simulations are written in C++; there are eclipse projects in

ext/si_taxi

These are exposed to Ruby using a wrapper that is automatically generated by SWIG.

Design Notes

Using SWIG constrains the design in a few ways:

  • must use one namespace (in this case si_taxi)

    • nested namespaces won't work, so we just use prefixes (e.g. BWSim instead of the more conventional bell_wong::Sim).

  • nested classes don't work, so we don't use them.

  • forward declarations of the form

    struct A;
    void foo(A *a);

    must be used instead of

    void foo(struct A *a);
  • avoid operator() and operator[], because they require extra swig code.

  • don't inherit from classes that don't wrap well (e.g. an extension of a boost matrix class doesn't work; it can be used as a member, because we define a typemap.

  • don't use exit or assert, because these will kill Ruby as well