Opened 10 years ago

Closed 8 years ago

Last modified 7 years ago

#2755 closed defect (worksforme)

Pantelides fails in a small model

Reported by: massimo ceraolo Owned by: somebody
Priority: high Milestone:
Component: Backend Version: trunk
Keywords: Cc:

Description

I have a class of models for which the following error is issued (using OM r21397).

[:0:0-0:0] Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!

Now I've created a small model (31 equations, 22 of which trivial), in which the issue occurs.
Maybe it is of use for the whole OM community to have this issue approached.
Here's the model:

model commTest0
  model Commutator
    parameter Integer m(final min = 1);
    Modelica.Electrical.Analog.Interfaces.PositivePin pin_pm[m];
    Modelica.Electrical.Analog.Interfaces.PositivePin pin_p;
    Modelica.Blocks.Interfaces.IntegerInput z;
  equation
    pin_p.v = pin_pm[z].v;
    for j in 1:m loop
      pin_pm[j].i = if j == z then -pin_p.i else 0;
    end for;
  end Commutator;

  Commutator commutator(m = 2);
  Modelica.Electrical.Analog.Basic.Resistor resistor(R = 2);
  Modelica.Electrical.Analog.Basic.Ground ground;
  Modelica.Electrical.Analog.Sources.ConstantVoltage E1(V = 100);
  Modelica.Electrical.Analog.Sources.ConstantVoltage E2(V = 200);
  Modelica.Blocks.Sources.IntegerConstant intConst(k = 1);
equation
  connect(commutator.pin_p, resistor.p);
  connect(resistor.n, ground.p);
  connect(E1.p, commutator.pin_pm[1]);
  connect(E2.p, commutator.pin_pm[2]);
  connect(E1.n, ground.p);
  connect(E2.n, ground.p);
  connect(commutator.z, intConst.y);
end commTest0;

Change History (9)

comment:1 by Lennart Ochel, 10 years ago

Component: UnknownBackend

The pre-optimization module removeSimpleEquations fails before the index-reduction takes place.

comment:2 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:3 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:4 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:7 by Francesco Casella, 8 years ago

Resolution: worksforme
Status: newclosed

I have checked this test case with v1.11.0-dev14 and it compiles fine.

comment:8 by massimo ceraolo, 8 years ago

I've checked.
Not it compiles but gives wrong results. I will open a brand new ticket for this.

comment:9 by Martin Sjölund, 7 years ago

Milestone: 1.10.0

Milestone deleted

Note: See TracTickets for help on using tickets.