Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Proper way to use simFlags

Proper way to use simFlags

Hi everyone!

I am having some trouble using simFlags, how do I have to separate the variables within simFlags?

Code:

simulate(model,outputFormat=mat

,method="dassl",fixedStepSize=False
,stopTime=10
,tolerance=0.00001
,startTime=0
,numberOfIntervals=1000
[b],simflags="-override vf1=" + String(0.5)+ ", pm1="+ String(0.01))[/b]

I am getting this output, that I think is caused because of the simFlags

Code:

record SimulationResult

    resultFile = "C:/Users/fragom/AppData/Local/Temp/OpenModelica/model_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 1000, tolerance = 0.00001, method = 'dassl', fileNamePrefix = 'SmarTSLab.Models.smibwbuses', options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = '-override vf1=0.5, pm1=0.01'",
    messages = "stdout            | warning | [b]invalid command line option: pm1=0.01[/b]
stdout            | info    | usage: C:/Users/fragom/AppData/Local/Temp/OpenModelica/model.exe

Greetings!

Re: Proper way to use simFlags

No space. That adds a new argument.
-override=var1=val1,var2=val2 or -override var1=val1,var2=val2

Re: Proper way to use simFlags

I see...

Thank you so much!

And regarding simflags again, if I want to use the option -overrideFile=, I was trying to use a .txt file for that with the variables written like this:

Code:

vf1=0.5

pm1=0.01

Is it the correct way? Because I was facing the same issue as before

Code:

| warning | invalid command line option: bla bla bla...

There are 0 guests and 0 other users also viewing this topic