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

CSV file Result with docker container

CSV file Result with docker container

Hi
sorry if my question is simple cause I'm a beginner at openmodelica.


I am using docker container and install openmodelica on it, so with this command, I execute my sample:

Code:

docker run --rm -v c/Users/*/OpenModelicaTests:/home/openmodelicausers jupytertest1 omc run.mos 

but my question is that:
how could I get the result with CSV file? codes work very well but I need a CSV file for the result.

p.s: I thought have to edit the mos file before running it and add some command line into it, but I don't know how?

mos file:

Code:


loadModel(Modelica);
getErrorString();

loadFile("types.mo");
getErrorString();

loadFile("next.mo");
getErrorString();

loadFile("system.mo");
getErrorString();

simulate(System, stopTime=20);
getErrorString();

plot({x}, externalWindow=true);
getErrorString();

Re: CSV file Result with docker container

You can use the outputFormat argument to simulate:

Code:


simulate(System, stopTime=20, outputFormat="csv");

There are 0 guests and 0 other users also viewing this topic
You are here: