Alternative simulatiom method: Independent translation from simulation #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The translation time of relatively large models can be significant. If lots of cases of such large models are simulated it makes sense to translate the model only once and simulate it with varied parameters (if the model allows to vary parameters after translation).
For this purpose I have added two methods:
translate()
simulate_translated()
which can be executed consecutively. Each method executes Dymola once. An example (
runSimulationTranslated.py
) is also added showing how to benefit from this alternative method.Basically the workflow looks as follows:
Some notes on fixes:
src
folder the same has been added.Simulator
object in my project the same needed to inherit fromobject
. http://stackoverflow.com/questions/4015417/python-class-inherits-objectFeel free to comment on my request!