Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fmusim] Feedthrough outputs are calculated one step too late #480

Closed
PTaeuberDS opened this issue Mar 28, 2024 · 1 comment · Fixed by #481 or #603
Closed

[fmusim] Feedthrough outputs are calculated one step too late #480

PTaeuberDS opened this issue Mar 28, 2024 · 1 comment · Fixed by #481 or #603
Labels
bug Something isn't working

Comments

@PTaeuberDS
Copy link
Collaborator

According to the Feedthrough_in.csv file inputs shall be applied at t=1.0.
Therefore, using Co-Simulation mode, I expect the FMU outputs to change accordingly one step later.
However, the outputs only change two steps later:

"time" "Float32_continuous_output" "Float32_discrete_output" "Float64_continuous_output" "Float64_discrete_output" "Int8_output" "UInt8_output" "Int16_output" "UInt16_output" "Int32_output" "UInt32_output" "Int64_output" "UInt64_output" "Boolean_output" "Enumeration_output"
1 0 0 0 0 -128 0 -32768 0 -2147483648 0 -9223372036854775808 0 0 1
1.004 0 0 0 0 -128 0 -32768 0 -2147483648 0 -9223372036854775808 0 0 1
1.008 0 0 0 0 127 255 32767 65535 2147483647 4294967295 9223372036854775807 18446744073709551615 0 1

I ran the following fmusim command:

fmusim.exe --interface-type cs --output-file Feedthrough.csv --input-file Feedthrough_in.csv --output-variable Float32_continuous_output --output-variable Float32_discrete_output --output-variable Float64_continuous_output --output-variable Float64_discrete_output --output-variable Int8_output --output-variable UInt8_output --output-variable Int16_output --output-variable UInt16_output --output-variable Int32_output --output-variable UInt32_output --output-variable Int64_output --output-variable UInt64_output --output-variable Boolean_output --output-variable Enumeration_output Feedthrough.fmu
@PTaeuberDS
Copy link
Collaborator Author

The issue still seems to exist for FMI 2.0.

@PTaeuberDS PTaeuberDS reopened this Oct 2, 2024
t-sommer added a commit to t-sommer/Reference-FMUs that referenced this issue Oct 7, 2024
t-sommer added a commit to t-sommer/Reference-FMUs that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants