Skip to content

Commit

Permalink
Adapted state machine tests for default clock
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhard-thiele committed May 11, 2016
1 parent ef47d95 commit b86e6f7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 47 deletions.
10 changes: 3 additions & 7 deletions simulation/modelica/statemachines/ConferenceTut1.mos
Expand Up @@ -4,17 +4,13 @@
//

loadFile("ConferenceTut1.mo");
echo(false);
simulate(ConferenceTut1, startTime=0, stopTime=30, numberOfIntervals = 0); getErrorString();
echo(true);
val(i,30.0);

// Result:
// true
// record SimulationResult
// resultFile = "ConferenceTut1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ConferenceTut1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// true
// 5
// endResult
9 changes: 3 additions & 6 deletions simulation/modelica/statemachines/DeadEnd.mos
Expand Up @@ -4,18 +4,15 @@
//

loadFile("DeadEnd.mo");
echo(false);
simulate(DeadEnd, startTime=0, stopTime=2, numberOfIntervals=0); getErrorString();
echo(true);
val(state1.active,2);
val(state2.active,2);

// Result:
// true
// record SimulationResult
// resultFile = "DeadEnd_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 2.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'DeadEnd', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// ""
// true
// 0.0
// 1.0
// endResult
10 changes: 3 additions & 7 deletions simulation/modelica/statemachines/MLS33_17_3_7NA.mos
Expand Up @@ -4,17 +4,13 @@
//

loadFile("MLS33_17_3_7NA.mo");
echo(false);
simulate(MLS33_17_3_7NA, startTime=0, stopTime=30, numberOfIntervals=0); getErrorString();
echo(true);
val(v,30.0);

// Result:
// true
// record SimulationResult
// resultFile = "MLS33_17_3_7NA_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'MLS33_17_3_7NA', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// true
// 18.0
// endResult
10 changes: 3 additions & 7 deletions simulation/modelica/statemachines/Maraninchi2003_2.mos
Expand Up @@ -4,20 +4,16 @@
//

loadFile("Maraninchi2003_2.mo");
echo(false);
simulate(Maraninchi2003_2, startTime=0, stopTime=20, numberOfIntervals=0); getErrorString();
echo(true);
val(x,20.0);
val(y,20.0);
val(z,20.0);

// Result:
// true
// record SimulationResult
// resultFile = "Maraninchi2003_2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 20.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Maraninchi2003_2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// true
// 21
// 1
// 101
Expand Down
9 changes: 3 additions & 6 deletions simulation/modelica/statemachines/SMMin.mos
Expand Up @@ -4,18 +4,15 @@
//

loadFile("SMMin.mo");
echo(false);
simulate(SMMin, startTime=0, stopTime=4, numberOfIntervals=0); getErrorString();
echo(true);
val(state1.active,4);
val(state2.active,4);

// Result:
// true
// record SimulationResult
// resultFile = "SMMin_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 4.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'SMMin', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// ""
// true
// 1.0
// 0.0
// endResult
10 changes: 3 additions & 7 deletions simulation/modelica/statemachines/TicksInState.mos
Expand Up @@ -4,17 +4,13 @@
//

loadFile("TicksInState.mo");
echo(false);
simulate(TicksInState, startTime=0, stopTime=30, numberOfIntervals=0); getErrorString();
echo(true);
val(i,30.0);

// Result:
// true
// record SimulationResult
// resultFile = "TicksInState_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'TicksInState', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// true
// 14.0
// endResult
10 changes: 3 additions & 7 deletions simulation/modelica/statemachines/TimeInState.mos
Expand Up @@ -4,17 +4,13 @@
//

loadFile("TimeInState.mo");
echo(false);
simulate(TimeInState, startTime=0, stopTime=30, numberOfIntervals=0); getErrorString();
echo(true);
val(i,30.0);

// Result:
// true
// record SimulationResult
// resultFile = "TimeInState_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 0, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'TimeInState', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// true
// 20.0
// endResult

0 comments on commit b86e6f7

Please sign in to comment.