Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

[BE] Fix handling of mixed determined systems #3085

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kabdelhak
Copy link
Contributor

  • add all variable indices to artifical functions in adjacency matrix
  • ticket #5170

 - add all variable indices to artifical functions in adjacency matrix
 - ticket #5170
@kabdelhak
Copy link
Contributor Author

This actually fixes ticket #5170, but several other models like
../simulation/modelica/resolveLoops/ElectricalCircuit1.mos
fail with different results.

Feel free to comment the code!

@casella
Copy link

casella commented May 10, 2019

I can't see the results of the testsuite. Maybe you can run it on this PR, so we can check?

@OpenModelica-Hudson
Copy link
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2019-05-10_16-24-49.

@@ -1426,7 +1425,8 @@ algorithm
outM := arrayCreate(inNEqns+inNAddEqns, {});
outM := Array.copy(inM, outM);
newEqIndices := List.intRange2(inNEqns+1, inNEqns+inNAddEqns);
outM := List.fold1(newEqIndices, squareIncidenceMatrix1, inInitVarIndices, outM);
allVarIndices := List.intRange2(1,inNEqns+inNAddEqns);
outM := List.fold1(newEqIndices, squareIncidenceMatrix1, allVarIndices, outM);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right to me. The introduced artificial equations should only be connected to inInitVarIndices (states, discrete states, and parameters having fixed=false).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants