Initialization of a model.
[eventInfo, initializedInstance] = fmiInitialize(instance, toleranceControlled, relativeTolerance)
tlist, an instance of a model.
boolean, if %t then the model is called with a numerical integration scheme where the step size is controlled by using relativeTolerance.
real, relative tolerance for error estimation.
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 %t when iterationConverged = true, then the meaning of the states has changed. The valueReferences of the new states can be inquired
with fmiGetStateValueReferences and the nominal values of the new states can be inquired
with fmiGetNominalContinuousStates.eventInfo.stateValuesChanged : boolean, is only meaningful when returns from fmiEventUpdate if not it is %t.
If %t when iterationConverged = 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 until time = nextEventTime,
and shall call fmiEventUpdate at this time instant. If integration is stopped before
nextEventTime, e.g., due to a state event, the definition of nextEventTime becomes obsolete.eventInfo.nextEventTime : real, a time for a next event.tlist, a new instance of a model that have been initialized.
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.