You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sim.jl
+20-15
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ You can force a specific simulation mode by calling [`simulateCS`](@ref), [`simu
30
30
# Keyword arguments
31
31
- `recordValues::fmi2ValueReferenceFormat` = nothing: Array of variables (Strings or variableIdentifiers) to record. Results are returned as `DiffEqCallbacks.SavedValues`
32
32
- `saveat = nothing`: Time points to save (interpolated) values at (default = nothing: save at each solver timestep)
33
-
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
34
-
- `reset::Bool`: call fmi2Reset before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
35
-
- `instantiate::Bool`: call fmi2Instantiate! before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
36
-
- `freeInstance::Bool`: call fmi2FreeInstance after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
37
-
- `terminate::Bool`: call fmi2Terminate after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
33
+
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
34
+
- `reset::Bool`: call fmi2Reset before each the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
35
+
- `instantiate::Bool`: call fmi2Instantiate! simulate on a new created instance (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
36
+
- `freeInstance::Bool`: call fmi2FreeInstance at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
37
+
- `terminate::Bool`: call fmi2Terminate at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
38
38
- `inputValueReferences::fmi2ValueReferenceFormat = nothing`: Input variables (Strings or variableIdentifiers) to set at each simulation step
39
39
- `inputFunction = nothing`: Function to get values for the input variables at each simulation step.
40
40
- `parameters::Union{Dict{<:Any, <:Any}, Nothing} = nothing`: Dict of parameter variables (strings or variableIdentifiers) and values (Real, Integer, Boolean, String) to set parameters during initialization
@@ -111,11 +111,11 @@ State- and Time-Events are handled correctly.
111
111
- `recordEigenvalues::Bool=false`: compute and record eigenvalues
112
112
- `saveat = nothing`: Time points to save (interpolated) values at (default = nothing: save at each solver timestep)
113
113
- `x0::Union{AbstractArray{<:Real}, Nothing} = nothing`: initial fmu State (default = nothing: use current or default-initial fmu state)
114
-
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
115
-
- `reset::Bool`: call fmi2Reset before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
116
-
- `instantiate::Bool`: call fmi2Instantiate! before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
117
-
- `freeInstance::Bool`: call fmi2FreeInstance after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
118
-
- `terminate::Bool`: call fmi2Terminate after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
114
+
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
115
+
- `reset::Bool`: call fmi2Reset before each the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
116
+
- `instantiate::Bool`: call fmi2Instantiate! simulate on a new created instance (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
117
+
- `freeInstance::Bool`: call fmi2FreeInstance at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
118
+
- `terminate::Bool`: call fmi2Terminate at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
119
119
- `inputValueReferences::fmi2ValueReferenceFormat = nothing`: Input variables (Strings or variableIdentifiers) to set at each simulation step
120
120
- `inputFunction = nothing`: Function to get values for the input variables at each simulation step.
121
121
- `parameters::Union{Dict{<:Any, <:Any}, Nothing} = nothing`: Dict of parameter variables (strings or variableIdentifiers) and values (Real, Integer, Boolean, String) to set parameters during initialization
@@ -206,6 +206,11 @@ function simulateME(
206
206
t_stop = t_stop,
207
207
x0 = x0,
208
208
inputs = inputs,
209
+
instantiate = instantiate,
210
+
freeInstance = freeInstance,
211
+
terminate= terminate,
212
+
reset = reset,
213
+
setup = setup,
209
214
)
210
215
211
216
# Zero state FMU: add dummy state
@@ -309,11 +314,11 @@ State- and Time-Events are handled internally by the FMU.
309
314
- `tolerance::Union{Real, Nothing} = nothing`: The tolerance for the internal FMU solver.
310
315
- `recordValues::fmi2ValueReferenceFormat` = nothing: Array of variables (Strings or variableIdentifiers) to record. Results are returned as `DiffEqCallbacks.SavedValues`
311
316
- `saveat = nothing`: Time points to save (interpolated) values at (default = nothing: save at each solver timestep)
312
-
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
313
-
- `reset::Bool`: call fmi2Reset before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
314
-
- `instantiate::Bool`: call fmi2Instantiate! before each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
315
-
- `freeInstance::Bool`: call fmi2FreeInstance after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
316
-
- `terminate::Bool`: call fmi2Terminate after each step (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
317
+
- `setup::Bool`: call fmi2SetupExperiment, fmi2EnterInitializationMode and fmi2ExitInitializationMode before the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
318
+
- `reset::Bool`: call fmi2Reset before each the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
319
+
- `instantiate::Bool`: call fmi2Instantiate! simulate on a new created instance (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
320
+
- `freeInstance::Bool`: call fmi2FreeInstance at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
321
+
- `terminate::Bool`: call fmi2Terminate at the end of the simulation (default = nothing: use value from `fmu`'s `FMUExecutionConfiguration`)
317
322
- `inputValueReferences::fmi2ValueReferenceFormat = nothing`: Input variables (Strings or variableIdentifiers) to set at each simulation step
318
323
- `inputFunction = nothing`: Function to get values for the input variables at each simulation step.
319
324
- `parameters::Union{Dict{<:Any, <:Any}, Nothing} = nothing`: Dict of parameter variables (strings or variableIdentifiers) and values (Real, Integer, Boolean, String) to set parameters during initialization
0 commit comments