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: stopTime ignored in versions >v0.0.22 #385

Open
jp-andre opened this issue Jul 25, 2023 · 1 comment
Open

fmusim: stopTime ignored in versions >v0.0.22 #385

jp-andre opened this issue Jul 25, 2023 · 1 comment
Labels
question Further information is requested

Comments

@jp-andre
Copy link

Hi,

In PR #353 fmusim starts ignoring the stop time defined either in CLI arguments or in the DefaultExperiment.

Here are some logs with the latest version:

fmi2Instantiate(instanceName="instance1", fmuType=1, fmuGUID="{BD403596-3166-4232-ABC2-132BDF73E644}", fmuResourceLocation="file:///tmp/fmusim.5M09Db/resources/", functions={logger=0x0x557f9677e534, allocateMemory=0x0x7eff94db2530, freeMemory=0x0x7eff94db1c40, stepFinished=0x(nil), componentEnvironment=0x0x557f96d41b90}, visible=0, loggingOn=0) -> OK
fmi2SetupExperiment(toleranceDefined=0, tolerance=0, startTime=0, stopTimeDefined=0, stopTime=0) -> OK

And in v22:

fmi2Instantiate(instanceName="instance1", fmuType=1, fmuGUID="{BD403596-3166-4232-ABC2-132BDF73E644}", fmuResourceLocation="file:///tmp/fmusim.L1j26L/resources/", functions={logger=0x0x555f6acbe42a, allocateMemory=0x0x7fbe2388c530, freeMemory=0x0x555f6acba730, stepFinished=0x(nil), componentEnvironment=0x0x555f6c1b8370}, visible=0, loggingOn=0) -> OK
fmi2SetupExperiment(toleranceDefined=0, tolerance=0, startTime=0, stopTimeDefined=1, stopTime=10) -> OK

This was extracted by running the Stairs FMU.

What is the rationale for ignoring the defined stop time?
Is this is a bug in fmusim?
Should all FMUs work the same without prior knowledge of the stop time? (this would indicate a potential bug on our end)

@jp-andre jp-andre changed the title stopTime ignored in versions >v0.0.22 fmusim: stopTime ignored in versions >v0.0.22 Jul 25, 2023
@t-sommer
Copy link
Collaborator

t-sommer commented Sep 9, 2023

Not passing the stop time to the FMU allows the importer to continue a simulation using a recorded FMU state. The stop time will still be used to end the simulation loop. Does your FMU need to know the stop time in advance?

@t-sommer t-sommer added the question Further information is requested label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants