diff --git a/resources/crml_tutorial/traffic_light/Spec_simplified.crml b/resources/crml_tutorial/traffic_light/Spec_simplified.crml index 56ff2357..c217a26e 100644 --- a/resources/crml_tutorial/traffic_light/Spec_simplified.crml +++ b/resources/crml_tutorial/traffic_light/Spec_simplified.crml @@ -62,12 +62,24 @@ model Spec is { Operator [ Periods ] 'after' Clock ev 'for' Real d = new Periods ] ev, ev + d ]; // Checking that the number of event occurrences at the end of a time period is lower or higher than a threshold + // Option 1: without category Operator [ Boolean ] Periods P 'check count' Clock E '==' Integer n = 'check'(('count' E 'inside' P) == n) 'over' P; + + // // Option 2 (later support): with category + // Operator [ Boolean ] Periods P 'check count' Clock E '==' Integer n + // = apply increasing1 on ('check'(('count' E 'inside' P) '==' n) 'over' P); + // Ensuring that a requirement is satisfied all along a time period + //Option 1: + // Operator [ Boolean ] Periods P 'ensure' Boolean b + // = ('check' (('count' (b 'becomes true') 'inside' P) == 0) 'over' P) and (P 'check anytime' b); + + //Option 2: Operator [ Boolean ] Periods P 'ensure' Boolean b - = ('check' ('count' (b 'becomes true') == 0) 'over' P) and (P 'check anytime' b); + = (Periods P 'check count' (b 'becomes true') '==' 0) and (P 'check anytime' b); + // Checking that a requirement is satisfied at any time instant of a time period Operator [ Boolean ] Periods P 'check anytime' Boolean b = apply varying2 on ('check' 'id' b 'over' P); diff --git a/resources/modelica_libraries/CRML.mo b/resources/modelica_libraries/CRML.mo index b3f9b0e7..6f06b1d7 100644 --- a/resources/modelica_libraries/CRML.mo +++ b/resources/modelica_libraries/CRML.mo @@ -4,12 +4,17 @@ class Overview "Overview of CRML" annotation (Documentation(info=" -

CRML(Common Requirement Modeling Language) is a language for the simulation of temporal requirements on cyber-physical systems.

+

CRML(Common Requirement Modeling Language) is a language for the simulation of temporal requirements on cyber-physical systems.

This library is a Modelica implementation of CRML.

For more information, please consult the following references:

-

§ Bouskela D., Nguyen T. and Jardin A. (2017), “Toward a Rigorous Approach for Verifying Cyber-Physical Systems Against Requirements,” Canadian J. of Electrical and Computer Engineering, Vol. 40-2, pp. 66-73.

+

Regarding the RandomFailure block in package Blocks.Events, please consult the following reference:

-

§ Bouissou M. and Buffoni L. (2020), “Generic Method to Transform a Modelica Simulation into a Dynamic Reliability Model,” IMdR, Institut pour la maîtrise des Risques, 22e Congrès de Maîtrise des Risques et Sûreté de Fonctionnement.

+ "), Icon(graphics={ Ellipse( lineColor={75,138,73}, @@ -31,7 +36,7 @@ end Overview; - class ReqSysProLicense "License" + class CrmlLicense "License" annotation (Documentation(info="

The CRML License

