Uh oh!
There was an error while loading. Please reload this page.
Enable the usage of a pre-built model executable when instantiating ModelicaSystem - #165
Enable the usage of a pre-built model executable when instantiating ModelicaSystem#165joewa wants to merge 0 commit into
Conversation
joewa
commented
Sep 12, 2022
I am happy to provide this PR @arun3688 |
adeas31
commented
Apr 25, 2025
@joewa please rebase this to the latest code. |
syntron
commented
Apr 28, 2025
perhaps wait a moment - currently lots of changes are ongoing ;-) |
syntron
commented
Apr 30, 2025
@joewa please check PR #275 - I will prepare the code in it as single PRs; however, you could check out what to expect: Class ModelicaSystemCmd would handle the execution of commands / calling the model executable. That way, the options (simflags / new: simargs) can be handled dynamically. Thus, any option could be overwritten (override!) as needed. See especially commit 2bd6754 which was created for this usecase. |
syntron
commented
May 1, 2025
adeas31
commented
May 26, 2025
#279 is merged so this can be rebased now. |
joewa
commented
Jun 9, 2025
OK, will do. However it might take a week or two... |
adeas31
commented
Dec 2, 2025
@joewa any update on this? Maybe with the current changes of ModelicaSystem this feature is not necessary anymore. With the current code one can create ModelicaSystem and then build it once, you can modify paramerters and then simulate several times as needed. |
joewa
commented
Dec 3, 2025
Sorry for the delay, @adeas31 I haven't found the time to work on this yet. It is still needed, but you're right that the structure of OMPython has changed significantly. I need to refactor my implementation to accommodate these updates. I plan to have time to work on it between the years. Hope this is OK. Thanks, Jörg |
Related Issues
This pull request was inspired from the discussion in issue #151
Purpose
ModelicaSystem. This will gain some efficiency e.g. when only the parameters or the input data changes between different simulation runs.Approach
ModelicaSystem will not to call buildModel when the
xmlFileNameof the pre-built model is provided.The simulation can be executed with a customized set of output variables and stopTime like this:
The log_str contains the models output from stdout and stderr.
Thanks to @Nobby-n and @arun3688 for contribution and inspiration.