Package PyDSTool :: Module ModelSpec' :: Class ModelSpec
[hide private]
[frames] | no frames]

Class ModelSpec

source code

object --+
         |
        ModelSpec
Known Subclasses:

Model specification abstract class. Sub-classes can override targetLangs, compatibleSubcomponents, compatibleContainers, and compatibleGens.

Instance Methods [hide private]
 
__call__(self) source code
 
__contains__(self, obj) source code
 
__copy__(self) source code
 
__deepcopy__(self, memo=None, _nil=[]) source code
 
__delitem__(self, name)
Delete named object (Var, Par, Fun, Input, or sub-component)
source code
 
__eq__(self, other, diff=False) source code
 
__getitem__(self, name)
Return object named using the hierarchical naming format.
source code
 
__init__(self, name)
Called by all sub-classes - do not override
source code
 
__ne__(self, other) source code
 
__repr__(self)
str(x)
source code
 
__str__(self)
str(x)
source code
 
_infostr(self, verbose=1) source code
 
_register(self, obj, depth=0, parent_obj=None) source code
 
add(self, arg, tosubcomponent=None)
Add object to registry, into a specified sub component if provided.
source code
 
addConnxnTarget(self, targ) source code
 
compileFuncSpec(self) source code
 
delConnxnTarget(self, targ) source code
 
difference(self, other)
Print the difference between two ModelSpecs to screen.
source code
 
flattenSpec(self, multiDefUnravel=True, globalRefs=None, ignoreInputs=False, force=False)
Flatten structured model specification to dictionary compatible with FuncSpec instantiation.
source code
 
info(self, verboselevel=1) source code
 
isComplete(self, globalRefs=None) source code
 
isDefined(self, verbose=False, ignoreInputs=False) source code
 
isEmpty(self) source code
 
remove(self, target)
Remove target component from specification.
source code
 
rename(self, newName) source code
 
search(self, name, component_type_order=None)
Find Quantity objects containing a component named <name>, of type given by the hierarchical name <comptype1.comptype2.
source code
 
validate(self) source code

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

Class Variables [hide private]
  compatibleContainers = ()
  compatibleGens = ()
  compatibleSubcomponents = ()
  targetLangs = ()
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

Called by all sub-classes - do not override

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

str(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

flattenSpec(self, multiDefUnravel=True, globalRefs=None, ignoreInputs=False, force=False)

source code 

Flatten structured model specification to dictionary compatible with FuncSpec instantiation.

Use globalRefs option to declare global variables used in the definitions that are not defined in them (e.g. time as 't', although this one is included as globalRef by default).

Default for multiple quantity definitions is to unravel them. Use multiDefUnravel=False to override this.

Use force option to rebuild flat spec if an existing one is out of date.

remove(self, target)

source code 

Remove target component from specification.

Use global hierarchical names for components if specifying a string.

search(self, name, component_type_order=None)

source code 

Find Quantity objects containing a component named <name>, of type given by the hierarchical name <comptype1.comptype2. ... .name>, where component_type_order = [<comptype1>, <comptype2>, ... ], and <comptypeN> may be a component type (as a wildcard) or a specific component name.