Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

jdleesmiller/si_taxi

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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