-
Notifications
You must be signed in to change notification settings - Fork 13
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
setSimulationOptions keyword argumente inputs #100
Comments
Oh and apparently there are more settings that can be set, e.g. |
I'd like to set the result file path. This is not an annotation, but is there another way to set it? |
@olivleno you can use the simulate API to specify the result file path for example |
Thanks for the hint. Now I realize that the simulate function exists twice:
What is the rational behind this? I want to load an entire library and simulate one-by-one the contained test cases. The ModelicaSystem seems to be designed to work one model to be simulated. The API seems to allow to load a package once and then simulate models without having to load it first. |
It depends on where you are coming from. If you are used to the OpenModelica Scripting API I would recommend to use the OMJulia.API. It is very similar, but the arguments are Julia types instead of everything is in string like with the
It's a bit more flexible, but you need to know how to use the Scripting API functions. |
If it's more flexible then I'd like to stick with the OMJulia.API. |
@olivleno It depends on which one you want to use if you want to use API, then you have to use the commands directly like
If you are using ModelicaSystem then you can specify result file like this
|
Thanks for the hint to simflags -r.
which results in
|
This code sample doesn't work. |
It should be:
or
But the resultfile name is now: |
That is what you specified with julia> OMJulia.API.simulate(omc, "BouncingBall", outputFormat="csv")
Dict{String, Any} with 10 entries:
"timeCompile" => 0.308608
"simulationOptions" => "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-6, method = '', fileName…
"messages" => "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.\n…
"timeFrontend" => 0.00238572
"timeTotal" => 0.337119
"timeTemplates" => 0.0104497
"timeSimulation" => 0.00682997
"resultFile" => "/path/to/BouncingBall_res.csv"
⋮ => ⋮ I hope this is the same on Windows. |
Sure. I was seeking for a simple way to setup a batch script to run simulations creating result files named
|
The input
name
orsetSimulationOptions
is difficult to use and error prone.There are only four simulation options one can set.
Make them keyword arguments of
setSimulationOptions
:and give them default values (e.g.
nothing
).The text was updated successfully, but these errors were encountered: