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 intoOpenModelica:masterfrom
Conversation
|
I am happy to provide this PR @arun3688 |
|
@joewa please rebase this to the latest code. |
|
perhaps wait a moment - currently lots of changes are ongoing ;-) |
|
@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. |
|
#279 is merged so this can be rebased now. |
|
OK, will do. However it might take a week or two... |
|
@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. |
|
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.