Skip to content

Commit

Permalink
in progress improvements of test model for Inside ETL operator
Browse files Browse the repository at this point in the history
  • Loading branch information
audrey-jardin committed Apr 19, 2024
1 parent ff07f12 commit f05feb9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 98 deletions.
70 changes: 36 additions & 34 deletions resources/modelica_libraries/CRML_test/ETL/Inside/Inside.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,23 @@ protected
parameter Integer N=CRML.ETL.Types.nMaxOverlap;

public
Utilities.BooleanConnector b1
annotation (Placement(transformation(extent={{-120,-20},{-100,-40}})));
CRML.Blocks.Events.EventFilter eventFilter
annotation (Placement(transformation(extent={{12,20},{32,40}})));
CRML.Blocks.Events.EventFilter eventFilter1
annotation (Placement(transformation(extent={{12,-40},{32,-20}})));
CRML.TimeLocators.Attributes.PeriodsStart periodStart
annotation (Placement(transformation(extent={{-64,-60},{-56,-52}})));
annotation (Placement(transformation(extent={{-94,-44},{-86,-36}})));
CRML.TimeLocators.Attributes.PeriodsEnd periodEnd
annotation (Placement(transformation(extent={{-64,-80},{-56,-72}})));
annotation (Placement(transformation(extent={{-84,-52},{-76,-44}})));
CRML.Blocks.Events.Before after_Pstart
annotation (Placement(transformation(extent={{-30,-10},{-10,10}})));
CRML.Blocks.Logical.BooleanConstant boolean4Constant(K=false)
annotation (Placement(transformation(extent={{-86,-10},{-66,10}})));
annotation (Placement(transformation(extent={{-96,-10},{-76,10}})));
Modelica.Blocks.Logical.And
and4_1
annotation (Placement(transformation(extent={{48,-10},{68,10}})));
CRML.Blocks.Events.Before before_Pend
annotation (Placement(transformation(extent={{-30,-50},{-10,-30}})));
Utilities.BooleanConnector b2
annotation (Placement(transformation(extent={{-120,40},{-100,20}})));
CRML.TimeLocators.Continuous.During during
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1
annotation (Placement(transformation(extent={{-94,-34},{-86,-26}})));
CRML.Blocks.Logical.BooleanConstant reset(K=false)
annotation (Placement(transformation(extent={{-80,60},{-60,80}})));
inner CRML.TimeLocators.Continuous.Master master
Expand All @@ -39,40 +31,27 @@ public
CRML.Blocks.Events.ClockEvent
eventClock
annotation (Placement(transformation(extent={{74,-10},{94,10}})));
CRML.ETL.Connectors.ClockInput C1
annotation (Placement(transformation(extent={{-120,20},{-100,40}})));
CRML.Blocks.Events.ClockToBoolean clockToBoolean
annotation (Placement(transformation(extent={{-84,26},{-76,34}})));
CRML.ETL.Connectors.TimeLocatorInput P1
annotation (Placement(transformation(extent={{-120,-40},{-100,-20}})));
Modelica.Clocked.BooleanSignals.Sampler.Hold hold2
annotation (Placement(transformation(extent={{-62,24},{-50,36}})));
equation
connect(periodStart.y, after_Pstart.u1) annotation (Line(points={{-55.6,-56},
{-52,-56},{-52,8},{-31,8}},color={217,67,180}));
connect(boolean4Constant.y, after_Pstart.strictlyBefore)
annotation (Line(points={{-65,0},{-31,0}}, color={217,67,180}));
annotation (Line(points={{-75,0},{-31,0}}, color={217,67,180}));
connect(after_Pstart.y, eventFilter.cond) annotation (Line(points={{-9,0},{4,0},
{4,38},{11,38}}, color={217,67,180}));
connect(periodEnd.y, before_Pend.u2) annotation (Line(points={{-55.6,-76},{
-48,-76},{-48,-48},{-31,-48}},
color={217,67,180}));
connect(before_Pend.strictlyBefore, boolean4Constant.y) annotation (Line(
points={{-31,-40},{-50,-40},{-50,0},{-65,0}}, color={217,67,180}));
points={{-31,-40},{-60,-40},{-60,0},{-75,0}}, color={217,67,180}));
connect(before_Pend.y, eventFilter1.cond) annotation (Line(points={{-9,-40},{0,
-40},{0,-22},{11,-22}}, color={217,67,180}));
connect(eventFilter1.u, eventFilter.u) annotation (Line(points={{11,-30},{-2,-30},
{-2,30},{11,30}}, color={217,67,180}));
connect(before_Pend.u1, after_Pstart.u2) annotation (Line(points={{-31,-32},{-40,
-32},{-40,-8},{-31,-8}}, color={217,67,180}));
connect(after_Pstart.u2, b2) annotation (Line(points={{-31,-8},{-40,-8},{-40,30},
{-110,30}}, color={217,67,180}));
connect(during.u, booleanToBoolean4_1.y)
annotation (Line(points={{-81,-30},{-85.6,-30}}, color={162,29,33}));
connect(during.y, periodStart.tl) annotation (Line(points={{-70,-40},{-70,-46},
{-60,-46},{-60,-52}}, color={0,0,255}));
connect(periodEnd.tl, during.y) annotation (Line(points={{-60,-72},{-60,-66},
{-70,-66},{-70,-40}}, color={0,0,255}));
connect(booleanToBoolean4_1.u, b1)
annotation (Line(points={{-94.4,-30},{-110,-30}}, color={217,67,180}));
connect(after_Pstart.reset, reset.y) annotation (Line(points={{-20,-11},{-34,
-11},{-34,70},{-59,70}}, color={217,67,180}));
connect(before_Pend.reset, reset.y) annotation (Line(points={{-20,-51},{-34,
-51},{-34,70},{-59,70}}, color={217,67,180}));
connect(eventFilter.u, b2)
annotation (Line(points={{11,30},{-110,30}}, color={217,67,180}));
connect(eventFilter1.y, and4_1.u2) annotation (Line(points={{33,-30},{38,-30},
{38,-8},{46,-8}}, color={217,67,180}));
connect(and4_1.u1, eventFilter.y) annotation (Line(points={{46,0},{40,0},{40,
Expand All @@ -84,6 +63,29 @@ equation
color={175,175,175},
pattern=LinePattern.Dot,
thickness=0.5));
connect(C1, clockToBoolean.u) annotation (Line(
points={{-110,30},{-84.8,30}},
color={175,175,175},
pattern=LinePattern.Dot,
thickness=0.5));
connect(P1, periodStart.tl[1]) annotation (Line(points={{-110,-30},{-90,-30},
{-90,-36}}, color={0,0,255}));
connect(periodEnd.tl[1], P1) annotation (Line(points={{-80,-44},{-80,-30},{
-110,-30}}, color={0,0,255}));
connect(clockToBoolean.y, hold2.u)
annotation (Line(points={{-75.2,30},{-63.2,30}}, color={217,67,180}));
connect(periodEnd.y, before_Pend.u2)
annotation (Line(points={{-75.6,-48},{-31,-48}}, color={217,67,180}));
connect(eventFilter.u, hold2.y)
annotation (Line(points={{11,30},{-49.4,30}}, color={217,67,180}));
connect(eventFilter1.u, hold2.y) annotation (Line(points={{11,-30},{0,-30},{0,
30},{-49.4,30}}, color={217,67,180}));
connect(periodStart.y, after_Pstart.u1) annotation (Line(points={{-85.6,-40},
{-82,-40},{-82,-20},{-48,-20},{-48,8},{-31,8}}, color={217,67,180}));
connect(after_Pstart.u2, hold2.y) annotation (Line(points={{-31,-8},{-40,-8},
{-40,30},{-49.4,30}}, color={217,67,180}));
connect(before_Pend.u1, hold2.y) annotation (Line(points={{-31,-32},{-40,-32},
{-40,30},{-49.4,30}}, color={217,67,180}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end Inside;

This file was deleted.

27 changes: 0 additions & 27 deletions resources/modelica_libraries/CRML_test/ETL/Inside/Inside_verif.mo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Inside2
Inside2_externals
Inside2_verif
Inside
Inside_externals
Inside_verif

0 comments on commit f05feb9

Please sign in to comment.