Initial operating capability for cysim

Cysim is an extraction of the Cypress simulation capability that relies on an externally provided residual function as a dynamically loadable library and dispenses with the C++ physical systems modeling framework. This is an effort to push the modeling capabilities up to higher level languages, but retain the simulator + sensing/actuation machinery of Cypress.

3 things are required for Cysim

  1. A dynamically linkable shared object that contains the following C function signature
void residual_function(realtype *y, realtype *dy, realtype *r, realtype t)
  1. A JSON file describing the simulation in terms of actuators, sensors and simultion parameters
{                                
  "actuators": [                 
    {                            
      "name": "a",               
      "address": "10.0.0.1/24",  
      "var": "r.τ",              
      "static_limit": {},        
      "dynamic_limit": {}        
    }                            
  ],                             
  "sensors": [                   
    {                            
      "name": "s",               
      "target": "c",             
      "var": "r.ω",              
      "rate": 100                
    }                            
  ],                                                        
  "config": {                    
    "end": 10,                   
    "step": 0.001,               
    "size": 3,                   
    "simulator": "sim0",         
    "id": "one.rotor.ry"         
  }                              
  1. A variable mapping file, so cysim can translate sensor/actuator variable references into DAE memory buffer indices
{          
  "r.θ": 2,
  "r.τ": 1,
  "r.ω": 0 
}