Opened 7 years ago

Closed 7 years ago

#4784 closed defect (fixed)

Equations with Complex variables lost in NF

Reported by: casella Owned by: mahge930
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc: perost

Description

The test cases in the ScalableTestSuite with complex numbers still fail. The smallest test case you can try out is ScalableTestSuite.Electrical.DistributionSystemAC.Verification.LinearControlledLoad (which lacks the experiment annotation, so it does not show up in the repors).

The model has 64 variable and equations. Checking with the NF reports only 57 equations. I flattened the model with the OF and NF and spotted at least one missing equation:

  linearControlledLoad.R.i.re = linearControlledLoad.R.p.i.re;

I guess the same problem takes place in the larger examples.

Change History (4)

comment:1 Changed 7 years ago by mahge930

  • Status changed from new to accepted

comment:2 follow-up: Changed 7 years ago by mahge930

The original problem was due to the way we were converting complex types to the old front-end DAE structure. That has been fixed in #2266.

In addition we were creating normal equations instead of complex equations where needed. For example record equality was converted to DAE scalar equality. We should scalarize such kind complex equalities. In the mean time the fix is to create a DAE.COMPLEX_EQUATION which is originally intended for handling cases where such scalarization was not possible (e.g. due to function calls on either side of equality). However for now that is what I have done. I will see if I can do a proper scalarization.

Now the next apparent problem is that complex connector elements are not expanded/scalarized. Plus there seems to be an issue which I currently don't understand with either - flow connection equations not handled correct - or - duplicate equations not removed. I will check more.

comment:3 in reply to: ↑ 2 Changed 7 years ago by casella

  • Cc perost added

Replying to mahge930:

In addition we were creating normal equations instead of complex equations where needed. For example record equality was converted to DAE scalar equality. We should scalarize such kind complex equalities. In the mean time the fix is to create a DAE.COMPLEX_EQUATION which is originally intended for handling cases where such scalarization was not possible (e.g. due to function calls on either side of equality). However for now that is what I have done. I will see if I can do a proper scalarization.

Would you mind opening a separate ticket on this topic, so we can keep track of it? It is probably related to #4354.

Now the next apparent problem is that complex connector elements are not expanded/scalarized. Plus there seems to be an issue which I currently don't understand with either - flow connection equations not handled correct - or - duplicate equations not removed. I will check more.

Maybe @perost can help you with that?

comment:4 Changed 7 years ago by casella

  • Resolution set to fixed
  • Status changed from accepted to closed

I have opened #4828 with a much smaller test case on the remaining issues.

Note: See TracTickets for help on using tickets.