Package PyDSTool :: Module MProject :: Class intModelInterface
[hide private]
[frames] | no frames]

Class intModelInterface

source code

 object --+        
          |        
dsInterface --+    
              |    
 ModelInterface --+
                  |
                 intModelInterface

Interface providing internal evaluation criteria between models. Optional conditions (object) argument used to specify these criteria.

Instance Methods [hide private]
 
__init__(self, model, conditions=None, compatibleInterfaces=None, test_traj=None)
Set model that generates test trajectories from which the dictionary of conditions can be imposed on a connected model.
source code
 
ensure_has_test_traj(self)
Cause recomputation of test trajectory if not already present in model, returning boolean for whether recomputation was performed.
source code
 
has_test_traj(self) source code
 
compute_traj(self, need_init=True, new_args=None) source code
 
get_test_traj(self, force=False)
Called by another interface.
source code
 
initialize_model(self)
Return any unique model-specific settings here, as a dictionary with keys that can include initial conditions, parameters, tdata, algorithmic parameters.
source code

Inherited from ModelInterface: AuxVars, Jacobian, JacobianP, MassMatrix, Rhs, __call__, evaluate, get, postprocess_test_traj, prepare_conditions, set, setup_conditions

Inherited from ModelInterface (private): _get_initiator_cache

Inherited from dsInterface: query

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from ModelInterface (private): _trajname

Inherited from dsInterface (private): _querykeys, _setkeys

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, model, conditions=None, compatibleInterfaces=None, test_traj=None)
(Constructor)

source code 
Set model that generates test trajectories from which the dictionary
of conditions can be imposed on a connected model.

If no conditions are specified then the model is trivially wrapped in
  an "empty" interface.

Optionally, a dummy test traj can be supplied in case of a dummy interface
for a trivial condition test that does not need to evaluate a trajectory
to determine the result.

Overrides: object.__init__

get_test_traj(self, force=False)

source code 

Called by another interface. Return model's test trajectory, using any post-processing specified by user-defined process_test_traj method.

Use force option if model is known to have changed and trajectory needs refreshing.

Overrides: dsInterface.get_test_traj

initialize_model(self)

source code 

Return any unique model-specific settings here, as a dictionary with keys that can include initial conditions, parameters, tdata, algorithmic parameters. Use the same keys that are suitable for a call to the Model.set method, i.e. 'pars', 'ics', 'tdata', and 'algparams'.

Override in a sub-class to use. This method will be called before any trajectory computation of the model.