Package PyDSTool :: Package Generator :: Module baseclasses :: Class Generator
[hide private]
[frames] | no frames]

Class Generator

source code

object --+
         |
        Generator
Known Subclasses:

Trajectory Generator abstract class.

Instance Methods [hide private]
 
__init__(self, kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
addEvtPars(self, eventPars)
Register parameter names as event specific parameters.
source code
 
getEvents(self, evnames=None, asGlobalTime=True)
Produce dictionary of pointsets of all flagged events' independent and dependent variable values, for each event (whether terminal or not).
source code
 
getEventTimes(self, evnames=None, asGlobalTime=True)
Produce dictionary of lists of all flagged events' independent variable values, for each event (whether terminal or not).
source code
 
query(self, querykey='')
Return info about Generator set-up.
source code
 
get(self, key)
For API compatibility with ModelInterface: get will make a copy of the key and pass it through the inverse FuncSpec-compatible name map.
source code
 
haveJacobian(self)
Default method.
source code
 
haveJacobian_pars(self)
Default method.
source code
 
info(self, verbose=1) source code
 
_kw_process_dispatch(self, keys, kw) source code
 
_kw_process_varspecs(self, kw, fs_args) source code
 
_kw_process_tdomain(self, kw, fs_args) source code
 
_kw_process_ttype(self, kw, fs_args) source code
 
_kw_process_tdata(self, kw, fs_args) source code
 
_kw_process_tstep(self, kw, fs_args) source code
 
_kw_process_inputs(self, kw, fs_args) source code
 
_kw_process_ics(self, kw, fs_args) source code
 
_kw_process_allvars(self, kw, fs_args) source code
 
_kw_process_xtype(self, kw, fs_args) source code
 
_kw_process_xdomain(self, kw, fs_args) source code
 
_kw_process_reuseterms(self, kw, fs_args) source code
 
_kw_process_ignorespecial(self, kw, fs_args) source code
 
_kw_process_algparams(self, kw, fs_args) source code
 
_kw_process_pars(self, kw, fs_args) source code
 
_kw_process_pdomain(self, kw, fs_args) source code
 
_kw_process_fnspecs(self, kw, fs_args) source code
 
_kw_process_target(self, kw, fs_args) source code
 
_kw_process_vfcodeinserts(self, kw, fs_args) source code
 
_kw_process_system(self, kw, fs_args) source code
 
_infostr(self, verbose=1)
Return detailed information about the Generator specification.
source code
 
showEventSpec(self) source code
 
showSpec(self) source code
 
showAuxSpec(self) source code
 
showAuxFnSpec(self, auxfnname=None) source code
 
__repr__(self)
str(x)
source code
 
__str__(self)
str(x)
source code
 
validateSpec(self) source code
 
checkArgs(self, kw) source code
 
_set_for_hybrid_DS(self, state)
Internal method for indicating whether this Generator is currently being used as part of a hybrid dybnamical system calculation
source code
 
_register(self, items)
_register names and types of sub-system variables (including Generator variables), pars and external inputs.
source code
 
_kw_process_events(self, kw) source code
 
_addEvents(self, evs) source code
 
_makeBoundsEvents(self, precise=True, eventtol=1e-06, activatedbounds=None) source code
 
set(self, **kw)
Set generic parameters.
source code
 
setEventICs(self, ics, gt0=0)
Set initialconditions attribute of all generator's events, in case event uses auxiliary functions that access this information.
source code
 
resetEventTimes(self) source code
 
resetEvents(self, state=None)
Reset any high level (Python) events in Generator
source code
 
_auxfn_globalindepvar(self, parsinps, t) source code
 
_auxfn_initcond(self, parsinps, varname) source code
 
_auxfn_heav(self, parsinps, x) source code
 
_auxfn_if(self, parsinps, c, e1, e2) source code
 
_auxfn_getindex(self, parsinps, varname) source code
 
_generate_ixmaps(self, gentypes=None)
Generate indices mapping.
source code
 
contains(self, interval, val, checklevel=2)
Interval containment test
source code
 
__getstate__(self) source code
 
__setstate__(self, state) source code
 
__del__(self) source code
 
__copy__(self) source code
 
__deepcopy__(self, memo=None, _nil=[]) source code

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

Class Variables [hide private]
  _querykeys = ['pars', 'parameters', 'events', 'abseps', 'ics',...
  _needKeys = ['name']
  _optionalKeys = ['globalt0', 'checklevel', 'model', 'abseps', ...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, kw)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

getEvents(self, evnames=None, asGlobalTime=True)

source code 

Produce dictionary of pointsets of all flagged events' independent and dependent variable values, for each event (whether terminal or not). Times will be globalized if optional asGlobalTime argument is True (default behavior). If a single event name is passed, only the pointset is returned (not a dictionary).

evnames may be a singleton string or list of strings, or left blank to return data for all events.

The events are not guaranteed to be ordered by the value of the independent variable.

getEventTimes(self, evnames=None, asGlobalTime=True)

source code 

Produce dictionary of lists of all flagged events' independent variable values, for each event (whether terminal or not). Times will be globalized if optional asGlobalTime argument is True (default behavior). If a single event name is passed, only the pointset is returned (not a dictionary).

evnames may be a singleton string or list of strings, or left blank to return data for all events.

The events are guaranteed to be ordered by the value of the independent variable.

query(self, querykey='')

source code 
Return info about Generator set-up.
Valid query key: 'pars', 'parameters', 'pardomains', 'events',
 'ics', 'initialconditions', 'vars', 'variables',
 'auxvars', 'auxvariables', 'vardomains'
 

haveJacobian(self)

source code 

Default method. Can be overridden by subclasses.

haveJacobian_pars(self)

source code 

Default method. Can be overridden by subclasses.

__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)

_register(self, items)

source code 

_register names and types of sub-system variables (including Generator variables), pars and external inputs.

Names must be unique for the Generator.

_generate_ixmaps(self, gentypes=None)

source code 

Generate indices mapping.

This creates a mapping from the names of variables, pars and inputs, to indices in the arrays used for refering to the internal (dynamic) call methods.


Class Variable Details [hide private]

_querykeys

Value:
['pars',
 'parameters',
 'events',
 'abseps',
 'ics',
 'initialconditions',
 'vars',
 'variables',
...

_optionalKeys

Value:
['globalt0',
 'checklevel',
 'model',
 'abseps',
 'eventPars',
 'FScompatibleNames',
 'FScompatibleNamesInv']