1 | setCommandLineOptions("-d=newInst"); getErrorString(); |
---|
2 | loadModel(Modelica); getErrorString(); |
---|
3 | loadFile("package.mo"); getErrorString(); |
---|
4 | // first simulation with a=5 |
---|
5 | writeFile("Resources/Parameters.txt", "a=5"); getErrorString(); |
---|
6 | simulate(ParametersTest.M); getErrorString(); |
---|
7 | val(config.a); getErrorString(); |
---|
8 | closeSimulationResultFile(); |
---|
9 | deleteFile("ParametersTest.M_res.mat"); getErrorString(); |
---|
10 | writeFile("Resources/Parameters.txt", "a=3"); getErrorString(); |
---|
11 | // resimulate with a=3 |
---|
12 | system("./ParametersTest.M"); getErrorString(); |
---|
13 | // for windows use this: |
---|
14 | // system("ParametersTest.M.exe"); getErrorString(); |
---|
15 | val(config.a); getErrorString(); |
---|
16 | |
---|