#include <Model.hpp>
Public Member Functions | |
| ECELL_API void | initialize () |
| Initialize the whole model. | |
| void | step () |
| Conduct a step of the simulation. | |
| const StepperEvent & | getTopEvent () const |
| Get the next event to occur on the scheduler. | |
| const Real | getCurrentTime () const |
| Returns the current time. | |
| const StepperPtr | getLastStepper () const |
| ECELL_API PolymorphMap | getClassInfo (StringCref aClassType, StringCref aClassname, Integer forceReload) |
| Creates a new Entity object and register it in an appropriate System in the Model. | |
| ECELL_API void | createEntity (StringCref aClassname, FullIDCref aFullID) |
| Creates a new Entity object and register it in an appropriate System in the Model. | |
| ECELL_API EntityPtr | getEntity (FullIDCref aFullID) const |
| This method finds an Entity object pointed by the FullID. | |
| ECELL_API SystemPtr | getSystem (SystemPathCref aSystemPath) const |
| This method finds a System object pointed by the SystemPath. | |
| ECELL_API void | createStepper (StringCref aClassname, StringCref anID) |
| Create a stepper with an ID and a classname. | |
| ECELL_API StepperPtr | getStepper (StringCref anID) const |
| Get a stepper by an ID. | |
| StepperMapCref | getStepperMap () const |
| Get the StepperMap of this Model. | |
| ECELL_API void | flushLoggers () |
| Flush the data in all Loggers immediately. | |
| SystemPtr | getRootSystem () const |
| Get the RootSystem. | |
| SystemStepperPtr | getSystemStepper () const |
| LoggerBrokerRef | getLoggerBroker () const |
| Get the LoggerBroker. | |
| StepperEventScheduler & | getScheduler () |
| StepperMakerRef | getStepperMaker () |
| ProcessMakerRef | getProcessMaker () |
| VariableMakerRef | getVariableMaker () |
| SystemMakerRef | getSystemMaker () |
Protected Types | |
|
typedef EventScheduler < StepperEvent > | StepperEventScheduler |
|
typedef StepperEventScheduler::EventIndex | EventIndex |
Model has a list of Steppers and a pointer to the root system.
| ECELL_API void libecs::Model::initialize | ( | ) |
Initialize the whole model.
This method must be called before running the model, and when structure of the model is changed.
Procedure of the initialization is as follows:
1. Initialize Systems recursively starting from theRootSystem. ( System::initialize() ) 2. Check if all the Systems have a Stepper each. 3. Initialize Steppers. ( Stepper::initialize() ) 4. Construct Stepper interdependency graph ( Stepper::updateDependentStepperVector() )
| InitializationFailed |
| void libecs::Model::step | ( | ) | [inline] |
Conduct a step of the simulation.
References libecs::EventScheduler< Event_ >::getTopEvent(), and libecs::EventScheduler< Event_ >::step().
| const Real libecs::Model::getCurrentTime | ( | ) | const [inline] |
Returns the current time.
| ECELL_API PolymorphMap libecs::Model::getClassInfo | ( | StringCref | aClassType, | |
| StringCref | aClassname, | |||
| Integer | forceReload | |||
| ) |
Creates a new Entity object and register it in an appropriate System in the Model.
| aClassname | ||
| aClassType |
| ECELL_API void libecs::Model::createEntity | ( | StringCref | aClassname, | |
| FullIDCref | aFullID | |||
| ) |
Creates a new Entity object and register it in an appropriate System in the Model.
| aClassname | ||
| aFullID | ||
| aName |
| ECELL_API EntityPtr libecs::Model::getEntity | ( | FullIDCref | aFullID | ) | const |
| ECELL_API SystemPtr libecs::Model::getSystem | ( | SystemPathCref | aSystemPath | ) | const |
This method finds a System object pointed by the SystemPath.
| aSystemPath | a SystemPath of the requested System. |
| ECELL_API void libecs::Model::createStepper | ( | StringCref | aClassname, | |
| StringCref | anID | |||
| ) |
Create a stepper with an ID and a classname.
| aClassname | a classname of the Stepper to create. | |
| anID | a Stepper ID string of the Stepper to create. |
| ECELL_API StepperPtr libecs::Model::getStepper | ( | StringCref | anID | ) | const |
Get a stepper by an ID.
| anID | a Stepper ID string of the Stepper to get. |
| StepperMapCref libecs::Model::getStepperMap | ( | ) | const [inline] |
| ECELL_API void libecs::Model::flushLoggers | ( | ) |
Flush the data in all Loggers immediately.
Usually Loggers record data with logging intervals. This method orders every Logger to write the data immediately ignoring the logging interval.
| SystemPtr libecs::Model::getRootSystem | ( | ) | const [inline] |
Get the RootSystem.
| LoggerBrokerRef libecs::Model::getLoggerBroker | ( | ) | const [inline] |
| StepperMakerRef libecs::Model::getStepperMaker | ( | ) | [inline] |
For internal use only.
| ProcessMakerRef libecs::Model::getProcessMaker | ( | ) | [inline] |
For internal use only.
| VariableMakerRef libecs::Model::getVariableMaker | ( | ) | [inline] |
For internal use only.
| SystemMakerRef libecs::Model::getSystemMaker | ( | ) | [inline] |
For internal use only.
1.5.5