Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Real discrete input values not read correctly from the input file (v2.0.4) #57

Open
daviddecobee opened this issue Aug 13, 2020 · 2 comments · May be fixed by #58
Open

Real discrete input values not read correctly from the input file (v2.0.4) #57

daviddecobee opened this issue Aug 13, 2020 · 2 comments · May be fixed by #58
Labels

Comments

@daviddecobee
Copy link

Using a co-simulation with multiple real value inputs that are discrete I have seen that the first value in the input file is copied to all real inputs. For example a model with real discrete variables A, B, C and an input file that using the compliance checker with an input similar to:

"time","A","B","C"
0,1.0,2.0,3.0

The output file (using -f) will show:

"time","A","B","C"
0,1.0,1.0,1.0

If I use integers or continuous no issue.

I originally raised this here:
ghorwin/FMICodeGenerator#32

But I believe the issue is not with the code generator but seems to be the compliance checker.

@filip-stenstrom
Copy link
Collaborator

Yes this seems to be Checker bug.

It should be enough to change fmi2_input_reader.c:152: indata->interpData[i] = *v1; -> indata->interpData[i] = v1[i]; (and same for FMI 1 corresponding file).

I'll fix this, but also want to add some tests which might take a bit longer. I'll open PR though.

@filip-stenstrom filip-stenstrom linked a pull request Aug 17, 2020 that will close this issue
@beutlich beutlich added the bug label Mar 28, 2021
@Kahldar
Copy link

Kahldar commented Aug 17, 2022

Do you plan a release (with binaries) with that fix ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants