Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

jdleesmiller/si_taxi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  
  •  

Packages

No packages published