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

permanent script simulation without recompiling

permanent script simulation without recompiling

dear all,

As part of my bachelor thesis I deal with the weather-dependent energy yield of photovoltaic systems.
The system I'm working with is a raspberry Pi 3 with Codesys installed.
Right now, Codesys calls the scrpit.mos file and reads back the resulting csv file after finishing the script:

script.mos

Code:


cd("/home/pi/Desktop/A");
loadFile("/home/pi/Desktop/A/package.mo");
setParameterValue(A.B.C,SOC,y);
simulate(A.B.C, startTime=35939, stopTime=208739, numberOfIntervals=1440, outputFormat="csv", variableFilter="a.x|a.y|a.z");

called by sudo omc /home/pi/Desktop/OMC_Scripting/script.mos

My requirement would be to cd and loadFile just once right after starting up and to setParameter and simulate in a loop.
The first idea was to split the lines in two script files and to execute the .mos file with the first two lines once.
After the execution of the first file, line 3 and 4 in the second .mos file could be changed and executed by Codesys in a 2 minute loop, with reading the resulting .csv file after execution.
My problem right now is, that this procedure would create two omshell instances that do not know eachother.
Is there any way to solve this matter?

thanks in advance,
Simon

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