Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Extends causes error

Extends causes error

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. 
If I check Model3 (created with nothing but extends, as above) 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"

Any idea what might be going on? 
Shouldn't extending a model, with nothing else, just end up with the identical model, so it should work just fine? 
Of course, I wanted to add some things to the model, and spent a while trying to figure out why the extended model would not work, until I finally removed things and was left with this trivial extends case that still will not work.
(I am using devel 22746, but while writing this, I am building 22854, to see if that changes anything)

Thanks,

There are 0 guests and 0 other users also viewing this topic