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

Class ModelInterface

source code

 object --+    
          |    
dsInterface --+
              |
             ModelInterface
Known Subclasses:

Model constraints expressed as a uni-directional interface to another
formal system model:
- Made up of conditions imposed on the other system's test trajectory.
- Defines evaluation criteria for any view (e.g. from experimental data and
test conditions).
This is an abstract superclass for the 'internal' and 'external'
sub-classes.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_get_initiator_cache(self, ics=None, t0=0)
initiator is a ModelInterface or GeneratorInterface object
source code
 
set(self, key, value, ics=None, t0=0) source code
 
get(self, key, ics=None, t0=0) source code
 
Rhs(self, t, xdict, pdict)
Direct access to a generator's Rhs function.
source code
 
Jacobian(self, t, xdict, pdict, idict=None)
Direct access to a generator's Jacobian function (if defined).
source code
 
JacobianP(self, t, xdict, pdict)
Direct access to a generator's JacobianP function (if defined).
source code
 
MassMatrix(self, t, xdict, pdict)
Direct access to a generator's MassMatrix function (if defined).
source code
 
AuxVars(self, t, xdict, pdict)
Direct access to a generator's auxiliary variables definition (if defined).
source code
 
setup_conditions(self, conditions, traj) source code
 
evaluate(self, target, force=False)
Evaluate interface consistency against target interface's trajectory on specified conditions.
source code
 
__call__(self, target, force=False)
Evaluate interface consistency against target interface's trajectory on specified conditions.
source code
 
postprocess_test_traj(self, test_traj)
Called by another interface via get_test_traj.
source code
 
prepare_conditions(self, target)
Called automatically by evaluate.
source code

Inherited from dsInterface: get_test_traj, query

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

Class Variables [hide private]
  _trajname = 'test_iface_traj'

Inherited from dsInterface (private): _querykeys, _setkeys

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

evaluate(self, target, force=False)

source code 

Evaluate interface consistency against target interface's trajectory on specified conditions.

Optional force argument forces model to recompute its test trajectory, e.g. because of a known change in model parameters, ics, etc.

__call__(self, target, force=False)
(Call operator)

source code 

Evaluate interface consistency against target interface's trajectory on specified conditions.

Optional force argument forces model to recompute its test trajectory, e.g. because of a known change in model parameters, ics, etc.

postprocess_test_traj(self, test_traj)

source code 
Called by another interface via get_test_traj.
Default post-processing of test trajectory is the identity
 function, i.e. no processing.

Override this method to return a processed version of the
 trajectory or perform other post-computation clean-up, e.g.
 prepare auxiliary feature/condition-related information based
 on end state of trajectory so that HybridModel can use it to
 decide on next hybrid state to switch to.

prepare_conditions(self, target)

source code 

Called automatically by evaluate. Override with user-defined access to the target interface or processing of trajectory after return of the target's test trajectory.