-
Notifications
You must be signed in to change notification settings - Fork 298
/
Ticket3926.mos
71 lines (65 loc) · 1.93 KB
/
Ticket3926.mos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// name: Ticket3926
// keywords: parameter
// status: correct
loadString("
model foo
final parameter Real p1 = 1;
final parameter Real p2 = 2;
final parameter Real p3 = 3;
final parameter Real p4 = 4;
parameter Real q1 (fixed=false);
parameter Real q2 (fixed=false);
initial equation
-p1 = 3 * (p3 * q1 + p4 * q2);
-p2 = 3 * (q1 * p4 - p3 * q2);
end foo;
");getErrorString();
setCommandLineOptions("--initOptModules-=calculateStrongComponentJacobians");
simulate(foo);getErrorString();
val(p1, 0.0);getErrorString();
val(p2, 0.0);getErrorString();
val(p3, 0.0);getErrorString();
val(p4, 0.0);getErrorString();
val(q1, 0.0);getErrorString();
val(q2, 0.0);getErrorString();
// Correct results:
// 1.0
// ""
// 2.0
// ""
// 3.0
// ""
// 4.0
// ""
// -0.1466666666666667
// ""
// 0.02666666666666667
// ""
// Result:
// true
// ""
// true
// record SimulationResult
// resultFile = "",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'foo', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "Failed to build model: foo"
// end SimulationResult;
// "Error: A torn linear system has no symbolic jacobian and currently there are no means to solve that numerically. Please compile with the module \"calculateStrongComponentJacobians\" to provide symbolic jacobians for torn linear systems.
// [SimCode/SimCodeUtil.mo:0:0-0:0:writable] Error: Internal error function createOdeSystem failed for component torn linear Equationsystem{{{1:1}},
// {2:2} Size: 1
// [SimCode/SimCodeUtil.mo:0:0-0:0:writable] Error: Internal error createEquationsForSystems failed
// [SimCode/SimCodeUtil.mo:0:0-0:0:writable] Error: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
// "
//
// ""
//
// ""
//
// ""
//
// ""
//
// ""
//
// ""
// endResult