Opened 10 years ago

Last modified 3 years ago

#2924 accepted defect

Extending a model fails

Reported by: Adam Dershowitz <dersh@…> Owned by: Adrian Pop
Priority: high Milestone: Future
Component: Frontend Version: trunk
Keywords: Cc:

Description

I have a model (unfortunately, proprietary, so i can't put it here) that I have been working with that is now causing me some difficulties. The base model is working fine. I then extended that model, with some additions, and it is also working fine.
The strange difficulty that I am running into, is that if I extend that model, I run into errors. And, the occur, even if I do nothing but this:
model Model3
extends Model2;
end Model3;

If I check Model2, I see that it is balanced with 894 equations and 894 variables. And it runs just fine.
If I check Model3 (created with nothing but extends, as above, and no actual additions or changes) it shows 1264 equations and 1571 variables (!?!?). If I try to run this model, I see a bunch of "Model is structurally singular, error found sorting equations", "Internal error pre-optimization model clockPartioning failed", "Too many equations, over-determined system. The model has 1264 equations and 894 variables"

I don't see how extending a model, with no changes, or even just a minor addition, can cause the addi4tion of hundreds of equations and variables.

Change History (5)

comment:1 by Adrian Pop, 10 years ago

Hi,

Do you have use any inner/outer or expandable connectors in your model?
How about overconstrained connectors?

If you want you can send the model to us privately
and we will use it for debugging and then delete it.

Cheers,
Adrian Pop/

comment:2 by Adam Dershowitz <dersh@…>, 10 years ago

No, it doesn't have inner/outer, expandable, or overconstrained connectors.

comment:3 by Adrian Pop, 10 years ago

Then is really strange that extending the model doesn't work.
Unfortunately we don't have a model to debug with is hard to
find out what the problem is.

comment:4 by Adrian Pop, 10 years ago

Component: UnknownFrontend
Owner: changed from somebody to Adrian Pop
Status: newaccepted

After I got a debug model I found out where the problem is.

It seems that in some cases where we have redeclare-as-element the element is
generated twice in the DAE instead of being send as a modifier to the extends
clause and generated only once. I'll debug a bit more to see where this happens.

comment:5 by Per Östlund, 3 years ago

Is this still an issue with the new frontend?

Note: See TracTickets for help on using tickets.