Skip to content

Commit

Permalink
Expected Output
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge committed Mar 16, 2016
1 parent 67f87dc commit 87f2ac1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion simulation/modelica/others/Makefile
Expand Up @@ -74,6 +74,7 @@ TestSolve14.mos \
TestSolve15.mos \
TestSolve16.mos \
TestSolve17.mos \
TestSolve18.mos \
VariableFilter.mos \
WhenStatement4.mos

Expand All @@ -86,7 +87,6 @@ pendulum4.mos \
SpaceProbe.mos \
filterTest.mos \
Bug1048.mos \
TestSolve18.mos \

# Dependency files that are not .mo .mos or Makefile
# Add them here or they will be cleaned.
Expand Down
28 changes: 26 additions & 2 deletions simulation/modelica/others/TestSolve18.mos
@@ -1,9 +1,11 @@
// name: TestSolve
// name: Test ExpressionSolve fail
// status: correct
//
// Checks that the backend knows how to solve certain expressions
// Checks that ExpressionSolve failed
//

setCommandLineOptions("+d=failtrace");

loadString("
model ModelTestSolve18
parameter Real x(fixed=false),y(fixed=false);
Expand All @@ -20,4 +22,26 @@ simulate(ModelTestSolve18, tolerance=0.001); getErrorString();
val(z,1.0);

// Result:
// true
// true
// ""
// record SimulationResult
// resultFile = "",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 0.001, method = 'dassl', fileNamePrefix = 'ModelTestSolve18', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Simulation execution failed for model: ModelTestSolve18
// assert | debug | Solving non-linear system 5 failed at time=0.
// | | | | For more information please use -lv LOG_NLS.
// assert | info | simulation terminated by an assertion at initialization
// "
// end SimulationResult;
// "[BackEnd/ExpressionSolve.mo:0:0-0:0:writable] Error: Internal error Failed to solve "(-exp(if y > 0.0 then time else 2.0 * time)) * y = -1.0 - time" w.r.t. "y"
// [BackEnd/ExpressionSolve.mo:0:0-0:0:writable] Error: Internal error Failed to solve "/*Real*/(sign(1.0 + 2.0 * x)) = log(1.0 - -0.2 * time)" w.r.t. "x"
// Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// [BackEnd/ExpressionSolve.mo:0:0-0:0:writable] Error: Internal error Failed to solve "(-exp(if y > 0.0 then time else 2.0 * time)) * y = -1.0 - time" w.r.t. "y"
// [BackEnd/ExpressionSolve.mo:0:0-0:0:writable] Error: Internal error Failed to solve "/*Real*/(sign(1.0 + 2.0 * x)) = log(1.0 - -0.2 * time)" w.r.t. "x"
// [BackEnd/Differentiate.mo:191:7-191:147:writable] Error: Derivative of expression "der(z) - (x - y)" w.r.t. "z" is non-existent.
// [BackEnd/ExpressionSolve.mo:0:0-0:0:writable] Error: Internal error Failed to solve "der(z) = x - y" w.r.t. "z"
// "
//
// endResult

0 comments on commit 87f2ac1

Please sign in to comment.