@@ -56,7 +61,7 @@ fillPattern=FillPattern.Solid, extent={{-12.5,-12.5},{12.5,12.5}})})); - end ReqSysProLicense; + end CrmlLicense; package ReleaseNotes "Release notes" @@ -109,6 +114,38 @@ fillPattern=FillPattern.Solid, extent={{-12.5,-12.5},{12.5,12.5}})})); end Version_0_2; + + class Version_0_3 "Version 0.3" + + annotation (DocumentationClass=true, Documentation(info=" +

Version 0.3 (in progress, 2024)

+

This is the third beta release of the library.

+

Minor updates:

+ +

Major updates:

+

-

+"),Icon(graphics={ + Ellipse( + lineColor={75,138,73}, + fillColor={75,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-100,-100},{100,100}}), + Polygon(origin={-10.167,-15}, + fillColor={255,255,255}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-15.833,20.0},{-15.833,30.0},{14.167,40.0},{24.167,20.0},{4.167,-30.0},{14.167,-30.0},{24.167,-30.0},{24.167,-40.0},{-5.833,-50.0},{-15.833,-30.0},{4.167,20.0},{-5.833,20.0}}, + smooth=Smooth.Bezier), + Ellipse(origin={1.5,56.5}, + fillColor={255,255,255}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-12.5,-12.5},{12.5,12.5}})})); + end Version_0_3; annotation (Icon(graphics={ Polygon( points={{-80,-100},{-80,100},{0,100},{0,20},{80,20},{80,-100},{-80,-100}}, @@ -164,16 +201,9 @@ fillColor={241,241,241}, fillPattern=FillPattern.Solid)}), Documentation(info="

Contacts

-
Daniel Bouskela
-
Audrey Jardin
-
Yulu Dong
-
EDF Lab - PRISME
-
6, quai Watier
-
F-78401 Chatou Cedex
-
France
-
email: daniel.bouskela@edf.fr
-
email: audrey.jardin@edf.fr
-
email: yulu.dong@edf.fr
+

Daniel Bouskela

Audrey Jardin

Yulu Dong

+

EDF Lab - PRISME

6, quai Watier

F-78401 Chatou Cedex

France

+


email: audrey.jardin@edf.fr

")); end Contacts; annotation (Icon(graphics={ @@ -3793,14 +3823,15 @@ The usage is demonstrated, e.g., in example block Event4ToEvent import CRML.ETL.Types.Boolean4; - protected - Boolean x(start=false, fixed=true) = (u == Boolean4.true4); + // protected + Boolean x(start=false, fixed=true) = (u == Boolean4.true4); public ETL.Connectors.Boolean4Input u annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); ETL.Connectors.BooleanOutput y(start=false, fixed=true) annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + equation y = edge(x); diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse.mo index 0a35538d..680268f3 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse.mo @@ -23,5 +23,7 @@ equation 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))); + coordinateSystem(preserveAspectRatio=false)), + Documentation(info=" +")); end BecomesFalse; diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_externals.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_externals.mo index f6fb4758..7d2644c8 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_externals.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_externals.mo @@ -1,16 +1,20 @@ within CRML_test.ETL.BecomesFalse; model BecomesFalse_externals - CRML.Blocks.Events.EventPeriodic boolean4Constant1(period=3, startTime=2) + CRML.Blocks.Events.EventPeriodic eventPeriodic_1(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}}))); + CRML.Blocks.Events.ShowEvent showEvent_eventPeriodic_b1 + annotation (Placement(transformation(extent={{-20,-44},{-12,-36}}))); equation - connect(boolean4Constant1.y, booleanToBoolean4_1.u) + connect(eventPeriodic_1.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})); + connect(eventPeriodic_1.y, showEvent_eventPeriodic_b1.u) annotation (Line( + points={{-39,0},{-28,0},{-28,-40},{-20.4,-40}}, color={217,67,180})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false))); end BecomesFalse_externals; diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_verif.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_verif.mo index e0d1551c..2ed203f6 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_verif.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse/BecomesFalse_verif.mo @@ -1,15 +1,15 @@ within CRML_test.ETL.BecomesFalse; model BecomesFalse_verif - extends BecomesFalse; + extends BecomesFalse(event4ToEvent(x(start=true))); 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}}))); + CRML.Blocks.Events.ShowEvent showEvent_c_b1_becomes_false + annotation (Placement(transformation(extent={{60,-74},{68,-66}}))); 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})); + connect(showEvent_c_b1_becomes_false.u, event4ToEvent.y) annotation (Line( + points={{59.6,-70},{-20,-70},{-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}}, diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse_no_ext/BecomesFalse_no_ext.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse_no_ext/BecomesFalse_no_ext.mo index a8f210ae..cfedf7da 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesFalse_no_ext/BecomesFalse_no_ext.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesFalse_no_ext/BecomesFalse_no_ext.mo @@ -2,7 +2,7 @@ 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 + CRML.Blocks.Events.Event4ToEvent event4ToEvent(x(start=true)) annotation (Placement(transformation(extent={{-4,46},{4,54}}))); CRML.Blocks.Logical.BooleanTable b1( y0=false, @@ -15,7 +15,7 @@ model BecomesFalse_no_ext 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 + CRML.Blocks.Events.Event4ToEvent event4ToEvent1(x(start=true)) annotation (Placement(transformation(extent={{-4,6},{4,14}}))); CRML.Blocks.Logical.BooleanConstant b2 annotation (Placement(transformation(extent={{-80,0},{-60,20}}))); @@ -25,7 +25,7 @@ model BecomesFalse_no_ext 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 + CRML.Blocks.Events.Event4ToEvent event4ToEvent2(x(start=true)) annotation (Placement(transformation(extent={{-4,-34},{4,-26}}))); CRML.Blocks.Logical.BooleanConstant b3(K=false) annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}))); diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesTrue/BecomesTrue_externals.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesTrue/BecomesTrue_externals.mo index 0e60cd3b..4e3704df 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesTrue/BecomesTrue_externals.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesTrue/BecomesTrue_externals.mo @@ -6,11 +6,15 @@ model BecomesTrue_externals annotation (Placement(transformation(extent={{100,-10},{120,10}}))); CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 annotation (Placement(transformation(extent={{-4,-4},{4,4}}))); + CRML.Blocks.Events.ShowEvent showEvent_eventPeriodic_b1 + annotation (Placement(transformation(extent={{-20,-44},{-12,-36}}))); 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})); + connect(showEvent_eventPeriodic_b1.u, boolean4Constant1.y) annotation (Line( + points={{-20.4,-40},{-30,-40},{-30,0},{-39,0}}, color={217,67,180})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false))); end BecomesTrue_externals; diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside.mo index 7b266f63..6643254d 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside.mo @@ -4,28 +4,28 @@ partial model BecomesTrueInside 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}}))); + CRML.Blocks.Events.Event4ToEvent event4ToEvent_1 + annotation (Placement(transformation(extent={{-64,-4},{-56,4}}))); + replaceable Inside.Inside2 inside + annotation (Placement(transformation(extent={{2,-50},{22,-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}}))); + CRML.Blocks.Events.Event4ToEvent event4ToEvent_2 + annotation (Placement(transformation(extent={{-64,-64},{-56,-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(b1, event4ToEvent_1.u) + annotation (Line(points={{-110,0},{-64.4,0}}, color={0,0,0})); + connect(b2, event4ToEvent_2.u) + annotation (Line(points={{-110,-60},{-64.4,-60}}, color={0,0,0})); + connect(event4ToEvent_2.y, inside.b1) annotation (Line(points={{-55.6,-60},{ + -22,-60},{-22,-43},{1,-43}}, color={217,67,180})); + connect(event4ToEvent_1.y, inside.b2) annotation (Line(points={{-55.6,0},{-22, + 0},{-22,-37},{1,-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}}, + points={{23,-40},{64,-40},{64,0},{110,0}}, color={175,175,175}, pattern=LinePattern.Dot, thickness=0.5)); diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside_externals.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside_externals.mo index 933f263b..9b6229b5 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside_externals.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesTrueInside/BecomesTrueInside_externals.mo @@ -1,16 +1,34 @@ 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}}))); + annotation (Placement(transformation(extent={{100,30},{120,50}}))); CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 - annotation (Placement(transformation(extent={{-4,-4},{4,4}}))); + annotation (Placement(transformation(extent={{-4,36},{4,44}}))); +public + CRML.Blocks.Logical.BooleanTable booleanTable_b1( + y0=false, + option_width=false, + instant={2,5,7.5,9}) + annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); + CRML.Blocks.Logical.BooleanTable booleanTable_b2( + y0=false, + option_width=false, + instant={3.5,4.5}) + annotation (Placement(transformation(extent={{-60,-50},{-40,-30}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_2 + annotation (Placement(transformation(extent={{-4,-44},{4,-36}}))); + CRML.ETL.Connectors.Boolean4Output b2 + annotation (Placement(transformation(extent={{100,-50},{120,-30}}))); 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 (Line(points={{4.4,40},{110,40}}, + color={162,29,33})); + connect(booleanTable_b1.y, booleanToBoolean4_1.u) + annotation (Line(points={{-39,40},{-4.4,40}}, color={217,67,180})); + connect(booleanTable_b2.y, booleanToBoolean4_2.u) + annotation (Line(points={{-39,-40},{-4.4,-40}}, color={217,67,180})); + connect(booleanToBoolean4_2.y, b2) + annotation (Line(points={{4.4,-40},{110,-40}}, color={162,29,33})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false))); end BecomesTrueInside_externals; diff --git a/resources/modelica_libraries/CRML_test/ETL/BecomesTrue_no_ext/BecomesTrue_no_ext.mo b/resources/modelica_libraries/CRML_test/ETL/BecomesTrue_no_ext/BecomesTrue_no_ext.mo index ff9d53c4..edf2d87d 100644 --- a/resources/modelica_libraries/CRML_test/ETL/BecomesTrue_no_ext/BecomesTrue_no_ext.mo +++ b/resources/modelica_libraries/CRML_test/ETL/BecomesTrue_no_ext/BecomesTrue_no_ext.mo @@ -2,7 +2,7 @@ within CRML_test.ETL.BecomesTrue_no_ext; model BecomesTrue_no_ext CRML.Blocks.Events.ClockEvent c1 annotation (Placement(transformation(extent={{24,44},{36,56}}))); - CRML.Blocks.Events.Event4ToEvent event4ToEvent + CRML.Blocks.Events.Event4ToEvent event4ToEvent(x(start=true)) annotation (Placement(transformation(extent={{-4,46},{4,54}}))); CRML.Blocks.Logical.BooleanTable b1( y0=false, @@ -15,7 +15,7 @@ model BecomesTrue_no_ext 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 + CRML.Blocks.Events.Event4ToEvent event4ToEvent1(x(start=true)) annotation (Placement(transformation(extent={{-4,6},{4,14}}))); CRML.Blocks.Logical.BooleanConstant b2 annotation (Placement(transformation(extent={{-80,0},{-60,20}}))); @@ -42,23 +42,24 @@ equation annotation (Line(points={{-15.6,50},{-4.4,50}}, color={162,29,33})); 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,20},{18,20},{18,10},{4.4,10}}, color={217,67,180})); - connect(b2.y, booleanToBoolean4_2.u) annotation (Line(points={{-59,10},{-48, - 10},{-48,20},{-36,20},{-36,10},{-24.4,10}}, color={217,67,180})); - connect(booleanToBoolean4_2.y, event4ToEvent1.u) annotation (Line(points={{ - -15.6,10},{-10,10},{-10,20},{-6,20},{-6,10},{-4.4,10}}, color={162,29, + connect(c2.u, event4ToEvent1.y) annotation (Line(points={{23.4,10},{4.4,10}}, + color={217,67,180})); + connect(b2.y, booleanToBoolean4_2.u) annotation (Line(points={{-59,10},{-24.4, + 10}}, color={217,67,180})); + connect(booleanToBoolean4_2.y, event4ToEvent1.u) annotation (Line(points={{-15.6, + 10},{-4.4,10}}, color={162,29, 33})); - connect(show_c2.u, event4ToEvent1.y) annotation (Line(points={{55.6,-4},{2,-4}, - {2,10},{4.4,10}}, color={217,67,180})); + connect(show_c2.u, event4ToEvent1.y) annotation (Line(points={{55.6,-4},{12, + -4},{12,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},{-24.4,-30}}, color={217,67,180})); connect(booleanToBoolean4_3.y, event4ToEvent2.u) annotation (Line(points={{-15.6,-30},{-4.4,-30}}, color={162,29,33})); - connect(show_c3.u, event4ToEvent2.y) annotation (Line(points={{55.6,-44},{-8, - -44},{-8,-30},{4.4,-30}}, color={217,67,180})); + connect(show_c3.u, event4ToEvent2.y) annotation (Line(points={{55.6,-44},{12, + -44},{12,-30},{4.4,-30}}, color={217,67,180})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false))); end BecomesTrue_no_ext; diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/Increasing1_no_ext.mo b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/Increasing1_no_ext.mo new file mode 100644 index 00000000..c9c7b40c --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/Increasing1_no_ext.mo @@ -0,0 +1,36 @@ +within CRML_test.ETL.Increasing1_no_ext; +model Increasing1_no_ext + Integer x1 = 3; + Integer x2 = 7; + Integer x3 = 7; + + CRML.ETL.Types.Boolean4 b_increasing1_on_strictly_greater_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_strictly_greater_2; + CRML.ETL.Types.Boolean4 b_increasing1_on_greater_or_equal_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_greater_or_equal_2; + CRML.ETL.Types.Boolean4 b_increasing1_on_strictly_less_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_strictly_less_2; + CRML.ETL.Types.Boolean4 b_increasing1_on_less_or_equal_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_less_or_equal_2; + CRML.ETL.Types.Boolean4 b_increasing1_on_equal_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_equal_2; + CRML.ETL.Types.Boolean4 b_increasing1_on_different_1; + CRML.ETL.Types.Boolean4 b_increasing1_on_different_2; + +equation + b_increasing1_on_strictly_greater_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing1_on_strictly_greater_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x1); + b_increasing1_on_greater_or_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 >= x2); + b_increasing1_on_greater_or_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 >= x1); + b_increasing1_on_strictly_less_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 >= x2); + b_increasing1_on_strictly_less_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 >= x1); + b_increasing1_on_less_or_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing1_on_less_or_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x1); + b_increasing1_on_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing1_on_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x3); + b_increasing1_on_different_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing1_on_different_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x3); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end Increasing1_no_ext; diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.mo b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.mo new file mode 100644 index 00000000..f793c201 --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.mo @@ -0,0 +1,3 @@ +within CRML_test.ETL; +package Increasing1_no_ext +end Increasing1_no_ext; diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.order b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.order new file mode 100644 index 00000000..e62bbf17 --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing1_no_ext/package.order @@ -0,0 +1 @@ +Increasing1_no_ext diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/Increasing2_no_ext.mo b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/Increasing2_no_ext.mo new file mode 100644 index 00000000..9cefd048 --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/Increasing2_no_ext.mo @@ -0,0 +1,36 @@ +within CRML_test.ETL.Increasing2_no_ext; +model Increasing2_no_ext + Integer x1 = 3; + Integer x2 = 7; + Integer x3 = 7; + + CRML.ETL.Types.Boolean4 b_increasing2_on_strictly_greater_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_strictly_greater_2; + CRML.ETL.Types.Boolean4 b_increasing2_on_greater_or_equal_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_greater_or_equal_2; + CRML.ETL.Types.Boolean4 b_increasing2_on_strictly_less_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_strictly_less_2; + CRML.ETL.Types.Boolean4 b_increasing2_on_less_or_equal_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_less_or_equal_2; + CRML.ETL.Types.Boolean4 b_increasing2_on_equal_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_equal_2; + CRML.ETL.Types.Boolean4 b_increasing2_on_different_1; + CRML.ETL.Types.Boolean4 b_increasing2_on_different_2; + +equation + b_increasing2_on_strictly_greater_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing2_on_strictly_greater_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x1); + b_increasing2_on_greater_or_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 >= x2); + b_increasing2_on_greater_or_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 >= x1); + b_increasing2_on_strictly_less_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 >= x2); + b_increasing2_on_strictly_less_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 >= x1); + b_increasing2_on_less_or_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 > x2); + b_increasing2_on_less_or_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 > x1); + b_increasing2_on_equal_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 == x2); + b_increasing2_on_equal_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 == x3); + b_increasing2_on_different_1 = CRML.ETL.Types.cvBooleanToBoolean4(x1 <> x2); + b_increasing2_on_different_2 = CRML.ETL.Types.cvBooleanToBoolean4(x2 <> x3); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end Increasing2_no_ext; diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.mo b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.mo new file mode 100644 index 00000000..df2e0086 --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.mo @@ -0,0 +1,3 @@ +within CRML_test.ETL; +package Increasing2_no_ext +end Increasing2_no_ext; diff --git a/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.order b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.order new file mode 100644 index 00000000..87a86203 --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Increasing2_no_ext/package.order @@ -0,0 +1 @@ +Increasing2_no_ext diff --git a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside.mo b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside.mo index 51d9d553..47895211 100644 --- a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside.mo +++ b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside.mo @@ -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 @@ -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, @@ -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; diff --git a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2.mo b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2.mo new file mode 100644 index 00000000..919a043e --- /dev/null +++ b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2.mo @@ -0,0 +1,89 @@ +within CRML_test.ETL.Inside; +partial model Inside2 + +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}}))); + CRML.TimeLocators.Attributes.PeriodsEnd periodEnd + annotation (Placement(transformation(extent={{-64,-80},{-56,-72}}))); + 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}}))); + 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 + annotation (Placement(transformation(extent={{40,60},{60,80}}))); + CRML.ETL.Connectors.ClockOutput c_filtered_ticks_of_c1_inside_p1 + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + CRML.Blocks.Events.ClockEvent + eventClock + annotation (Placement(transformation(extent={{74,-10},{94,10}}))); +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})); + 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})); + 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, + 30},{33,30}}, color={255,0,255})); + connect(and4_1.y, eventClock.u) + annotation (Line(points={{69,0},{73,0}}, color={255,0,255})); + connect(c_filtered_ticks_of_c1_inside_p1, eventClock.y) annotation (Line( + points={{110,0},{95,0}}, + color={175,175,175}, + pattern=LinePattern.Dot, + thickness=0.5)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end Inside2; diff --git a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside_externals.mo b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_externals.mo similarity index 96% rename from resources/modelica_libraries/CRML_test/ETL/Inside/Inside_externals.mo rename to resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_externals.mo index 40ccd261..d4eeac21 100644 --- a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside_externals.mo +++ b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_externals.mo @@ -1,6 +1,5 @@ within CRML_test.ETL.Inside; -model Inside_externals - +model Inside2_externals public CRML.Blocks.Logical.BooleanTable bool2( @@ -32,4 +31,4 @@ equation 50}}, color={217,67,180})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false))); -end Inside_externals; +end Inside2_externals; diff --git a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside_verif.mo b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_verif.mo similarity index 91% rename from resources/modelica_libraries/CRML_test/ETL/Inside/Inside_verif.mo rename to resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_verif.mo index 747d3bb8..b7adf2df 100644 --- a/resources/modelica_libraries/CRML_test/ETL/Inside/Inside_verif.mo +++ b/resources/modelica_libraries/CRML_test/ETL/Inside/Inside2_verif.mo @@ -1,7 +1,7 @@ within CRML_test.ETL.Inside; -model Inside_verif - extends Inside; - Inside_externals externals +model Inside2_verif + extends Inside2; + Inside2_externals externals annotation (Placement(transformation(extent={{-200,0},{-140,60}}))); equation // Bindings @@ -24,4 +24,4 @@ equation extent={{-200,-100},{100,100}}, initialScale=0.1)), experiment(StopTime=14)); -end Inside_verif; +end Inside2_verif; diff --git a/resources/modelica_libraries/CRML_test/ETL/Inside/package.order b/resources/modelica_libraries/CRML_test/ETL/Inside/package.order index 141c57fc..1f3373aa 100644 --- a/resources/modelica_libraries/CRML_test/ETL/Inside/package.order +++ b/resources/modelica_libraries/CRML_test/ETL/Inside/package.order @@ -1,3 +1,4 @@ +Inside2 +Inside2_externals +Inside2_verif Inside -Inside_externals -Inside_verif diff --git a/resources/modelica_libraries/CRML_test/ETL/package.order b/resources/modelica_libraries/CRML_test/ETL/package.order index d1388755..2b1ebf27 100644 --- a/resources/modelica_libraries/CRML_test/ETL/package.order +++ b/resources/modelica_libraries/CRML_test/ETL/package.order @@ -24,3 +24,5 @@ TemplateXor TemplateXor_no_ext Varying1_no_ext Varying2_no_ext +Increasing1_no_ext +Increasing2_no_ext diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/BooleanAtEvent/package.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/BooleanAtEvent/package.bak-mo deleted file mode 100644 index 2dfba03b..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/BooleanAtEvent/package.bak-mo +++ /dev/null @@ -1,3 +0,0 @@ -within CRML_test.Spec_doc; -package BooleanAtEvent -end BooleanAtEvent; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/BooleanIntegration/package.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/BooleanIntegration/package.bak-mo deleted file mode 100644 index 0675ba9f..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/BooleanIntegration/package.bak-mo +++ /dev/null @@ -1,3 +0,0 @@ -within CRML_test.Spec_doc; -package BooleanIntegration -end BooleanIntegration; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_externals.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_externals.bak-mo deleted file mode 100644 index fa483b70..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_externals.bak-mo +++ /dev/null @@ -1,20 +0,0 @@ -within CRML_test.Spec_doc.ClockCurrentTick_no_ext; -model ClockCurrentTick_externals - CRML.Blocks.Logical.BooleanPulse boolean4Constant1(period=20, startTime= - 2) - annotation (Placement(transformation(extent={{-60,40},{-40,60}}))); - CRML.ETL.Connectors.ClockOutput c - annotation (Placement(transformation(extent={{100,40},{120,60}}))); - CRML.Blocks.Events.ClockEvent clockEvent - annotation (Placement(transformation(extent={{24,44},{36,56}}))); -equation - connect(boolean4Constant1.y, clockEvent.u) - annotation (Line(points={{-39,50},{23.4,50}}, color={217,67,180})); - connect(c, clockEvent.y) annotation (Line( - points={{110,50},{36.6,50}}, - color={175,175,175}, - pattern=LinePattern.Dot, - thickness=0.5)); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); -end ClockCurrentTick_externals; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_verif.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_verif.bak-mo deleted file mode 100644 index 71ebf0c9..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/ClockCurrentTick_no_ext/ClockCurrentTick_verif.bak-mo +++ /dev/null @@ -1,26 +0,0 @@ -within CRML_test.Spec_doc.ClockCurrentTick_no_ext; -model ClockCurrentTick_verif - extends ClockCurrentTick_no_ext; - ClockCurrentTick_externals externals - annotation (Placement(transformation(extent={{-200,0},{-140,60}}))); -equation - // Bindings - c =externals.c; - 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 ClockCurrentTick_verif; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter/package.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter/package.bak-mo deleted file mode 100644 index 841878ed..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter/package.bak-mo +++ /dev/null @@ -1,3 +0,0 @@ -within CRML_test.Spec_doc; -package ClockFilter -end ClockFilter; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter_wip/package.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter_wip/package.bak-mo deleted file mode 100644 index 9afcade1..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/ClockFilter_wip/package.bak-mo +++ /dev/null @@ -1,3 +0,0 @@ -within CRML_test.Spec_doc; -package ClockFilter_wip -end ClockFilter_wip; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/ClockRank_wip/package.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/ClockRank_wip/package.bak-mo deleted file mode 100644 index 1398b600..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/ClockRank_wip/package.bak-mo +++ /dev/null @@ -1,3 +0,0 @@ -within CRML_test.Spec_doc; -package ClockRank_wip -end ClockRank_wip; diff --git a/resources/modelica_libraries/CRML_test/Spec_doc/TemplateExample1_no_ext/TemplateExample1_verif.bak-mo b/resources/modelica_libraries/CRML_test/Spec_doc/TemplateExample1_no_ext/TemplateExample1_verif.bak-mo deleted file mode 100644 index b4d3fc05..00000000 --- a/resources/modelica_libraries/CRML_test/Spec_doc/TemplateExample1_no_ext/TemplateExample1_verif.bak-mo +++ /dev/null @@ -1,24 +0,0 @@ -within CRML_test.Spec_doc.TemplateExample1_no_ext; -model TemplateExample1_verif - extends TemplateExample1_no_ext; -equation - // Bindings - - 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 TemplateExample1_verif; diff --git a/resources/modelica_libraries/README.md b/resources/modelica_libraries/README.md index 5d83a9ad..2ea6f9f0 100644 --- a/resources/modelica_libraries/README.md +++ b/resources/modelica_libraries/README.md @@ -1,3 +1,3 @@ -The CRML library is developed by BOUSKELA Daniel at EDF and contains the ETL block definitions in Modelica. +The CRML library is developed by BOUSKELA Daniel and JARDIN Audrey at EDF and contains the ETL block definitions in Modelica. The CRMLtoModelica library contains the blocks needed by the Modelica models translated from CRML by the compiler. diff --git a/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_no_ext_ref.mat b/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_no_ext_ref.mat index e162586f..47d3ae78 100644 Binary files a/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_no_ext_ref.mat and b/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_no_ext_ref.mat differ diff --git a/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_verif_ref.mat b/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_verif_ref.mat index cdb9ccc2..767f99ad 100644 Binary files a/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_verif_ref.mat and b/src/test/resources/refResults/libraries/ETL_test/BecomesFalse_verif_ref.mat differ diff --git a/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_no_ext_ref.mat b/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_no_ext_ref.mat index d6f21bc4..5d7db6f3 100644 Binary files a/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_no_ext_ref.mat and b/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_no_ext_ref.mat differ diff --git a/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_verif_ref.mat b/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_verif_ref.mat index d82129b8..d3fff92a 100644 Binary files a/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_verif_ref.mat and b/src/test/resources/refResults/libraries/ETL_test/BecomesTrue_verif_ref.mat differ diff --git a/src/test/resources/testModels/libraries/ETL_test/DecideOver_no_ext.crml b/src/test/resources/testModels/libraries/ETL_test/DecideOver_no_ext.crml index 6542a8c2..b634ed88 100644 --- a/src/test/resources/testModels/libraries/ETL_test/DecideOver_no_ext.crml +++ b/src/test/resources/testModels/libraries/ETL_test/DecideOver_no_ext.crml @@ -11,5 +11,5 @@ model DecideOver_no_ext is { Boolean b1 is if (2.5 < time) and (time < 5) then true else false; Period P1 is [ new Event b1, new Event not b1]; - Boolean b_decide_over is 'decide' phi1 'over' P1; //Value is undecided and becomes false at t=3.5s + Boolean b_decide_over is 'decide' phi1 'over' P1; //Value is false until t=2s, remains undecided and becomes false again at t=3.5s }; \ No newline at end of file