-
Notifications
You must be signed in to change notification settings - Fork 61
Enable the usage of a pre-built model executable when instantiating ModelicaSystem #165
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
base: master
Are you sure you want to change the base?
Conversation
- Fix OMPython usage with overrideparameters - Capture stdout of the model (tested with POSIX only so far)
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. |
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
xmlFileName
of 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.