How to make start_time, stop_time, and step_size user-configurable in PythonFMU? #251
Unanswered
MengnanLi91
asked this question in
Q&A
Replies: 1 comment 5 replies
-
|
Are you saying that Edit: Are you explicitly setting these values from FMPy? If not, it will probably default to FMPY defaults or it may ise the DefaultExperiment from PythonFMU. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
When I run an FMU with
fmpy.simulate_fmu, I can passstart_time,stop_time, andstep_sizeas arguments.However, when I implement my own FMU class with pythonfmu, I’m not sure how to make these values configurable at runtime.
I tried using
setup_experiment(maybe not the right way):But the values don’t seem to take effect.
The only way I can set them successfully is by using default_experiment in construction phase:
This works, but it fixes the values at build time — I can’t change them at runtime when running the FMU, which is inconvenient.
Question:
What’s the correct way in pythonfmu to allow
start_time,stop_time, andstep_sizeset by the user (viafmpy.simulate_fmu) to be applied in my custom FMU class?Beta Was this translation helpful? Give feedback.
All reactions