Skip to content

Commit

Permalink
Merge pull request #72 from audrey-jardin/main
Browse files Browse the repository at this point in the history
new set of verification models for ETL testing
  • Loading branch information
lenaRB committed Apr 11, 2024
2 parents 6a3ae5f + 160337b commit f1db7ff
Show file tree
Hide file tree
Showing 75 changed files with 1,173 additions and 691 deletions.
281 changes: 4 additions & 277 deletions resources/modelica_libraries/CRML.mo

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
within CRML_test.ETL.BecomesFalse;
partial model BecomesFalse
Utilities.Boolean4Connector b1
annotation (Placement(transformation(extent={{-120,10},{-100,-10}})));
Utilities.ClockConnector c_b1_becomes_false
annotation (Placement(transformation(extent={{100,10},{120,-10}})));
CRML.Blocks.Events.ClockEvent clockEvent
annotation (Placement(transformation(extent={{-6,-6},{6,6}})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent
annotation (Placement(transformation(extent={{-54,-4},{-46,4}})));
CRML.Blocks.Logical4.Not4 not4_1
annotation (Placement(transformation(extent={{-88,-10},{-68,10}})));
equation
connect(clockEvent.y, c_b1_becomes_false) annotation (Line(
points={{6.6,0},{110,0}},
color={175,175,175},
pattern=LinePattern.Dot,
thickness=0.5));
connect(clockEvent.u, event4ToEvent.y)
annotation (Line(points={{-6.6,0},{-45.6,0}}, color={217,67,180}));
connect(event4ToEvent.u, not4_1.y)
annotation (Line(points={{-54.4,0},{-67,0}}, color={162,29,33}));
connect(b1, not4_1.u)
annotation (Line(points={{-110,0},{-89,0}}, color={0,0,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end BecomesFalse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within CRML_test.ETL.BecomesFalse;
model BecomesFalse_externals
CRML.Blocks.Events.EventPeriodic boolean4Constant1(period=3, startTime=2)
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
CRML.ETL.Connectors.Boolean4Output b1
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1
annotation (Placement(transformation(extent={{-4,-4},{4,4}})));
equation
connect(boolean4Constant1.y, booleanToBoolean4_1.u)
annotation (Line(points={{-39,0},{-4.4,0}}, color={217,67,180}));
connect(booleanToBoolean4_1.y, b1)
annotation (Line(points={{4.4,0},{110,0}}, color={162,29,33}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end BecomesFalse_externals;
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
within CRML_test.ETL.BecomesFalse;
model BecomesFalse_verif
extends BecomesFalse;
BecomesFalse_externals externals
annotation (Placement(transformation(extent={{-200,0},{-140,60}})));
CRML.Blocks.Events.ShowEvent show_c_b1_becomes_false
annotation (Placement(transformation(extent={{52,-44},{60,-36}})));
equation
// Bindings
b1 = externals.b1;
connect(show_c_b1_becomes_false.u, event4ToEvent.y) annotation (Line(points={{
51.6,-40},{-20,-40},{-20,0},{-45.6,0}}, color={217,67,180}));
annotation (Placement(transformation(extent={{0,-20},{60,40}})),
Icon(coordinateSystem(preserveAspectRatio=false,
extent={{-200,-100},{100,100}},
initialScale=0.1), graphics={
Ellipse(lineColor = {75,138,73},
fillColor={255,255,255},
fillPattern = FillPattern.Solid,
extent = {{-100,-100},{100,100}}),
Polygon(lineColor = {0,0,255},
fillColor = {75,138,73},
pattern = LinePattern.None,
fillPattern = FillPattern.Solid,
points = {{-36,60},{64,0},{-36,-60},{-36,60}})}), Diagram(
coordinateSystem(preserveAspectRatio=false,
extent={{-200,-100},{100,100}},
initialScale=0.1)),
experiment(StopTime=14));
end BecomesFalse_verif;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
within CRML_test.ETL;
package BecomesFalse
end BecomesFalse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BecomesFalse
BecomesFalse_externals
BecomesFalse_verif
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
within CRML_test.ETL.BecomesFalse_no_ext;
model BecomesFalse_no_ext
CRML.Blocks.Events.ClockEvent c1
annotation (Placement(transformation(extent={{24,44},{36,56}})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent
annotation (Placement(transformation(extent={{-4,46},{4,54}})));
CRML.Blocks.Logical.BooleanTable b1(
y0=false,
instant={2.5,5,7.5,9},
option_width=false)
annotation (Placement(transformation(extent={{-80,40},{-60,60}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1
annotation (Placement(transformation(extent={{-40,46},{-32,54}})));
CRML.Blocks.Events.ShowEvent show_c1
annotation (Placement(transformation(extent={{56,32},{64,40}})));
CRML.Blocks.Events.ClockEvent c2
annotation (Placement(transformation(extent={{24,4},{36,16}})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent1
annotation (Placement(transformation(extent={{-4,6},{4,14}})));
CRML.Blocks.Logical.BooleanConstant b2
annotation (Placement(transformation(extent={{-80,0},{-60,20}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_2
annotation (Placement(transformation(extent={{-40,6},{-32,14}})));
CRML.Blocks.Events.ShowEvent show_c2
annotation (Placement(transformation(extent={{56,-8},{64,0}})));
CRML.Blocks.Events.ClockEvent c3
annotation (Placement(transformation(extent={{24,-36},{36,-24}})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent2
annotation (Placement(transformation(extent={{-4,-34},{4,-26}})));
CRML.Blocks.Logical.BooleanConstant b3(K=false)
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_3
annotation (Placement(transformation(extent={{-40,-34},{-32,-26}})));
CRML.Blocks.Events.ShowEvent show_c3
annotation (Placement(transformation(extent={{56,-48},{64,-40}})));
CRML.Blocks.Logical4.Not4 not4_1
annotation (Placement(transformation(extent={{-28,40},{-8,60}})));
CRML.Blocks.Logical4.Not4 not4_2
annotation (Placement(transformation(extent={{-28,0},{-8,20}})));
CRML.Blocks.Logical4.Not4 not4_3
annotation (Placement(transformation(extent={{-28,-40},{-8,-20}})));
equation
connect(c1.u, event4ToEvent.y)
annotation (Line(points={{23.4,50},{4.4,50}}, color={217,67,180}));
connect(b1.y, booleanToBoolean4_1.u)
annotation (Line(points={{-59,50},{-40.4,50}}, color={217,67,180}));
connect(show_c1.u, event4ToEvent.y) annotation (Line(points={{55.6,36},{12,36},
{12,50},{4.4,50}}, color={217,67,180}));
connect(c2.u, event4ToEvent1.y) annotation (Line(points={{23.4,10},{20,10},{
20,10},{20,10},{20,10},{4.4,10}}, color={217,67,180}));
connect(b2.y, booleanToBoolean4_2.u) annotation (Line(points={{-59,10},{-40.4,
10}}, color={217,67,180}));
connect(show_c2.u, event4ToEvent1.y) annotation (Line(points={{55.6,-4},{16,
-4},{16,10},{4.4,10}},
color={217,67,180}));
connect(c3.u, event4ToEvent2.y)
annotation (Line(points={{23.4,-30},{4.4,-30}}, color={217,67,180}));
connect(b3.y, booleanToBoolean4_3.u)
annotation (Line(points={{-59,-30},{-40.4,-30}}, color={217,67,180}));
connect(show_c3.u, event4ToEvent2.y) annotation (Line(points={{55.6,-44},{14,
-44},{14,-30},{4.4,-30}}, color={217,67,180}));
connect(booleanToBoolean4_1.y, not4_1.u)
annotation (Line(points={{-31.6,50},{-29,50}}, color={162,29,33}));
connect(event4ToEvent.u, not4_1.y)
annotation (Line(points={{-4.4,50},{-7,50}}, color={162,29,33}));
connect(booleanToBoolean4_2.y, not4_2.u)
annotation (Line(points={{-31.6,10},{-29,10}}, color={162,29,33}));
connect(event4ToEvent1.u, not4_2.y)
annotation (Line(points={{-4.4,10},{-7,10}}, color={162,29,33}));
connect(booleanToBoolean4_3.y, not4_3.u)
annotation (Line(points={{-31.6,-30},{-29,-30}}, color={162,29,33}));
connect(event4ToEvent2.u, not4_3.y)
annotation (Line(points={{-4.4,-30},{-7,-30}}, color={162,29,33}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end BecomesFalse_no_ext;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
within CRML_test.ETL;
package BecomesFalse_no_ext
end BecomesFalse_no_ext;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BecomesFalse_no_ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
within CRML_test.ETL.BecomesTrueInside;
partial model BecomesTrueInside
Utilities.Boolean4Connector b1
annotation (Placement(transformation(extent={{-120,10},{-100,-10}})));
Utilities.ClockConnector c_b1_becomes_true_inside_p1
annotation (Placement(transformation(extent={{100,10},{120,-10}})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent
annotation (Placement(transformation(extent={{-54,-4},{-46,4}})));
replaceable ETL.Inside.Inside inside
annotation (Placement(transformation(extent={{4,-50},{24,-30}})));
Utilities.Boolean4Connector b2
annotation (Placement(transformation(extent={{-10,10},{10,-10}},
rotation=-90,
origin={-110,-60})));
CRML.Blocks.Events.Event4ToEvent event4ToEvent1
annotation (Placement(transformation(extent={{-66,-64},{-58,-56}})));
equation
connect(b1, event4ToEvent.u)
annotation (Line(points={{-110,0},{-54.4,0}}, color={0,0,0}));
connect(b2, event4ToEvent1.u)
annotation (Line(points={{-110,-60},{-66.4,-60}}, color={0,0,0}));
connect(event4ToEvent1.y, inside.b1) annotation (Line(points={{-57.6,-60},{
-22,-60},{-22,-43},{3,-43}}, color={217,67,180}));
connect(event4ToEvent.y, inside.b2) annotation (Line(points={{-45.6,0},{-22,0},
{-22,-37},{3,-37}}, color={217,67,180}));
connect(inside.c_filtered_ticks_of_c1_inside_p1, c_b1_becomes_true_inside_p1)
annotation (Line(
points={{25,-40},{64,-40},{64,0},{110,0}},
color={175,175,175},
pattern=LinePattern.Dot,
thickness=0.5));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end BecomesTrueInside;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within CRML_test.ETL.BecomesTrueInside;
model BecomesTrueInside_externals
CRML.Blocks.Events.EventPeriodic boolean4Constant1(period=3, startTime=2)
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
CRML.ETL.Connectors.Boolean4Output b1
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1
annotation (Placement(transformation(extent={{-4,-4},{4,4}})));
equation
connect(boolean4Constant1.y, booleanToBoolean4_1.u)
annotation (Line(points={{-39,0},{-4.4,0}}, color={217,67,180}));
connect(booleanToBoolean4_1.y, b1)
annotation (Line(points={{4.4,0},{110,0}}, color={162,29,33}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end BecomesTrueInside_externals;
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
within CRML_test.ETL.BecomesTrueInside;
model BecomesTrueInside_verif
extends BecomesTrueInside;
BecomesTrueInside_externals externals
annotation (Placement(transformation(extent={{-200,0},{-140,60}})));
equation
// Bindings
b1 = externals.b1;
annotation (Placement(transformation(extent={{0,-20},{60,40}})),
Icon(coordinateSystem(preserveAspectRatio=false,
extent={{-200,-100},{100,100}},
initialScale=0.1), graphics={
Ellipse(lineColor = {75,138,73},
fillColor={255,255,255},
fillPattern = FillPattern.Solid,
extent = {{-100,-100},{100,100}}),
Polygon(lineColor = {0,0,255},
fillColor = {75,138,73},
pattern = LinePattern.None,
fillPattern = FillPattern.Solid,
points = {{-36,60},{64,0},{-36,-60},{-36,60}})}), Diagram(
coordinateSystem(preserveAspectRatio=false,
extent={{-200,-100},{100,100}},
initialScale=0.1)),
experiment(StopTime=14));
end BecomesTrueInside_verif;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
within CRML_test.ETL;
package BecomesTrueInside
end BecomesTrueInside;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BecomesTrueInside
BecomesTrueInside_externals
BecomesTrueInside_verif

This file was deleted.

Loading

0 comments on commit f1db7ff

Please sign in to comment.