Opened 6 years ago

Last modified 3 years ago

#5361 new defect

Inconsistent Variable Filter between .mat and .csv format

Reported by: trista.arinomo@… Owned by: Lennart Ochel
Priority: high Milestone:
Component: Run-time Version: v1.13.0
Keywords: Variable Filter; Output File Format Cc: Martin Sjölund, Willi Braun, Lennart Ochel

Description

Below is an arbitary model of electrical circuit with 5 resistors. When i apply the filter R[0-9]\.p\.i i expected to get all the current flow from each p pin of resistors (and some other variable due to alias variable). But somehow i got an unexpected results. For example:

R1.p.i and R2.p.i are not saved
R4.i and R5.i are saved due to i=p.i in Interfaces.OnePort but not for R1-3

with the .mat format i got all the current R(1-5).p.i; R4.i and R5.i are still there but not for R(1-3).

why it is seem inconsistent? i understand the part where .mat saves the parameter but .csv not. but the filter variable result shoud be identical, is it not?

thanks again for your time

cheers

model Arbitary
  Modelica.Electrical.Analog.Sources.ConstantCurrent constantCurrent1 annotation(
    Placement(visible = true, transformation(origin = {-80, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Basic.Ground ground1 annotation(
    Placement(visible = true, transformation(origin = {-80, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Resistor R1(R = 1)  annotation(
    Placement(visible = true, transformation(origin = {-64, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Resistor R2(R = 2)  annotation(
    Placement(visible = true, transformation(origin = {-30, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Resistor R3(R = 3)  annotation(
    Placement(visible = true, transformation(origin = { 0, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor R4(R = 5)  annotation(
    Placement(visible = true, transformation(origin = {30, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor R5(R = 6)  annotation(
    Placement(visible = true, transformation(origin = {60, -28}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Ideal.IdealOpeningSwitch switch annotation(
    Placement(visible = true, transformation(origin = {0, 10}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Ground ground2 annotation(
    Placement(visible = true, transformation(origin = {0, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground3 annotation(
    Placement(visible = true, transformation(origin = {30, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground4 annotation(
    Placement(visible = true, transformation(origin = {60, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Ideal.IdealCommutingSwitch switch1 annotation(
    Placement(visible = true, transformation(origin = {42, 10}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Blocks.Sources.BooleanExpression booleanExpression1 annotation(
    Placement(visible = true, transformation(origin = {-32, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.BooleanExpression booleanExpression2 annotation(
    Placement(visible = true, transformation(origin = {80, 10}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
equation
  connect(booleanExpression2.y, switch1.control) annotation(
    Line(points = {{70, 10}, {56, 10}, {56, 10}, {54, 10}}, color = {255, 0, 255}));
  connect(booleanExpression1.y, switch.control) annotation(
    Line(points = {{-20, 10}, {-12, 10}, {-12, 10}, {-12, 10}}, color = {255, 0, 255}));
  connect(R2.n, switch1.p) annotation(
    Line(points = {{-20, 40}, {42, 40}, {42, 20}, {42, 20}}, color = {0, 0, 255}));
  connect(switch1.n1, R5.p) annotation(
    Line(points = {{46, 0}, {60, 0}, {60, -18}, {60, -18}}, color = {0, 0, 255}));
  connect(R2.n, switch.p) annotation(
    Line(points = {{-20, 40}, {0, 40}, {0, 20}}, color = {0, 0, 255}));
  connect(R3.p, switch.n) annotation(
    Line(points = {{0, -18}, {0, 0}}, color = {0, 0, 255}));
  connect(switch1.n2, R4.p) annotation(
    Line(points = {{42, 0}, {30, 0}, {30, -18}, {30, -18}}, color = {0, 0, 255}));
  connect(ground3.p, R4.n) annotation(
    Line(points = {{30, -46}, {30, -38}}, color = {0, 0, 255}));
  connect(ground4.p, R5.n) annotation(
    Line(points = {{60, -46}, {60, -46}, {60, -38}, {60, -38}}, color = {0, 0, 255}));
  connect(ground2.p, R3.n) annotation(
    Line(points = {{0, -46}, {0, -46}, {0, -38}, {0, -38}}, color = {0, 0, 255}));
  connect(R1.p, constantCurrent1.n) annotation(
    Line(points = {{-74, 40}, {-80, 40}, {-80, 10}, {-80, 10}}, color = {0, 0, 255}));
  connect(R2.p, R1.n) annotation(
    Line(points = {{-40, 40}, {-54, 40}, {-54, 40}, {-54, 40}}, color = {0, 0, 255}));
  connect(ground1.p, constantCurrent1.p) annotation(
    Line(points = {{-80, -20}, {-80, -20}, {-80, -10}, {-80, -10}}, color = {0, 0, 255}));

annotation(
    Icon(coordinateSystem(preserveAspectRatio = false)),
    uses(Modelica(version = "3.2.3")),
  experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.002),
  __OpenModelica_simulationFlags(lv = "LOG_STATS", outputFormat = "csv", s = "dassl"));end Arbitary;

Change History (5)

comment:1 by Adeel Asghar, 6 years ago

Cc: Martin Sjölund Willi Braun Lennart Ochel added
Component: OMEditRun-time
Milestone: Future1.14.0
Owner: changed from Adeel Asghar to Lennart Ochel

comment:2 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:3 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:4 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:5 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.