Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
ext
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Simple taxi / personal rapid transit (PRT) model.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.