Skip to content

Commit

Permalink
added test for ticket5114
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Sep 26, 2018
1 parent ff4a735 commit a4010f6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions simulation/modelica/arrays/Makefile
Expand Up @@ -39,6 +39,7 @@ PolynomialEvaluator1.mos \
PolynomialEvaluator2.mos \
PolynomialEvaluator3.mos \
ticket2336.mos \
ticket5114.mos \
VariableRangeSubscript.mos \
VectorizeOneReturnValue.mos \
Xpowers1.mos \
Expand Down
44 changes: 44 additions & 0 deletions simulation/modelica/arrays/ticket5114.mos
@@ -0,0 +1,44 @@
// name: ticket5114
// keywords: array cref newInst
// status: correct
// teardown_command: rm -rf Test5114*

loadModel(Modelica);
loadString("
model A
parameter Modelica.Mechanics.MultiBody.Frames.Orientation R_start =
Modelica.Mechanics.MultiBody.Frames.axesRotations(
{1, 2, 3},
angles_start,
{0.0, 0.0, 0.0});

parameter Real angles_start[3](each fixed = false);
initial equation
angles_start = {0, 0, 0};
end A;

model Test5114
A a[1];
end Test5114;
");
getErrorString();

setDebugFlags("newInst");
simulate(Test5114);
getErrorString();


// Result:
// true
// true
// ""
// true
// record SimulationResult
// resultFile = "Test5114_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Test5114', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// endResult

0 comments on commit a4010f6

Please sign in to comment.