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

help on .mos file creation

help on .mos file creation

Dears,

Is it possible to create .mos file using OpenModelica?
If yes, how can I do that from within OpenModelica?

if not, can anyone tell me how to create .mos file for the following modelica package structure:

myMainPackage
    - InterfacePackage
    - ConnectorsPackage
    - ComponentsPackage
    myExperiment


I would like to run myExperiment using .mos file.  I would like to note that, this model (experiment) reads time series file (series.txt) which is located in the same folder as the main package myMainPackage.mo

I had tried the following but I couldn't find it working:

Code:


// -start script
cd();  // display the current directory
loadFile("C:\\MOD\\myMainPackage.mo"); getErrorString();
simulate(myExperiment, startTime = 0, stopTime = 1, numberOfIntervals = 500, tolerance = 0.0001, method = "dassl", outputFormat = "csv"); getErrorString();
// -end script

I admint that I do not know where to place the time series file (series.txt)


Can anyone help me

Edited by: Allen - May-01-17 14:22:37
There are 0 guests and 0 other users also viewing this topic
You are here: