@@ -43,6 +43,9 @@ case SIMCODE(__) then
4343end simulationHeaderFile;
4444
4545
46+
47+
48+
4649template simulationMainRunScrip(SimCode simCode)
4750 "Generates code for header file for simulation target."
4851::=
@@ -61,9 +64,18 @@ match platform
6164case "linux64"
6265case "linux32" then
6366match simCode
64- case SIMCODE(modelInfo=MODELINFO(__),makefileParams=MAKEFILE_PARAMS(__)) then
67+ case SIMCODE(modelInfo=MODELINFO(__),makefileParams=MAKEFILE_PARAMS(__),simulationSettingsOpt = SOME(settings as SIMULATION_SETTINGS(__))) then
68+ let start = settings.startTime
69+ let end = settings.stopTime
70+ let stepsize = settings.stepSize
71+ let intervals = settings.numberOfIntervals
72+ let tol = settings.tolerance
73+ let solver = settings.method
74+ let moLib = makefileParams.compileDir
75+ let home = makefileParams.omhome
6576<<
66-
77+ > #!/bin/sh
78+ > exec OMCpp<%fileNamePrefix%> -s <%start%> -e <%end%> -f <%stepsize%> -v <%intervals%> -y <%tol%> -i <%solver%> -r <%simulationLibDir(simulationCodeTarget(),simCode)%> -m <%moLib%> -R <%simulationResults(getRunningTestsuite(),simCode)%> $*
6779>>
6880end match
6981case "win32"
@@ -303,35 +315,7 @@ end simulationMainDLLib2;
303315
304316
305317
306- template simulationRunScript(SimCode simCode)
307- ::=
308- match simCode
309- case SIMCODE(makefileParams=MAKEFILE_PARAMS(__)) then
310- <<
311- <%simulationRunScript2(makefileParams.platform,simCode)%>
312- >>
313- end simulationRunScript;
314318
315- template simulationRunScript2(String platform,SimCode simCode)
316- "Generates the contents of the makefile for the simulation case."
317- ::=
318- match platform
319- case "win32" then
320- match simCode
321- case SIMCODE(makefileParams=MAKEFILE_PARAMS(__)) then
322- <<
323- "Test1"
324- >>
325- end match
326- case "linux" then
327- match simCode
328- case SIMCODE(makefileParams=MAKEFILE_PARAMS(__)) then
329- <<
330- "Test2"
331- >>
332- end match
333- end match
334- end simulationRunScript2;
335319
336320
337321
0 commit comments