Opened 10 years ago

Closed 10 years ago

#2835 closed defect (fixed)

Overconstrained connector support for types extending basic types

Reported by: adrpo Owned by: adrpo
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

Currently we only support overconstrained connectors which are records (become T_COMPLEX) and not this kind of connectors (from PowerSystems library) which extend from basic types:

      type ReferenceAngle  
        extends .Modelica.SIunits.Angle;

        function equalityConstraint  
          input ReferenceAngle[:] theta1;
          input ReferenceAngle[:] theta2;
          output Real[0] residue;
        algorithm
          for i in 1:size(theta1, 1) loop
            assert(abs(theta1[i] - theta2[i]) < Modelica.Constants.eps, "angles theta1 and theta2 not equal over connection!");
          end for;
        end equalityConstraint;
      end ReferenceAngle;

    connector Terminal  
      replaceable package PhaseSystem = PhaseSystems.PartialPhaseSystem;
      PhaseSystem.Voltage[PhaseSystem.n] v;
      flow PhaseSystem.Current[PhaseSystem.n] i;
      PhaseSystem.ReferenceAngle[PhaseSystem.m] theta if PhaseSystem.m > 0;
    end Terminal;

Change History (2)

comment:1 Changed 10 years ago by adrpo

  • Owner changed from somebody to adrpo
  • Status changed from new to accepted

comment:2 Changed 10 years ago by adrpo

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

Fixed in r22424. PowerSystems library is +10 build +10 simulate compared with trunk/.

Note: See TracTickets for help on using tickets.