Opened 8 years ago
Closed 8 years ago
#4192 closed defect (fixed)
Cannot set discrete inputs for Co-Simulation FMU
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | 1.12.0 |
Component: | FMI | Version: | v1.12.0 |
Keywords: | Cc: |
Description
When building CS FMU version 2, I cannot set Integer and Boolean inputs between steps. FMU Checker cannot pass input csv to the model too.
How to reproduce
- Set up the following FMU generation parameters
- Version: 2.0
- Type: Co-Simulation
- Build the following test model to FMU:
model DiscreteInput input Integer int; end DiscreteInput;
- Pass the following input to this FMU using FMU Checker ver. 2.0.3
"time","int" 0.0,0 0.1,1 0.2,2
fmuCheck.linux64 -l 6 -i input.csv DiscreteInput.fmu
What is expected
The FMU passes validation.
What really happens
An error occurres when setting Integer inputs:
[FMU][logStatusError][FMU status:Error] fmi2SetInteger: Illegal call sequence. fmi2SetInteger is not allowed in Continuous-Time Mode state.
See the log attached for details.
Attachments (1)
Change History (11)
by , 8 years ago
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Lennart, can you have a look at this?
comment:2 by , 8 years ago
Status: | assigned → accepted |
---|
comment:3 by , 8 years ago
Does that mean fmi2SetInteger
is allowed to be called in continuous-time mode?
comment:4 by , 8 years ago
Yes, in between fmi2DoStep. See:
https://svn.modelica.org/fmi/branches/public/specifications/v2.0/FMI_for_ModelExchange_and_CoSimulation_v2.0.pdf
Figure 11, for inputs and tunable parameters.
comment:5 by , 8 years ago
I've just pushed a workaround. Please verify (e.g. using tomorrows nightly build) if it actually helps.
comment:6 by , 8 years ago
I will check it slightly later, but as far as I remember, it was failing not only for Integer
s, but also for Boolean
s and String
s
comment:7 by , 8 years ago
I checked. It works now for Integers but it fails for Booleans and Strings.
comment:8 by , 8 years ago
We can do the same workaround for those types as well until we have a proper implementation of the call sequence logics for CS and ME.
comment:10 by , 8 years ago
Milestone: | Future → 1.12.0 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
It should work now: OMCompiler#1674
Error log