fmiInitialize
Initialization of a model.
Calling Sequence
[eventInfo, initializedInstance] = fmiInitialize(instance, toleranceControlled, relativeTolerance)
Arguments
- instance
tlist, an instance of a model.
- toleranceControlled
boolean, if
%tthen the model is called with a numerical integration scheme where the step size is controlled by usingrelativeTolerance.- relativeTolerance
real, relative tolerance for error estimation.
- eventInfo
mlist, occured events.
eventInfo.iterationConverged: boolean, is only meaningful when returns from fmiEventUpdate if not, it is%t.eventInfo.stateValueReferencesChanged: boolean, is only meaningful when returns from fmiEventUpdate if not, it is%t. If%twheniterationConverged = true, then the meaning of the states has changed. The valueReferences of the new states can be inquired with fmiGetStateValueRefs and the nominal values of the new states can be inquired with fmiGetNominalContStates.eventInfo.stateValuesChanged: boolean, is only meaningful when returns from fmiEventUpdate if not it is%t. If%twheniterationConverged = true, then at least one element of the continuous state vector has changed it's value, e.g., since at initial time, or due to an impulse. The new values of the states must be inquired with function fmiGetContinuousStates.eventInfo.terminateSimulation: boolean, if%t, the simulation should be terminated (successfully). It is assumed that an appropriate message is printed by the FMU to explain the reason for the termination.eventInfo.upcomingTimeEvent: boolean, if%t, then the simulation shall integrate at most untiltime = nextEventTime, and shall call fmiEventUpdate at this time instant. If integration is stopped beforenextEventTime, e.g., due to a state event, the definition ofnextEventTimebecomes obsolete.eventInfo.nextEventTime: real, a time for a next event.
- initializedInstance
tlist, a new instance of a model that have been initialized.
Description
fmiInitialize is the function which initializes the model, i.e., computes initial values for all variables.
Before calling this function, fmiSetTime must be called, and all variables with start values or
with causality = input can be set with the fmiSetXXX functions (the Scalar Variable attributes are defined in the Model Description File (XML),
see fmiModelDescription and fmiModelVariables).
Setting other variables is not allowed (with exception of causality = none).
Currently, this function can only be called once for one instance. Note, even if it can only be called once, an event can be triggered
and then event iteration via fmiEventUpdate is possible at the initial time.
See Also
- fmiInstantiateModel — Creation an instance of a model.
- importFMU — Decompressing the model and parsing of XML description file.
- fmiGetStateValueRefs — Get the value references of the state vector.
- Official site of the Functional Mockup Interfaces.
| Report an issue | ||
| << fmiGetVersion | Functional Mock-up Interface (FMU) | fmiInitializeSlave >> |