- Index
- » Programming
- » Modelica Language
- » About overconstrained equaiton operators
Page Start Prev 1 Next End
About overconstrained equaiton operators
About overconstrained equaiton operators
Jan-22-18 10:49:33
According to the MLS, the "branch" operator define a unbreakable connect.Why this model only generator 3 equations in OpenModelica?
Code:
model BreakBranch
record Rec
Real x;
function equalityConstraint
input Rec r1;
input Rec r2;
output Real x[0];
algorithm
assert(r1.x > r2.x, "Test");
end equalityConstraint;
end Rec;
connector Con
Rec r;
end Con;
model Source
Con c;
equation
c.r.x = time;
Connections.root(c.r);
end Source;
model A
Con c1;
Con c2;
equation
Connections.branch(c1.r, c2.r);
end A;
model Ground
Con c;
end Ground;
A a;
Ground g;
Source s;
equation
connect(s.c, a.c1);
connect(a.c1, a.c2);
connect(a.c2, g.c);
end BreakBranch;
Edited by: YangH - Jan-28-18 06:07:39
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » About overconstrained equaiton operators
There are 0 guests and 0 other users also viewing this topic