Opened 12 years ago

Closed 12 years ago

#2108 closed defect (fixed)

OMedit alters code

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: high Milestone: 1.9.0
Component: OMEdit Version: trunk
Keywords: Cc:

Description

I have the following code in a file:

model AlgebraicInv "Algebraic part of functional lossless inverter"
  Modelica.Electrical.Analog.Interfaces.Pin pin_p;
  Modelica.Electrical.Analog.Interfaces.NegativePin pin_n;
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_n;
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p;
  Modelica.SIunits.Power Power;
  //  Modelica.SIunits.Voltage Udc;
  Modelica.Blocks.Interfaces.RealInput u[3] annotation(Placement(visible = true, transformation(origin = {3,-120}, extent = {{20,-20},{-20,20}}, rotation = 90), iconTransformation(origin = {3,-120}, extent = {{20,-20},{-20,20}}, rotation = 90)));
equation
  plug_p.pin[1:3].i = -plug_n.pin[1:3].i;
  pin_p.i + pin_n.i = 0;
  plug_p.pin[1:3].v - plug_n.pin[1:3].v = u[1:3];
  Power = sum(plug_p.pin[i].v * plug_p.pin[i].i for i in 1:3);
  (pin_p.v - pin_n.v) * pin_p.i + Power = 0;
end AlgebraicInv;

When it is loaded by OMedit a row is changed. From:

Modelica.Blocks.Interfaces.RealInput u[3]; 

into

Modelica.Blocks.Interfaces.RealInput u; 

that makes the code incorrect.

Change History (3)

comment:1 by Per Östlund, 12 years ago

Component: BackendOMEdit
Owner: changed from probably noone to Adeel Asghar

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

Adeel... Why does OMEdit call:

updateComponent(u,Modelica.Blocks.Interfaces.RealInput,AlgebraicInv,annotate=Placement(visible=true, transformation=transformation(origin={3,-120}, extent={{20,-20},{-20,20}}, rotation=90), iconTransformation=transformation(origin={0,0}, extent={{-12,-12},{12,12}}, rotation=0)))

All I tried to do was load the class

comment:3 by Adeel Asghar, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r15501.

Note: See TracTickets for help on using tickets.