| Home | Trees | Indices | Help |
|
|---|
|
|
Model Constructor classes.
Instantiate abstract Model Specifications into concrete simulation code.
Robert Clewley, September 2005.
Overview of steps that ModelConstructor takes:
1. Build Generators for each vector field
* Take flattened spec and select a compatible Generator type and language
* include check that compatibleGen selection actually exists,
and is compatible with specType/domain, and with cts/discrete
time variables)
* presently, each v.f. must have all the same Gen type
* Map things like x^y and x**y power specs -> pow(x,y)
and abs() function -> fabs() in C.
2. Given the specific target lang/Generator with a ModelSpec vector field
* Associate additional events, code inserts, reused vars
* Choose which domains map to domain verification events (certainly none that
are infinite -- although semi-infinite can be checked in one direction)
* All non-infinite domain ends would have an event created for them, but
default is for them to be inactive.
The 'mspec' argument to the GeneratorConstructor class must be a complete
ModelSpec (up to introduction of global references including definitions of
external inputs).
The resulting model output from getModel contains the ModelSpec mspec in
order to use its structure in resolving information about the relationship
between variables.
|
|||
|
Descriptor Abstract class for model and generator descriptors |
|||
|
EvMapping Event mapping class, for use by makeModelInfoEntry and, when instantiated, the Model class. |
|||
|
GDescriptor All-in-one descriptor class for single Generators, and information necessary to be able to build a Model object using a ModelConstructor call -- i.e. |
|||
| GeneratorConstructor | |||
|
MDescriptor All-in-one descriptor class for hybrid model definitions and information necessary to be able to build a Model object using a ModelConstructor call. |
|||
| ModelConstructor | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
API = API_class()
|
|||
Continuous = Continuous Domain
|
|||
Discrete = Discrete Domain
|
|||
Inf = inf
|
|||
LargestInt32 = 2147483647
|
|||
NAMESEP =
|
|||
NaN = nan
|
|||
_all_complex =
|
|||
_all_float =
|
|||
_all_int =
|
|||
_all_numpy_complex =
|
|||
_all_numpy_float =
|
|||
_all_numpy_int =
|
|||
_complex_types =
|
|||
_float_types =
|
|||
_int_types =
|
|||
_num_equivtype =
|
|||
_num_maxmin =
|
|||
_num_name2equivtypes =
|
|||
_num_name2type =
|
|||
_num_type2name =
|
|||
_num_types =
|
|||
_pytypefromtype =
|
|||
_real_types =
|
|||
_seq_types =
|
|||
isfinite = <ufunc 'isfinite'>
|
|||
mathNameMap =
|
|||
null_predicate = null_predicate_class(None)
|
|||
targetLangs =
|
|||
|
|||
Only use this function for building non-hybrid models with single Generators. Otherwise, use the ModelConstructor class. NB The supplied Generator is *copied* into the model unless optional make_copy argument is False. |
Create an entry for the modelInfo attribute of a Model or Generator, already wrapped in a dsInterface object. Specify the list of non-event based reasons which can be generated by global consistency checks. |
Find and process reused terms in abstract specification. To avoid RHS specs depending on auxiliary variables, temp variables will be declared in FuncSpec.py and used in both the RHS and auxiliary variables in the target language specification. |
|
|||
_all_complex
|
_all_float
|
_all_int
|
_all_numpy_complex
|
_all_numpy_float
|
_all_numpy_int
|
_complex_types
|
_num_equivtype
|
_num_maxmin
|
_num_name2equivtypes
|
_num_name2type
|
_num_type2name
|
_num_types
|
_pytypefromtype
|
_real_types
|
_seq_types
|
mathNameMap
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun Dec 2 23:44:17 2012 | http://epydoc.sourceforge.net |