Types in FMI Import/Core .jl
FMIBase.FMU — TypeFMUThe abstract type for FMUs (FMI 2 & 3).
FMIBase.FMUInstance — TypeFMUInstanceAn instance of a FMU. This was called component in FMI2, but was corrected to instance in FMI3.
FMIBase.FMUSolution — TypeThe mutable struct representing a specific Solution of a FMI2 FMU.
FMIBase.FMUEvent — TypeContainer for event related information.
FMIBase.FMUSnapshot — TypeToDo
FMIBase.FMUExecutionConfiguration — TypeA mutable struct representing the excution configuration of a FMU. For FMUs that have issues with calls like fmi2Reset or fmi2FreeInstance, this is pretty useful.
Fields
terminate::Bool: Callfmi2Terminatebefore every training step/simulation.reset::Bool: Callfmi2Resetbefore every training step/simulation.setup::Bool: Call setup functions before every training step/simulation.instantiate::Bool: Callfmi2Instantiatebefore every training step/simulation.freeInstance::Bool: Callfmi2FreeInstanceafter every training step/simulation.loggingOn::Bool: Enable or disable logging.externalCallbacks::Bool: Use external callbacks.force::Bool: Default value for forced actions.handleStateEvents::Bool: Handle state events during simulation/training.handleTimeEvents::Bool: Handle time events during simulation/training.assertOnError::Bool: Whether an exception is thrown if afmi2XXXcommand fails (>=fmi2StatusError).assertOnWarning::Bool: Whether an exception is thrown if afmi2XXXcommand warns (>=fmi2StatusWarning).autoTimeShift::Bool: Whether to shift all time-related functions for simulation intervals not starting at 0.0.inplace_eval::Bool: Whether FMU/Component evaluation should happen in place.sensealg::Any: Algorithm for sensitivity estimation over solve call ([ToDo] Datatype/Nothing).rootSearchInterpolationPoints::UInt: Number of root search interpolation points.useVectorCallbacks::Bool: Whether to use vector (faster) or scalar (slower) callbacks.maxNewDiscreteStateCalls::UInt: Max calls forfmi2NewDiscreteStatesbefore throwing an exception.maxStateEventsPerSecond::UInt: Max state events allowed to occur per second (more is interpreted as event chattering).snapshotDeltaTimeTolerance::Float64: Distance to distinguish between snapshots.eval_t_gradients::Bool: If time gradients ∂ẋ/∂t and ∂y/∂t should be sampled (not part of the FMI standard).JVPBuiltInDerivatives::Bool: Use built-in directional derivatives for JVP-sensitivities over FMU without caching the Jacobian (because this is done in the FMU, but not per default).VJPBuiltInDerivatives::Bool: Use built-in adjoint derivatives for VJP-sensitivities over FMU without caching the Jacobian (because this is done in the FMU, but not per default).sensitivity_strategy::Symbol: Build-up strategy for Jacobians/gradients, available options are:FMIDirectionalDerivative,:FMIAdjointDerivative,:FiniteDiff.set_p_every_step::Bool: Whether parameters are set for every simulation step - this is uncommon, because parameters are often set just one time: during/after initialization.concat_eval::Bool: (Deprecated) Whether FMU/Component evaluation should return a tuple(y, dx, ec)or a concatenation[y..., dx..., ec...].
FMIBase.FMULogLevel — TypeLog levels for non-standard printing of infos, warnings and errors.
FMIBase.FMUInputFunction — TypeFMUInputFunction(inputFunction, vrs)Struct container for inplace input functions for FMUs.
Arguments
inputFunction: The input function (inplace) that gets called when new inputs are needed, must match one of the patterns described under Input function patterns.vrs::AbstractVector: A vector of value refernces to be set by the input function
Input function patterns
Available input patterns are [c: current component, u: current state ,t: current time, returning array of values to be passed to fmi2SetReal(..., inputValueReferences, inputFunction(...)) or fmi3SetFloat64]:
inputFunction(t::Real, u::AbstractVector{<:Real})inputFunction(c::Union{FMUInstance, Nothing}, t::Real, u::AbstractVector{<:Real})inputFunction(c::Union{FMUInstance, Nothing}, x::AbstractVector{<:Real}, u::AbstractVector{<:Real})inputFunction(x::AbstractVector{<:Real}, t::Real, u::AbstractVector{<:Real})inputFunction(c::Union{FMUInstance, Nothing}, x::AbstractVector{<:Real}, t::Real, u::AbstractVector{<:Real})