Skip to content

Commit

Permalink
Muted annoying test case properly
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel committed Aug 4, 2015
1 parent 2b49180 commit e022a1f
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions simulation/modelica/others/ComplexFun.mos
@@ -1,48 +1,38 @@
// name: complexFun1
// status: correct

loadFile("ComplexFun.mo");
getErrorString();
loadFile("ComplexFun.mo"); getErrorString();

simulate(problem1);
getErrorString();
simulate(problem1); getErrorString();

val(x,{0.0,0.1,0.2,0.7,1.0});
getErrorString();

simulate(problem2);
getErrorString();
simulate(problem2); getErrorString();

val(y,{0.0,0.1,0.2,0.7,1.0});
val(z,{0.0,0.1,0.2,0.7,1.0});
getErrorString();
val(z,{0.0,0.1,0.2,0.7,1.0});

setCommandLineOptions("+cseEachCall"); getErrorString();
simulate(problem1);
getErrorString();
simulate(problem1); getErrorString();

val(x,{0.0,0.1,0.2,0.7,1.0});
getErrorString();
val(x,{0.0,0.1,0.2,0.7,1.0}); getErrorString();

simulate(problem2);
getErrorString();
simulate(problem2); getErrorString();

val(y,{0.0,0.1,0.2,0.7,1.0});
val(z,{0.0,0.1,0.2,0.7,1.0});
getErrorString();

setCommandLineOptions("+d=disableSimplifyComplexFunction +cseEachCall=false"); getErrorString();
simulate(problem1);
getErrorString();
simulate(problem1); getErrorString();

val(x,{0.0,0.1,0.2,0.7,1.0});
getErrorString();

simulate(problem2);
getErrorString() == "";
simulate(problem2); getErrorString() == "";

val(y,{0.0,0.1,0.2,0.7,1.0});
getErrorString();
setCommandLineOptions("+d=disableSimplifyComplexFunction +cseEachCall"); getErrorString();
simulate(problem1); getErrorString() == "";

simulate(problem2); getErrorString() == "";

// Result:
// true
Expand All @@ -54,7 +44,6 @@ getErrorString();
// end SimulationResult;
// ""
// {0.0,0.2720759220056126,0.4824045318333194,1.445553342178025,2.0}
// ""
// record SimulationResult
// resultFile = "problem2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'problem2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
Expand All @@ -63,7 +52,6 @@ getErrorString();
// ""
// {-1.0,-1.216227766016838,-1.247213595499958,-1.136660026534076,-1.0}
// {1.0,1.216227766016838,1.247213595499958,1.136660026534076,1.0}
// ""
// true
// ""
// record SimulationResult
Expand All @@ -82,7 +70,6 @@ getErrorString();
// ""
// {-1.0,-1.216227766016838,-1.247213595499958,-1.136660026534076,-1.0}
// {1.0,1.216227766016838,1.247213595499958,1.136660026534076,1.0}
// ""
// true
// ""
// record SimulationResult
Expand All @@ -92,13 +79,24 @@ getErrorString();
// end SimulationResult;
// ""
// {0.0,0.2720759220056126,0.4824045318333193,1.445553342178025,2.0}
// ""
// record SimulationResult
// resultFile = "",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'problem2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Failed to build model: problem2"
// end SimulationResult;
// false
// {0.0,-0.07207592200561265,-0.08240453183331929,-0.04555334217802521,8.980666631940483e-19}
// true
// ""
// record SimulationResult
// resultFile = "",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'problem1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Failed to build model: problem1"
// end SimulationResult;
// false
// record SimulationResult
// resultFile = "",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'problem2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Failed to build model: problem2"
// end SimulationResult;
// false
// endResult

0 comments on commit e022a1f

Please sign in to comment.