- Index
- » Programming
- » Modelica Language
- » Strange behavior
Strange behavior
Strange behavior
I found out that I have had one equation twotimes in my code therefore i delete it ones but this reduce the number of equations by one i would expect that the number of equations and unknows stays the same. Is there any reason for this behavior?
Re: Strange behavior
Hi,
Does your simulation start? If you get an error message about the number of varaible is not the same as the number of equations then your model is either over-determinant or under. The Modelica compilers rearrange all the equations and not neccessary in the order that the users expects it.
Regards
Mohsen
Re: Strange behavior
The Simulation doesn't start, if i connect the necessary Inputs and compile I get a quite senselesse message, alleged there should miss some connections to my Medium. I know this message i get it quite often if a have forgot to use some Variables or use a wrong equation...
In Detail: Model with the 2 times the same equation: the model has the same number of unknowns and equations: 66
model+inputs(these are right for sure I have tested them allready in detail) now the compiler complains about missing equation due to missing connections to my medium....
For sure Modellica rearrangements aren't always what i expect. But 2 times one equation should lead 0 = 0 (-> neglect one of both) or to an unsolveable algebraic loop(simulation should start and stop with an error at T=0).
- Index
- » Programming
- » Modelica Language
- » Strange behavior