Opened 14 years ago

Last modified 14 years ago

#1330 closed defect (fixed)

Unbalanced ModelicaAdditions: Class MultiBody_Examples_Loops_Fourbar1 has 2316 equation(s) and 2319 variable(s)

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: Red October
Component: Version:
Keywords: Cc: Adrian Pop, Adrian Pop, Per Östlund, Peter Aronsson

Description

After the new connection-set implementation the ModelicaAdditions model is not balanced anymore.

As far as I can see from the diff, see sort-new.txt and sort-old.txt there are two equations in
plus in sort-old (revision before the change) these two equations are in plus in the old model:

j2.axis.f = 0.0;
j1.axis.tau = 0.0;

However, these are protected connectors which have duplicates for these equations:

j1.axis.tau = j1.nn[1] * j1.tb[1] + (j1.nn[2] * j1.tb[2] + j1.nn[3] * j1.tb[3]);
j2.axis.f = j2.nn[1] * j2.fb[1] + (j2.nn[2] * j2.fb[2] + j2.nn[3] * j2.fb[3]);

and we deduced that the set-to-zero should be removed if the connector is protected, the flow is output
and another equation is present for the same variable.

Attachments (2)

sort-new.txt (332.9 KB ) - added by Adrian Pop 14 years ago.
sort-old.txt (332.0 KB ) - added by Adrian Pop 14 years ago.

Download all attachments as: .zip

Change History (3)

by Adrian Pop, 14 years ago

Attachment: sort-old.txt added

comment:1 by Adrian Pop, 14 years ago

Also note that there are no other equations that are missing as sort-old.txt file has 3829 lines
and the sort-new.txt file has 3831 lines. There are ONLY two line difference between the two which
come from the two equations.

comment:2 by Per Östlund, 14 years ago

This is hopefully fixed in revision 6567. OpenModelica still reports one equation to few, but it now has two equations more.

Note: See TracTickets for help on using tickets.