diff --git a/resources/modelica_libraries/CRML.mo b/resources/modelica_libraries/CRML.mo index 2c6475e..79b4501 100644 --- a/resources/modelica_libraries/CRML.mo +++ b/resources/modelica_libraries/CRML.mo @@ -4325,7 +4325,9 @@ which is only valid in the rotor-fixed coordinate system. end xSI; annotation( Documentation(info = " -")); +"), + Diagram(graphics), + Icon(graphics = {Rectangle(lineColor = {200, 200, 200}, fillColor = {248, 248, 248}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-100, -100}, {100, 100}}, radius = 25), Text(extent = {{-64, 36}, {58, -32}}, textString = "Units")})); end Units; package ETL diff --git a/src/test/resources/refResults/use-cases/ics_educational/Reqs_sri_CRML_verif_res.mat b/src/test/resources/refResults/use-cases/ics_educational/Reqs_sri_CRML_verif_res.mat new file mode 100644 index 0000000..a407371 Binary files /dev/null and b/src/test/resources/refResults/use-cases/ics_educational/Reqs_sri_CRML_verif_res.mat differ diff --git a/src/test/resources/testModels/use-cases/ics_educational/Reqs_sri_CRML.crml b/src/test/resources/testModels/use-cases/ics_educational/Reqs_sri_CRML.crml new file mode 100644 index 0000000..2d05eb9 --- /dev/null +++ b/src/test/resources/testModels/use-cases/ics_educational/Reqs_sri_CRML.crml @@ -0,0 +1,220 @@ +// SRI requirement model +model Reqs_sri_CRML is { + + // ETL library + + // Operators on Boolean + // Logical disjunction + Template b1 'or' b2 = not (not b1 and not b2); + + // Exclusive logical disjunction + Template b1 'xor' b2 = (b1 'or' b2) and not (b1 and b2); + + // Logical inference + Template b1 'implies' b2 = not b1 'or' b2; + + // Operators on clocks + // Filter clock ticks inside a time period + Operator [ Clock ] Clock C 'inside' Period P + = C filter ((tick C >= P start) and (tick C <= P end)); + + // Count the occurrences of events inside a time period + Operator [ Integer ] 'count' Clock C 'inside' Period P = card (C 'inside' P); + + // Operators on events + // Events generated when a Boolean becomes true + Operator [ Clock ] Boolean b 'becomes true' = new Clock b; + + // Events generated when a Boolean becomes false + Operator [ Clock] Boolean b 'becomes false' = not b 'becomes true'; + + // Events generated when a Boolean becomes true inside a time period + Operator [ Clock] Boolean b 'becomes true inside' Period P + = (b 'becomes true') 'inside' P; + + // Events generated when a Boolean becomes false inside a time period + Operator [ Clock] Boolean b 'becomes false inside' Period P + = (b 'becomes false') 'inside' P; + + // Decide + // Operator 'decide' is + Operator [ Boolean ] 'decide' Boolean phi 'over' Period P + = phi 'or' new Boolean (P end); + + // Evaluate + Operator [ Boolean ] 'evaluate' Boolean phi 'over' Period P + = integrate (('decide' phi 'over' P) * phi) on P; + + // Operators for the evaluation of requirements + // Check + Operator [ Boolean ] 'check' Boolean phi 'over' Periods P + = and ('evaluate' phi 'over' P); + + Category increasing_int = { (>, >), (>=, >=), (<, >=), (<=, >), (==, >), (<>, >) }; + Category increasing_real = { (>, >), (>=, >=), (<, >=), (<=, >) }; + Operator [ Boolean ] Integer x '>_int' Integer n = apply increasing_int on ( x > n ); + Operator [ Boolean ] Integer x '>=_int' Integer n = apply increasing_int on ( x >= n ); + Operator [ Boolean ] Integer x '<_int' Integer n = apply increasing_int on ( x < n ); + Operator [ Boolean ] Integer x '<=_int' Integer n = apply increasing_int on ( x <= n ); + Operator [ Boolean ] Integer x '==_int' Integer n = apply increasing_int on ( x == n ); + Operator [ Boolean ] Integer x '<>_int' Integer n = apply increasing_int on ( x <> n ); + Operator [ Boolean ] Real x '>_real' Real d = apply increasing_real on ( x > d ); + Operator [ Boolean ] Real x '>=_real' Real d = apply increasing_real on ( x >= d ); + Operator [ Boolean ] Real x '<_real' Real d = apply increasing_real on ( x < d ); + Operator [ Boolean ] Real x '<=_real' Real d = apply increasing_real on ( x <= d ); + + + Operator [ Boolean ] 'id' Boolean b = b; + Operator [ Boolean ] 'cte_false' Boolean b = false; + Operator [ Boolean ] 'cte_true' Boolean b = true; + + Category varying1 = { ('id', 'cte_false') }; + Category varying2 = { ('id', 'cte_true') }; + Operator [ Boolean ] 'set to false' Boolean b = apply varying1 on ( 'id' b ); + Operator [ Boolean ] 'set to true' Boolean b = apply varying2 on ( 'id' b ); + + /////////////////////////////////////////////////////////////////////////////// + // FORM-L library + // include "ETL.crml" + + // Operators to define time periods + // From events occur + Operator [ Periods ] 'from' Clock ev = new Periods [ ev, new Clock false ]; + + // After events occur + Operator [ Periods ] 'after' Clock ev = new Periods ] ev, new Clock false ]; + + // Before events occur + Operator [ Periods ] 'before' Clock ev = new Periods [ new Clock false, ev [; + + // Until events occur + Operator [ Periods ] 'until' Clock ev = new Periods [ new Clock false, ev ]; + + // While a Boolean is true + Operator [ Periods ] 'during' Boolean b = new Periods [ new Clock b, new Clock not b ]; + + // After events occur and before events occur + Operator [ Periods ] 'after' Clock ev1 'before' Clock ev2 = new Periods ] ev1, ev2 [; + + // After events occur and until events occur + Operator [ Periods ] 'after' Clock ev1 'until' Clock ev2 = new Periods ] ev1, ev2 ]; + + // After events occur and for an elapsed time + Operator [ Periods ] 'after' Clock ev 'for' Real d = new Periods ] ev, ev + d ]; + + // After events occur and within an elapsed time + Operator [ Periods ] 'after' Clock ev 'within' Real d = new Periods ] ev, ev + d [; + + // From events occur and before events occur + Operator [ Periods ] 'from' Clock ev1 'before' Clock ev2 = new Periods [ ev1, ev2 [; + + // From events occur and until events occur + Operator [ Periods ] 'from' Clock ev1 'until' Clock ev2 = new Periods [ ev1, ev2 ]; + + // From events occur and for an elapsed time + Operator [ Periods ] 'from' Clock ev 'for' Real d = new Periods [ ev, ev + d ]; + + // From events occur and within an elapsed time + Operator [ Periods ] 'from' Clock ev 'within' Real d = new Periods [ ev, ev + d [; + + // When events occurs + Operator [ Periods ] 'when' Clock ev = new Periods [ ev, ev ]; + + + // Operators for the evaluation of requirements + + // Checking that a requirement is satisfied at the end of a time period + Operator [ Boolean ] Periods P 'check at end' Boolean b + = 'check' ('set to false' b) 'over' P; + + // Checking that a requirement is satisfied at any time instant of a time period + Operator [ Boolean ] Periods P 'check anytime' Boolean b + = 'check' ('set to true' b) 'over' P; + + // Following operators cannot be implemented because "count inside" is implemented only on period and not periods (which would have no meaning) ! + + // Checking that the number of event occurrences at the end of a time period is lower or higher than a threshold + //Operator [ Boolean ] Periods P 'check count' Clock E '<' Integer n + // = 'check' (('count' E 'inside' P) '<_int' n) 'over' P; + //Operator [ Boolean ] Periods P 'check count' Clock E '<=' Integer n + // = 'check'(('count' E 'inside' P) '<=_int' n) 'over' P; + //Operator [ Boolean ] Periods P 'check count' Clock E '>' Integer n + // = 'check'(('count' E 'inside' P) '>_int' n) 'over' P; + //Operator [ Boolean ] Periods P 'check count' Clock E '>=' Integer n + // = 'check'(('count' E 'inside' P) '>=_int' n) 'over' P; + //Operator [ Boolean ] Periods P 'check count' Clock E '==' Integer n + // = 'check'(('count' E 'inside' P) '==_int' n) 'over' P; + //Operator [ Boolean ] Periods P 'check count' Clock E '<>' Integer n + // = 'check'(('count' E 'inside' P) '<>_int' n) 'over' P; + + // Ensuring that a requirement is satisfied all along a time period + //Operator [ Boolean ] Periods P 'ensure' Boolean b + // = (P 'check count' (b 'becomes true') '==' 0) and (P 'check anytime' b); + + + // Following operators cannot been implemented because "duration on" is not implemented yet in the compiler. + + // Checking that the duration of a condition at the end of a time period is lower or higher than a threshold + //Operator [ Boolean ] Periods P 'check duration' Boolean b '<' Real d + // = 'check' (('duration' b 'on' P) '<_real' d) 'over' P; + //Operator [ Boolean ] Periods P 'check duration' Boolean b '<=' Real d + // = 'check' (('duration' b 'on' P) '<=_real' d) 'over' P; + //Operator [ Boolean ] Periods P 'check duration' Boolean b '>' Real d + // = 'check' (('duration' b 'on' P) '>_real' d) 'over' P; + //Operator [ Boolean ] Periods P 'check duration' Boolean b '>=' Real d + // = 'check' (('duration' b 'on' P) '>=_real' d) 'over' P; + + /////////////////////////////////////////////////////////////////////////////// + // Finally, the SRI model + + // Always ??? Not sure operator without parameter is admitted. + Operator [ Periods ] 'always' = 'during' true; + + // Temperature requirements + Real T is external; + + // NL : "La température du SRI doit être maintenue entre 16°C et 30°C." + // SNL: "En fonctionnement normal, le système SRI doit avoir une température entre 16°C et 30°C." + Boolean T_in_range is ((T >= 16) and (T <= 30)); //remark: not done yet but units should be specified + Boolean R1_T is ('always') 'ensure' T_in_range ; + + // NL : "Si la température dépasse ces limites, elle doit être revenue dans l'intervalle au bout d'une minute." + // SNL : "Lorsque le système SRI a une température qui dépasse les limites du fonctionnement normal, + // le système SRI doit avoir une température à nouveau dans l'intervalle autorisé en fonctionnement normal + // au bout d'une minute." + Boolean R2_T is ('from' (new Clock (not R1_T)) 'for' 60.0) 'check at end' T_in_range ; //remark: 'implies' could be used instead + Boolean R_T is R1_T and R2_T ; + + // Speed requirements for heat exchangers + class Req_speed is { + Real v is external; + Boolean v_too_high is (v > 6.0) ; // m/s + Clock v_too_high_clock is (new Clock v_too_high) ; + Boolean R1_v is ('from' v_too_high_clock 'for' 3600.0) 'check duration' v_too_high '<=_real' 10.0 ; + Boolean R2_v is ('from' v_too_high_clock 'for' 3600.0) 'check count' v_too_high_clock '<=_int' 2 ; + Boolean R_v is R1_v and R2_v ; + }; + Real v1 is external; + Real v2 is external; + Req_speed Req_speed1(v = v1), Req_speed2(v = v2); + Boolean R_speed_all is Req_speed1.R_v and Req_speed2.R_v ; + + // Flow requirements for pumps + class Req_flow is { + Real f is external ; + Boolean pump_in_service is external ; + Boolean f_over_fmin is (f >= 700) ; // t/h + Boolean R_f is ('during' pump_in_service) 'ensure' f_over_fmin ; + }; + Boolean pump_in_service1 is external; + Boolean pump_in_service2 is external; + Boolean pump_in_service3 is external; + Real flow1 is external; + Real flow2 is external; + Real flow3 is external; + Req_flow Req_flow1(pump_in_service=pump_in_service1,flow=flow1); + Req_flow Req_flow1(pump_in_service=pump_in_service2,flow=flow2); + Req_flow Req_flow1(pump_in_service=pump_in_service3,flow=flow3); + Boolean R_flow_all is Req_flow1.R_f and Req_flow2.R_f and Req_flow3.R_f; + +}; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_externals.mo b/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_externals.mo new file mode 100644 index 0000000..48d7025 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_externals.mo @@ -0,0 +1,128 @@ +within cooling_system.Verification; + +model Reqs_sri_CRML_externals + import cooling_system; + Modelica.Blocks.Sources.RealExpression Q_echangeur_1(y = SRI_corrige.EchangeurAPlaques1D1.Ec.Q) annotation( + Placement(transformation(origin = {27, 64}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed annotation( + Placement(transformation(origin = {78, 64}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Sources.RealExpression Q_echangeur_2(y = SRI_corrige.EchangeurAPlaques1D2.Ec.Q) annotation( + Placement(transformation(origin = {25, 36}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed1 annotation( + Placement(transformation(origin = {80, 36}, extent = {{-10, -10}, {10, 10}}))); + Scenarios.Scenario0_2echangeurs scenario0_2echangeurs annotation( + Placement(transformation(origin = {-156, 54}, extent = {{-18, -12}, {18, 12}}))); + Scenarios.Scenario0_1echangeur scenario0_1echangeur annotation( + Placement(transformation(origin = {-98, 36}, extent = {{-18, -12}, {17.9999, 12}}))); + Scenarios.Scenario_GrandChaud scenarioGrandChaud annotation( + Placement(transformation(origin = {-101, -75}, extent = {{-19, -13}, {18.9999, 13}}))); + cooling_system.Behavior.SRIN4_v4.SRI_corrige SRI_corrige annotation( + Placement(transformation(origin = {-26, 9}, extent = {{-26, -22}, {26, 22}}))); + Scenarios.Scenario_limites scenario_limites annotation( + Placement(transformation(origin = {-157, -55}, extent = {{-19, -13}, {19, 13}}))); + Scenarios.Scenario2 scenario_perturbations annotation( + Placement(transformation(origin = {-98, -20.6667}, extent = {{-19, -12.6667}, {19, 12.6667}}))); + Scenarios.Scenario1 scenario_test annotation( + Placement(transformation(extent = {{-176, -14}, {-136, 12}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe1(y = SRI_corrige.PompeCentrifugeDyn1.Q) annotation( + Placement(transformation(origin = {25, -14}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe1(y = SRI_corrige.PompeCentrifugeDyn1.M.Ctr) annotation( + Placement(transformation(origin = {23, 10}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowConversion flowConversion annotation( + Placement(transformation(extent = {{68, -26}, {88, -6}}))); + Observers.PompeEnService pompeEnService annotation( + Placement(transformation(extent = {{68, 0}, {88, 20}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe2(y = SRI_corrige.PompeCentrifugeDyn2.Q) annotation( + Placement(transformation(origin = {25, -66}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe2(y = SRI_corrige.PompeCentrifugeDyn2.M.Ctr) annotation( + Placement(transformation(origin = {23, -42}, extent = {{-17, -14}, {17, 14}}))); + Observers.PompeEnService pompeEnService1 annotation( + Placement(transformation(extent = {{68, -52}, {88, -32}}))); + Observers.FlowConversion flowConversion1 annotation( + Placement(transformation(extent = {{68, -78}, {88, -58}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe3(y = SRI_corrige.PompeCentrifugeDyn3.Q) annotation( + Placement(transformation(origin = {25, -118}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe3(y = SRI_corrige.PompeCentrifugeDyn3.M.Ctr) annotation( + Placement(transformation(origin = {23, -94}, extent = {{-17, -14}, {17, 14}}))); + Observers.PompeEnService pompeEnService2 annotation( + Placement(transformation(extent = {{68, -104}, {88, -84}}))); + Observers.FlowConversion flowConversion2 annotation( + Placement(transformation(extent = {{68, -130}, {88, -110}}))); + Modelica.Blocks.Sources.RealExpression T_SRI(y = SRI_corrige.CapteurT1.T) annotation( + Placement(transformation(origin = {27, -148}, extent = {{-17, -14}, {17, 14}}))); + Observers.KtoDeg ktoDeg annotation( + Placement(transformation(extent = {{68, -160}, {88, -140}}))); + Observers.KtoDeg ktoDeg1 annotation( + Placement(transformation(extent = {{68, -230}, {88, -210}}))); + Observers.KtoDeg ktoDeg2 annotation( + Placement(transformation(extent = {{68, -200}, {88, -180}}))); + Modelica.Blocks.Sources.RealExpression T_input_sf(y = SRI_corrige.EchangeurAPlaques1D2.Tef) annotation( + Placement(transformation(origin = {25, -218}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression T_output_sf(y = SRI_corrige.EchangeurAPlaques1D2.Tsf) annotation( + Placement(transformation(origin = {27, -190}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Interfaces.RealOutput v1 annotation( + Placement(transformation(origin = {270, 60}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, 60}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput v2 annotation( + Placement(transformation(origin = {270, 40}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, 20}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service1 annotation( + Placement(transformation(origin = {270, 10}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -60}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service2 annotation( + Placement(transformation(origin = {270, -46}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -120}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service3 annotation( + Placement(transformation(origin = {270, -100}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -180}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow1 annotation( + Placement(transformation(origin = {270, -12}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -80}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow2 annotation( + Placement(transformation(origin = {270, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -140}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow3 annotation( + Placement(transformation(origin = {270, -130}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -200}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput T annotation( + Placement(transformation(origin = {270, -200}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -240}, extent = {{-10, -10}, {10, 10}}))); +equation + connect(Q_echangeur_1.y, flowToSpeed.u) annotation( + Line(points = {{45.7, 64}, {57.4, 64}, {57.4, 65.2}, {66, 65.2}}, color = {0, 0, 127})); + connect(Q_echangeur_2.y, flowToSpeed1.u) annotation( + Line(points = {{43.7, 36}, {58, 36}, {58, 37.2}, {68, 37.2}}, color = {0, 0, 127})); + connect(Q_Pompe1.y, flowConversion.u) annotation( + Line(points = {{43.7, -14}, {43.7, -14.8}, {66, -14.8}}, color = {0, 0, 127})); + connect(Couple_Pompe1.y, pompeEnService.u) annotation( + Line(points = {{41.7, 10}, {58, 10}, {58, 11.2}, {66, 11.2}}, color = {0, 0, 127})); + connect(Couple_Pompe2.y, pompeEnService1.u) annotation( + Line(points = {{41.7, -42}, {58, -42}, {58, -40.8}, {66, -40.8}}, color = {0, 0, 127})); + connect(Q_Pompe2.y, flowConversion1.u) annotation( + Line(points = {{43.7, -66}, {46, -66.8}, {66, -66.8}}, color = {0, 0, 127})); + connect(Couple_Pompe3.y, pompeEnService2.u) annotation( + Line(points = {{41.7, -94}, {58, -94}, {58, -92.8}, {66, -92.8}}, color = {0, 0, 127})); + connect(Q_Pompe3.y, flowConversion2.u) annotation( + Line(points = {{43.7, -118}, {46, -118.8}, {66, -118.8}}, color = {0, 0, 127})); + connect(T_SRI.y, ktoDeg.u) annotation( + Line(points = {{45.7, -148}, {58, -148}, {58, -148.8}, {66, -148.8}}, color = {0, 0, 127})); + connect(ktoDeg1.u, T_input_sf.y) annotation( + Line(points = {{66, -218.8}, {64, -218}, {43.7, -218}}, color = {0, 0, 127})); + connect(ktoDeg2.u, T_output_sf.y) annotation( + Line(points = {{66, -188.8}, {50, -188.8}, {50, -190}, {45.7, -190}}, color = {0, 0, 127})); + connect(scenario0_2echangeurs.scenarioConnector, SRI_corrige.scenario) annotation( + Line(points = {{-136.8, 54.24}, {-64, 54.24}, {-64, 8.18519}, {-51.7111, 8.18519}})); + connect(ktoDeg.y, T) annotation( + Line(points = {{90, -148}, {218, -148}, {218, -200}, {270, -200}}, color = {0, 0, 127})); + connect(flow3, flowConversion2.y) annotation( + Line(points = {{270, -130}, {132, -130}, {132, -118}, {90, -118}}, color = {0, 0, 127})); + connect(pump_in_service3, pompeEnService2.y) annotation( + Line(points = {{270, -100}, {176, -100}, {176, -94}, {90, -94}}, color = {255, 0, 255})); + connect(flow2, flowConversion1.y) annotation( + Line(points = {{270, -70}, {140, -70}, {140, -66}, {90, -66}}, color = {0, 0, 127})); + connect(pump_in_service2, pompeEnService1.y) annotation( + Line(points = {{270, -46}, {158, -46}, {158, -42}, {90, -42}}, color = {255, 0, 255})); + connect(flow1, flowConversion.y) annotation( + Line(points = {{270, -12}, {160, -12}, {160, -14}, {90, -14}}, color = {0, 0, 127})); + connect(pump_in_service1, pompeEnService.y) annotation( + Line(points = {{270, 10}, {90, 10}}, color = {255, 0, 255})); + connect(v2, flowToSpeed1.y) annotation( + Line(points = {{270, 40}, {180, 40}, {180, 38}, {92, 38}}, color = {0, 0, 127})); + connect(v1, flowToSpeed.y) annotation( + Line(points = {{270, 60}, {178, 60}, {178, 66}, {90, 66}}, color = {0, 0, 127})); + annotation( + Diagram(graphics = {Rectangle(origin = {56, -70}, fillColor = {143, 240, 164}, fillPattern = FillPattern.Solid, extent = {{-52, 166}, {52, -166}}), Text(origin = {53, 87}, extent = {{-27, 9}, {27, -9}}, textString = "Observers"), Rectangle(origin = {-127, 0}, fillColor = {255, 190, 111}, fillPattern = FillPattern.Solid, extent = {{-67, 96}, {67, -96}}), Text(origin = {-131, 87}, extent = {{-35, 7}, {35, -7}}, textString = "Scenarios")}, coordinateSystem(extent = {{-200, 100}, {260, -240}})), + Icon(coordinateSystem(extent = {{-200, -300}, {260, 100}})), + experiment(StartTime = 0, StopTime = 1000, Tolerance = 1e-06, Interval = 2)); +end Reqs_sri_CRML_externals; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_verif.mo b/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_verif.mo new file mode 100644 index 0000000..69305f3 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/Reqs_sri_CRML_verif.mo @@ -0,0 +1,32 @@ +within cooling_system.Verification; + +model Reqs_sri_CRML_verif + Reqs_sri_CRML_externals externals annotation( + Placement(transformation(origin = {-206, 40}, extent = {{-23, -20}, {23, 20}}))); + inner CRML.TimeLocators.Continuous.Master master annotation( + Placement(transformation(origin = {-392, 168}, extent = {{232, -228}, {252, -208}}))); + CRML.Blocks.Logical.BooleanPulse booleanPulse(period = 1000, startTime = 10, width = 980) annotation( + Placement(transformation(origin = {-414, 168}, extent = {{194, -228}, {214, -208}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 annotation( + Placement(transformation(origin = {-402, 168}, extent = {{218, -222}, {226, -214}}))); + Reqs_sri_CRML reqs annotation( + Placement(transformation(origin = {-130, 4}, extent = {{-14, -13}, {14, 13}}))); +equation + // Bindings + reqs.v1 = externals.v1; + reqs.v2 = externals.v2; + reqs.pump_in_service1 = externals.pump_in_service1; + reqs.pump_in_service2 = externals.pump_in_service2; + reqs.pump_in_service3 = externals.pump_in_service3; + reqs.flow1 = externals.flow1; + reqs.flow2 = externals.flow2; + reqs.flow3 = externals.flow3; + reqs.T = externals.T ; + connect(booleanPulse.y, booleanToBoolean4_1.u) annotation( + Line(points = {{-199, -50}, {-184, -50}}, color = {217, 67, 180})); + connect(master.u, booleanToBoolean4_1.y) annotation( + Line(points = {{-161, -50}, {-176, -50}}, color = {162, 29, 33})); + +annotation( + Diagram(coordinateSystem(extent = {{-240, 60}, {-140, -60}}))); +end Reqs_sri_CRML_verif; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL.mo new file mode 100644 index 0000000..d01440b --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL.mo @@ -0,0 +1,43 @@ +within BFE.Logique; +block ETL "ET logique à deux entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,50},{-100,70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,-70},{-100,-50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal and uL2.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + "&"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end ETL; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL3.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL3.mo new file mode 100644 index 0000000..385c526 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL3.mo @@ -0,0 +1,46 @@ +within BFE.Logique; +block ETL3 "ET logique à trois entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-90},{-100,-70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,70},{-100,90}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal and uL2.signal and uL3.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + "&"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end ETL3; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL4.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL4.mo new file mode 100644 index 0000000..29340f6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/ETL4.mo @@ -0,0 +1,49 @@ +within BFE.Logique; +block ETL4 "ET logique à quatre entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-40},{-100,-20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL4 + annotation (Placement(transformation(extent={{-120,-100},{-100,-80}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,80},{-100,100}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal and uL2.signal and uL3.signal and uL4.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + "&"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end ETL4; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/HOP.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/HOP.mo new file mode 100644 index 0000000..b188799 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/HOP.mo @@ -0,0 +1,71 @@ +within BFE.Logique; +block HOP "Mémoire hors prioritaire" +protected + Boolean xL; + +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical E + annotation (Placement(transformation( + extent={{-120,50},{-100,70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical HP + annotation (Placement(transformation( + extent={{-120,-70},{-100,-50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uInit + annotation (Placement(transformation( + origin={0,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); +algorithm + + when initial() then + xL := uInit.signal; + end when; + + if HP.signal then + xL := false; + elseif E.signal then + xL := true; + end if; + + yL.signal := xL; + +equation + + if (cardinality(uInit) == 0) then + uInit.signal = E.signal; + end if; + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-50,74},{44,18}}, textString= + "E"), + Line(points={{-100,0},{100,0}}), + Text(extent={{-48,-20},{50,-84}}, textString= + "HP"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

Version 1.6

+ +")); +end HOP; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/IMP.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/IMP.mo new file mode 100644 index 0000000..b80f0d5 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/IMP.mo @@ -0,0 +1,68 @@ +within BFE.Logique; +block IMP "Impulsion monostable monocoup réenclenchable" + parameter Real T=5 "Durée de l'impulsion (s)"; + +protected + Real trans "Instant de la désexcitation (s)"; + +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uInit + annotation (Placement(transformation( + origin={0,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + when initial() then + yL.signal := uInit.signal; + trans := if uInit.signal then T else 0; + elsewhen (uL.signal) then + yL.signal := true; + trans := time + T; + end when; + + when (time >= trans) then + yL.signal := false; + end when; + +equation + + if (cardinality(uInit) == 0) then + uInit.signal = uL.signal; + end if; + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-36,20},{34,-36}}, textString= + "%T"), + Line(points={{-80,-40},{-60,-40},{-60,40},{60,40},{60,-40},{80,-40}}), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

Version 1.6

+ +")); +end IMP; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL.mo new file mode 100644 index 0000000..4d6b040 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL.mo @@ -0,0 +1,43 @@ +within BFE.Logique; +block OUL "OU logique à deux entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,50},{-100,70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,-70},{-100,-50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal or uL2.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + ">= 1"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end OUL; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL3.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL3.mo new file mode 100644 index 0000000..b73f75d --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL3.mo @@ -0,0 +1,46 @@ +within BFE.Logique; +block OUL3 "OU logique à trois entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-90},{-100,-70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,70},{-100,90}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal or uL2.signal or uL3.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + ">= 1"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end OUL3; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL4.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL4.mo new file mode 100644 index 0000000..8f1af48 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/OUL4.mo @@ -0,0 +1,49 @@ +within BFE.Logique; +block OUL4 "OU logique à quatre entrées" + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-40},{-100,-20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL4 + annotation (Placement(transformation(extent={{-120,-100},{-100,-80}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,80},{-100,100}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + yL.signal := uL1.signal or uL2.signal or uL3.signal or uL4.signal; + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + ">= 1"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end OUL4; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/RAZ.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/RAZ.mo new file mode 100644 index 0000000..2d4f0b0 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/RAZ.mo @@ -0,0 +1,73 @@ +within BFE.Logique; +block RAZ "Mémoire RAZ prioritaire" +protected + Boolean xL; + +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical E + annotation (Placement(transformation( + extent={{-120,50},{-100,70}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical Z + annotation (Placement(transformation( + extent={{-120,-70},{-100,-50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uInit + annotation (Placement(transformation( + origin={0,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); +algorithm + + when initial() then + xL := uInit.signal; + end when; + + if Z.signal then + xL := false; + end if; + + when E.signal then + xL := not (Z.signal); + end when; + + yL.signal := xL; + +equation + + if (cardinality(uInit) == 0) then + uInit.signal = E.signal; + end if; + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-50,74},{44,18}}, textString= + "E"), + Line(points={{-100,0},{100,0}}), + Text(extent={{-48,-20},{50,-84}}, textString= + "Z"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

Version 1.6

+ +")); +end RAZ; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU3.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU3.mo new file mode 100644 index 0000000..a3488b2 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU3.mo @@ -0,0 +1,63 @@ +within BFE.Logique; +block SEU3 "Seuil logique à trois entrées" + parameter Integer m=1 "Nombre d'entrées à valider"; + +protected + Integer n; +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,70},{-100,90}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-90},{-100,-70}}, rotation=0))); +algorithm + n := 0; + + if uL1.signal then + n := n + 1; + end if; + + if uL2.signal then + n := n + 1; + end if; + + if uL3.signal then + n := n + 1; + end if; + + yL.signal := (n >= m); + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + ">= %m"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end SEU3; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU4.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU4.mo new file mode 100644 index 0000000..4c3e0f6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/SEU4.mo @@ -0,0 +1,70 @@ +within BFE.Logique; +block SEU4 "Seuil logique à quatre entrées" + parameter Integer m=1 "Nombre d'entrées à valider"; + +protected + Integer n; +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL1 + annotation (Placement(transformation( + extent={{-120,80},{-100,100}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL2 + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL3 + annotation (Placement(transformation( + extent={{-120,-40},{-100,-20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL4 + annotation (Placement(transformation(extent={{-120,-100},{-100,-80}}, + rotation=0))); +algorithm + n := 0; + + if uL1.signal then + n := n + 1; + end if; + + if uL2.signal then + n := n + 1; + end if; + + if uL3.signal then + n := n + 1; + end if; + + if uL4.signal then + n := n + 1; + end if; + + yL.signal := (n >= m); + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-54,20},{50,-20}}, textString= + ">= %m"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0

+ +")); +end SEU4; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TDX.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TDX.mo new file mode 100644 index 0000000..038c092 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TDX.mo @@ -0,0 +1,90 @@ +within BFE.Logique; +block TDX "Temporisation à la commande maintenue à la désexcitation" + parameter Real T=5 "Durée de la temporisation (s)"; + +protected + Real trans(start=Modelica.Constants.inf) "Instant de la désexcitation (s)"; + +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uInit + annotation (Placement(transformation( + origin={0,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + when initial() then + yL.signal := uInit.signal; + end when; + + when uL.signal then + yL.signal := true; + trans := Modelica.Constants.inf; + end when; + + when not (uL.signal) then + trans := time + T; + end when; + + when (time >= trans) then + yL.signal := false; + end when; + +equation + + if (cardinality(uInit) == 0) then + uInit.signal = uL.signal; + end if; + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Text(extent={{-70,56},{-44,24}}, textString= + "0"), + Text(extent={{34,56},{86,24}}, textString= + "%tempo"), + Line( + points={{-60,20},{-60,0},{60,0},{60,20}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-74,52},{-48,20}}, textString= + "0"), + Line(points={{-60,20},{-60,0},{60,0},{60,20}}), + Text(extent={{34,52},{86,20}}, textString= + "%T"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

Version 1.6

+ +")); +end TDX; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TEX.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TEX.mo new file mode 100644 index 0000000..920220c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/TEX.mo @@ -0,0 +1,75 @@ +within BFE.Logique; +block TEX "Temporisation à la commande maintenue à l'excitation" + parameter Real T=5 "Durée de la temporisation (s)"; + +protected + Real trans(start=Modelica.Constants.inf) "Instant de l'excitation (s)"; + +public + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL + annotation (Placement(transformation( + extent={{-120,-10},{-100,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uInit + annotation (Placement(transformation( + origin={0,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation( + extent={{100,-10},{120,10}}, rotation=0))); +algorithm + + when initial() then + yL.signal := uInit.signal; + end when; + + when not (uL.signal) then + yL.signal := false; + trans := Modelica.Constants.inf; + end when; + + when (uL.signal) then + trans := time + T; + end when; + + when (time >= trans) then + yL.signal := true; + end when; + +equation + + if (cardinality(uInit) == 0) then + uInit.signal = uL.signal; + end if; + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Rectangle( + extent={{-100,-100},{100,102}}, + lineColor={0,0,0}, + pattern=LinePattern.Solid, + lineThickness=0.25, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text(extent={{-86,52},{-34,20}}, textString= + "%T"), + Line(points={{-60,20},{-60,0},{60,0},{60,20}}), + Text(extent={{44,52},{70,20}}, textString= + "0"), + Text(extent={{-150,150},{150,110}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

Version 1.6

+ +")); +end TEX; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.mo new file mode 100644 index 0000000..06e557e --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.mo @@ -0,0 +1,129 @@ +within BFE; +package Logique "Bibliothèque des blocs élémentaires logiques" + +annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}, + initialScale=0.1), graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8}, + {52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{ + -62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{ + -42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12}, + {-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6}, + {52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62, + 2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line(points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, color={0, + 0,255}), + Line(points={{80,80},{100,100}}, color={0,0,255})}), + Documentation(info=" +

Copyright © EDF 2002 - 2010

+ + +

ThermoSysPro Version 2.0 + +")); +end Logique; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.order new file mode 100644 index 0000000..7dc52b0 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/Logique/package.order @@ -0,0 +1,13 @@ +ETL +ETL3 +ETL4 +HOP +IMP +OUL +OUL3 +OUL4 +RAZ +SEU3 +SEU4 +TDX +TEX diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.mo new file mode 100644 index 0000000..202a854 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.mo @@ -0,0 +1,129 @@ +within ; +package BFE "Bibliothèque des blocs élémentaires EDF" + +annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}, + initialScale=0.1), graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8}, + {52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{ + -62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{ + -42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12}, + {-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6}, + {52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62, + 2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line(points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, color={0, + 0,255}), + Line(points={{80,80},{100,100}}, color={0,0,255})}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.1 + +"), uses(ThermoSysPro(version="4.1"), Modelica(version="4.0.0"))); +end BFE; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.order new file mode 100644 index 0000000..04752df --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/BFE-osr/BFE/package.order @@ -0,0 +1 @@ +Logique diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/README.md b/src/test/resources/verificationModels/use-cases/ics_educational/lib/README.md new file mode 100644 index 0000000..91ad0f2 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/README.md @@ -0,0 +1,14 @@ +To load the model in OpenModelica, drag the following files into the OMEdit interface: +* ThermoSysPro.mo +* lib/BFE/package.mo +* cooling_system/package.mo +* CRML.mo (only for the corrected version) + +From the model tree in OMEdit... +* The behavior models of the SRI are located in cooling_system/Behavior/SRIN4_v4: + * **SRI** is the model that will be provided to the students. + * **SRI_corrige** is the corrected model (the main difference lies in the cmdVannes block). + * The model **SRI_init** can be ignored (it is not required for simulation with OpenModelica). +* The verification models (scenarios, requirements...) are located in cooling_system/Verification/: + * **Verif** (and everything it contains) will be provided to the students. + * **Verif_corrige** (and everything it contains) is the corrected model. \ No newline at end of file diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/CmdVannes.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/CmdVannes.mo new file mode 100644 index 0000000..7262322 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/CmdVannes.mo @@ -0,0 +1,119 @@ +within cooling_system.Behavior.SRIN4_v4; +block CmdVannes "Régulation de température du SRI N4" + parameter Real consigneT = 300 "Consigne de temperature"; + parameter Real k = 1 "Gain"; + parameter Real Ti = 1 "Constante de temps"; + parameter Real range = 40 "Range"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal utemp annotation ( + Placement(transformation(extent = {{-120, 50}, {-100, 70}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal yserie annotation ( + Placement(transformation(extent = {{300, 50}, {320, 70}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal ybypass annotation ( + Placement(transformation(extent = {{300, -170}, {320, -150}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical unbech annotation ( + Placement(transformation(extent = {{-120, -170}, {-100, -150}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add ADD1(k2 = -1) annotation ( + Placement(transformation(extent = {{-60, 40}, {-40, 60}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Div DIV1 annotation ( + Placement(transformation(extent = {{0, 10}, {20, 30}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante1(k = range) annotation ( + Placement(transformation(extent = {{-60, -20}, {-40, 0}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante2(k = consigneT) annotation ( + Placement(transformation(extent = {{-100, 80}, {-80, 100}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Continu.PIsat PIsat1(k = k, Ti = Ti, Limiteur1(u(signal(start = 0.55))), ureset0 = 0.562, permanent = true) annotation ( + Placement(transformation(extent = {{40, -20}, {60, 0}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante3 annotation ( + Placement(transformation(extent = {{60, 80}, {80, 100}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add ADD2(k2 = -1) annotation ( + Placement(transformation(extent = {{120, 50}, {140, 70}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Limiteur Limiteur1(minval = 0.05) annotation ( + Placement(transformation(extent = {{160, 50}, {180, 70}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante4(k = 0) annotation ( + Placement(transformation(extent = {{160, -156}, {180, -136}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add ADD3 annotation ( + Placement(transformation(extent = {{220, -110}, {240, -90}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Limiteur Limiteur2(maxval = 0.6, minval = 0) annotation ( + Placement(transformation(extent = {{260, -110}, {280, -90}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Mul MUL1 annotation ( + Placement(transformation(origin = {-10, 0}, extent = {{130, -40}, {150, -20}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Mul MUL2 annotation ( + Placement(transformation(origin = {14, -4}, extent = {{170, -80}, {190, -60}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante5(k = 0.7) annotation ( + Placement(transformation(extent = {{100, -100}, {120, -80}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Selecteur k1 annotation ( + Placement(transformation(extent = {{134, -140}, {154, -120}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante6(k = 0.35) annotation ( + Placement(transformation(extent = {{100, -200}, {120, -180}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Selecteur k2 annotation ( + Placement(transformation(extent = {{190, -180}, {210, -160}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante7(k = 0.16) annotation ( + Placement(transformation(extent = {{160, -200}, {180, -180}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Continu.FctTrans FctTrans1(a = {Ti, 1}, permanent = true, y(signal(start = 0.55))) annotation ( + Placement(transformation(extent = {{80, -20}, {100, 0}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Mul MUL11 annotation ( + Placement(transformation(origin = {24, -6}, extent = {{130, -40}, {150, -20}}))); +equation + connect(ADD1.y, DIV1.u1) annotation ( + Line(points = {{-39, 50}, {-20, 50}, {-20, 26}, {-1, 26}})); + connect(Constante1.y, DIV1.u2) annotation ( + Line(points = {{-39, -10}, {-20, -10}, {-20, 14}, {-1, 14}})); + connect(Constante2.y, ADD1.u1) annotation ( + Line(points = {{-79, 90}, {-70, 90}, {-70, 56}, {-61, 56}}, color = {0, 0, 255})); + connect(utemp, ADD1.u2) annotation ( + Line(points = {{-110, 60}, {-80, 60}, {-80, 44}, {-61, 44}})); + connect(DIV1.y, PIsat1.u) annotation ( + Line(points = {{21, 20}, {30, 20}, {30, -10}, {39, -10}}, color = {0, 0, 255})); + connect(Constante3.y, ADD2.u1) annotation ( + Line(points = {{81, 90}, {100, 90}, {100, 66}, {119, 66}})); + connect(ADD2.y, Limiteur1.u) annotation ( + Line(points = {{141, 60}, {159, 60}}, color = {0, 0, 255})); + connect(Limiteur1.y, yserie) annotation ( + Line(points = {{181, 60}, {310, 60}}, color = {0, 0, 255})); + connect(MUL2.y, ADD3.u1) annotation ( + Line(points = {{205, -74}, {204, -74}, {204, -94}, {219, -94}})); + connect(ADD3.y, Limiteur2.u) annotation ( + Line(points = {{241, -100}, {259, -100}})); + connect(Constante7.y, k2.u2) annotation ( + Line(points = {{181, -190}, {184, -190}, {184, -178}, {189, -178}})); + connect(Constante4.y, k2.u1) annotation ( + Line(points = {{181, -146}, {186, -146}, {186, -162}, {189, -162}})); + connect(k2.y, ADD3.u2) annotation ( + Line(points = {{211, -170}, {214, -170}, {214, -106}, {219, -106}})); + connect(Constante6.y, k1.u2) annotation ( + Line(points = {{121, -190}, {126, -190}, {126, -138}, {133, -138}})); + connect(Constante5.y, k1.u1) annotation ( + Line(points = {{121, -90}, {126, -90}, {126, -122}, {133, -122}})); + connect(k1.y, MUL2.u2) annotation ( + Line(points = {{155, -130}, {160, -130}, {160, -80}, {183, -80}})); + connect(Limiteur2.y, ybypass) annotation ( + Line(points = {{281, -100}, {290, -100}, {290, -160}, {310, -160}}, color = {0, 0, 255})); + connect(unbech, k2.uCond) annotation ( + Line(points = {{-110, -160}, {148, -160}, {148, -170}, {189, -170}})); + connect(unbech, k1.uCond) annotation ( + Line(points = {{-110, -160}, {80, -160}, {80, -130}, {133, -130}})); + connect(PIsat1.y, FctTrans1.u) annotation ( + Line(points = {{61, -10}, {79, -10}})); + connect(FctTrans1.y, ADD2.u2) annotation ( + Line(points = {{101, -10}, {110, -10}, {110, 54}, {119, 54}})); + connect(FctTrans1.y, MUL1.u1) annotation ( + Line(points = {{101, -10}, {110, -10}, {110, -24}, {119, -24}})); + connect(FctTrans1.y, MUL1.u2) annotation ( + Line(points = {{101, -10}, {110, -10}, {110, -36}, {119, -36}})); + connect(PIsat1.y, FctTrans1.u0) annotation ( + Line(points = {{61, -10}, {70, -10}, {70, -18}, {79, -18}})); + connect(MUL1.y, MUL11.u2) annotation ( + Line(points={{141,-30},{144,-30},{144,-40},{153,-40},{153,-42}}, color = {0, 0, 255})); + connect(FctTrans1.y, MUL11.u1) annotation ( + Line(points={{101,-10},{146,-10},{146,-30},{153,-30}}, color = {0, 0, 255})); + connect(MUL11.y, MUL2.u1) annotation ( + Line(points={{175,-36},{178,-36},{178,-68},{183,-68}}, color = {0, 0, 255})); + annotation ( + Icon(coordinateSystem(preserveAspectRatio = false, preserveOrientation = false, extent = {{-100, -200}, {300, 100}}, grid = {2, 2}, initialScale = 0.1), graphics={ Rectangle(extent = {{-100, 100}, {300, -200}}), Text(extent={{-100,32}, + {298,-108}}, textString = "%name")}), + Diagram(coordinateSystem(preserveAspectRatio = false, preserveOrientation = false, extent = {{-100, -200}, {300, 100}}, grid = {2, 2}, initialScale = 0.1), graphics), + Window(x = 0.18, y = 0.08, width = 0.6, height = 0.6), + Documentation(info = " +

Copyright © EDF 2002 - 2003

+ + ")); +end CmdVannes; \ No newline at end of file diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/PO.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/PO.mo new file mode 100644 index 0000000..0f91893 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/PO.mo @@ -0,0 +1,495 @@ +within cooling_system.Behavior.SRIN4_v4; +package PO "Bibliothèque des parties opératives" + block CapteurNiveau + parameter Boolean defaut=false "Défaut capteur"; + parameter Real defval=0 "Valeur du signal en cas de défaut capteur"; + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Defaut( + K=defaut) + annotation (Placement(transformation(extent={{-40,20},{-20,40}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal mesure + annotation ( + layer="icon", Placement(transformation( + origin={30,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal etat + annotation ( layer="icon", Placement( + transformation(extent={{160,20},{180,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Selecteur + Selecteur1 annotation (Placement( + transformation(extent={{80,20},{100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante + Constante1( k=defval) + annotation (Placement(transformation(extent={{20,60},{40,80}}, rotation= + 0))); + equation + connect(Defaut.yL, Selecteur1.uCond) annotation (Line(points={{-19,30},{ + 79,30}})); + connect(mesure, Selecteur1.u2) annotation (Line(points={{30,-110},{30,22}, + {79,22}})); + connect(Selecteur1.y, etat) + annotation (Line(points={{101,30},{170,30}}, color={0,0,255})); + connect(Constante1.y, Selecteur1.u1) + annotation (Line(points={{41,70},{60,70},{60,38},{79,38}}, color={0,0, + 255})); + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics), + Window( + x=0.23, + y=0.14, + width=0.65, + height=0.64), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics={ + Ellipse( + extent={{-30,140},{90,20}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,160},{160,-100}}), + Text(extent={{-120,214},{180,174}}, textString= + "%name"), + Line(points={{30,20},{30,-100}})}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + end CapteurNiveau; + + block CapteurTemperature + parameter Boolean defaut=false "Défaut capteur"; + parameter Real defval=0 "Valeur du signal en cas de défaut capteur"; + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Defaut( + K=defaut) + annotation (Placement(transformation(extent={{-40,20},{-20,40}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal mesure + annotation ( + layer="icon", Placement(transformation( + origin={30,-110}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal etat + annotation ( layer="icon", Placement( + transformation(extent={{160,20},{180,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Selecteur + Selecteur1 annotation (Placement( + transformation(extent={{80,20},{100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante + Constante1( k=defval) + annotation (Placement(transformation(extent={{20,60},{40,80}}, rotation= + 0))); + equation + connect(Defaut.yL, Selecteur1.uCond) annotation (Line(points={{-19,30},{ + 79,30}})); + connect(mesure, Selecteur1.u2) annotation (Line(points={{30,-110},{30,22}, + {79,22}})); + connect(Selecteur1.y, etat) + annotation (Line(points={{101,30},{170,30}}, color={0,0,255})); + connect(Constante1.y, Selecteur1.u1) + annotation (Line(points={{41,70},{60,70},{60,38},{79,38}}, color={0,0, + 255})); + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics), + Window( + x=0.23, + y=0.14, + width=0.65, + height=0.64), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics={ + Ellipse( + extent={{-30,140},{90,20}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,160},{160,-100}}), + Text(extent={{-120,214},{180,174}}, textString= + "%name"), + Line(points={{30,20},{30,-100}})}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + end CapteurTemperature; + + block Pompe + parameter Integer delaiDemarrage=1 "Délai de démarrage de la pompe"; + parameter Boolean defaut=false "Défaut pompe"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical etatE + annotation (Placement( + transformation(extent={{160,20},{180,40}}, rotation=0))); + BFE.Logique.TEX TEX1( T=delaiDemarrage) annotation (Placement( + transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical Cmd + annotation (Placement(transformation( + origin={30,-110}, + extent={{10,-10},{-10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Defaut( + K=defaut) + annotation (Placement(transformation(extent={{-40,60},{-20,80}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL NONL1 + annotation (Placement(transformation(extent={{0, + 60},{20,80}}, rotation=0))); + BFE.Logique.ETL ETL1 annotation (Placement(transformation(extent={{60, + 40},{80,60}}, rotation=0))); + equation + connect(Defaut.yL, NONL1.uL) annotation (Line(points={{-19,70},{-1,70}})); + connect(NONL1.yL, ETL1.uL1) + annotation (Line(points={{21,70},{40,70},{40,56},{59,56}})); + connect(TEX1.yL, ETL1.uL2) + annotation (Line(points={{21,10},{40,10},{40,44},{59,44}})); + connect(ETL1.yL, etatE) + annotation (Line(points={{81,50},{120,50},{120,30},{170,30}})); + connect(ETL1.yL, Cmd) + annotation (Line(points={{81,50},{120,50},{120,-60},{30,-60},{30,-110}})); + connect(uL, TEX1.uL) annotation (Line(points={{-110,30},{-10,30},{-10,10}, + {-1,10}})); + connect(uL, TEX1.uInit) + annotation (Line(points={{-110,30},{-10,30},{-10,-10},{10,-10},{10,-1}})); + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics), + Window( + x=0.06, + y=0.28, + width=0.65, + height=0.64), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics={ + Ellipse( + extent={{-80,140},{140,-80}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Line(points={{-60,28},{120,28}}), + Line(points={{60,68},{120,28},{60,-12}}), + Rectangle(extent={{-100,160},{160,-100}}), + Text(extent={{-120,214},{180,174}}, textString= + "%name")}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + end Pompe; + + block VanneReglante + parameter Integer delai=0 "Délai de transmission de la commande"; + parameter Real vmax=1 "Vitesse maximum de manoeuvre de la vanne"; + parameter Boolean defaut=false "Défaut vanne"; + parameter Real Ti=0.1 "Constante de temps"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal u + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal Cmd + annotation (Placement(transformation( + origin={30,-110}, + extent={{-10,-10},{10,10}}, + rotation=270))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.RetardFixe + RetardFixe1( retard=delai) + annotation (Placement(transformation(extent={{120,20},{140,40}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Selecteur + Selecteur1 annotation (Placement( + transformation(extent={{-40,20},{-20,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Continu.PT1 PT1_1( + Ti=Ti) annotation (Placement(transformation( + extent={{0,20},{20,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal etat + annotation (Placement(transformation( + extent={{160,20},{180,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.LimiteurVitesse + LimiteurVitesse1( + dmax=vmax, + dmin=-vmax, + Ti=0.1) annotation (Placement(transformation(extent={{40,20},{60,40}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Continu.PI PI1( + Ti=Ti, permanent=true) + annotation (Placement(transformation(extent={{-20,-40},{0,-20}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add Add1( + k2=-1) annotation (Placement(transformation(extent={{ + -60,-40},{-40,-20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Limiteur + Limiteur1( minval=0) + annotation (Placement(transformation(extent={{80,20},{100,40}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante + Constante1(K=defaut) + annotation (Placement(transformation(extent={{-100,40},{-80,60}}, + rotation=0))); + equation + connect(PT1_1.y, Selecteur1.u1) annotation (Line(points={{21,30},{30,30}, + {30,60},{-50,60},{-50,38},{-41,38}}, color={0,0,255})); + connect(Selecteur1.y, PT1_1.u) + annotation (Line(points={{-19,30},{-1,30}}, color={0,0,255})); + connect(u, Add1.u1) + annotation (Line(points={{-110,30},{-80,30},{-80,-24},{-61,-24}})); + connect(Add1.y, PI1.u) + annotation (Line(points={{-39,-30},{-21,-30}}, color={0,0,255})); + connect(PI1.y, Selecteur1.u2) annotation (Line(points={{1,-30},{20,-30},{ + 20,0},{-60,0},{-60,22},{-41,22}}, color={0,0,255})); + connect(LimiteurVitesse1.y, Limiteur1.u) + annotation (Line(points={{61,30},{79,30}}, color={0,0,255})); + connect(Limiteur1.y, Add1.u2) annotation (Line(points={{101,30},{110,30}, + {110,-60},{-80,-60},{-80,-36},{-61,-36}}, color={0,0,255})); + connect(PT1_1.y, LimiteurVitesse1.u) + annotation (Line(points={{21,30},{39,30}}, color={0,0,255})); + connect(Limiteur1.y, RetardFixe1.u) + annotation (Line(points={{101,30},{119,30}}, color={0,0,255})); + connect(RetardFixe1.y, etat) + annotation (Line(points={{141,30},{170,30}}, color={0,0,255})); + connect(RetardFixe1.y, Cmd) annotation (Line(points={{141,30},{150,30},{ + 150,-80},{30,-80},{30,-110}}, color={0,0,255})); + connect(Constante1.yL, Selecteur1.uCond) + annotation (Line(points={{-79,50},{-60,50},{-60,30},{-41,30}})); + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics), + Window( + x=0.3, + y=0.25, + width=0.65, + height=0.64), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics={ + Rectangle(extent={{-100,160},{160,-100}}), + Text(extent={{-120,214},{180,174}}, textString= + "%name"), + Line(points={{30,-30},{30,40},{30,60}}), + Polygon( + points={{30,-30},{140,20},{140,-80},{30,-30}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{30,-30},{-80,20},{-80,-80},{30,-30}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{140,80},{-80,80},{-78,92},{-72,102},{-70,104},{-66,108}, + {-58,114},{-48,120},{-38,124},{-28,128},{-20,130},{-10,132},{ + 0,134},{20,136},{40,136},{60,134},{80,130},{98,124},{108,120}, + {118,114},{126,108},{132,102},{138,92},{140,84},{140,80}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-30,80},{92,80},{30,-30},{-30,80}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid)}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + end VanneReglante; + + block VanneTOR + parameter Integer delaiOuverture=1 "Délai d'ouverture de la vanne"; + parameter Boolean defaut=false "Défaut vanne"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical uL + annotation (Placement(transformation( + extent={{-120,20},{-100,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical etatE + annotation (Placement( + transformation(extent={{160,20},{180,40}}, rotation=0))); + BFE.Logique.TEX TEX1( T=delaiOuverture) annotation (Placement( + transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical Cmd + annotation (Placement(transformation( + origin={30,-110}, + extent={{10,-10},{-10,10}}, + rotation=90))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Defaut( + K=defaut) + annotation (Placement(transformation(extent={{-40,60},{-20,80}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL NONL1 + annotation (Placement(transformation(extent={{0, + 60},{20,80}}, rotation=0))); + BFE.Logique.ETL ETL1 annotation (Placement(transformation(extent={{60, + 40},{80,60}}, rotation=0))); + equation + connect(uL, TEX1.uL) annotation (Line(points={{-110,30},{-10,30},{-10,10}, + {-1,10}})); + connect(Defaut.yL, NONL1.uL) annotation (Line(points={{-19,70},{-1,70}})); + connect(NONL1.yL, ETL1.uL1) + annotation (Line(points={{21,70},{40,70},{40,56},{59,56}})); + connect(TEX1.yL, ETL1.uL2) + annotation (Line(points={{21,10},{40,10},{40,44},{59,44}})); + connect(ETL1.yL, etatE) + annotation (Line(points={{81,50},{120,50},{120,30},{170,30}})); + connect(ETL1.yL, Cmd) + annotation (Line(points={{81,50},{120,50},{120,-60},{30,-60},{30,-110}})); + connect(uL, TEX1.uInit) + annotation (Line(points={{-110,30},{-10,30},{-10,-10},{10,-10},{10,-1}})); + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics), + Window( + x=0.08, + y=0.21, + width=0.65, + height=0.64), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-100,-100},{160,160}}, + grid={2,2}, + initialScale=0), graphics={ + Rectangle(extent={{-100,160},{160,-100}}), + Text(extent={{-120,214},{180,174}}, textString= + "%name"), + Line(points={{30,-30},{30,40},{30,60}}), + Polygon( + points={{30,-30},{140,20},{140,-80},{30,-30}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{30,-30},{-80,20},{-80,-80},{30,-30}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), + Polygon( + points={{140,60},{-80,60},{-78,72},{-72,82},{-70,84},{-66,88},{ + -58,94},{-48,100},{-38,104},{-28,108},{-20,110},{-10,112},{0, + 114},{20,116},{40,116},{60,114},{80,110},{98,104},{108,100},{ + 118,94},{126,88},{132,82},{138,72},{140,64},{140,60}}, + lineColor={28,108,200}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid)}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + end VanneTOR; +annotation ( + Window( + x=0.05, + y=0.26, + width=0.25, + height=0.25, + library=1, + autolayout=1), + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{0,0},{312,210}}, + grid={2,2}, + initialScale=0), graphics={ + Rectangle( + extent={{-100,-100},{80,50}}, + lineColor={28,108,200}, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}, + lineColor={28,108,200}, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Polygon( + points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}, + lineColor={28,108,200}, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid), + Text( + extent={{-120,135},{120,70}}, + lineColor={255,0,0}, + textString= + "%name"), + Text( + extent={{-90,40},{70,10}}, + lineColor={160,160,164}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString= + "Library"), + Rectangle(extent={{-32,-6},{16,-35}}, lineColor={0,0,0}), + Rectangle(extent={{-32,-56},{16,-85}}, lineColor={0,0,0}), + Line(points={{16,-20},{49,-20},{49,-71},{16,-71}}, color={0,0,0}), + Line(points={{-32,-72},{-64,-72},{-64,-21},{-32,-21}}, color={0,0,0}), + Polygon( + points={{16,-71},{29,-67},{29,-74},{16,-71}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-32,-21},{-46,-17},{-46,-25},{-32,-21}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid)}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ +")); + +end PO; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ReguNiveau_simple.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ReguNiveau_simple.mo new file mode 100644 index 0000000..b9c834d --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ReguNiveau_simple.mo @@ -0,0 +1,129 @@ +within cooling_system.Behavior.SRIN4_v4; +block ReguNiveau_simple "Régulation de niveau du SRI N4" + parameter Modelica.Units.SI.Length niveauMax2=4.75 "Niveau maximum 2"; + parameter Modelica.Units.SI.Length niveauMax1=4.50 "Niveau maximum 1"; + parameter Modelica.Units.SI.Length niveauMin1=1.50 "Niveau minimum 1"; + parameter Modelica.Units.SI.Length niveauMin2=1.25 "Niveau minimum 2"; + parameter Modelica.Units.SI.Length niveauMin3=1.00 "Niveau minimum 3"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal univeau + annotation (Placement(transformation(extent={{-320,-10},{-300,10}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yvanne + annotation (Placement(transformation(extent={{300,-230},{320,-210}}, + rotation=0))); + BFE.Logique.HOP HOP1 annotation (Placement(transformation(extent={{40, + -20},{80,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yniveauBas + annotation (Placement(transformation(extent={{300,210},{320,230}}, + rotation=0))); + ST.VanneTORA_simple + STVanneTOR1(repere="1201VA-") + annotation (Placement(transformation(extent={{160,-60},{280,60}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL NONL1 + annotation (Placement(transformation(extent={{120, + -10},{140,10}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMin1( + seuil=niveauMin1, + sens=false, + repere="1203 SN1", + libelle="niveau 1201BA min1") annotation (Placement(transformation(extent= + {{-260,-40},{-160,0}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMax1( + seuil=niveauMax1, + repere="1202 SN1", + libelle="niveau 1201BA max1") annotation (Placement(transformation(extent= + {{-260,-120},{-160,-80}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMin2( + seuil=niveauMin2, + sens=false, + repere="1201 SN2", + libelle="niveau 1201BA min2") annotation (Placement(transformation(extent= + {{-260,40},{-160,80}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMin3( + seuil=niveauMin3, + sens=false, + repere="1203 SN2", + libelle="niveau 1201BA min3") annotation (Placement(transformation(extent= + {{-260,120},{-160,160}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMin4( + seuil=niveauMin3, + sens=false, + repere="1202 SN2", + libelle="niveau 1201BA min3") annotation (Placement(transformation(extent= + {{-260,200},{-160,240}}, rotation=0))); + BFE.Logique.OUL OUL1 annotation (Placement(transformation(extent={{-80,0}, + {-40,40}}, rotation=0))); + BFE.Logique.SEU3 SEU3_1( m=2) annotation (Placement(transformation(extent= + {{-80,120},{-40,160}}, rotation=0))); + ST.CapteurNiveau STCapteurNiveauMax2( + seuil=niveauMax2, + repere="1201 SN1", + libelle="niveau 1201BA max2") annotation (Placement(transformation(extent= + {{-260,-200},{-160,-160}}, rotation=0))); +equation + connect(HOP1.yL, NONL1.uL) annotation (Line(points={{82,0},{119,0}})); + connect(NONL1.yL, STVanneTOR1.D) + annotation (Line(points={{141,0},{158.5,0}})); + connect(HOP1.yL, STVanneTOR1.E) annotation (Line(points={{82,0},{100,0},{100, + 30},{129.063,30},{129.063,30.8571},{158.5,30.8571}})); + connect(STCapteurNiveauMax1.etat, HOP1.HP) + annotation (Line(points={{-156.667,-88},{-60,-88},{-60,-12},{38,-12}})); + connect(univeau, STCapteurNiveauMin2.u) + annotation (Line(points={{-310,0},{-280,0},{-280,20},{-210,20},{-210,38}})); + connect(STVanneTOR1.cmd, yvanne) + annotation (Line(points={{220,-61.7143},{220,-220},{310,-220}})); + connect(univeau, STCapteurNiveauMin1.u) + annotation (Line(points={{-310,0},{-280,0},{-280,-60},{-210,-60},{-210, + -42}})); + connect(univeau, STCapteurNiveauMin3.u) + annotation (Line(points={{-310,0},{-280,0},{-280,100},{-210,100},{-210, + 118}})); + connect(univeau, STCapteurNiveauMin4.u) + annotation (Line(points={{-310,0},{-280,0},{-280,180},{-210,180},{-210, + 198}})); + connect(STCapteurNiveauMin2.etat, OUL1.uL1) + annotation (Line(points={{-156.667,72},{-130,72},{-130,32},{-82,32}})); + connect(STCapteurNiveauMin1.etat, OUL1.uL2) + annotation (Line(points={{-156.667,-8},{-129,-8},{-129,8},{-82,8}})); + connect(OUL1.yL, HOP1.E) + annotation (Line(points={{-38,20},{20,20},{20,12},{38,12}})); + connect(OUL1.yL, HOP1.uInit) + annotation (Line(points={{-38,20},{20,20},{20,-40},{60,-40},{60,-22}})); + connect(STCapteurNiveauMin2.etat, SEU3_1.uL3) + annotation (Line(points={{-156.667,72},{-130,72},{-130,124},{-82,124}})); + connect(STCapteurNiveauMin3.etat, SEU3_1.uL2) + annotation (Line(points={{-156.667,152},{-128,152},{-128,140},{-82,140}})); + connect(STCapteurNiveauMin4.etat, SEU3_1.uL1) + annotation (Line(points={{-156.667,232},{-128,232},{-128,156},{-82,156}})); + connect(univeau, STCapteurNiveauMax2.u) annotation (Line(points={{-310,0},{ + -280,0},{-280,-220},{-210,-220},{-210,-202}})); + connect(univeau, STCapteurNiveauMax1.u) annotation (Line(points={{-310,0},{ + -280,0},{-280,-140},{-210,-140},{-210,-122}})); + connect(SEU3_1.yL, yniveauBas) + annotation (Line(points={{-38,140},{240,140},{240,220},{310,220}})); + annotation ( + Icon(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-300,-300},{300,300}}, + grid={2,2}, + initialScale=0.1), graphics={Rectangle(extent={{-298,300},{302,-300}}), + Text(extent={{-278,98},{278,-82}}, textString= + "%name")}), + Window( + x=0.23, + y=0.04, + width=0.6, + height=0.6), + Diagram(coordinateSystem( + preserveAspectRatio=false, + preserveOrientation=false, + extent={{-300,-300},{300,300}}, + grid={2,2}, + initialScale=0.1), graphics), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ +")); +end ReguNiveau_simple; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI.mo new file mode 100644 index 0000000..c0d37aa --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI.mo @@ -0,0 +1,602 @@ +within cooling_system.Behavior.SRIN4_v4; +model SRI "SRI built with ThermoSysPro v4.0" + import SRIN4_v3 = + cooling_system.Behavior.SRIN4_v4; + parameter Real p_rho=1000; + parameter Real p_rho_vol=1000; + parameter Real p_rho_vanne=1000; + parameter Real p_rho_pompe=1000; + parameter Real p_rho_ech=1000; + parameter Real p_rho_bache=1000; + parameter Integer mode=0; + ThermoSysPro.WaterSteam.Volumes.VolumeA VolumeA1( + p_rho=p_rho_vol, + mode=mode, + h(start=71733), + Ce2(Q(start=-6.94834))) + annotation (Placement(transformation(extent={{260,0},{280,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP1( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=313105)), + C2(P(start=302810))) + annotation (Placement(transformation(extent={{-20,0},{0,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneUtil( + p_rho=p_rho, mode=mode, + C1(h_vol(start=71733), P(start=538486)), + Pm(start=454907), + C2(P(start=371329))) + annotation (Placement(transformation(extent={{80,-184},{60,-164}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur2(Im(start= + 2157)) annotation (Placement(transformation( + extent={{40,-60},{60,-40}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP3 + annotation (Placement(transformation( + extent={{-100,250},{-80,270}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.SwitchValve VanneTOR1( + Qmin=0, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0), + Pm(start=200650)) + annotation (Placement(transformation(extent={{-60,256},{-40, + 276}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeD VolumeD2( + p_rho=p_rho_vol, + mode=mode, + h(start=107545), + Cs1(Q(start=324)), + Cs2(Q(start=245)), + P(displayUnit="Pa", start=361174)) + annotation (Placement(transformation(extent={{-380,0},{-360,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC2( + p_rho=p_rho_vol, + mode=mode, + h(start=71612.6), + P(start=323241, displayUnit="Pa")) + annotation (Placement(transformation(extent={{-180,0},{-160,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneSerie1( + p_rho=p_rho_vanne, mode= + mode, + Q(start=324), + C1(h_vol(start=57940.3), P(start=337884))) + annotation (Placement(transformation(extent={{-220,66},{-200,86}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneSerie2( + p_rho=p_rho_vanne, mode= + mode, + C1(h_vol(start=57940.3), P(start=337884))) + annotation (Placement(transformation(extent={{-220,6},{-200,26}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneBypass( + p_rho=p_rho_vanne, mode= + mode, + Q(start=245)) + annotation (Placement(transformation(extent={{-220,-58},{-200, + -38}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC1( + option_temperature=2, T0={ + 323.15}) + annotation (Placement(transformation(extent={{-50,-112},{-30,-92}}, + rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.ConvectiveHeatFlow Flux1( + A={800}) + annotation (Placement(transformation(extent={{-50,-154},{-30,-134}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeDTh VolumeD3( + p_rho=p_rho_vol, + mode=mode, + h(start=107545), + Cs1(Q(start=0))) + annotation (Placement(transformation(extent={{-78,-190},{-98, + -170}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneFuite( + Cvmax=500, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0)) + annotation (Placement(transformation( + origin={-94,-140}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP3 + annotation (Placement(transformation( + origin={-88,-100}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP4( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=371329)), + C2(P(start=361174))) + annotation (Placement(transformation(extent={{-260,-190},{-280, + -170}}, rotation=0))); + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterWaterExchanger + EchangeurAPlaques1D1( + N=5, + p_rhoc=p_rho_ech, + p_rhof=p_rho_ech, + modec=mode, + modef=mode, + Hcc(start={107545,89041.1,76592.9,68054.3,62114.9,57940.3}), + Hcf(start={61856.9,57460.1,54502.3,52473.4,51062.1,50070.2}), + Ef(h(start=50070.2)), + Hmc(start={98293.1,82817,72323.6,65084.6,60027.6}), + Qf(start={1064,1064,1064,1064,1064}), + Hmf(start={59658.5,55981.2,53487.8,51767.8,50566.2}), + Sf(h(start=61856.9)), + muf(start={0.0012,0.0012,0.0012,0.0012,0.0012}), + Ec(P(start=361174), h_vol(start=107545)), + Pcc(start={361174,356572,351934,347268,342583,337884}, each displayUnit="Pa"), + prof(d(start={999.227,999.366,999.462,999.531,999.585}))) + annotation (Placement(transformation(extent={{-300,60},{-280, + 80}}, rotation=0))); + + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP1( + T0=285) + annotation (Placement(transformation(extent={{-322,40},{-302,60}}, + rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP1( + T0=285) + annotation (Placement(transformation(extent={{-280,40},{-260,60}}, + rotation=0))); + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterWaterExchanger + EchangeurAPlaques1D2( + N=5, + p_rhoc=p_rho_ech, + p_rhof=p_rho_ech, + modec=mode, + modef=mode, + Ef(h(start=50070.2)), + Hcc(start={107545,89041.1,76592.9,68054.3,62114.9,57940.3}), + Hcf(start={61856.9,57460.1,54502.3,52473.4,51062.1,50070.2}), + Qf(start={1064,1064,1064,1064,1064}), + Hmc(start={98293.1,82817,72323.6,65084.6,60027.6}), + Hmf(start={59658.5,55981.2,53487.8,51767.8,50566.2}), + Sf(h(start=61856.9)), + muf(start={0.0012,0.0012,0.0012,0.0012,0.0012}), + Ec(P(start=361174), h_vol(start=107545)), + Pcc(start={361174,356572,351934,347268,342583,337884}), + prof(d(start={999.227,999.366,999.462,999.531,999.585}))) + annotation (Placement(transformation(extent={{-300,0},{-280, + 20}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP2( + T0=285) + annotation (Placement(transformation(extent={{-320,-20},{-300,0}}, + rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP2( + T0=285) + annotation (Placement(transformation(extent={{-280,-20},{-260,0}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Terminate Terminate1 + annotation (Placement(transformation(extent={{-340,260},{-320,280}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante FinSimu( + K=false) + annotation (Placement(transformation(extent={{-380,260},{-360,280}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC1( + p_rho=p_rho_vol, + mode=mode, + h(start=71733), + Ce1(h_vol(start=71733)), + Ce3(Q(start=0)), + P(start=548779, displayUnit="Pa")) + annotation ( Placement(transformation( + extent={{180,0},{200,20}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeD VolumeD1( + p_rho=p_rho_vol, + mode=mode, + Cs1(h(start=71551.9)), + Cs2(h(start=71733)), + Cs3(h(start=71551.9)), + h(start=71551.9)) + annotation (Placement(transformation(extent={{20,0},{40,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_1( + Qmin=0, C1(h_vol(start=71733), + P(start=548779))) + annotation (Placement(transformation(extent={{140,0},{160,20}}, rotation= + 0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur1(Im(start= + 2157)) annotation (Placement(transformation( + extent={{40,40},{60,60}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_2( + Qmin=0, C1(P(start=548779), + h_vol(start=71733))) + annotation (Placement(transformation(extent={{140,100},{160,120}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur3(Im(start=0)) + annotation (Placement(transformation( + extent={{40,-140},{60,-120}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_3( + Qmin=0, C1(P(start=302810), + h_vol(start=71733))) + annotation (Placement(transformation(extent={{140,-80},{160,-60}}, + rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn1( + p_rho=p_rho_pompe, + mode=mode, + Q(start=447), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + Cr(start=890.9), + w_a(start=1), + hn(start=25.1), + Qv(start=0.45), + C1(h(start=71551.9)), + C2(h_vol(start=71733), P(start=548779)), + h(start=71642.4)) + annotation (Placement(transformation(extent={{100,100},{120, + 120}}, rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn2( + p_rho=p_rho_pompe, + mode=mode, + Cr(start=890.9), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + w_a(start=1), + hn(start=25.1), + Qv(start=0.45), + C1(h(start=71551.9)), + C2( + P(start=548779), + h_vol(start=71733), + h(start=71733))) + annotation (Placement(transformation(extent={{100,0},{120,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn3( + p_rho=p_rho_pompe, + mode=mode, + Q(start=0), + Qv(start=0), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + Cr(start=0), + w_a(start=0), + hn(start=0), + C1(h(start=71733), P(start=302810)), + C2( + h_vol(start=71733), + P(start=302810), + h(start=71733))) + annotation (Placement(transformation(extent={{100,-80},{120, + -60}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealSwitchValve VanneTOR0_1( + Qmin=0, C2(h_vol(start=107545))) + annotation (Placement(transformation(extent={{-340,66},{-320,86}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealSwitchValve VanneTOR0_2( + Qmin=0, C2(h_vol(start=107545))) + annotation (Placement(transformation(extent={{-340,6},{-320,26}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP5( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=548779)), + Q(start=901)) + annotation (Placement(transformation(extent={{220,0},{240,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP6( + L=30, + D=0.05, + z2=30, + p_rho=p_rho, + mode=mode, + C2(P(start=131784))) + annotation (Placement(transformation( + origin={-50,110}, + extent={{-10,10},{10,-10}}, + rotation=90))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP4(Q(start=0)) + annotation (Placement(transformation( + extent={{160,222},{180,242}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP3( + D=0.3, + lambda=0.005, + p_rho=p_rho, + mode=mode) annotation (Placement(transformation(extent={{120,222},{140, + 242}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP4(Q(start=0)) + annotation (Placement(transformation( + extent={{-100,210},{-80,230}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.SwitchValve VanneTOR2( + Qmin=0, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0)) + annotation (Placement(transformation(extent={{-60,216},{-40, + 236}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC3( + p_rho=p_rho_vol, + mode=mode, + Cs(Q(start=0))) + annotation (Placement(transformation(extent={{-10,230},{10,250}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP7( + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=101300)), + C2(P(start=101300))) + annotation (Placement(transformation(extent={{20,230},{40,250}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP8( + L=30, + D=0.05, + z1=30, + p_rho=p_rho, + mode=mode, + C1(P(start=131784))) + annotation (Placement(transformation( + origin={270,110}, + extent={{10,-10},{-10,10}}, + rotation=90))); + SRIN4_v3.ReguNiveau_simple + ReguNiveau1 annotation (Placement(transformation(extent={{-124, + 278},{-84,318}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeA VolumeA2( + p_rho=p_rho_vol, + mode=mode, + h(start=71444.9)) + annotation (Placement(transformation(extent={{-60,20},{-40,0}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique1( + Ke=2) + annotation (Placement(transformation(extent={{80,40},{100,60}}, rotation= + 0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique2( + Ke=2) + annotation (Placement(transformation(extent={{80,-60},{100,-40}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique3( + Ke=2) + annotation (Placement(transformation(extent={{80,-140},{100,-120}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.Tank Bache1( + A=7, + ze1=5, + zs1=4.70, + z0=3.11, + p_rho=p_rho_bache, + mode=mode, + Cs1(Q(start=0)), + Ce1(Q(start=0)), + Ce2(Q(start=-6.94))) + annotation (Placement(transformation(extent={{60,200},{100,240}}, + rotation=0))); + ThermoSysPro.WaterSteam.Sensors.SensorT CapteurT1(T(start=17 + 273.15), C2( + h_vol(start=71612.6))) + annotation (Placement(transformation(extent={{-150,8},{-130,28}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP2( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + Q(start=880), + C1(h_vol(start=71612.6), P(start=323241))) + annotation (Placement(transformation(extent={{-100,0},{-80,20}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.AND and1 annotation ( + Placement(transformation(origin={-390,62}, extent = {{-10, -10}, {10, 10}}))); + Verification.Scenarios.Connector.ScenarioConnector scenario annotation ( + Placement(transformation(origin={-478,70}, extent={{-10,-10},{10,10}}), + iconTransformation(origin={-416,60}, extent={{-36,-36},{36,36}}))); + Verification.Scenarios.Connector.BooleanExpression ouvreBranche1(y=scenario.ouvreBranche1) + annotation (Placement(transformation(extent={{-440,84},{-420,104}}))); + Verification.Scenarios.Connector.BooleanExpression ouvreBranche2(y=scenario.ouvreBranche2) + annotation (Placement(transformation(extent={{-438,24},{-418,44}}))); + Verification.Scenarios.Connector.RealExpression Psf(y=scenario.Psf) + annotation (Placement(transformation(extent={{-366,-38},{-346,-18}}))); + Verification.Scenarios.Connector.RealExpression Tsf(y=scenario.Tsf) + annotation (Placement(transformation(extent={{-330,98},{-310,118}}))); + Verification.Scenarios.Connector.RealExpression load(y=scenario.load) + annotation (Placement(transformation(extent={{-74,-82},{-54,-62}}))); + Verification.Scenarios.Connector.RealExpression leak(y=scenario.leak) + annotation (Placement(transformation(extent={{-136,-150},{-116,-130}}))); + Verification.Scenarios.Connector.RealExpression comUtil(y=scenario.comUtil) + annotation (Placement(transformation(extent={{30,-160},{50,-140}}))); + Verification.Scenarios.Connector.BooleanExpression encP1(y=scenario.encP1) + annotation (Placement(transformation(extent={{-12,54},{8,74}}))); + Verification.Scenarios.Connector.BooleanExpression encP2(y=scenario.encP2) + annotation (Placement(transformation(extent={{-8,-44},{12,-24}}))); + Verification.Scenarios.Connector.BooleanExpression encP3(y=scenario.encP3) + annotation (Placement(transformation(extent={{-8,-122},{12,-102}}))); + Verification.Scenarios.Connector.BooleanExpression comVanneBache(y=scenario.comVanneBache) + annotation (Placement(transformation(extent={{-126,234},{-106,254}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante + comVanne_constante(k=0.5) + annotation (Placement(transformation(extent={{-270,132},{-250,152}}))); +equation + connect(SourceP3.C, VanneTOR1.C1) annotation ( + Line(points = {{-80, 260}, {-60, 260}}, color = {0, 0, 255})); + connect(PuitsP3.C, VanneFuite.C2) annotation ( + Line(points = {{-88, -110}, {-88, -130}}, color = {0, 0, 255})); + connect(SourceP1.C, EchangeurAPlaques1D1.Ef) annotation ( + Line(points={{-302,50},{-295,50},{-295,64}}, color = {0, 0, 255})); + connect(PuitsP1.C, EchangeurAPlaques1D1.Sf) annotation ( + Line(points = {{-280, 50}, {-285, 50}, {-285, 64}}, color = {0, 0, 255})); + connect(SourceP2.C, EchangeurAPlaques1D2.Ef) annotation ( + Line(points={{-300,-10},{-295,-10},{-295,4}}, color = {0, 0, 255})); + connect(PuitsP2.C, EchangeurAPlaques1D2.Sf) annotation ( + Line(points={{-280,-10},{-285,-10},{-285,4}}, color = {0, 0, 255})); + connect(FinSimu.yL, Terminate1.uL) annotation ( + Line(points = {{-359, 270}, {-341, 270}})); + connect(PerteDP3.C2, PuitsP4.C) annotation ( + Line(points = {{140, 232}, {160, 232}}, color = {0, 0, 255})); + connect(SourceP4.C, VanneTOR2.C1) annotation ( + Line(points = {{-80, 220}, {-60, 220}}, color = {0, 0, 255})); + connect(ReguNiveau1.yvanne, VanneTOR1.Ouv) annotation ( + Line(points={{-83.3333,283.333},{-50,283.333},{-50,273.2}})); + connect(Moteur1.C, CoupleurMecanique1.C1) annotation ( + Line(points = {{60.2, 50}, {79, 50}}, color = {217, 67, 180})); + connect(Moteur2.C, CoupleurMecanique2.C1) annotation ( + Line(points = {{60.2, -50}, {79, -50}}, color = {217, 67, 180})); + connect(Moteur3.C, CoupleurMecanique3.C1) annotation ( + Line(points = {{60.2, -130}, {79, -130}}, color = {217, 67, 180})); + connect(VolumeD3.Cth, Flux1.C2) annotation ( + Line(points = {{-88, -180}, {-64, -180}, {-64, -154}, {-40, -154}}, color = {191, 95, 0})); + connect(SourceC1.C[1], Flux1.C1) annotation ( + Line(points = {{-40, -111.8}, {-40, -134}}, color = {191, 95, 0})); + connect(VolumeC2.Cs, CapteurT1.C1) annotation ( + Line(points = {{-160, 10}, {-150, 10}}, color = {0, 0, 255})); + connect(CapteurT1.C2, PerteDP2.C1) annotation ( + Line(points = {{-129.8, 10}, {-100, 10}}, color = {0, 0, 255})); + connect(PerteDP2.C2, VolumeA2.Ce1) annotation ( + Line(points = {{-80, 10}, {-60, 10}}, color = {0, 0, 255})); + connect(VolumeA2.Cs1, PerteDP1.C1) annotation ( + Line(points = {{-40, 10}, {-20, 10}}, color = {0, 0, 255})); + connect(PerteDP1.C2, VolumeD1.Ce) annotation ( + Line(points = {{0, 10}, {20, 10}}, color = {0, 0, 255})); + connect(PerteDP5.C2, VolumeA1.Ce1) annotation ( + Line(points = {{240, 10}, {260, 10}}, color = {0, 0, 255})); + connect(VolumeC1.Cs, PerteDP5.C1) annotation ( + Line(points = {{200, 10}, {220, 10}}, color = {0, 0, 255})); + connect(VanneFuite.C1, VolumeD3.Cs1) annotation ( + Line(points = {{-88, -150}, {-88, -170}}, color = {28, 108, 200})); + connect(VanneUtil.C2, VolumeD3.Ce) annotation ( + Line(points = {{60, -180}, {-78, -180}}, color = {28, 108, 200})); + connect(VanneUtil.C1, VolumeA1.Cs1) annotation ( + Line(points = {{80, -180}, {290, -180}, {290, 10}, {280, 10}}, color = {28, 108, 200})); + connect(VanneTOR1.C2, VolumeC3.Ce2) annotation ( + Line(points = {{-40, 260.2}, {-20, 260.2}, {-20, 260}, {0, 260}, {0, 249}}, color = {0, 0, 255})); + connect(VanneTOR2.C2, VolumeC3.Ce3) annotation ( + Line(points = {{-40, 220.2}, {-20, 220.2}, {-20, 220}, {0, 220}, {0, 230}}, color = {0, 0, 255})); + connect(VolumeC3.Cs, PerteDP7.C1) annotation ( + Line(points = {{10, 240}, {20, 240}}, color = {0, 0, 255})); + connect(VolumeC1.Ce3, ClapetDP0_3.C2) annotation ( + Line(points = {{190, 0}, {190, -70}, {160, -70}}, color = {28, 108, 200})); + connect(VolumeC1.Ce1, ClapetDP0_1.C2) annotation ( + Line(points = {{180, 10}, {160, 10}}, color = {28, 108, 200})); + connect(ClapetDP0_1.C1, PompeCentrifugeDyn2.C2) annotation ( + Line(points = {{140, 10}, {120, 10}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn2.C1, VolumeD1.Cs3) annotation ( + Line(points = {{100, 10}, {40, 10}}, color = {28, 108, 200})); + connect(VanneTOR0_1.C2, EchangeurAPlaques1D1.Ec) annotation ( + Line(points = {{-320, 70}, {-300, 70}}, color = {28, 108, 200})); + connect(VanneTOR0_1.C1, VolumeD2.Cs1) annotation ( + Line(points = {{-340, 69.8}, {-370, 69.8}, {-370, 20}}, color = {28, 108, 200})); + connect(EchangeurAPlaques1D2.Ec, VanneTOR0_2.C2) annotation ( + Line(points = {{-300, 10}, {-320, 10}}, color = {28, 108, 200})); + connect(VanneTOR0_2.C1, VolumeD2.Cs3) annotation ( + Line(points = {{-340, 9.8}, {-350, 9.8}, {-350, 10}, {-360, 10}}, color = {28, 108, 200})); + connect(VanneSerie1.C2, VolumeC2.Ce2) annotation ( + Line(points = {{-200, 70}, {-170, 70}, {-170, 19}}, color = {28, 108, 200})); + connect(VanneSerie1.C1, EchangeurAPlaques1D1.Sc) annotation ( + Line(points = {{-220, 70}, {-280, 70}}, color = {28, 108, 200})); + connect(VolumeC2.Ce1, VanneSerie2.C2) annotation ( + Line(points = {{-180, 10}, {-200, 10}}, color = {28, 108, 200})); + connect(VanneSerie2.C1, EchangeurAPlaques1D2.Sc) annotation ( + Line(points = {{-220, 10}, {-280, 10}}, color = {28, 108, 200})); + connect(VolumeC2.Ce3, VanneBypass.C2) annotation ( + Line(points = {{-170, 0}, {-170, -54}, {-200, -54}}, color = {28, 108, 200})); + connect(VanneBypass.C1, VolumeD2.Cs2) annotation ( + Line(points = {{-220, -54}, {-370, -54}, {-370, 0.2}}, color = {28, 108, 200})); + connect(VolumeD3.Cs3, PerteDP4.C1) annotation ( + Line(points = {{-98, -180}, {-260, -180}}, color = {28, 108, 200})); + connect(VolumeD2.Ce, PerteDP4.C2) annotation ( + Line(points = {{-380, 10}, {-390, 10}, {-390, -180}, {-280, -180}}, color = {28, 108, 200})); + connect(PerteDP8.C2, VolumeA1.Ce2) annotation ( + Line(points = {{270, 100}, {270, 19.8}}, color = {28, 108, 200})); + connect(PerteDP6.C1, VolumeA2.Cs2) annotation ( + Line(points = {{-50, 100}, {-50, 20}})); + connect(ClapetDP0_2.C2, VolumeC1.Ce2) annotation ( + Line(points = {{160, 110}, {190, 110}, {190, 19}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn1.C1, VolumeD1.Cs1) annotation ( + Line(points = {{100, 110}, {30, 110}, {30, 20}}, color = {28, 108, 200})); + connect(ClapetDP0_2.C1, PompeCentrifugeDyn1.C2) annotation ( + Line(points = {{140, 110}, {120, 110}}, color = {28, 108, 200})); + connect(Bache1.yLevel, ReguNiveau1.univeau) annotation ( + Line(points={{102,224},{112,224},{112,332},{-136,332},{-136,298},{-124.667, + 298}})); + connect(Bache1.Ce2, PerteDP6.C2) annotation ( + Line(points = {{60, 208}, {-50, 208}, {-50, 120}}, color = {28, 108, 200})); + connect(Bache1.Ce1, PerteDP7.C2) annotation ( + Line(points = {{60, 232}, {52, 232}, {52, 240}, {40, 240}})); + connect(Bache1.Cs1, PerteDP3.C1) annotation ( + Line(points = {{100.4, 232}, {120, 232}}, color = {0, 0, 255})); + connect(Bache1.Cs2, PerteDP8.C1) annotation ( + Line(points = {{100, 208}, {270, 208}, {270, 120}}, color = {28, 108, 200})); + connect(ClapetDP0_3.C1, PompeCentrifugeDyn3.C2) annotation ( + Line(points = {{140, -70}, {120, -70}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn3.C1, VolumeD1.Cs2) annotation ( + Line(points = {{100, -70}, {30, -70}, {30, 0.2}}, color = {28, 108, 200})); + connect(CoupleurMecanique3.C2, PompeCentrifugeDyn3.M) annotation ( + Line(points = {{101, -130}, {110, -130}, {110, -81}}, color = {217, 67, 180})); + connect(CoupleurMecanique2.C2, PompeCentrifugeDyn2.M) annotation ( + Line(points = {{101, -50}, {110, -50}, {110, -1}}, color = {217, 67, 180})); + connect(CoupleurMecanique1.C2, PompeCentrifugeDyn1.M) annotation ( + Line(points = {{101, 50}, {110, 50}, {110, 99}}, color = {217, 67, 180})); + connect(ouvreBranche2.yL, and1.uL2) annotation (Line(points={{-417,34},{-412, + 34},{-412,56},{-401,56}}, + color={0,0,255})); + connect(ouvreBranche2.yL, VanneTOR0_2.Ouv) + annotation (Line(points={{-417,34},{-330,34},{-330,23}}, color={0,0,255})); + connect(ouvreBranche1.yL, and1.uL1) annotation (Line(points={{-419,94},{-410,94}, + {-410,68},{-401,68}}, color={0,0,255})); + connect(ouvreBranche1.yL, VanneTOR0_1.Ouv) + annotation (Line(points={{-419,94},{-330,94},{-330,83}}, color={0,0,255})); + connect(load.yR, SourceC1.ISignal) annotation (Line(points={{-53,-72},{-40, + -72},{-40,-97}}, + color={0,0,255})); + connect(Tsf.yR, SourceP1.ITemperature) annotation (Line(points={{-309,108},{ + -292,108},{-292,90},{-312,90},{-312,55}}, + color={0,0,255})); + connect(Tsf.yR, PuitsP1.ITemperature) annotation (Line(points={{-309,108},{ + -288,108},{-288,90},{-270,90},{-270,55}}, + color={0,0,255})); + connect(Tsf.yR, SourceP2.ITemperature) annotation (Line(points={{-309,108},{ + -252,108},{-252,26},{-310,26},{-310,-5}}, + color={0,0,255})); + connect(Psf.yR, SourceP2.IPressure) annotation (Line(points={{-345,-28},{-332, + -28},{-332,-10},{-315,-10}}, color={0,0,255})); + connect(Psf.yR, SourceP1.IPressure) annotation (Line(points={{-345,-28},{-332, + -28},{-332,0},{-348,0},{-348,50},{-317,50}}, color={0,0,255})); + connect(Tsf.yR, PuitsP2.ITemperature) annotation (Line(points={{-309,108},{ + -252,108},{-252,-5},{-270,-5}}, color={0,0,255})); + connect(leak.yR, VanneFuite.Ouv) + annotation (Line(points={{-115,-140},{-105,-140}}, color={0,0,255})); + connect(comUtil.yR, VanneUtil.Ouv) annotation (Line(points={{51,-150},{51, + -152},{70,-152},{70,-163}}, color={0,0,255})); + connect(encP1.yL, Moteur1.marche) + annotation (Line(points={{9,64},{50,64},{50,54.4}}, color={0,0,255})); + connect(encP3.yL, Moteur3.marche) annotation (Line(points={{13,-112},{50,-112}, + {50,-125.6}}, color={0,0,255})); + connect(encP2.yL, Moteur2.marche) + annotation (Line(points={{13,-34},{50,-34},{50,-45.6}}, color={0,0,255})); + connect(comVanneBache.yL, VanneTOR2.Ouv) annotation (Line(points={{-105,244}, + {-50,244},{-50,233.2}}, color={0,0,255})); + connect(comVanne_constante.y, VanneSerie1.Ouv) annotation (Line(points={{-249, + 142},{-228,142},{-228,100},{-210,100},{-210,87}}, color={0,0,255})); + connect(comVanne_constante.y, VanneSerie2.Ouv) annotation (Line(points={{-249, + 142},{-228,142},{-228,38},{-210,38},{-210,27}}, color={0,0,255})); + connect(comVanne_constante.y, VanneBypass.Ouv) annotation( + Line(points = {{-249, 142}, {-228, 142}, {-228, -24}, {-210, -24}, {-210, -37}}, color = {0, 0, 255})); + annotation ( + Diagram(coordinateSystem(preserveAspectRatio=false, extent = {{-420, -200}, {300, 340}}, + grid={2,2}, + initialScale=0.1)), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-420,-200},{300,340}}, + grid={2,2}, + initialScale=0.1), graphics={Rectangle(origin = {20, -2}, extent = {{-420, 342}, {280, -198}}), + Text(origin = {0, 388},extent={{-302,114},{200,-42}}, textString= + "%name"), Rectangle(origin = {-45, 69}, fillColor = {153, 193, 241}, fillPattern = FillPattern.Solid, extent = {{-335, -257}, {335, 257}}), Text(origin = {-43, 75}, extent = {{-141, 69}, {141, -69}}, textString = "SRI")}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ +"), experiment(StopTime=1000, __Dymola_Algorithm="Dassl")); +end SRI; \ No newline at end of file diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_corrige.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_corrige.mo new file mode 100644 index 0000000..89eac91 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_corrige.mo @@ -0,0 +1,608 @@ +within cooling_system.Behavior.SRIN4_v4; +model SRI_corrige "SRI built with ThermoSysPro v4.0" + import SRIN4_v3 = + cooling_system.Behavior.SRIN4_v4; + parameter Real p_rho=1000; + parameter Real p_rho_vol=1000; + parameter Real p_rho_vanne=1000; + parameter Real p_rho_pompe=1000; + parameter Real p_rho_ech=1000; + parameter Real p_rho_bache=1000; + parameter Integer mode=0; + ThermoSysPro.WaterSteam.Volumes.VolumeA VolumeA1( + p_rho=p_rho_vol, + mode=mode, + h(start=71733), + Ce2(Q(start=-6.94834))) + annotation (Placement(transformation(extent={{260,0},{280,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP1( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=313105)), + C2(P(start=302810))) + annotation (Placement(transformation(extent={{-20,0},{0,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneUtil( + p_rho=p_rho, mode=mode, + C1(h_vol(start=71733), P(start=538486)), + Pm(start=454907), + C2(P(start=371329))) + annotation (Placement(transformation(extent={{80,-184},{60,-164}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur2(Im(start= + 2157)) annotation (Placement(transformation( + extent={{40,-60},{60,-40}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP3 + annotation (Placement(transformation( + extent={{-100,250},{-80,270}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.SwitchValve VanneTOR1( + Qmin=0, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0), + Pm(start=200650)) + annotation (Placement(transformation(extent={{-60,256},{-40, + 276}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeD VolumeD2( + p_rho=p_rho_vol, + mode=mode, + h(start=107545), + Cs1(Q(start=324)), + Cs2(Q(start=245)), + P(displayUnit="Pa", start=361174)) + annotation (Placement(transformation(extent={{-380,0},{-360,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC2( + p_rho=p_rho_vol, + mode=mode, + h(start=71612.6), + P(start=323241, displayUnit="Pa")) + annotation (Placement(transformation(extent={{-180,0},{-160,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneSerie1( + p_rho=p_rho_vanne, mode= + mode, + Q(start=324), + C1(h_vol(start=57940.3), P(start=337884))) + annotation (Placement(transformation(extent={{-220,66},{-200,86}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneSerie2( + p_rho=p_rho_vanne, mode= + mode, + C1(h_vol(start=57940.3), P(start=337884))) + annotation (Placement(transformation(extent={{-220,6},{-200,26}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneBypass( + p_rho=p_rho_vanne, mode= + mode, + Q(start=245)) + annotation (Placement(transformation(extent={{-220,-58},{-200, + -38}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC1( + option_temperature=2, T0={ + 323.15}) + annotation (Placement(transformation(extent={{-50,-112},{-30,-92}}, + rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.ConvectiveHeatFlow Flux1( + A={800}) + annotation (Placement(transformation(extent={{-50,-154},{-30,-134}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeDTh VolumeD3( + p_rho=p_rho_vol, + mode=mode, + h(start=107545), + Cs1(Q(start=0))) + annotation (Placement(transformation(extent={{-78,-190},{-98, + -170}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.ControlValve VanneFuite( + Cvmax=500, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0)) + annotation (Placement(transformation( + origin={-94,-140}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP3 + annotation (Placement(transformation( + origin={-88,-100}, + extent={{-10,-10},{10,10}}, + rotation=90))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP4( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=371329)), + C2(P(start=361174))) + annotation (Placement(transformation(extent={{-260,-190},{-280, + -170}}, rotation=0))); + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterWaterExchanger + EchangeurAPlaques1D1( + N=5, + p_rhoc=p_rho_ech, + p_rhof=p_rho_ech, + modec=mode, + modef=mode, + Hcc(start={107545,89041.1,76592.9,68054.3,62114.9,57940.3}), + Hcf(start={61856.9,57460.1,54502.3,52473.4,51062.1,50070.2}), + Ef(h(start=50070.2)), + Hmc(start={98293.1,82817,72323.6,65084.6,60027.6}), + Qf(start={1064,1064,1064,1064,1064}), + Hmf(start={59658.5,55981.2,53487.8,51767.8,50566.2}), + Sf(h(start=61856.9)), + muf(start={0.0012,0.0012,0.0012,0.0012,0.0012}), + Ec(P(start=361174), h_vol(start=107545)), + Pcc(start={361174,356572,351934,347268,342583,337884}, each displayUnit="Pa"), + prof(d(start={999.227,999.366,999.462,999.531,999.585}))) + annotation (Placement(transformation(extent={{-300,60},{-280, + 80}}, rotation=0))); + + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP1( + T0=285) + annotation (Placement(transformation(extent={{-322,40},{-302,60}}, + rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP1( + T0=285) + annotation (Placement(transformation(extent={{-280,40},{-260,60}}, + rotation=0))); + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterWaterExchanger + EchangeurAPlaques1D2( + N=5, + p_rhoc=p_rho_ech, + p_rhof=p_rho_ech, + modec=mode, + modef=mode, + Ef(h(start=50070.2)), + Hcc(start={107545,89041.1,76592.9,68054.3,62114.9,57940.3}), + Hcf(start={61856.9,57460.1,54502.3,52473.4,51062.1,50070.2}), + Qf(start={1064,1064,1064,1064,1064}), + Hmc(start={98293.1,82817,72323.6,65084.6,60027.6}), + Hmf(start={59658.5,55981.2,53487.8,51767.8,50566.2}), + Sf(h(start=61856.9)), + muf(start={0.0012,0.0012,0.0012,0.0012,0.0012}), + Ec(P(start=361174), h_vol(start=107545)), + Pcc(start={361174,356572,351934,347268,342583,337884}), + prof(d(start={999.227,999.366,999.462,999.531,999.585}))) + annotation (Placement(transformation(extent={{-300,0},{-280, + 20}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP2( + T0=285) + annotation (Placement(transformation(extent={{-320,-20},{-300,0}}, + rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP2( + T0=285) + annotation (Placement(transformation(extent={{-280,-20},{-260,0}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Terminate Terminate1 + annotation (Placement(transformation(extent={{-340,260},{-320,280}}, + rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante FinSimu( + K=false) + annotation (Placement(transformation(extent={{-380,260},{-360,280}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC1( + p_rho=p_rho_vol, + mode=mode, + h(start=71733), + Ce1(h_vol(start=71733)), + Ce3(Q(start=0)), + P(start=548779, displayUnit="Pa")) + annotation ( Placement(transformation( + extent={{180,0},{200,20}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeD VolumeD1( + p_rho=p_rho_vol, + mode=mode, + Cs1(h(start=71551.9)), + Cs2(h(start=71733)), + Cs3(h(start=71551.9)), + h(start=71551.9)) + annotation (Placement(transformation(extent={{20,0},{40,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_1( + Qmin=0, C1(h_vol(start=71733), + P(start=548779))) + annotation (Placement(transformation(extent={{140,0},{160,20}}, rotation= + 0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur1(Im(start= + 2157)) annotation (Placement(transformation( + extent={{40,40},{60,60}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_2( + Qmin=0, C1(P(start=548779), + h_vol(start=71733))) + annotation (Placement(transformation(extent={{140,100},{160,120}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Moteur3(Im(start=0)) + annotation (Placement(transformation( + extent={{40,-140},{60,-120}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve ClapetDP0_3( + Qmin=0, C1(P(start=302810), + h_vol(start=71733))) + annotation (Placement(transformation(extent={{140,-80},{160,-60}}, + rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn1( + p_rho=p_rho_pompe, + mode=mode, + Q(start=447), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + Cr(start=890.9), + w_a(start=1), + hn(start=25.1), + Qv(start=0.45), + C1(h(start=71551.9)), + C2(h_vol(start=71733), P(start=548779)), + h(start=71642.4)) + annotation (Placement(transformation(extent={{100,100},{120, + 120}}, rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn2( + p_rho=p_rho_pompe, + mode=mode, + Cr(start=890.9), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + w_a(start=1), + hn(start=25.1), + Qv(start=0.45), + C1(h(start=71551.9)), + C2( + P(start=548779), + h_vol(start=71733), + h(start=71733))) + annotation (Placement(transformation(extent={{100,0},{120,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.Machines.CentrifugalPump PompeCentrifugeDyn3( + p_rho=p_rho_pompe, + mode=mode, + Q(start=0), + Qv(start=0), + dynamic_mech_equation=true, + dynamic_energy_balance=true, + Cr(start=0), + w_a(start=0), + hn(start=0), + C1(h(start=71733), P(start=302810)), + C2( + h_vol(start=71733), + P(start=302810), + h(start=71733))) + annotation (Placement(transformation(extent={{100,-80},{120, + -60}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealSwitchValve VanneTOR0_1( + Qmin=0, C2(h_vol(start=107545))) + annotation (Placement(transformation(extent={{-340,66},{-320,86}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.IdealSwitchValve VanneTOR0_2( + Qmin=0, C2(h_vol(start=107545))) + annotation (Placement(transformation(extent={{-340,6},{-320,26}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP5( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=548779)), + Q(start=901)) + annotation (Placement(transformation(extent={{220,0},{240,20}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP6( + L=30, + D=0.05, + z2=30, + p_rho=p_rho, + mode=mode, + C2(P(start=131784))) + annotation (Placement(transformation( + origin={-50,110}, + extent={{-10,10},{10,-10}}, + rotation=90))); + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP PuitsP4(Q(start=0)) + annotation (Placement(transformation( + extent={{160,222},{180,242}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP3( + D=0.3, + lambda=0.005, + p_rho=p_rho, + mode=mode) annotation (Placement(transformation(extent={{120,222},{140, + 242}}, rotation=0))); + ThermoSysPro.WaterSteam.BoundaryConditions.SourceP SourceP4(Q(start=0)) + annotation (Placement(transformation( + extent={{-100,210},{-80,230}}, rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.SwitchValve VanneTOR2( + Qmin=0, + p_rho=p_rho_vanne, + mode=mode, + Q(start=0)) + annotation (Placement(transformation(extent={{-60,216},{-40, + 236}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeC VolumeC3( + p_rho=p_rho_vol, + mode=mode, + Cs(Q(start=0))) + annotation (Placement(transformation(extent={{-10,230},{10,250}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP7( + lambda=0.005, + p_rho=p_rho, + mode=mode, + C1(P(start=101300)), + C2(P(start=101300))) + annotation (Placement(transformation(extent={{20,230},{40,250}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP8( + L=30, + D=0.05, + z1=30, + p_rho=p_rho, + mode=mode, + C1(P(start=131784))) + annotation (Placement(transformation( + origin={270,110}, + extent={{10,-10},{-10,10}}, + rotation=90))); + SRIN4_v3.ReguNiveau_simple + ReguNiveau1 annotation (Placement(transformation(extent={{-124, + 278},{-84,318}}, rotation=0))); + ThermoSysPro.WaterSteam.Volumes.VolumeA VolumeA2( + p_rho=p_rho_vol, + mode=mode, + h(start=71444.9)) + annotation (Placement(transformation(extent={{-60,20},{-40,0}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique1( + Ke=2) + annotation (Placement(transformation(extent={{80,40},{100,60}}, rotation= + 0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique2( + Ke=2) + annotation (Placement(transformation(extent={{80,-60},{100,-40}}, + rotation=0))); + ThermoSysPro.ElectroMechanics.Machines.Shaft CoupleurMecanique3( + Ke=2) + annotation (Placement(transformation(extent={{80,-140},{100,-120}}, + rotation=0))); + ThermoSysPro.WaterSteam.Volumes.Tank Bache1( + A=7, + ze1=5, + zs1=4.70, + z0=3.11, + p_rho=p_rho_bache, + mode=mode, + Cs1(Q(start=0)), + Ce1(Q(start=0)), + Ce2(Q(start=-6.94))) + annotation (Placement(transformation(extent={{60,200},{100,240}}, + rotation=0))); + ThermoSysPro.WaterSteam.Sensors.SensorT CapteurT1(T(start=17 + 273.15), C2( + h_vol(start=71612.6))) + annotation (Placement(transformation(extent={{-150,8},{-130,28}}, + rotation=0))); + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PerteDP2( + L=1, + lambda=0.005, + p_rho=p_rho, + mode=mode, + Q(start=880), + C1(h_vol(start=71612.6), P(start=323241))) + annotation (Placement(transformation(extent={{-100,0},{-80,20}}, + rotation=0))); + SRIN4_v3.CmdVannes cmdVannes(consigneT=290.15, Ti=8) annotation (Placement( + transformation(origin={-282,168}, extent={{-38,-37},{38,37}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.AND and1 annotation ( + Placement(transformation(origin={-390,62}, extent = {{-10, -10}, {10, 10}}))); + Verification.Scenarios.Connector.ScenarioConnector scenario annotation ( + Placement(transformation(origin={-478,70}, extent={{-10,-10},{10,10}}), + iconTransformation(origin={-416,60}, extent={{-36,-36},{36,36}}))); + Verification.Scenarios.Connector.BooleanExpression ouvreBranche1(y=scenario.ouvreBranche1) + annotation (Placement(transformation(extent={{-440,84},{-420,104}}))); + Verification.Scenarios.Connector.BooleanExpression ouvreBranche2(y=scenario.ouvreBranche2) + annotation (Placement(transformation(extent={{-438,24},{-418,44}}))); + Verification.Scenarios.Connector.RealExpression Psf(y=scenario.Psf) + annotation (Placement(transformation(extent={{-366,-38},{-346,-18}}))); + Verification.Scenarios.Connector.RealExpression Tsf(y=scenario.Tsf) + annotation (Placement(transformation(extent={{-330,98},{-310,118}}))); + Verification.Scenarios.Connector.RealExpression load(y=scenario.load) + annotation (Placement(transformation(extent={{-74,-82},{-54,-62}}))); + Verification.Scenarios.Connector.RealExpression leak(y=scenario.leak) + annotation (Placement(transformation(extent={{-136,-150},{-116,-130}}))); + Verification.Scenarios.Connector.RealExpression comUtil(y=scenario.comUtil) + annotation (Placement(transformation(extent={{30,-160},{50,-140}}))); + Verification.Scenarios.Connector.BooleanExpression encP1(y=scenario.encP1) + annotation (Placement(transformation(extent={{-12,54},{8,74}}))); + Verification.Scenarios.Connector.BooleanExpression encP2(y=scenario.encP2) + annotation (Placement(transformation(extent={{-8,-44},{12,-24}}))); + Verification.Scenarios.Connector.BooleanExpression encP3(y=scenario.encP3) + annotation (Placement(transformation(extent={{-8,-122},{12,-102}}))); + Verification.Scenarios.Connector.BooleanExpression comVanneBache(y=scenario.comVanneBache) + annotation (Placement(transformation(extent={{-126,234},{-106,254}}))); +equation + connect(SourceP3.C, VanneTOR1.C1) annotation ( + Line(points = {{-80, 260}, {-60, 260}}, color = {0, 0, 255})); + connect(PuitsP3.C, VanneFuite.C2) annotation ( + Line(points = {{-88, -110}, {-88, -130}}, color = {0, 0, 255})); + connect(SourceP1.C, EchangeurAPlaques1D1.Ef) annotation ( + Line(points={{-302,50},{-295,50},{-295,64}}, color = {0, 0, 255})); + connect(PuitsP1.C, EchangeurAPlaques1D1.Sf) annotation ( + Line(points = {{-280, 50}, {-285, 50}, {-285, 64}}, color = {0, 0, 255})); + connect(SourceP2.C, EchangeurAPlaques1D2.Ef) annotation ( + Line(points={{-300,-10},{-295,-10},{-295,4}}, color = {0, 0, 255})); + connect(PuitsP2.C, EchangeurAPlaques1D2.Sf) annotation ( + Line(points={{-280,-10},{-285,-10},{-285,4}}, color = {0, 0, 255})); + connect(FinSimu.yL, Terminate1.uL) annotation ( + Line(points = {{-359, 270}, {-341, 270}})); + connect(PerteDP3.C2, PuitsP4.C) annotation ( + Line(points = {{140, 232}, {160, 232}}, color = {0, 0, 255})); + connect(SourceP4.C, VanneTOR2.C1) annotation ( + Line(points = {{-80, 220}, {-60, 220}}, color = {0, 0, 255})); + connect(ReguNiveau1.yvanne, VanneTOR1.Ouv) annotation ( + Line(points={{-83.3333,283.333},{-50,283.333},{-50,273.2}})); + connect(Moteur1.C, CoupleurMecanique1.C1) annotation ( + Line(points = {{60.2, 50}, {79, 50}}, color = {217, 67, 180})); + connect(Moteur2.C, CoupleurMecanique2.C1) annotation ( + Line(points = {{60.2, -50}, {79, -50}}, color = {217, 67, 180})); + connect(Moteur3.C, CoupleurMecanique3.C1) annotation ( + Line(points = {{60.2, -130}, {79, -130}}, color = {217, 67, 180})); + connect(VolumeD3.Cth, Flux1.C2) annotation ( + Line(points = {{-88, -180}, {-64, -180}, {-64, -154}, {-40, -154}}, color = {191, 95, 0})); + connect(SourceC1.C[1], Flux1.C1) annotation ( + Line(points = {{-40, -111.8}, {-40, -134}}, color = {191, 95, 0})); + connect(VolumeC2.Cs, CapteurT1.C1) annotation ( + Line(points = {{-160, 10}, {-150, 10}}, color = {0, 0, 255})); + connect(CapteurT1.C2, PerteDP2.C1) annotation ( + Line(points = {{-129.8, 10}, {-100, 10}}, color = {0, 0, 255})); + connect(PerteDP2.C2, VolumeA2.Ce1) annotation ( + Line(points = {{-80, 10}, {-60, 10}}, color = {0, 0, 255})); + connect(VolumeA2.Cs1, PerteDP1.C1) annotation ( + Line(points = {{-40, 10}, {-20, 10}}, color = {0, 0, 255})); + connect(PerteDP1.C2, VolumeD1.Ce) annotation ( + Line(points = {{0, 10}, {20, 10}}, color = {0, 0, 255})); + connect(PerteDP5.C2, VolumeA1.Ce1) annotation ( + Line(points = {{240, 10}, {260, 10}}, color = {0, 0, 255})); + connect(VolumeC1.Cs, PerteDP5.C1) annotation ( + Line(points = {{200, 10}, {220, 10}}, color = {0, 0, 255})); + connect(VanneFuite.C1, VolumeD3.Cs1) annotation ( + Line(points = {{-88, -150}, {-88, -170}}, color = {28, 108, 200})); + connect(VanneUtil.C2, VolumeD3.Ce) annotation ( + Line(points = {{60, -180}, {-78, -180}}, color = {28, 108, 200})); + connect(VanneUtil.C1, VolumeA1.Cs1) annotation ( + Line(points = {{80, -180}, {290, -180}, {290, 10}, {280, 10}}, color = {28, 108, 200})); + connect(VanneTOR1.C2, VolumeC3.Ce2) annotation ( + Line(points = {{-40, 260.2}, {-20, 260.2}, {-20, 260}, {0, 260}, {0, 249}}, color = {0, 0, 255})); + connect(VanneTOR2.C2, VolumeC3.Ce3) annotation ( + Line(points = {{-40, 220.2}, {-20, 220.2}, {-20, 220}, {0, 220}, {0, 230}}, color = {0, 0, 255})); + connect(VolumeC3.Cs, PerteDP7.C1) annotation ( + Line(points = {{10, 240}, {20, 240}}, color = {0, 0, 255})); + connect(VolumeC1.Ce3, ClapetDP0_3.C2) annotation ( + Line(points = {{190, 0}, {190, -70}, {160, -70}}, color = {28, 108, 200})); + connect(VolumeC1.Ce1, ClapetDP0_1.C2) annotation ( + Line(points = {{180, 10}, {160, 10}}, color = {28, 108, 200})); + connect(ClapetDP0_1.C1, PompeCentrifugeDyn2.C2) annotation ( + Line(points = {{140, 10}, {120, 10}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn2.C1, VolumeD1.Cs3) annotation ( + Line(points = {{100, 10}, {40, 10}}, color = {28, 108, 200})); + connect(VanneTOR0_1.C2, EchangeurAPlaques1D1.Ec) annotation ( + Line(points = {{-320, 70}, {-300, 70}}, color = {28, 108, 200})); + connect(VanneTOR0_1.C1, VolumeD2.Cs1) annotation ( + Line(points = {{-340, 69.8}, {-370, 69.8}, {-370, 20}}, color = {28, 108, 200})); + connect(EchangeurAPlaques1D2.Ec, VanneTOR0_2.C2) annotation ( + Line(points = {{-300, 10}, {-320, 10}}, color = {28, 108, 200})); + connect(VanneTOR0_2.C1, VolumeD2.Cs3) annotation ( + Line(points = {{-340, 9.8}, {-350, 9.8}, {-350, 10}, {-360, 10}}, color = {28, 108, 200})); + connect(VanneSerie1.C2, VolumeC2.Ce2) annotation ( + Line(points = {{-200, 70}, {-170, 70}, {-170, 19}}, color = {28, 108, 200})); + connect(VanneSerie1.C1, EchangeurAPlaques1D1.Sc) annotation ( + Line(points = {{-220, 70}, {-280, 70}}, color = {28, 108, 200})); + connect(VolumeC2.Ce1, VanneSerie2.C2) annotation ( + Line(points = {{-180, 10}, {-200, 10}}, color = {28, 108, 200})); + connect(VanneSerie2.C1, EchangeurAPlaques1D2.Sc) annotation ( + Line(points = {{-220, 10}, {-280, 10}}, color = {28, 108, 200})); + connect(VolumeC2.Ce3, VanneBypass.C2) annotation ( + Line(points = {{-170, 0}, {-170, -54}, {-200, -54}}, color = {28, 108, 200})); + connect(VanneBypass.C1, VolumeD2.Cs2) annotation ( + Line(points = {{-220, -54}, {-370, -54}, {-370, 0.2}}, color = {28, 108, 200})); + connect(VolumeD3.Cs3, PerteDP4.C1) annotation ( + Line(points = {{-98, -180}, {-260, -180}}, color = {28, 108, 200})); + connect(VolumeD2.Ce, PerteDP4.C2) annotation ( + Line(points = {{-380, 10}, {-390, 10}, {-390, -180}, {-280, -180}}, color = {28, 108, 200})); + connect(PerteDP8.C2, VolumeA1.Ce2) annotation ( + Line(points = {{270, 100}, {270, 19.8}}, color = {28, 108, 200})); + connect(PerteDP6.C1, VolumeA2.Cs2) annotation ( + Line(points = {{-50, 100}, {-50, 20}})); + connect(ClapetDP0_2.C2, VolumeC1.Ce2) annotation ( + Line(points = {{160, 110}, {190, 110}, {190, 19}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn1.C1, VolumeD1.Cs1) annotation ( + Line(points = {{100, 110}, {30, 110}, {30, 20}}, color = {28, 108, 200})); + connect(ClapetDP0_2.C1, PompeCentrifugeDyn1.C2) annotation ( + Line(points = {{140, 110}, {120, 110}}, color = {28, 108, 200})); + connect(Bache1.yLevel, ReguNiveau1.univeau) annotation ( + Line(points={{102,224},{112,224},{112,332},{-136,332},{-136,298},{-124.667, + 298}})); + connect(Bache1.Ce2, PerteDP6.C2) annotation ( + Line(points = {{60, 208}, {-50, 208}, {-50, 120}}, color = {28, 108, 200})); + connect(Bache1.Ce1, PerteDP7.C2) annotation ( + Line(points = {{60, 232}, {52, 232}, {52, 240}, {40, 240}})); + connect(Bache1.Cs1, PerteDP3.C1) annotation ( + Line(points = {{100.4, 232}, {120, 232}}, color = {0, 0, 255})); + connect(Bache1.Cs2, PerteDP8.C1) annotation ( + Line(points = {{100, 208}, {270, 208}, {270, 120}}, color = {28, 108, 200})); + connect(ClapetDP0_3.C1, PompeCentrifugeDyn3.C2) annotation ( + Line(points = {{140, -70}, {120, -70}}, color = {28, 108, 200})); + connect(PompeCentrifugeDyn3.C1, VolumeD1.Cs2) annotation ( + Line(points = {{100, -70}, {30, -70}, {30, 0.2}}, color = {28, 108, 200})); + connect(CoupleurMecanique3.C2, PompeCentrifugeDyn3.M) annotation ( + Line(points = {{101, -130}, {110, -130}, {110, -81}}, color = {217, 67, 180})); + connect(CoupleurMecanique2.C2, PompeCentrifugeDyn2.M) annotation ( + Line(points = {{101, -50}, {110, -50}, {110, -1}}, color = {217, 67, 180})); + connect(CoupleurMecanique1.C2, PompeCentrifugeDyn1.M) annotation ( + Line(points = {{101, 50}, {110, 50}, {110, 99}}, color = {217, 67, 180})); + connect(CapteurT1.Measure, cmdVannes.utemp) annotation (Line(points={{-140,28}, + {-140,236},{-336,236},{-336,195.133},{-321.9,195.133}}, color={0,0, + 255})); + connect(and1.yL, cmdVannes.unbech) annotation (Line(points={{-379,62},{-376, + 62},{-376,140.867},{-321.9,140.867}}, color={0,0,255})); + connect(ouvreBranche2.yL, and1.uL2) annotation (Line(points={{-417,34},{-412, + 34},{-412,56},{-401,56}}, + color={0,0,255})); + connect(ouvreBranche2.yL, VanneTOR0_2.Ouv) + annotation (Line(points={{-417,34},{-330,34},{-330,23}}, color={0,0,255})); + connect(ouvreBranche1.yL, and1.uL1) annotation (Line(points={{-419,94},{-410,94}, + {-410,68},{-401,68}}, color={0,0,255})); + connect(ouvreBranche1.yL, VanneTOR0_1.Ouv) + annotation (Line(points={{-419,94},{-330,94},{-330,83}}, color={0,0,255})); + connect(load.yR, SourceC1.ISignal) annotation (Line(points={{-53,-72},{-40, + -72},{-40,-97}}, + color={0,0,255})); + connect(Tsf.yR, SourceP1.ITemperature) annotation (Line(points={{-309,108},{ + -292,108},{-292,90},{-312,90},{-312,55}}, + color={0,0,255})); + connect(Tsf.yR, PuitsP1.ITemperature) annotation (Line(points={{-309,108},{ + -288,108},{-288,90},{-270,90},{-270,55}}, + color={0,0,255})); + connect(Tsf.yR, SourceP2.ITemperature) annotation (Line(points={{-309,108},{ + -252,108},{-252,26},{-310,26},{-310,-5}}, + color={0,0,255})); + connect(Psf.yR, SourceP2.IPressure) annotation (Line(points={{-345,-28},{-332, + -28},{-332,-10},{-315,-10}}, color={0,0,255})); + connect(Psf.yR, SourceP1.IPressure) annotation (Line(points={{-345,-28},{-332, + -28},{-332,0},{-348,0},{-348,50},{-317,50}}, color={0,0,255})); + connect(Tsf.yR, PuitsP2.ITemperature) annotation (Line(points={{-309,108},{ + -252,108},{-252,-5},{-270,-5}}, color={0,0,255})); + connect(cmdVannes.ybypass, VanneBypass.Ouv) annotation (Line(points={{-242.1, + 140.867},{-232,140.867},{-232,-37},{-210,-37}}, color={0,0,255})); + connect(cmdVannes.yserie, VanneSerie1.Ouv) annotation (Line(points={{-242.1, + 195.133},{-224,195.133},{-224,194},{-210,194},{-210,87}}, color={0,0, + 255})); + connect(cmdVannes.yserie, VanneSerie2.Ouv) annotation (Line(points={{-242.1, + 195.133},{-218,195.133},{-218,194},{-196,194},{-196,36},{-210,36},{ + -210,27}}, color={0,0,255})); + connect(leak.yR, VanneFuite.Ouv) + annotation (Line(points={{-115,-140},{-105,-140}}, color={0,0,255})); + connect(comUtil.yR, VanneUtil.Ouv) annotation (Line(points={{51,-150},{51, + -152},{70,-152},{70,-163}}, color={0,0,255})); + connect(encP1.yL, Moteur1.marche) + annotation (Line(points={{9,64},{50,64},{50,54.4}}, color={0,0,255})); + connect(encP3.yL, Moteur3.marche) annotation (Line(points={{13,-112},{50,-112}, + {50,-125.6}}, color={0,0,255})); + connect(encP2.yL, Moteur2.marche) + annotation (Line(points={{13,-34},{50,-34},{50,-45.6}}, color={0,0,255})); + connect(comVanneBache.yL, VanneTOR2.Ouv) annotation (Line(points={{-105,244}, + {-50,244},{-50,233.2}}, color={0,0,255})); + annotation ( + Diagram(coordinateSystem(preserveAspectRatio=false, extent = {{-420, -200}, {300, 340}}, + grid={2,2}, + initialScale=0.1)), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-420,-200},{300,340}}, + grid={2,2}, + initialScale=0.1), graphics={Rectangle(origin = {20, -2}, extent = {{-420, 342}, {280, -198}}), + Text(origin = {0, 388},extent={{-302,114},{200,-42}}, textString= + "%name"), Rectangle(origin = {-45, 69}, fillColor = {153, 193, 241}, fillPattern = FillPattern.Solid, extent = {{-335, -257}, {335, 257}}), Text(origin = {-43, 75}, extent = {{-141, 69}, {141, -69}}, textString = "SRI")}), + Documentation(info=" +

Copyright © EDF 2002 - 2003

+ +"), experiment(StopTime=1000, __Dymola_Algorithm="Dassl")); +end SRI_corrige; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_init.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_init.mo new file mode 100644 index 0000000..8988db0 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_init.mo @@ -0,0 +1,88 @@ +within cooling_system.Behavior.SRIN4_v4; +model SRI_init "SRI_v4 model with init values saved directly in the model" + extends SRI_corrige( + Bache1(pro(d(start=997.3453137072643))), + CapteurT1(C2(h_vol(start=71573.27285329779))), + ClapetDP0_1(C1(P(start=547095.0154148956), h_vol(start=72077.35256495455))), + ClapetDP0_2(C1(P(start=547095.0154148956), h_vol(start=72077.35256495455))), + ClapetDP0_3( + C1(P(start=301517.66056181194), h_vol(start=72077.35256495455)), + ouvert(start=false), + tferme(start=true)), + CmdPompes(Pre2(uL(signal(start=true))), Pre4(uL(signal(start=true)))), + EchangeurAPlaques1D1( + Ec(h_vol(start=100007.46023281592)), + Hcc(start={100007.4609375,85778.96839259249,75560.7684473257, + 68126.11700557474,62662.29331747978,58615.05078125}), + Hcf(start={62028.23260501498,57917.69443246873,54965.708979536306, + 52817.87638463647,51239.40579969524,50070.17830080963}), + Hmc(start={92893.2143127042,80669.8684199591,71843.44272645022, + 65394.20516152726,60638.67217239303}), + Hmf(start={59972.96351874185,56441.70170600252,53891.79268208639, + 52028.64109216585,50654.792050252436}), + Pcc(start={359075.3646610427,354911.8156194186,350721.38213225495, + 346510.3514161237,342283.59853089077,338044.875}), + Qcf(start={1064.1863961415913,1064.1864013671875,1064.1864013671875, + 1064.1864013671875,1064.1864013671875,1064.1864013671875}), + muf(start={0.0011597178388986422,0.0011866694617536457, + 0.0012068379048888554,0.0012219995925208968,0.001233450441582668}), + prof(d(start={999.2160322618827,999.3516321206855,999.449707086125, + 999.5238499555511,999.5821886286685}))), + EchangeurAPlaques1D2( + Ec(h_vol(start=100007.46023281592)), + Hcc(start={100007.4609375,85778.96839259249,75560.76844732567, + 68126.11700557456,62662.293317479576,58615.05078125}), + Hcf(start={62028.23260501492,57917.694432468685,54965.70897953626, + 52817.876384636365,51239.40579969514,50070.17830080963}), + Hmc(start={92893.2143127042,80669.86841995908,71843.44272645011, + 65394.20516152707,60638.672172392995}), + Hmf(start={59972.9635187418,56441.701706002474,53891.792682086314, + 52028.64109216575,50654.792050252385}), + Pcc(start={359075.3646610427,354911.8156194186,350721.38213225495, + 346510.3514161237,342283.59853089077,338044.875}), + Qcf(start={1064.186396141591,1064.1864013671875,1064.1864013671875, + 1064.1864013671875,1064.1864013671875,1064.1864013671875}), + muf(start={0.0011597178388986422,0.0011866694617536457, + 0.0012068379048888554,0.0012219995925209135,0.001233450441582668}), + prof(d(start={999.2160322618827,999.3516321206855,999.449707086125, + 999.5238499555511,999.5821886286685}))), + Moteur1(Im(start=2345.0829595742834)), + Moteur2(Im(start=2345.0829595742834)), + Moteur3(Im(start=-1.2125704024831297E-30)), + PerteDP1(C1(P(start=311834.2624381542)), C2(P(start=301517.66056181194))), + PerteDP6(C2(P(start=130739.63122782367))), + PerteDP8(C1(P(start=130739.67962444667))), + PompeCentrifugeDyn1( + Qv(start=0.4514996477109916), + h(start=71934.4793953251), + w_a(start=0.9999382872905375)), + PompeCentrifugeDyn2(Qv(start=0.4514996477109916), w_a(start= + 0.9999382872905375)), + PompeCentrifugeDyn3(Qv(start=-9.872099138881721E-33), w_a(start=-4.140498095755179E-34)), + PuitsP4(Q(start=9.851012407281147E-28)), + ReguTemperature1(PIsat1(Limiteur1(u(signal(start=0.600714973598904))))), + VanneSerie1(C1(P(start=338044.86971547134), h_vol(start=58615.05102730628))), + VanneSerie2(C1(P(start=338044.86971547134), h_vol(start=58615.0510273064))), + VanneUtil(C2(P(start=369248.27194503625)), Pm(start=453013.89110509725)), + VolumeA1(Ce2(Q(start=-6.92802050277794)), h(start=72077.35256495453)), + VolumeA2(h(start=71791.60622569578)), + VolumeC1( + Ce1(h(start=72077.35256495455)), + Ce3(Q(start=-9.859513063874475E-30)), + P(start=547095.0154148956), + h(start=72077.35256495455)), + VolumeC2(P(start=321992.853371121), h(start=71573.27285329779)), + VolumeD1( + Cs1(h(start=71791.60622569566)), + Cs2(h(start=77780.84625390434)), + Cs3(h(start=71791.60622569566)), + h(start=71791.60622569566)), + VolumeD2( + Cs1(Q(start=307.43798100047417)), + Cs2(Q(start=280.215467551985)), + P(start=359075.3646610427), + h(start=100007.46023281592)), + VolumeD3(Cs1(Q(start=4.2324297039926084E-33)), h(start=100007.46023281592))); + + annotation (); +end SRI_init; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_v4_init.mos b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_v4_init.mos new file mode 100644 index 0000000..f8aeb40 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/SRI_v4_init.mos @@ -0,0 +1,88 @@ +Bache1.pro.d.start=997.3453137072643; +CapteurT1.C2.h_vol.start=71573.27285329779; +ClapetDP0_1.C1.P.start=547095.0154148956; +ClapetDP0_1.C1.h_vol.start=72077.35256495455; +ClapetDP0_2.C1.P.start=547095.0154148956; +ClapetDP0_2.C1.h_vol.start=72077.35256495455; +ClapetDP0_3.C1.P.start=301517.66056181194; +ClapetDP0_3.C1.h_vol.start=72077.35256495455; +ClapetDP0_3.C1.ouvert.start=false; +ClapetDP0_3.C1.tferme.start=true; +CmdPompes.Pre2.uL.signal.start=true; +CmdPompes.Pre4.uL.signal.start=true; +EchangeurAPlaques1D1.Ec.h_vol.start=100007.46023281592; +EchangeurAPlaques1D1.Hcc.start={100007.4609375,85778.96839259249,75560.7684473257, + 68126.11700557474,62662.29331747978,58615.05078125}; +EchangeurAPlaques1D1.Hcf.start={62028.23260501498,57917.69443246873,54965.708979536306, + 52817.87638463647,51239.40579969524,50070.17830080963}; +EchangeurAPlaques1D1.Hmc.start={92893.2143127042,80669.8684199591,71843.44272645022, + 65394.20516152726,60638.67217239303}; +EchangeurAPlaques1D1.Hmf.start={59972.96351874185,56441.70170600252,53891.79268208639, + 52028.64109216585,50654.792050252436}; +EchangeurAPlaques1D1.Pcc.start={359075.3646610427,354911.8156194186,350721.38213225495, + 346510.3514161237,342283.59853089077,338044.875}; +EchangeurAPlaques1D1.Qcf.start={1064.1863961415913,1064.1864013671875,1064.1864013671875, + 1064.1864013671875,1064.1864013671875,1064.1864013671875}; +EchangeurAPlaques1D1.muf.start={0.0011597178388986422,0.0011866694617536457, + 0.0012068379048888554,0.0012219995925208968,0.001233450441582668}; + +EchangeurAPlaques1D1.prof.d.start={999.2160322618827,999.3516321206855,999.449707086125, + 999.5238499555511,999.5821886286685}; +EchangeurAPlaques1D2.Ec.h_vol.start=100007.46023281592; +EchangeurAPlaques1D2.Hcc.start={100007.4609375,85778.96839259249,75560.76844732567, + 68126.11700557456,62662.293317479576,58615.05078125}; +EchangeurAPlaques1D2.Hcf.start={62028.23260501492,57917.694432468685,54965.70897953626, + 52817.876384636365,51239.40579969514,50070.17830080963}; +EchangeurAPlaques1D2.Hmc.start={92893.2143127042,80669.86841995908,71843.44272645011, + 65394.20516152707,60638.672172392995}; +EchangeurAPlaques1D2.Hmf.start={59972.9635187418,56441.701706002474,53891.792682086314, + 52028.64109216575,50654.792050252385}; +EchangeurAPlaques1D2.Pcc.start={359075.3646610427,354911.8156194186,350721.38213225495, + 346510.3514161237,342283.59853089077,338044.875}; +EchangeurAPlaques1D2.Qcf.start={1064.186396141591,1064.1864013671875,1064.1864013671875, + 1064.1864013671875,1064.1864013671875,1064.1864013671875}; +EchangeurAPlaques1D2.muf.start={0.0011597178388986422,0.0011866694617536457, + 0.0012068379048888554,0.0012219995925209135,0.001233450441582668}; +EchangeurAPlaques1D2.prof.d.start={999.2160322618827,999.3516321206855,999.449707086125, + 999.5238499555511,999.5821886286685}; +Moteur1.Im.start=2345.0829595742834; +Moteur2.Im.start=2345.0829595742834; +Moteur3.Im.start=-1.2125704024831297E-30; +PerteDP1.C1.P.start=311834.2624381542; +PerteDP1.C2.P.start=301517.66056181194; +PerteDP6.C2.P.start=130739.63122782367; +PerteDP8.C1.P.start=130739.67962444667; +PompeCentrifugeDyn1.Qv.start=0.4514996477109916; +PompeCentrifugeDyn1.h.start=71934.4793953251; +PompeCentrifugeDyn1.w_a.start=0.9999382872905375; +PompeCentrifugeDyn2.Qv.start=0.4514996477109916; +PompeCentrifugeDyn2.w_a.start=0.9999382872905375; +PompeCentrifugeDyn3.Qv.start=-9.872099138881721E-33; +PompeCentrifugeDyn3.w_a.start=-4.140498095755179E-34; +PuitsP4.Q.start=9.851012407281147E-28; +ReguTemperature1.PIsat1.Limiteur1.u.signal.start=0.600714973598904; +VanneSerie1.C1.P.start=338044.86971547134; +VanneSerie1.h_vol.start=58615.05102730628; +VanneSerie2.C1.P.start=338044.86971547134; +VanneSerie2.h_vol.start=58615.0510273064; +VanneUtil.C2.P.start=369248.27194503625; +VanneUtil.Pm.start=453013.89110509725; +VolumeA1.Ce2.Q.start=-6.92802050277794; +VolumeA1.h.start=72077.35256495453; +VolumeA2.h.start=71791.60622569578; +VolumeC1.Ce1.h.start=72077.35256495455; +VolumeC1.Ce3.Q.start=-9.859513063874475E-30; +VolumeC1.P.start=547095.0154148956; +VolumeC1.h.start=72077.35256495455; +VolumeC2.P.start=321992.853371121; +VolumeC2.h.start=71573.27285329779; +VolumeD1.Cs1.h.start=71791.60622569566; +VolumeD1.Cs2.h.start=77780.84625390434; +VolumeD1.Cs3.h.start=71791.60622569566; +VolumeD1.h.start=71791.60622569566; +VolumeD2.Cs1.Q.start=307.43798100047417; +VolumeD2.Cs2.Q.start=280.215467551985; +VolumeD2.P.start=359075.3646610427; +VolumeD2.h.start=100007.46023281592; +VolumeD3.Cs1.Q.start=4.2324297039926084E-33; +VolumeD3.h.start=100007.46023281592; \ No newline at end of file diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ST.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ST.mo new file mode 100644 index 0000000..797184a --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/ST.mo @@ -0,0 +1,142 @@ +within cooling_system.Behavior.SRIN4_v4; +package ST "Bibliothèque des schémas-types" + block CapteurNiveau + parameter Real seuil = 0 "Seuil"; + parameter Boolean defaut = false "Défaut capteur"; + parameter Boolean sens = true "Sens de la détection - true : >, false : <"; + parameter String repere = "xxxxSN" "Repère fonctionnel"; + parameter String libelle = "niveau" "Libellé"; + parameter Real Ti = 0.1 "Constante de temps"; + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical etat annotation ( + Placement(transformation(extent = {{200, 50}, {220, 70}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal u annotation ( + Placement(transformation(origin = {50, -110}, extent = {{-10, -10}, {10, 10}}, rotation = 90))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Inf Inf1 annotation ( + Placement(transformation(extent = {{80, -40}, {100, -20}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante1(k = seuil) annotation ( + Placement(transformation(extent = {{40, -60}, {60, -40}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante2(k = seuil) annotation ( + Placement(transformation(extent = {{40, 40}, {60, 60}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Sup Sup1 annotation ( + Placement(transformation(extent = {{80, 60}, {100, 80}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Selecteur Selecteur1 annotation ( + Placement(transformation(extent = {{120, 10}, {140, 30}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Constante3(K = sens) annotation ( + Placement(transformation(extent = {{80, 10}, {100, 30}}, rotation = 0))); + PO.CapteurNiveau CapteurNiveau1(defaut = defaut) annotation ( + Placement(transformation(extent = {{-20, 10}, {0, 30}}, rotation = 0))); + BFE.Logique.IMP IMP1(T = Ti) annotation ( + Placement(transformation(extent = {{160, 10}, {180, 30}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal valeur annotation ( + Placement(transformation(extent = {{200, -70}, {220, -50}}, rotation = 0))); + equation + connect(Sup1.yL, Selecteur1.uL1) annotation ( + Line(points = {{101, 70}, {114, 70}, {114, 28}, {119, 28}})); + connect(Inf1.yL, Selecteur1.uL2) annotation ( + Line(points = {{101, -30}, {114, -30}, {114, 12}, {119, 12}})); + connect(Constante3.yL, Selecteur1.uCond) annotation ( + Line(points = {{101, 20}, {119, 20}}, color = {0, 0, 255})); + connect(u, CapteurNiveau1.mesure) annotation ( + Line(points = {{50, -110}, {50, -80}, {-10, -80}, {-10, 9.23077}})); + connect(CapteurNiveau1.etat, Sup1.u1) annotation ( + Line(points = {{0.769231, 20}, {20, 20}, {20, 76}, {79, 76}}, color = {0, 0, 255})); + connect(CapteurNiveau1.etat, Inf1.u1) annotation ( + Line(points = {{0.769231, 20}, {20, 20}, {20, -24}, {79, -24}}, color = {0, 0, 255})); + connect(Selecteur1.yL, IMP1.uL) annotation ( + Line(points = {{141, 20}, {159, 20}})); + connect(IMP1.yL, etat) annotation ( + Line(points = {{181, 20}, {190, 20}, {190, 60}, {210, 60}})); + connect(Selecteur1.yL, IMP1.uInit) annotation ( + Line(points = {{141, 20}, {150, 20}, {150, 0}, {170, 0}, {170, 9}})); + connect(CapteurNiveau1.etat, valeur) annotation ( + Line(points = {{0.769231, 20}, {20, 20}, {20, -70}, {190, -70}, {190, -60}, {210, -60}}, color = {0, 0, 255})); + connect(Constante2.y, Sup1.u2) annotation ( + Line(points = {{61, 50}, {70, 50}, {70, 64}, {79, 64}}, color = {0, 0, 255})); + connect(Constante1.y, Inf1.u2) annotation ( + Line(points = {{61, -50}, {70, -50}, {70, -36}, {79, -36}}, color = {0, 0, 255})); + annotation ( + Icon(coordinateSystem(preserveAspectRatio = false, preserveOrientation = false, extent = {{-100, -100}, {200, 100}}, grid = {2, 2}, initialScale = 0), graphics={ Rectangle(extent = {{-100, 100}, {200, -100}}, lineColor = {28, 108, 200}, lineThickness = 0.5), Text(extent = {{-122, 144}, {226, 106}}, textString = "%name"), Rectangle(extent = {{-20, 30}, {120, -30}}), Line(points = {{60, 30}, {60, -30}}), Text(extent = {{124, 86}, {198, 34}}, textString = "état"), Text(extent = {{-16, 26}, {56, -26}}, textString = "PN"), Text(extent = {{-80, -40}, {112, -80}}, textString = "%libelle"), Text(extent = {{-80, 88}, {60, 54}}, textString = "%repere"), Rectangle(extent = {{120, 80}, {200, 40}}), Text(extent = {{124, -34}, {198, -86}}, textString = "valeur"), Rectangle(extent = {{120, -40}, {200, -80}})}), + Window(x = 0.32, y = 0.18, width = 0.6, height = 0.59), + Documentation(info = " +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ + ")); + end CapteurNiveau; + + block VanneTORA_simple + parameter Integer delaiOuverture = 1 "Délai d'ouverture de la vanne"; + parameter Boolean defaut = false "Défaut vanne"; + parameter String repere = "xxxxVA" "Repère fonctionnel"; + parameter Integer tension = 125 "Tension d'alimentation"; + parameter String voie = "A" "Voie"; + parameter String manqueTension = "F" "Etat sur manque tension"; + parameter String manqueAir = "F" "Etat sur manque air"; + parameter Real Ti = 0.1 "Constante de temps"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical E annotation ( + Placement(transformation(extent = {{-220, 320}, {-200, 340}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical D annotation ( + Placement(transformation(extent = {{-220, 140}, {-200, 160}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical cmd annotation ( + Placement(transformation(origin = {200, -210}, extent = {{10, -10}, {-10, 10}}, rotation = 90))); + BFE.Logique.RAZ RAZ1 annotation ( + Placement(transformation(extent = {{160, 40}, {180, 60}}, rotation = 0))); + BFE.Logique.OUL OUL4 annotation ( + Placement(transformation(extent = {{60, -41}, {80, -21}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Defaut(K = defaut) annotation ( + Placement(transformation(extent = {{-100, -80}, {-80, -60}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL NONL1 annotation ( + Placement(transformation(extent = {{-60, -80}, {-40, -60}}, rotation = 0))); + BFE.Logique.IMP IMP1(T = Ti) annotation ( + Placement(transformation(extent = {{-20, -80}, {0, -60}}, rotation = 0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante Constante5(K = false) annotation ( + Placement(transformation(extent = {{-40, -110}, {-20, -90}}, rotation = 0))); + PO.VanneTOR POVanneTOR(delaiOuverture = delaiOuverture, defaut = defaut) annotation ( + Placement(transformation(extent = {{340, 40}, {360, 60}}, rotation = 0))); + equation + connect(OUL4.yL, RAZ1.Z) annotation ( + Line(points = {{81, -31}, {150, -31}, {150, 44}, {159, 44}})); + connect(Defaut.yL, NONL1.uL) annotation ( + Line(points = {{-79, -70}, {-61, -70}})); + connect(NONL1.yL, IMP1.uL) annotation ( + Line(points = {{-39, -70}, {-21, -70}})); + connect(IMP1.yL, OUL4.uL2) annotation ( + Line(points = {{1, -70}, {48, -70}, {48, -37}, {59, -37}})); + connect(Constante5.yL, IMP1.uInit) annotation ( + Line(points = {{-19, -100}, {-10, -100}, {-10, -81}})); + connect(POVanneTOR.Cmd, cmd) annotation ( + Line(points={{350,39.2308},{350,-140},{200,-140},{200,-210}})); + connect(E, RAZ1.E) annotation ( + Line(points = {{-210, 330}, {140, 330}, {140, 56}, {159, 56}})); + connect(E, RAZ1.uInit) annotation ( + Line(points = {{-210, 330}, {140, 330}, {140, 32}, {170, 32}, {170, 39}})); + connect(D, OUL4.uL1) annotation ( + Line(points = {{-210, 150}, {20, 150}, {20, -25}, {59, -25}})); + connect(RAZ1.yL, POVanneTOR.uL) + annotation (Line(points={{181,50},{339.231,50}}, color={0,0,255})); + annotation ( + Icon(coordinateSystem(preserveAspectRatio = false, preserveOrientation = false, extent = {{-200, -200}, {600, 500}}, grid = {2, 2}, initialScale = 0), graphics={ Rectangle(extent = {{-200, 498}, {600, -200}}, lineColor = {28, 108, 200}, lineThickness = 0.5), Rectangle(extent = {{-200, 340}, {-180, 320}}), Text(extent = {{-202, 340}, {-182, 320}}, textString = "E"), Rectangle(extent = {{-200, 160}, {-180, 140}}), Text(extent = {{-200, 160}, {-180, 140}}, textString = "D"), Rectangle(extent = {{-200, 80}, {100, -200}}), Text(extent = {{-178, 58}, {78, -2}}, textString = "%repere"), Rectangle(extent = {{-40, 420}, {400, 200}}), Text(extent = {{-18, 296}, {380, 222}}, textString = "TTLE F : N.A. s"), Text(extent = {{-17, 397}, {381, 323}}, textString = "TTLE O : N.A. s"), Rectangle(extent = {{280, 80}, {600, -200}}), Text(extent = {{300, 78}, {580, 18}}, textString = "Tension: %tension V"), Text(extent = {{320, -60}, {560, -120}}, textString = "Etat/Mqe T: %manqueTension"), Text(extent = {{320, 0}, {580, -40}}, textString = "Voie: %voie"), Text(extent = {{322, -141}, {560, -198}}, textString = "Etat/Mqe air: %manqueAir"), Line(points = {{-180, -180}, {80, -100}, {80, -180}, {-180, -100}, {-180, -180}}), Line(points = {{-180, -60}, {80, -60}}), Line(points = {{-50, -140}, {-50, -60}}), Line(points = {{-180, -60}, {-178, -54}, {-174, -48}, {-162, -40}, {-148, -34}, {-136, -30}, {-126, -28}, {-118, -26}, {-108, -24}, {-92, -22}, {-66, -20}, {-50, -20}, {-32, -20}, {-6, -22}, {16, -26}, {28, -28}, {42, -32}, {54, -36}, {66, -42}, {74, -48}, {78, -52}, {80, -56}, {80, -60}}), Text(extent = {{-196, 596}, {596, 524}}, textString = "%name"), Rectangle(extent = {{560, 480}, {600, 460}}), Text(extent = {{560, 480}, {600, 460}}, textString = "discO"), Rectangle(extent = {{560, 300}, {600, 280}}), Text(extent = {{560, 300}, {600, 280}}, textString = "etatO"), Rectangle(extent = {{560, 120}, {600, 100}}), Text(extent = {{560, 120}, {600, 100}}, textString = "indispo")}), + Diagram(coordinateSystem(preserveAspectRatio = false, preserveOrientation = false, extent = {{-200, -200}, {600, 500}}, grid = {2, 2}, initialScale = 0)), + Window(x = 0.21, y = 0.28, width = 0.6, height = 0.6), + Documentation(info = " +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ + ")); + end VanneTORA_simple; + + annotation ( + Window(x = 0.05, y = 0.26, width = 0.25, height = 0.25, library = 1, autolayout = 1), + Icon(coordinateSystem(preserveAspectRatio = false, extent = {{40, 240}, {280, 0}}, grid = {2, 2}, initialScale = 0), graphics={ Rectangle(origin = {160, 110}, lineColor = {28, 108, 200}, fillColor = {235, 235, 235}, fillPattern = FillPattern.Solid, extent = {{-100, -100}, {80, 50}}), Polygon(origin = {160, 110}, lineColor = {28, 108, 200}, fillColor = {235, 235, 235}, fillPattern = FillPattern.Solid, points = {{-100, 50}, {-80, 70}, {100, 70}, {80, 50}, {-100, 50}}), Polygon(origin = {160, 110}, lineColor = {28, 108, 200}, fillColor = {235, 235, 235}, fillPattern = FillPattern.Solid, points = {{100, 70}, {100, -80}, {80, -100}, {80, 50}, {100, 70}}), Text(origin = {160, 110}, textColor = {255, 0, 0}, extent = {{-120, 135}, {120, 70}}, textString = "%name"), Text(origin = {160, 110}, textColor = {160, 160, 164}, extent = {{-90, 40}, {70, 10}}, textString = "Library"), Rectangle(origin = {160, 110}, extent = {{-32, -6}, {16, -35}}), Rectangle(origin = {160, 110}, extent = {{-32, -56}, {16, -85}}), Line(origin = {159.351, 109.405}, points = {{16, -20}, {49, -20}, {49, -71}, {16, -71}}), Line(origin = {159.351, 109.405}, points = {{-32, -72}, {-64, -72}, {-64, -21}, {-32, -21}}), Polygon(origin = {160, 110}, fillPattern = FillPattern.Solid, points = {{16, -71}, {29, -67}, {29, -74}, {16, -71}}), Polygon(origin = {160, 110}, fillPattern = FillPattern.Solid, points = {{-32, -21}, {-46, -17}, {-46, -25}, {-32, -21}})}), + Documentation(info = " +

Copyright © EDF 2002 - 2003

+ + +

Version 1.0

+ + ")); +end ST; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.mo new file mode 100644 index 0000000..a393f07 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.mo @@ -0,0 +1,8 @@ +within cooling_system.Behavior; +package SRIN4_v4 "SRI N4 with ThermoSysPro v4" + + annotation (Documentation(info=" +

Copyright © EDF 2002 - 2003

+ +"), conversion(noneFromVersion="")); +end SRIN4_v4; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.order new file mode 100644 index 0000000..9d747a6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/SRIN4_v4/package.order @@ -0,0 +1,7 @@ +SRI_init +ReguNiveau_simple +CmdVannes +ST +PO +SRI_corrige +SRI diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.mo new file mode 100644 index 0000000..e6ad9a3 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.mo @@ -0,0 +1,3 @@ +within cooling_system; +package Behavior +end Behavior; \ No newline at end of file diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.order new file mode 100644 index 0000000..35ff915 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Behavior/package.order @@ -0,0 +1 @@ +SRIN4_v4 diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowConversion.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowConversion.mo new file mode 100644 index 0000000..23eb1b7 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowConversion.mo @@ -0,0 +1,37 @@ +within cooling_system.Verification.Observers; +model FlowConversion + + + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin = {-106, 12}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 12}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealOutput y annotation ( + Placement(transformation(origin = {104, 4}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {118, 12}, extent = {{-18, -18}, {18, 18}}))); + Modelica.Blocks.Sources.Constant const(k=1e-3) + annotation (Placement(transformation(extent={{-90,-30},{-70,-10}}))); + Modelica.Blocks.Math.Product product1 + annotation (Placement(transformation(extent={{-40,-14},{-20,6}}))); + Modelica.Blocks.Sources.Constant const1(k=3600) + annotation (Placement(transformation(extent={{-40,-56},{-20,-36}}))); + Modelica.Blocks.Math.Product product2 + annotation (Placement(transformation(extent={{18,-20},{38,0}}))); +equation + connect(const.y, product1.u2) annotation (Line(points={{-69,-20},{-50,-20},{-50, + -10},{-42,-10}}, color={0,0,127})); + connect(u, product1.u1) annotation (Line(points={{-106,12},{-50,12},{-50,2},{-42, + 2}}, color={0,0,127})); + connect(product1.y, product2.u1) + annotation (Line(points={{-19,-4},{16,-4}}, color={0,0,127})); + connect(y, product2.y) annotation (Line(points={{104,4},{44,4},{44,-10},{39,-10}}, + color={0,0,127})); + connect(const1.y, product2.u2) annotation (Line(points={{-19,-46},{8,-46},{8,-16}, + {16,-16}}, color={0,0,127})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {192, 191, 188}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-1, 129}, extent = {{-111, 31}, {111, -31}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-96,42},{-72,30}}, + textColor={28,108,200}, + textString="kg/s"), Text( + extent={{74,42},{98,30}}, + textColor={28,108,200}, + textString="t/h")})); +end FlowConversion; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowToSpeed.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowToSpeed.mo new file mode 100644 index 0000000..8db890c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/FlowToSpeed.mo @@ -0,0 +1,53 @@ +within cooling_system.Verification.Observers; +model FlowToSpeed + + parameter Modelica.Units.SI.Length radius=0.175 + "radius of the section"; + + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin = {-106, 12}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 12}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealOutput y annotation ( + Placement(transformation(origin = {104, 4}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {118, 12}, extent = {{-18, -18}, {18, 18}}))); + Modelica.Blocks.Sources.Constant const(k=1e-3) + annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); + Modelica.Blocks.Math.Product product1 + annotation (Placement(transformation(extent={{-40,-14},{-20,6}}))); + Modelica.Blocks.Math.Division division + annotation (Placement(transformation(extent={{40,-30},{60,-10}}))); + Modelica.Blocks.Sources.Constant Pi(k=Modelica.Constants.pi) + annotation (Placement(transformation(extent={{-100,-62},{-80,-42}}))); + Modelica.Blocks.Math.Product product2 + annotation (Placement(transformation(extent={{-12,-76},{8,-56}}))); + Modelica.Blocks.Sources.Constant const2(k=radius) + annotation (Placement(transformation(extent={{-100,-94},{-80,-74}}))); + Modelica.Blocks.Math.Product pow2 + annotation (Placement(transformation(extent={{-60,-94},{-40,-74}}))); +equation + connect(const.y, product1.u2) annotation (Line(points={{-79,-20},{-50,-20},{-50, + -10},{-42,-10}}, color={0,0,127})); + connect(u, product1.u1) annotation (Line(points={{-106,12},{-50,12},{-50,2},{-42, + 2}}, color={0,0,127})); + connect(product1.y, division.u1) annotation (Line(points={{-19,-4},{30,-4},{30, + -14},{38,-14}}, color={0,0,127})); + connect(division.y, y) annotation (Line(points={{61,-20},{90,-20},{90,4},{104, + 4}}, color={0,0,127})); + connect(division.u2, product2.y) annotation (Line(points={{38,-26},{16,-26},{16, + -66},{9,-66}}, color={0,0,127})); + connect(Pi.y, product2.u1) annotation (Line(points={{-79,-52},{-24,-52},{-24,-60}, + {-14,-60}}, color={0,0,127})); + connect(const2.y, pow2.u1) annotation (Line(points={{-79,-84},{-72,-84},{-72,-78}, + {-62,-78}}, color={0,0,127})); + connect(const2.y, pow2.u2) annotation (Line(points={{-79,-84},{-72,-84},{-72,-90}, + {-62,-90}}, color={0,0,127})); + connect(pow2.y, product2.u2) annotation (Line(points={{-39,-84},{-22,-84},{-22, + -72},{-14,-72}}, color={0,0,127})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {192, 191, 188}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-1, 129}, extent = {{-111, 31}, {111, -31}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-98,34},{-70,20}}, + textColor={28,108,200}, + textString="kg/s"), Text( + extent={{66,36},{94,22}}, + textColor={28,108,200}, + textString="m/s")})); +end FlowToSpeed; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/KtoDeg.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/KtoDeg.mo new file mode 100644 index 0000000..18bfbc2 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/KtoDeg.mo @@ -0,0 +1,28 @@ +within cooling_system.Verification.Observers; +model KtoDeg + + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin = {-106, 12}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 12}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealOutput y annotation ( + Placement(transformation(origin = {104, 4}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {118, 12}, extent = {{-18, -18}, {18, 18}}))); + Modelica.Blocks.Sources.Constant const(k=273.15) + annotation (Placement(transformation(extent={{-54,-38},{-34,-18}}))); + Modelica.Blocks.Math.Add add(k2=-1) + annotation (Placement(transformation(extent={{-4,-10},{16,10}}))); +equation + connect(const.y, add.u2) annotation (Line(points={{-33,-28},{-14,-28},{-14,-6}, + {-6,-6}}, color={0,0,127})); + connect(y, add.y) + annotation (Line(points={{104,4},{22,4},{22,0},{17,0}}, color={0,0,127})); + connect(u, add.u1) annotation (Line(points={{-106,12},{-16,12},{-16,6},{-6,6}}, + color={0,0,127})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {192, 191, 188}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-1, 129}, extent = {{-111, 31}, {111, -31}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-96,42},{-72,30}}, + textColor={28,108,200}, + textString="Kelvin"), Text( + extent={{74,42},{98,30}}, + textColor={28,108,200}, + textString="°C")})); +end KtoDeg; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/PompeEnService.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/PompeEnService.mo new file mode 100644 index 0000000..8d7f92a --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/PompeEnService.mo @@ -0,0 +1,27 @@ +within cooling_system.Verification.Observers; +model PompeEnService + + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin = {-106, 12}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 12}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Logical.Greater greater + annotation (Placement(transformation(extent={{-18,-4},{2,16}}))); + Modelica.Blocks.Interfaces.BooleanOutput y annotation (Placement( + transformation(extent={{100,-4},{120,16}}), iconTransformation(extent={{ + 100,-4},{120,16}}))); + Modelica.Blocks.Sources.Constant const(k=200) + annotation (Placement(transformation(extent={{-66,-32},{-46,-12}}))); +equation + connect(y, greater.y) + annotation (Line(points={{110,6},{3,6}}, color={255,0,255})); + connect(u, greater.u1) annotation (Line(points={{-106,12},{-30,12},{-30,6},{-20, + 6}}, color={0,0,127})); + connect(greater.u2, const.y) annotation (Line(points={{-20,-2},{-40,-2},{-40,-22}, + {-45,-22}}, color={0,0,127})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {192, 191, 188}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-1, 129}, extent = {{-111, 31}, {111, -31}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-56,94},{66,12}}, + textColor={28,108,200}, + textString="La pompe est considérée en fonctionnement +quand son couple moteur est supérieur à 200 N.m")})); +end PompeEnService; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.mo new file mode 100644 index 0000000..253cbef --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification; +package Observers +end Observers; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.order new file mode 100644 index 0000000..de39465 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Observers/package.order @@ -0,0 +1,4 @@ +FlowToSpeed +FlowConversion +PompeEnService +KtoDeg diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML.mo new file mode 100644 index 0000000..d95831f --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML.mo @@ -0,0 +1,68 @@ +within cooling_system.Verification; + +model Reqs_sri_CRML + Modelica.Blocks.Interfaces.RealInput T annotation( + Placement(transformation(origin = {-160, -140}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -100}, extent = {{-20, -20}, {20, 20}}))); + CRML.ETL.Connectors.Boolean4Output R_speed_all annotation( + Placement(transformation(origin = {140, -20}, extent = {{100, 40}, {120, 60}}), iconTransformation(extent = {{100, 40}, {120, 60}}))); + CRML.ETL.Connectors.Boolean4Output R_flow_all annotation( + Placement(transformation(origin = {140, -48}, extent = {{100, 8}, {120, 28}}), iconTransformation(origin = {0, 54}, extent = {{100, -54}, {120, -34}}))); + outer CRML.TimeLocators.Continuous.Master master annotation( + Placement(transformation(origin = {70, 76}, extent = {{-10, -10}, {10, 10}}))); + CRML.ETL.Connectors.Boolean4Output R_T annotation( + Placement(transformation(origin = {140, -148}, extent = {{100, 8}, {120, 28}}), iconTransformation(origin = {0, -12}, extent = {{100, -54}, {120, -34}}))); + Verification.Requirements.Req_speed_all_CRML req_speed_all_CRML annotation( + Placement(transformation(origin = {-172, -22}, extent = {{212, 42}, {232, 62}}))); + Verification.Requirements.Req_flow_all_CRML req_flow_all_CRML annotation( + Placement(transformation(origin = {-174, 6}, extent = {{214, -46}, {234, -26}}))); + Verification.Requirements.Req_Tsri_CRML req_Tsri_CRML annotation( + Placement(transformation(origin = {-170, 20}, extent = {{210, -158}, {230, -138}}))); + Modelica.Blocks.Interfaces.RealInput v1 annotation( + Placement(transformation(origin = {-160, 60}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 100}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput v2 annotation( + Placement(transformation(origin = {-160, 40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 80}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow1 annotation( + Placement(transformation(origin = {-160, -10}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 20}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow2 annotation( + Placement(transformation(origin = {-160, -60}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -20}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow3 annotation( + Placement(transformation(origin = {-160, -110}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -60}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service1 annotation( + Placement(transformation(origin = {-160, 10}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 40}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service2 annotation( + Placement(transformation(origin = {-160, -40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service3 annotation( + Placement(transformation(origin = {-160, -90}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -40}, extent = {{-20, -20}, {20, 20}}))); +equation + connect(R_flow_all, R_flow_all) annotation( + Line(points = {{250, -30}, {250, -30}}, color = {162, 29, 33})); + connect(req_speed_all_CRML.v1, v1) annotation( + Line(points = {{38, 34}, {-100, 34}, {-100, 60}, {-160, 60}}, color = {0, 0, 127})); + connect(req_speed_all_CRML.v2, v2) annotation( + Line(points = {{38, 26}, {-61, 26}, {-61, 40}, {-160, 40}}, color = {0, 0, 127})); + connect(req_Tsri_CRML.T, T) annotation( + Line(points = {{41, -130}, {-59.5, -130}, {-59.5, -140}, {-160, -140}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_1, pump_in_service1) annotation( + Line(points = {{38, -22}, {-60, -22}, {-60, 10}, {-160, 10}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow1, flow1) annotation( + Line(points = {{38, -26}, {-78, -26}, {-78, -10}, {-160, -10}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_2, pump_in_service2) annotation( + Line(points = {{38, -30}, {-60, -30}, {-60, -40}, {-160, -40}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow3, flow2) annotation( + Line(points = {{38, -34}, {-54, -34}, {-54, -56}, {-160, -56}, {-160, -60}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_3, pump_in_service3) annotation( + Line(points = {{38, -38}, {-40, -38}, {-40, -90}, {-160, -90}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow2, flow3) annotation( + Line(points = {{38, -42}, {-30, -42}, {-30, -110}, {-160, -110}}, color = {0, 0, 127})); + connect(req_speed_all_CRML.R_speed_all, R_speed_all) annotation( + Line(points = {{62, 30}, {250, 30}}, color = {162, 29, 33})); + connect(req_speed_all_CRML.R_speed_all, R_speed_all) annotation( + Line(points = {{62, 30}, {250, 30}}, color = {162, 29, 33})); + connect(req_flow_all_CRML.R_flow_all, R_flow_all) annotation( + Line(points = {{62, -30}, {250, -30}}, color = {162, 29, 33})); + connect(req_Tsri_CRML.R_T, R_T) annotation( + Line(points = {{58, -134}, {250, -134}, {250, -130}}, color = {162, 29, 33})); + annotation( + Icon(graphics = {Rectangle(fillColor = {128, 0, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}, coordinateSystem(extent = {{-140, 160}, {140, -100}})), + Diagram(coordinateSystem(extent = {{-180, 80}, {260, -160}}))); +end Reqs_sri_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_externals.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_externals.mo new file mode 100644 index 0000000..48d7025 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_externals.mo @@ -0,0 +1,128 @@ +within cooling_system.Verification; + +model Reqs_sri_CRML_externals + import cooling_system; + Modelica.Blocks.Sources.RealExpression Q_echangeur_1(y = SRI_corrige.EchangeurAPlaques1D1.Ec.Q) annotation( + Placement(transformation(origin = {27, 64}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed annotation( + Placement(transformation(origin = {78, 64}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Sources.RealExpression Q_echangeur_2(y = SRI_corrige.EchangeurAPlaques1D2.Ec.Q) annotation( + Placement(transformation(origin = {25, 36}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed1 annotation( + Placement(transformation(origin = {80, 36}, extent = {{-10, -10}, {10, 10}}))); + Scenarios.Scenario0_2echangeurs scenario0_2echangeurs annotation( + Placement(transformation(origin = {-156, 54}, extent = {{-18, -12}, {18, 12}}))); + Scenarios.Scenario0_1echangeur scenario0_1echangeur annotation( + Placement(transformation(origin = {-98, 36}, extent = {{-18, -12}, {17.9999, 12}}))); + Scenarios.Scenario_GrandChaud scenarioGrandChaud annotation( + Placement(transformation(origin = {-101, -75}, extent = {{-19, -13}, {18.9999, 13}}))); + cooling_system.Behavior.SRIN4_v4.SRI_corrige SRI_corrige annotation( + Placement(transformation(origin = {-26, 9}, extent = {{-26, -22}, {26, 22}}))); + Scenarios.Scenario_limites scenario_limites annotation( + Placement(transformation(origin = {-157, -55}, extent = {{-19, -13}, {19, 13}}))); + Scenarios.Scenario2 scenario_perturbations annotation( + Placement(transformation(origin = {-98, -20.6667}, extent = {{-19, -12.6667}, {19, 12.6667}}))); + Scenarios.Scenario1 scenario_test annotation( + Placement(transformation(extent = {{-176, -14}, {-136, 12}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe1(y = SRI_corrige.PompeCentrifugeDyn1.Q) annotation( + Placement(transformation(origin = {25, -14}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe1(y = SRI_corrige.PompeCentrifugeDyn1.M.Ctr) annotation( + Placement(transformation(origin = {23, 10}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowConversion flowConversion annotation( + Placement(transformation(extent = {{68, -26}, {88, -6}}))); + Observers.PompeEnService pompeEnService annotation( + Placement(transformation(extent = {{68, 0}, {88, 20}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe2(y = SRI_corrige.PompeCentrifugeDyn2.Q) annotation( + Placement(transformation(origin = {25, -66}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe2(y = SRI_corrige.PompeCentrifugeDyn2.M.Ctr) annotation( + Placement(transformation(origin = {23, -42}, extent = {{-17, -14}, {17, 14}}))); + Observers.PompeEnService pompeEnService1 annotation( + Placement(transformation(extent = {{68, -52}, {88, -32}}))); + Observers.FlowConversion flowConversion1 annotation( + Placement(transformation(extent = {{68, -78}, {88, -58}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe3(y = SRI_corrige.PompeCentrifugeDyn3.Q) annotation( + Placement(transformation(origin = {25, -118}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe3(y = SRI_corrige.PompeCentrifugeDyn3.M.Ctr) annotation( + Placement(transformation(origin = {23, -94}, extent = {{-17, -14}, {17, 14}}))); + Observers.PompeEnService pompeEnService2 annotation( + Placement(transformation(extent = {{68, -104}, {88, -84}}))); + Observers.FlowConversion flowConversion2 annotation( + Placement(transformation(extent = {{68, -130}, {88, -110}}))); + Modelica.Blocks.Sources.RealExpression T_SRI(y = SRI_corrige.CapteurT1.T) annotation( + Placement(transformation(origin = {27, -148}, extent = {{-17, -14}, {17, 14}}))); + Observers.KtoDeg ktoDeg annotation( + Placement(transformation(extent = {{68, -160}, {88, -140}}))); + Observers.KtoDeg ktoDeg1 annotation( + Placement(transformation(extent = {{68, -230}, {88, -210}}))); + Observers.KtoDeg ktoDeg2 annotation( + Placement(transformation(extent = {{68, -200}, {88, -180}}))); + Modelica.Blocks.Sources.RealExpression T_input_sf(y = SRI_corrige.EchangeurAPlaques1D2.Tef) annotation( + Placement(transformation(origin = {25, -218}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Sources.RealExpression T_output_sf(y = SRI_corrige.EchangeurAPlaques1D2.Tsf) annotation( + Placement(transformation(origin = {27, -190}, extent = {{-17, -14}, {17, 14}}))); + Modelica.Blocks.Interfaces.RealOutput v1 annotation( + Placement(transformation(origin = {270, 60}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, 60}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput v2 annotation( + Placement(transformation(origin = {270, 40}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, 20}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service1 annotation( + Placement(transformation(origin = {270, 10}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -60}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service2 annotation( + Placement(transformation(origin = {270, -46}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -120}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.BooleanOutput pump_in_service3 annotation( + Placement(transformation(origin = {270, -100}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -180}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow1 annotation( + Placement(transformation(origin = {270, -12}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -80}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow2 annotation( + Placement(transformation(origin = {270, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -140}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput flow3 annotation( + Placement(transformation(origin = {270, -130}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -200}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealOutput T annotation( + Placement(transformation(origin = {270, -200}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {270, -240}, extent = {{-10, -10}, {10, 10}}))); +equation + connect(Q_echangeur_1.y, flowToSpeed.u) annotation( + Line(points = {{45.7, 64}, {57.4, 64}, {57.4, 65.2}, {66, 65.2}}, color = {0, 0, 127})); + connect(Q_echangeur_2.y, flowToSpeed1.u) annotation( + Line(points = {{43.7, 36}, {58, 36}, {58, 37.2}, {68, 37.2}}, color = {0, 0, 127})); + connect(Q_Pompe1.y, flowConversion.u) annotation( + Line(points = {{43.7, -14}, {43.7, -14.8}, {66, -14.8}}, color = {0, 0, 127})); + connect(Couple_Pompe1.y, pompeEnService.u) annotation( + Line(points = {{41.7, 10}, {58, 10}, {58, 11.2}, {66, 11.2}}, color = {0, 0, 127})); + connect(Couple_Pompe2.y, pompeEnService1.u) annotation( + Line(points = {{41.7, -42}, {58, -42}, {58, -40.8}, {66, -40.8}}, color = {0, 0, 127})); + connect(Q_Pompe2.y, flowConversion1.u) annotation( + Line(points = {{43.7, -66}, {46, -66.8}, {66, -66.8}}, color = {0, 0, 127})); + connect(Couple_Pompe3.y, pompeEnService2.u) annotation( + Line(points = {{41.7, -94}, {58, -94}, {58, -92.8}, {66, -92.8}}, color = {0, 0, 127})); + connect(Q_Pompe3.y, flowConversion2.u) annotation( + Line(points = {{43.7, -118}, {46, -118.8}, {66, -118.8}}, color = {0, 0, 127})); + connect(T_SRI.y, ktoDeg.u) annotation( + Line(points = {{45.7, -148}, {58, -148}, {58, -148.8}, {66, -148.8}}, color = {0, 0, 127})); + connect(ktoDeg1.u, T_input_sf.y) annotation( + Line(points = {{66, -218.8}, {64, -218}, {43.7, -218}}, color = {0, 0, 127})); + connect(ktoDeg2.u, T_output_sf.y) annotation( + Line(points = {{66, -188.8}, {50, -188.8}, {50, -190}, {45.7, -190}}, color = {0, 0, 127})); + connect(scenario0_2echangeurs.scenarioConnector, SRI_corrige.scenario) annotation( + Line(points = {{-136.8, 54.24}, {-64, 54.24}, {-64, 8.18519}, {-51.7111, 8.18519}})); + connect(ktoDeg.y, T) annotation( + Line(points = {{90, -148}, {218, -148}, {218, -200}, {270, -200}}, color = {0, 0, 127})); + connect(flow3, flowConversion2.y) annotation( + Line(points = {{270, -130}, {132, -130}, {132, -118}, {90, -118}}, color = {0, 0, 127})); + connect(pump_in_service3, pompeEnService2.y) annotation( + Line(points = {{270, -100}, {176, -100}, {176, -94}, {90, -94}}, color = {255, 0, 255})); + connect(flow2, flowConversion1.y) annotation( + Line(points = {{270, -70}, {140, -70}, {140, -66}, {90, -66}}, color = {0, 0, 127})); + connect(pump_in_service2, pompeEnService1.y) annotation( + Line(points = {{270, -46}, {158, -46}, {158, -42}, {90, -42}}, color = {255, 0, 255})); + connect(flow1, flowConversion.y) annotation( + Line(points = {{270, -12}, {160, -12}, {160, -14}, {90, -14}}, color = {0, 0, 127})); + connect(pump_in_service1, pompeEnService.y) annotation( + Line(points = {{270, 10}, {90, 10}}, color = {255, 0, 255})); + connect(v2, flowToSpeed1.y) annotation( + Line(points = {{270, 40}, {180, 40}, {180, 38}, {92, 38}}, color = {0, 0, 127})); + connect(v1, flowToSpeed.y) annotation( + Line(points = {{270, 60}, {178, 60}, {178, 66}, {90, 66}}, color = {0, 0, 127})); + annotation( + Diagram(graphics = {Rectangle(origin = {56, -70}, fillColor = {143, 240, 164}, fillPattern = FillPattern.Solid, extent = {{-52, 166}, {52, -166}}), Text(origin = {53, 87}, extent = {{-27, 9}, {27, -9}}, textString = "Observers"), Rectangle(origin = {-127, 0}, fillColor = {255, 190, 111}, fillPattern = FillPattern.Solid, extent = {{-67, 96}, {67, -96}}), Text(origin = {-131, 87}, extent = {{-35, 7}, {35, -7}}, textString = "Scenarios")}, coordinateSystem(extent = {{-200, 100}, {260, -240}})), + Icon(coordinateSystem(extent = {{-200, -300}, {260, 100}})), + experiment(StartTime = 0, StopTime = 1000, Tolerance = 1e-06, Interval = 2)); +end Reqs_sri_CRML_externals; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_verif.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_verif.mo new file mode 100644 index 0000000..69305f3 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Reqs_sri_CRML_verif.mo @@ -0,0 +1,32 @@ +within cooling_system.Verification; + +model Reqs_sri_CRML_verif + Reqs_sri_CRML_externals externals annotation( + Placement(transformation(origin = {-206, 40}, extent = {{-23, -20}, {23, 20}}))); + inner CRML.TimeLocators.Continuous.Master master annotation( + Placement(transformation(origin = {-392, 168}, extent = {{232, -228}, {252, -208}}))); + CRML.Blocks.Logical.BooleanPulse booleanPulse(period = 1000, startTime = 10, width = 980) annotation( + Placement(transformation(origin = {-414, 168}, extent = {{194, -228}, {214, -208}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 annotation( + Placement(transformation(origin = {-402, 168}, extent = {{218, -222}, {226, -214}}))); + Reqs_sri_CRML reqs annotation( + Placement(transformation(origin = {-130, 4}, extent = {{-14, -13}, {14, 13}}))); +equation + // Bindings + reqs.v1 = externals.v1; + reqs.v2 = externals.v2; + reqs.pump_in_service1 = externals.pump_in_service1; + reqs.pump_in_service2 = externals.pump_in_service2; + reqs.pump_in_service3 = externals.pump_in_service3; + reqs.flow1 = externals.flow1; + reqs.flow2 = externals.flow2; + reqs.flow3 = externals.flow3; + reqs.T = externals.T ; + connect(booleanPulse.y, booleanToBoolean4_1.u) annotation( + Line(points = {{-199, -50}, {-184, -50}}, color = {217, 67, 180})); + connect(master.u, booleanToBoolean4_1.y) annotation( + Line(points = {{-161, -50}, {-176, -50}}, color = {162, 29, 33})); + +annotation( + Diagram(coordinateSystem(extent = {{-240, 60}, {-140, -60}}))); +end Reqs_sri_CRML_verif; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_DTsf.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_DTsf.mo new file mode 100644 index 0000000..aef092d --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_DTsf.mo @@ -0,0 +1,57 @@ +within cooling_system.Verification.Requirements; +model Req_DTsf + Modelica.Blocks.Interfaces.BooleanOutput y annotation ( + Placement(transformation(origin = {108, 6}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, 4}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation( + origin={-120,18}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,50}, extent={{-20,-20},{20,20}}))); + Modelica.Blocks.Logical.And and1 annotation ( + Placement(transformation(origin={78,-14}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=22) + annotation (Placement(transformation(extent={{-50,-34},{-30,-14}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold(threshold=7) + annotation (Placement(transformation(extent={{18,8},{38,28}}))); + Utils.Imply imply1 + annotation (Placement(transformation(extent={{24,-30},{44,-10}}))); + Modelica.Blocks.Interfaces.RealInput u1 annotation (Placement(transformation( + origin={-120,-40}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,-40}, extent={{-20,-20},{20,20}}))); + Modelica.Blocks.Math.Add add(k2=-1) + annotation (Placement(transformation(extent={{-78,-14},{-58,6}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold1(threshold=5) + annotation (Placement(transformation(extent={{-14,-52},{6,-32}}))); +equation + connect(and1.y, y) annotation ( + Line(points={{89,-14},{94,-14},{94,6},{108,6}}, color = {255, 0, 255})); + + connect(lessThreshold.y, and1.u1) annotation (Line(points={{39,18},{56,18},{ + 56,-14},{66,-14}}, color={255,0,255})); + connect(and1.u2, imply1.y) annotation (Line(points={{66,-22},{50,-22},{50,-20}, + {45,-20}}, color={255,0,255})); + connect(u, add.u1) annotation (Line(points={{-120,18},{-82,18},{-82,2},{-80,2}}, + color={0,0,127})); + connect(u1, add.u2) annotation (Line(points={{-120,-40},{-82,-40},{-82,-10},{ + -80,-10}}, color={0,0,127})); + connect(add.y, lessThreshold.u) annotation (Line(points={{-57,-4},{6,-4},{6, + 18},{16,18}}, color={0,0,127})); + connect(u1, greaterThreshold.u) annotation (Line(points={{-120,-40},{-82,-40}, + {-82,-24},{-52,-24}}, color={0,0,127})); + connect(greaterThreshold.y, imply1.u1) annotation (Line(points={{-29,-24},{12, + -24},{12,-20},{22,-20}}, color={255,0,255})); + connect(imply1.u2, lessThreshold1.y) + annotation (Line(points={{22,-28},{7,-28},{7,-42}}, color={255,0,255})); + connect(lessThreshold1.u, add.y) annotation (Line(points={{-16,-42},{-14,-42}, + {-14,-4},{-57,-4}}, color={0,0,127})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {246, 97, 81}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-64,88},{52,54}}, + textColor={28,108,200}, + textString="La delta de température entre la sortie et +l'entrée des échangeurs connectés à la source +froide doit etre inférieure à 7°C."), Text( + extent={{-58,-68},{52,-100}}, + textColor={28,108,200}, + textString="De plus, en situation caniculaire (Tsf>22°C), +la limite est à 5°C.")})); +end Req_DTsf; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri.mo new file mode 100644 index 0000000..ddda11a --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri.mo @@ -0,0 +1,33 @@ +within cooling_system.Verification.Requirements; +model Req_Tsri + Modelica.Blocks.Interfaces.BooleanOutput y annotation ( + Placement(transformation(origin = {108, 6}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, 4}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation( + origin={-120,-2}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,0}, extent={{-20,-20},{20,20}}))); + Modelica.Blocks.Logical.And and1 annotation ( + Placement(transformation(origin = {58, -14}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=16) + annotation (Placement(transformation(extent={{-28,-44},{-8,-24}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold(threshold=30) + annotation (Placement(transformation(extent={{-26,8},{-6,28}}))); +equation + connect(and1.y, y) annotation ( + Line(points={{69,-14},{108,-14},{108,6}}, color = {255, 0, 255})); + + connect(u, lessThreshold.u) annotation (Line(points={{-120,-2},{-38,-2},{-38, + 18},{-28,18}}, color={0,0,127})); + connect(u, greaterThreshold.u) annotation (Line(points={{-120,-2},{-40,-2},{ + -40,-34},{-30,-34}}, color={0,0,127})); + connect(lessThreshold.y, and1.u1) annotation (Line(points={{-5,18},{36,18},{ + 36,-14},{46,-14}}, color={255,0,255})); + connect(greaterThreshold.y, and1.u2) annotation (Line(points={{-7,-34},{38, + -34},{38,-22},{46,-22}}, color={255,0,255})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {246, 97, 81}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-62,84},{54,50}}, + textColor={28,108,200}, + textString="La température du SRI doit etre +maintenue entre 16 et 30°C")})); +end Req_Tsri; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri_CRML.mo new file mode 100644 index 0000000..a0171fa --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_Tsri_CRML.mo @@ -0,0 +1,93 @@ +within cooling_system.Verification.Requirements; +model Req_Tsri_CRML + Modelica.Blocks.Interfaces.RealInput T annotation (Placement(transformation( + origin={-120,34}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,0}, extent={{-20,-20},{20,20}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 + annotation (Placement(transformation(extent={{-6,22},{2,30}}))); + CRML.ETL.Connectors.Boolean4Output R1_T annotation (Placement( + transformation(extent={{100,40},{120,60}}), iconTransformation(extent={ + {100,40},{120,60}}))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold(threshold + =16) annotation (Placement(transformation(extent={{-70,-6},{-50,14}}))); + Modelica.Blocks.Logical.LessEqualThreshold lessEqualThreshold(threshold=30) + annotation (Placement(transformation(extent={{-70,26},{-50,46}}))); + Modelica.Blocks.Logical.And and1 + annotation (Placement(transformation(extent={{-34,16},{-14,36}}))); + CRML.TimeLocators.Continuous.During during + annotation (Placement(transformation(extent = {{18, 46}, {38, 66}}))); + CRML.Requirements.Ensure ensure + annotation (Placement(transformation(extent = {{18, 16}, {38, 36}}))); + CRML.Blocks.Logical4.Boolean4Constant Always(K = CRML.ETL.Types.Boolean4.true4) annotation( + Placement(transformation(extent = {{-18, 46}, {2, 66}}))); + CRML.TimeLocators.Continuous.FromFor fromFor + annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); + CRML.Blocks.Logical4.Not4 not4_1 + annotation (Placement(transformation(extent={{-14,-30},{6,-10}}))); + Modelica.Blocks.Sources.Constant seconds(k=60) + annotation (Placement(transformation(extent={{-72,-48},{-52,-28}}))); + CRML.Requirements.CheckAtEnd checkAtEnd + annotation (Placement(transformation(extent={{20,-66},{40,-46}}))); + CRML.Blocks.Logical4.Not4 not4_2 + annotation (Placement(transformation(extent={{-12,-66},{8,-46}}))); + CRML.ETL.Connectors.Boolean4Output R2_T annotation (Placement( + transformation(extent={{100,8},{120,28}}), iconTransformation(origin = {0, 54}, extent = {{100, -54}, {120, -34}}))); + outer CRML.TimeLocators.Continuous.Master master annotation( + Placement(transformation(origin = {70, 76}, extent = {{-10, -10}, {10, 10}}))); + CRML.Blocks.Logical4.And4 and4 annotation( + Placement(transformation(origin = {80, -34}, extent = {{-10, -10}, {10, 10}}))); + CRML.ETL.Connectors.Boolean4Output R_T annotation( + Placement(transformation(origin = {0, -52}, extent = {{100, 8}, {120, 28}}), iconTransformation(origin = {0, -12}, extent = {{100, -54}, {120, -34}}))); +equation + connect(T, lessEqualThreshold.u) annotation( + Line(points = {{-120, 34}, {-88, 34}, {-88, 36}, {-72, 36}}, color = {0, 0, 127})); + connect(T, greaterEqualThreshold.u) annotation( + Line(points = {{-120, 34}, {-80, 34}, {-80, 4}, {-72, 4}}, color = {0, 0, 127})); + connect(greaterEqualThreshold.y, and1.u2) annotation( + Line(points = {{-49, 4}, {-42, 4}, {-42, 18}, {-36, 18}}, color = {255, 0, 255})); + connect(lessEqualThreshold.y, and1.u1) annotation( + Line(points = {{-49, 36}, {-42, 36}, {-42, 26}, {-36, 26}}, color = {255, 0, 255})); + connect(booleanToBoolean4_1.u, and1.y) annotation( + Line(points = {{-6.4, 26}, {-13, 26}}, color = {217, 67, 180})); + connect(booleanToBoolean4_1.y, ensure.u) annotation( + Line(points = {{2.4, 26}, {17, 26}}, color = {162, 29, 33})); + connect(ensure.tl, during.y) annotation( + Line(points = {{28, 36}, {28, 46}}, color = {0, 0, 255})); + connect(during.u, Always.y) annotation( + Line(points = {{17, 56}, {3, 56}}, color = {162, 29, 33})); + connect(ensure.y, not4_1.u) annotation( + Line(points = {{39, 26}, {44, 26}, {44, -2}, {-20, -2}, {-20, -20}, {-15, -20}}, color = {162, 29, 33})); + connect(fromFor.u, not4_1.y) annotation( + Line(points = {{19, -20}, {7, -20}}, color = {162, 29, 33})); + connect(fromFor.duration, seconds.y) annotation( + Line(points = {{19, -28}, {12, -28}, {12, -38}, {-51, -38}}, color = {0, 0, 0})); + connect(fromFor.y, checkAtEnd.tl) annotation( + Line(points = {{30, -30}, {30, -46}}, color = {0, 0, 255})); + connect(checkAtEnd.u, not4_2.y) annotation( + Line(points = {{19, -56}, {9, -56}}, color = {162, 29, 33})); + connect(booleanToBoolean4_1.y, not4_2.u) annotation( + Line(points = {{2.4, 26}, {6, 26}, {6, 6}, {-30, 6}, {-30, -56}, {-13, -56}}, color = {162, 29, 33})); + connect(R2_T, R2_T) annotation( + Line(points = {{110, 18}, {110, 18}}, color = {162, 29, 33})); + connect(ensure.y, R1_T) annotation( + Line(points = {{39, 26}, {56, 26}, {56, 50}, {110, 50}}, color = {162, 29, 33})); + connect(checkAtEnd.y, R2_T) annotation( + Line(points = {{41, -56}, {56, -56}, {56, 18}, {110, 18}}, color = {162, 29, 33})); + connect(and4.u1, ensure.y) annotation( + Line(points = {{70, -26}, {50, -26}, {50, 26}, {40, 26}}, color = {162, 29, 33})); + connect(and4.u2, checkAtEnd.y) annotation( + Line(points = {{70, -42}, {50, -42}, {50, -56}, {42, -56}}, color = {162, 29, 33})); + connect(and4.y, R_T) annotation( + Line(points = {{92, -34}, {110, -34}}, color = {162, 29, 33})); + annotation ( + Icon(graphics = {Rectangle(fillColor = {128, 0, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}, coordinateSystem(extent = {{-140, 160}, {140, -100}})), + Diagram(graphics={Text( + extent={{-88,94},{24,76}}, + textColor={28,108,200}, + textString="La température du SRI doit etre +maintenue entre 16 et 30°C."), Text( + extent={{-88,-58},{90,-104}}, + textColor={28,108,200}, + textString="Si la température dépasse ces limites, +elle doit etre revenue dans l'intervalle au bout de 1 minute.")})); +end Req_Tsri_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow.mo new file mode 100644 index 0000000..98ef35f --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow.mo @@ -0,0 +1,77 @@ +within cooling_system.Verification.Requirements; +model Req_flow + "\"Le débit dans les pompes doit etre supérieur à 700 t/h\"" + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin={-120,40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120,40}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanOutput y annotation ( + Placement(transformation(origin = {108, 6}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin={110,-10}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealInput u1 annotation ( + Placement(transformation(origin={-120,-90}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120,-38}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Logical.And and1 annotation ( + Placement(transformation(origin={72,6}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealInput u2 + annotation ( + Placement(transformation(origin={-120,-36}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120, + -118}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput u3 annotation (Placement( + transformation(extent={{-140,60},{-100,100}}), iconTransformation( + extent={{-140,60},{-100,100}}))); + Modelica.Blocks.Interfaces.BooleanInput u4 annotation (Placement( + transformation(extent={{-140,-18},{-100,22}}), iconTransformation( + extent={{-140,-18},{-100,22}}))); + Modelica.Blocks.Interfaces.BooleanInput u5 annotation (Placement( + transformation(extent={{-140,-82},{-100,-42}}), iconTransformation( + extent={{-140,-98},{-100,-58}}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=700) + annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); + Utils.Imply imply1 + annotation (Placement(transformation(extent={{-20,24},{0,44}}))); + Modelica.Blocks.Logical.And and2 + annotation (Placement(transformation(extent={{22,-4},{42,16}}))); + Utils.Imply imply2 + annotation (Placement(transformation(extent={{-20,-18},{0,2}}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold1(threshold=700) + annotation (Placement(transformation(extent={{-70,-42},{-50,-22}}))); + Utils.Imply imply3 + annotation (Placement(transformation(extent={{-20,-70},{0,-50}}))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold2(threshold=700) + annotation (Placement(transformation(extent={{-72,-92},{-52,-72}}))); +equation + connect(and1.y, y) annotation ( + Line(points={{83,6},{108,6}}, color = {255, 0, 255})); + + connect(u, greaterThreshold.u) annotation (Line(points={{-120,40},{-96,40},{ + -96,20},{-72,20}}, color={0,0,127})); + connect(u3, imply1.u1) annotation (Line(points={{-120,80},{-30,80},{-30,34},{ + -22,34}}, color={255,0,255})); + connect(greaterThreshold.y, imply1.u2) annotation (Line(points={{-49,20},{-32, + 20},{-32,26},{-22,26}}, color={255,0,255})); + connect(and1.u1, and2.y) + annotation (Line(points={{60,6},{43,6}}, color={255,0,255})); + connect(imply1.y, and2.u1) annotation (Line(points={{1,34},{10,34},{10,6},{20, + 6}}, color={255,0,255})); + connect(u4, imply2.u1) annotation (Line(points={{-120,2},{-30,2},{-30,-8},{ + -22,-8}}, color={255,0,255})); + connect(u2, greaterThreshold1.u) annotation (Line(points={{-120,-36},{-82,-36}, + {-82,-32},{-72,-32}}, color={0,0,127})); + connect(greaterThreshold1.y, imply2.u2) annotation (Line(points={{-49,-32},{ + -30,-32},{-30,-16},{-22,-16}}, color={255,0,255})); + connect(u5, imply3.u1) annotation (Line(points={{-120,-62},{-78,-62},{-78,-60}, + {-22,-60}}, color={255,0,255})); + connect(u1, greaterThreshold2.u) annotation (Line(points={{-120,-90},{-86,-90}, + {-86,-82},{-74,-82}}, color={0,0,127})); + connect(greaterThreshold2.y, imply3.u2) annotation (Line(points={{-51,-82},{ + -32,-82},{-32,-68},{-22,-68}}, color={255,0,255})); + connect(imply2.y, and2.u2) annotation (Line(points={{1,-8},{12,-8},{12,-2},{ + 20,-2}}, color={255,0,255})); + connect(imply3.y, and1.u2) annotation (Line(points={{1,-60},{52,-60},{52,-2}, + {60,-2}}, color={255,0,255})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {246, 97, 81}, fillPattern = FillPattern.Solid, extent={{-100, + 100},{100,-130}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-34,96},{24,64}}, + textColor={28,108,200}, + textString="Le débit dans les pompes +doit etre supérieur à 700 t/h")})); +end Req_flow; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_CRML.mo new file mode 100644 index 0000000..da3b1dc --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_CRML.mo @@ -0,0 +1,46 @@ +within cooling_system.Verification.Requirements; +model Req_flow_CRML + Modelica.Blocks.Interfaces.RealInput f annotation (Placement(transformation( + origin={-120,-36}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,-36}, extent={{-20,-20},{20,20}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 + annotation (Placement(transformation(extent={{-40,-40},{-32,-32}}))); + CRML.ETL.Connectors.Boolean4Output R_f annotation (Placement( + transformation(extent={{100,-10},{120,10}}), iconTransformation(extent= + {{100,-10},{120,10}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service annotation (Placement( + transformation(extent={{-140,6},{-100,46}}), iconTransformation(extent= + {{-140,6},{-100,46}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_2 + annotation (Placement(transformation(extent={{-88,22},{-80,30}}))); + CRML.TimeLocators.Continuous.During during + annotation (Placement(transformation(extent={{-6,16},{14,36}}))); + CRML.Requirements.Ensure ensure + annotation (Placement(transformation(extent={{-6,-46},{14,-26}}))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold(threshold + =700) annotation (Placement(transformation(extent={{-76,-46},{-56,-26}}))); +equation + + connect(pump_in_service, booleanToBoolean4_2.u) + annotation (Line(points={{-120,26},{-88.4,26}}, color={255,0,255})); + connect(booleanToBoolean4_1.y, ensure.u) + annotation (Line(points={{-31.6,-36},{-7,-36}}, color={162,29,33})); + connect(ensure.y, R_f) annotation (Line(points={{15,-36},{96,-36}, + {96,0},{110,0}}, color={162,29,33})); + connect(booleanToBoolean4_2.y, during.u) + annotation (Line(points={{-79.6,26},{-7,26}}, color={162,29,33})); + connect(ensure.tl, during.y) + annotation (Line(points={{4,-26},{4,16}}, color={0,0,255})); + connect(f, greaterEqualThreshold.u) + annotation (Line(points={{-120,-36},{-78,-36}}, color={0,0,127})); + connect(booleanToBoolean4_1.u, greaterEqualThreshold.y) + annotation (Line(points={{-40.4,-36},{-55,-36}}, color={217,67,180})); +annotation ( + Icon(graphics={ Rectangle(fillColor={128,0,255}, fillPattern= + FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-68,90},{82,66}}, + textColor={28,108,200}, + textString="Quand les pompes sont en service, leur débit +doit etre supérieur à 700 t/h")})); +end Req_flow_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_all_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_all_CRML.mo new file mode 100644 index 0000000..aeb2a8c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_flow_all_CRML.mo @@ -0,0 +1,60 @@ +within cooling_system.Verification.Requirements; +model Req_flow_all_CRML + "\"Le débit dans les pompes doit etre supérieur à 700 t/h\"" + Modelica.Blocks.Interfaces.RealInput flow1 annotation ( + Placement(transformation(origin={-120,40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120,40}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow3 annotation ( + Placement(transformation(origin={-120,-90}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120,-38}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow2 + annotation ( + Placement(transformation(origin={-120,-36}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120, + -118}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service_1 annotation (Placement( + transformation(extent={{-140,60},{-100,100}}), iconTransformation( + extent={{-140,60},{-100,100}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service_2 annotation (Placement( + transformation(extent={{-140,-18},{-100,22}}), iconTransformation( + extent={{-140,-18},{-100,22}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service_3 annotation (Placement( + transformation(extent={{-140,-82},{-100,-42}}), iconTransformation( + extent={{-140,-98},{-100,-58}}))); + CRML.ETL.Connectors.Boolean4Output R_flow_all annotation (Placement( + transformation(extent={{100,-10},{120,10}}), iconTransformation(extent= + {{100,-10},{120,10}}))); + Req_flow_CRML req_flow_CRML1 + annotation (Placement(transformation(extent={{-64,54},{-44,74}}))); + Req_flow_CRML req_flow_CRML2 + annotation (Placement(transformation(extent={{-66,-24},{-46,-4}}))); + Req_flow_CRML req_flow_CRML3 + annotation (Placement(transformation(extent={{-68,-82},{-48,-62}}))); + CRML.Blocks.Logical4.And4_n and4_n(N=3) + annotation (Placement(transformation(origin = {0, -4}, extent = {{4, -6}, {24, 14}}))); +equation + + connect(pump_in_service_1, req_flow_CRML1.pump_in_service) annotation (Line(points={{-120,80},{-86,80},{ + -86,66.6},{-66,66.6}}, color={255,0,255})); + connect(flow1, req_flow_CRML1.f) annotation (Line(points={{-120,40},{-86,40},{-86, + 60.4},{-66,60.4}}, color={0,0,127})); + connect(R_flow_all, and4_n.y) annotation( + Line(points = {{110, 0}, {25, 0}})); + connect(req_flow_CRML2.pump_in_service, pump_in_service_2) annotation( + Line(points = {{-68, -12}, {-84, -12}, {-84, 2}, {-120, 2}}, color = {255, 0, 255})); + connect(req_flow_CRML3.pump_in_service, pump_in_service_3) annotation( + Line(points = {{-70, -70}, {-86, -70}, {-86, -62}, {-120, -62}}, color = {255, 0, 255})); + connect(req_flow_CRML2.f, flow2) annotation( + Line(points = {{-68, -18}, {-84, -18}, {-84, -36}, {-120, -36}}, color = {0, 0, 127})); + connect(req_flow_CRML3.f, flow3) annotation( + Line(points = {{-70, -76}, {-86, -76}, {-86, -90}, {-120, -90}}, color = {0, 0, 127})); + connect(req_flow_CRML1.R_f, and4_n.u[1]) annotation( + Line(points = {{-42, 64}, {-24, 64}, {-24, 0}, {4, 0}}, color = {162, 29, 33})); + connect(req_flow_CRML2.R_f, and4_n.u[2]) annotation( + Line(points = {{-44, -14}, {-24, -14}, {-24, 0}, {4, 0}}, color = {162, 29, 33})); + connect(req_flow_CRML3.R_f, and4_n.u[3]) annotation( + Line(points = {{-46, -72}, {-24, -72}, {-24, 0}, {4, 0}}, color = {162, 29, 33})); + +annotation ( + Icon(graphics={ Rectangle( + fillColor={128,0,255}, + fillPattern=FillPattern.Solid, + extent={{-100,100},{100,-130}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")})); +end Req_flow_all_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed.mo new file mode 100644 index 0000000..3ae8c41 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed.mo @@ -0,0 +1,34 @@ +within cooling_system.Verification.Requirements; +model Req_speed + Modelica.Blocks.Interfaces.RealInput u annotation ( + Placement(transformation(origin = {-104, 16}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -56}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanOutput y annotation ( + Placement(transformation(origin = {108, 6}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, 4}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Interfaces.RealInput u1 annotation ( + Placement(transformation(origin = {-106, -42}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 38}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Logical.And and1 annotation ( + Placement(transformation(origin = {58, -14}, extent = {{-10, -10}, {10, 10}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold(threshold=6) + annotation (Placement(transformation(extent={{-18,6},{2,26}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold1(threshold=6) + annotation (Placement(transformation(extent={{-16,-52},{4,-32}}))); +equation + connect(and1.y, y) annotation ( + Line(points={{69,-14},{108,-14},{108,6}}, color = {255, 0, 255})); + + connect(u, lessThreshold.u) + annotation (Line(points={{-104,16},{-20,16}}, color={0,0,127})); + connect(and1.u1, lessThreshold.y) annotation (Line(points={{46,-14},{10,-14}, + {10,16},{3,16}}, color={255,0,255})); + connect(u1, lessThreshold1.u) + annotation (Line(points={{-106,-42},{-18,-42}}, color={0,0,127})); + connect(and1.u2, lessThreshold1.y) annotation (Line(points={{46,-22},{12,-22}, + {12,-42},{5,-42}}, color={255,0,255})); +annotation ( + Icon(graphics={ Rectangle(fillColor = {246, 97, 81}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-56,82},{62,50}}, + textColor={28,108,200}, + textString="La vitesse dans les échangeurs doit etre +supérieure à 6 m/s")})); +end Req_speed; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_CRML.mo new file mode 100644 index 0000000..08f7a98 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_CRML.mo @@ -0,0 +1,67 @@ +within cooling_system.Verification.Requirements; +model Req_speed_CRML + Modelica.Blocks.Interfaces.RealInput v annotation (Placement(transformation( + origin={-120,16}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,0}, extent={{-20,-20},{20,20}}))); + Modelica.Blocks.Logical.LessThreshold lessThreshold(threshold=6) + annotation (Placement(transformation(extent={{-62,6},{-42,26}}))); + CRML.TimeLocators.Continuous.FromFor fromFor + annotation (Placement(transformation(extent={{22,6},{42,26}}))); + CRML.Requirements.CheckDurationLowerEqual checkDurationLowerEqual + annotation (Placement(transformation(extent={{22,-34},{42,-14}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 + annotation (Placement(transformation(extent={{-32,12},{-24,20}}))); + CRML.Requirements.CheckCountLowerEqual checkCountLowerEqual(threshold = 2) + annotation (Placement(transformation(origin = {2, 0}, extent = {{20, -70}, {40, -50}}))); + CRML.Blocks.Logical4.And4 and4_1 + annotation (Placement(transformation(extent={{62,-52},{82,-32}}))); + CRML.ETL.Connectors.Boolean4Output R_v annotation (Placement( + transformation(origin = {0, -42}, extent = {{100, -10}, {120, 10}}), iconTransformation(origin = {0, -54}, extent = {{100, -10}, {120, 10}}))); + Modelica.Blocks.Sources.Constant heure(k=3600) + annotation (Placement(transformation(extent={{-60,-28},{-40,-8}}))); + CRML.Blocks.Logical4.Not4 not4_1 + annotation (Placement(transformation(extent={{-10,6},{10,26}}))); + CRML.ETL.Connectors.Boolean4Output R2_v annotation( + Placement(transformation(origin = {0, 4}, extent = {{100, -10}, {120, 10}}), iconTransformation(origin = {0, 32}, extent = {{100, -10}, {120, 10}}))); + CRML.ETL.Connectors.Boolean4Output R1_v annotation( + Placement(transformation(origin = {0, 40}, extent = {{100, -10}, {120, 10}}), iconTransformation(origin = {0, 66}, extent = {{100, -10}, {120, 10}}))); +equation + + connect(v, lessThreshold.u) + annotation (Line(points={{-120,16},{-64,16}}, color={0,0,127})); + connect(fromFor.y, checkDurationLowerEqual.tl) + annotation (Line(points={{32,6},{32,-14}}, color={0,0,255})); + connect(lessThreshold.y, booleanToBoolean4_1.u) + annotation (Line(points={{-41,16},{-32.4,16}}, color={255,0,255})); + connect(checkDurationLowerEqual.u, booleanToBoolean4_1.y) annotation (Line( + points={{21,-24},{-16,-24},{-16,16},{-23.6,16}}, color={162,29,33})); + connect(booleanToBoolean4_1.y, checkCountLowerEqual.u) annotation (Line( + points={{-23.6,16},{-16,16},{-16,-60},{21,-60}}, color={162,29,33})); + connect(fromFor.y, checkCountLowerEqual.tl) annotation (Line(points={{32,6},{ + 32,-10},{50,-10},{50,-44},{32,-44},{32,-50}}, color={0,0,255})); + connect(checkDurationLowerEqual.y, and4_1.u1) annotation (Line(points={{43, + -24},{58,-24},{58,-34},{61,-34}}, color={162,29,33})); + connect(checkCountLowerEqual.y, and4_1.u2) annotation (Line(points={{43,-60}, + {56,-60},{56,-50},{61,-50}}, color={162,29,33})); + connect(and4_1.y, R_v) annotation (Line(points={{83,-42},{110, -42}}, color={162,29,33})); + connect(fromFor.duration, heure.y) annotation (Line(points={{21,8},{14,8},{14, + -18},{-39,-18}}, color={0,0,0})); + connect(fromFor.u, not4_1.y) + annotation (Line(points={{21,16},{11,16}}, color={162,29,33})); + connect(booleanToBoolean4_1.y, not4_1.u) + annotation (Line(points={{-23.6,16},{-11,16}}, color={162,29,33})); + connect(checkDurationLowerEqual.y, R1_v) annotation( + Line(points = {{44, -24}, {58, -24}, {58, 40}, {110, 40}}, color = {162, 29, 33})); + connect(checkCountLowerEqual.y, R2_v) annotation( + Line(points = {{44, -60}, {90, -60}, {90, 4}, {110, 4}}, color = {162, 29, 33})); + +annotation ( + Icon(graphics={ Rectangle(fillColor={128,0,255}, fillPattern= + FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}), + Diagram(graphics={Text( + extent={{-90,96},{92,42}}, + textColor={28,108,200}, + textString="La vitesse dans les échangeurs ne doit pas +exceder de 6 m/s plus de deux fois, +ni pendant plus de 10s (cumulé) par heure (glissante).")})); +end Req_speed_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_all_CRML.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_all_CRML.mo new file mode 100644 index 0000000..4b77112 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Req_speed_all_CRML.mo @@ -0,0 +1,34 @@ +within cooling_system.Verification.Requirements; +model Req_speed_all_CRML + Modelica.Blocks.Interfaces.RealInput v1 annotation (Placement(transformation( + origin={-120,32}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,40}, extent={{-20,-20},{20,20}}))); + CRML.Blocks.Logical4.And4 and4_1 + annotation (Placement(transformation(extent={{22,-10},{42,10}}))); + CRML.ETL.Connectors.Boolean4Output R_speed_all annotation (Placement( + transformation(extent={{100,-10},{120,10}}), iconTransformation(extent= + {{100,-10},{120,10}}))); + Modelica.Blocks.Interfaces.RealInput v2 annotation (Placement(transformation( + origin={-120,-26}, extent={{-20,-20},{20,20}}), iconTransformation( + origin={-120,-40}, extent={{-20,-20},{20,20}}))); + Req_speed_CRML req_speed1 + annotation (Placement(transformation(extent={{-58,10},{-38,30}}))); + Req_speed_CRML req_speed2 + annotation (Placement(transformation(origin = {4, 0}, extent = {{-60, -28}, {-40, -8}}))); +equation + + connect(and4_1.y, R_speed_all) + annotation (Line(points={{43,0},{110,0}}, color={162,29,33})); + connect(v1, req_speed1.v) annotation (Line(points={{-120,32},{-68,32},{-68,20}, + {-60,20}}, color={0,0,127})); + connect(v2, req_speed2.v) annotation (Line(points={{-120,-26},{-72,-26},{-72, + -18},{-58,-18}}, color={0,0,127})); + connect(req_speed1.R_v, and4_1.u1) annotation( + Line(points = {{-36, 14}, {-12, 14}, {-12, 8}, {22, 8}}, color = {162, 29, 33})); + connect(req_speed2.R_v, and4_1.u2) annotation( + Line(points = {{-34, -24}, {-12, -24}, {-12, -8}, {22, -8}}, color = {162, 29, 33})); + +annotation ( + Icon(graphics={ Rectangle(fillColor={128,0,255}, fillPattern= + FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")})); +end Req_speed_all_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Reqs_CRML.bak-mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Reqs_CRML.bak-mo new file mode 100644 index 0000000..5b197d5 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Reqs_CRML.bak-mo @@ -0,0 +1,68 @@ +within cooling_system.Verification.Requirements; + +model Reqs_CRML + Modelica.Blocks.Interfaces.RealInput T annotation( + Placement(transformation(origin = {-160, -140}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -100}, extent = {{-20, -20}, {20, 20}}))); + CRML.ETL.Connectors.Boolean4Output R_speed_all annotation( + Placement(transformation(origin = {140, -20}, extent = {{100, 40}, {120, 60}}), iconTransformation(extent = {{100, 40}, {120, 60}}))); + CRML.ETL.Connectors.Boolean4Output R_flow_all annotation( + Placement(transformation(origin = {140, -48}, extent = {{100, 8}, {120, 28}}), iconTransformation(origin = {0, 54}, extent = {{100, -54}, {120, -34}}))); + outer CRML.TimeLocators.Continuous.Master master annotation( + Placement(transformation(origin = {70, 76}, extent = {{-10, -10}, {10, 10}}))); + CRML.ETL.Connectors.Boolean4Output R_T annotation( + Placement(transformation(origin = {140, -148}, extent = {{100, 8}, {120, 28}}), iconTransformation(origin = {0, -12}, extent = {{100, -54}, {120, -34}}))); + cooling_system.Verification.Requirements.Req_speed_all_CRML req_speed_all_CRML annotation( + Placement(transformation(origin = {-172, -22}, extent = {{212, 42}, {232, 62}}))); + cooling_system.Verification.Requirements.Req_flow_all_CRML req_flow_all_CRML annotation( + Placement(transformation(origin = {-174, 6}, extent = {{214, -46}, {234, -26}}))); + cooling_system.Verification.Requirements.Req_Tsri_CRML req_Tsri_CRML annotation( + Placement(transformation(origin = {-170, 20}, extent = {{210, -158}, {230, -138}}))); + Modelica.Blocks.Interfaces.RealInput v1 annotation( + Placement(transformation(origin = {-160, 60}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 100}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput v2 annotation( + Placement(transformation(origin = {-160, 40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 80}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow1 annotation( + Placement(transformation(origin = {-160, -10}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 20}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow2 annotation( + Placement(transformation(origin = {-160, -60}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -20}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.RealInput flow3 annotation( + Placement(transformation(origin = {-160, -110}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -60}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service1 annotation( + Placement(transformation(origin = {-160, 10}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 40}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service2 annotation( + Placement(transformation(origin = {-160, -40}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}))); + Modelica.Blocks.Interfaces.BooleanInput pump_in_service3 annotation( + Placement(transformation(origin = {-160, -90}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-120, -40}, extent = {{-20, -20}, {20, 20}}))); +equation + connect(R_flow_all, R_flow_all) annotation( + Line(points = {{250, -30}, {250, -30}}, color = {162, 29, 33})); + connect(req_speed_all_CRML.v1, v1) annotation( + Line(points = {{38, 34}, {-100, 34}, {-100, 60}, {-160, 60}}, color = {0, 0, 127})); + connect(req_speed_all_CRML.v2, v2) annotation( + Line(points = {{38, 26}, {-61, 26}, {-61, 40}, {-160, 40}}, color = {0, 0, 127})); + connect(req_Tsri_CRML.T, T) annotation( + Line(points = {{41, -130}, {-59.5, -130}, {-59.5, -140}, {-160, -140}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_1, pump_in_service1) annotation( + Line(points = {{38, -22}, {-60, -22}, {-60, 10}, {-160, 10}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow1, flow1) annotation( + Line(points = {{38, -26}, {-78, -26}, {-78, -10}, {-160, -10}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_2, pump_in_service2) annotation( + Line(points = {{38, -30}, {-60, -30}, {-60, -40}, {-160, -40}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow3, flow2) annotation( + Line(points = {{38, -34}, {-54, -34}, {-54, -56}, {-160, -56}, {-160, -60}}, color = {0, 0, 127})); + connect(req_flow_all_CRML.pump_in_service_3, pump_in_service3) annotation( + Line(points = {{38, -38}, {-40, -38}, {-40, -90}, {-160, -90}}, color = {255, 0, 255})); + connect(req_flow_all_CRML.flow2, flow3) annotation( + Line(points = {{38, -42}, {-30, -42}, {-30, -110}, {-160, -110}}, color = {0, 0, 127})); + connect(req_speed_all_CRML.R_speed_all, R_speed_all) annotation( + Line(points = {{62, 30}, {250, 30}}, color = {162, 29, 33})); + connect(req_speed_all_CRML.R_speed_all, R_speed_all) annotation( + Line(points = {{62, 30}, {250, 30}}, color = {162, 29, 33})); + connect(req_flow_all_CRML.R_flow_all, R_flow_all) annotation( + Line(points = {{62, -30}, {250, -30}}, color = {162, 29, 33})); + connect(req_Tsri_CRML.R_T, R_T) annotation( + Line(points = {{58, -134}, {250, -134}, {250, -130}}, color = {162, 29, 33})); + annotation( + Icon(graphics = {Rectangle(fillColor = {128, 0, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {-6, 124}, extent = {{-136, 30}, {136, -30}}, textString = "%name")}, coordinateSystem(extent = {{-140, 160}, {140, -100}})), + Diagram(coordinateSystem(extent = {{-140, 80}, {240, -160}}))); +end Reqs_CRML; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/Imply.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/Imply.mo new file mode 100644 index 0000000..8ad05eb --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/Imply.mo @@ -0,0 +1,19 @@ +within cooling_system.Verification.Requirements.Utils; +block Imply "Logical 'imply': y = (u1 => u2)" + extends Modelica.Blocks.Interfaces.partialBooleanSI2SO; +equation + y = u2 or not u1; + annotation ( + defaultComponentName="imply1", + Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, + 100}}), graphics={Text( + extent={{-90,40},{90,-40}}, + textString="=>", + textColor={0,0,0})}), + Documentation(info=" +

+The output is true if at least one input is true, otherwise +the output is false. +

+")); +end Imply; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.mo new file mode 100644 index 0000000..8fd5521 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification.Requirements; +package Utils +end Utils; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.order new file mode 100644 index 0000000..7925f42 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/Utils/package.order @@ -0,0 +1 @@ +Imply diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.mo new file mode 100644 index 0000000..1fe7774 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification; +package Requirements +end Requirements; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.order new file mode 100644 index 0000000..70bb5b4 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Requirements/package.order @@ -0,0 +1,10 @@ +Utils +Req_speed +Req_flow +Req_Tsri +Req_DTsf +Req_speed_CRML +Req_speed_all_CRML +Req_flow_CRML +Req_flow_all_CRML +Req_Tsri_CRML diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/BooleanExpression.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/BooleanExpression.mo new file mode 100644 index 0000000..34b2e09 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/BooleanExpression.mo @@ -0,0 +1,43 @@ +within cooling_system.Verification.Scenarios.Connector; +block BooleanExpression + "Set output signal to a time varying Boolean expression" + + Boolean y=false "Value of Boolean output"; + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical yL + annotation (Placement(transformation(extent={{100,-10},{120,10}}), + iconTransformation(extent={{100,-10},{120,10}}))); +equation + yL.signal = y; + + annotation (Dialog(group="Time varying output signal"), Placement( + transformation(extent={{100,-10},{120,10}}), + iconTransformation(extent={{100,-10},{120,10}})), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}), graphics={ + Rectangle( + extent={{-100,40},{100,-40}}, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid, + borderPattern=BorderPattern.Raised), + Text( + extent={{-96,15},{96,-15}}, + textString="%y", + textColor={0,0,0}), + Text( + extent={{-150,90},{150,50}}, + textString="%name", + textColor={0,0,255})}), Documentation(info=" +

+The (time varying) Boolean output signal of this block can be defined in its +parameter menu via variable y. The purpose is to support the +easy definition of Boolean expressions in a block diagram. For example, +in the y-menu the definition \"time >= 1 and time <= 2\" can be given in order +to define that the output signal is true in the time interval +1 ≤ time ≤ 2 and otherwise it is false. +Note, that \"time\" is a built-in variable that is always +accessible and represents the \"model time\" and that +variable y is both a variable and a connector. +

+")); +end BooleanExpression; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/RealExpression.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/RealExpression.mo new file mode 100644 index 0000000..08052b3 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/RealExpression.mo @@ -0,0 +1,40 @@ +within cooling_system.Verification.Scenarios.Connector; +block RealExpression + "Set output signal to a time varying Real expression" + + Real y=0.0 "Value of Real output"; + + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal yR + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + +equation + yR.signal = y; + annotation (Dialog(group="Time varying output signal"), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}), graphics={ + Rectangle( + extent={{-100,40},{100,-40}}, + fillColor={235,235,235}, + fillPattern=FillPattern.Solid, + borderPattern=BorderPattern.Raised), + Text( + extent={{-96,15},{96,-15}}, + textString="%y", + textColor={0,0,0}), + Text( + extent={{-150,90},{150,50}}, + textString="%name", + textColor={0,0,255})}), Documentation(info=" +

+The (time varying) Real output signal of this block can be defined in its +parameter menu via variable y. The purpose is to support the +easy definition of Real expressions in a block diagram. For example, +in the y-menu the definition \"if time < 1 then 0 else 1\" can be given in order +to define that the output signal is one, if time ≥ 1 and otherwise +it is zero. Note, that \"time\" is a built-in variable that is always +accessible and represents the \"model time\" and that +variable y is both a variable and a connector. +

+")); +end RealExpression; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ScenarioConnector.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ScenarioConnector.mo new file mode 100644 index 0000000..e686724 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ScenarioConnector.mo @@ -0,0 +1,18 @@ +within cooling_system.Verification.Scenarios.Connector; +connector ScenarioConnector + + Boolean ouvreBranche1(start=true); + Boolean ouvreBranche2(start=true); + Boolean encP1(start=true); + Boolean encP2(start=true); + Boolean encP3(start=true); + Boolean comVanneBache(start=false); + Real load(start=25E6); + Real leak(start=0.0); + Real comUtil(start=0.36); + Real Tsf(start=285); + Real Psf(start=3E5); + annotation ( + Icon(graphics={ Rectangle(fillColor = {38, 162, 105}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}})})); + +end ScenarioConnector; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ToConnector.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ToConnector.mo new file mode 100644 index 0000000..992d66c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/ToConnector.mo @@ -0,0 +1,58 @@ +within cooling_system.Verification.Scenarios.Connector; +model ToConnector + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical ouvreBranche1 annotation ( + Placement(transformation(origin={-142,458}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={-142,458}, extent = {{-40, -40}, {40, 40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical ouvreBranche2 annotation ( + Placement(transformation(origin={-142,378}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={-142,378}, extent = {{-40, -40}, {40, 40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal load annotation ( + Placement(transformation(origin={-140,-132}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={-140, + -132}, extent = {{-40, -40}, {40, 40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal Tsf annotation ( + Placement(transformation(origin={-140,-214}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={-140, + -214}, extent = {{-40, -40}, {40, 40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal Psf annotation ( + Placement(transformation(origin={-140,-296}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={-140, + -296}, extent = {{-40, -40}, {40, 40}}))); + ScenarioConnector c annotation ( + Placement(transformation(origin = {106, 0}, extent = {{-40, -40}, {40, 40}}), iconTransformation(origin={142,0}, extent={{-40,-40}, + {40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical encP1 + annotation (Placement(transformation(origin={-142,298},extent={{-40,-40},{40,40}}), + iconTransformation(origin={-142,298},extent={{-40,-40},{40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical encP2 + annotation (Placement(transformation(origin={-110,42}, extent={{-40,-40},{40, + 40}}), iconTransformation(origin={-142,218},extent={{-40,-40},{40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical encP3 + annotation (Placement(transformation(origin={-110,22}, extent={{-40,-40},{40, + 40}}), iconTransformation(origin={-142,138},extent={{-40,-40},{40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical comVanneBache + annotation (Placement(transformation(origin={-110,2}, extent={{-40,-40},{40, + 40}}), iconTransformation(origin={-142,56}, extent={{-40,-40},{40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal leak annotation ( + Placement(transformation(origin={-140,-455},extent={{-40,-40},{40,40}}), + iconTransformation(origin={-140,-455},extent={{-40,-40},{40,40}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal comUtil + annotation (Placement(transformation(origin={-110,-104}, extent={{-40,-40},{40,40}}), + iconTransformation(origin={-140,-378},extent={{-40,-40},{40,40}}))); +equation + +c.ouvreBranche1 = ouvreBranche1.signal; +c.ouvreBranche2 = ouvreBranche2.signal; +c.encP1 = encP1.signal; +c.encP2 = encP2.signal; +c.encP3 = encP3.signal; +c.comVanneBache = comVanneBache.signal; +c.load = load.signal; +c.Tsf = Tsf.signal; +c.Psf = Psf.signal; +c.leak = leak.signal; +c.comUtil = comUtil.signal; + +annotation ( + Icon(coordinateSystem(extent={{-100,-500},{100,500}}), + graphics={ Rectangle(extent={{-98,498},{100,-500}}), Line(origin={-50.35, + -400}, points={{-45.65, + 898},{106.35,400},{-49.6464,-100},{-49.6464,-100}}, thickness = 1), Line(origin = {50, 0}, points={{4,0},{ + 50,0},{50,0}}, thickness = 1)}), + Diagram(coordinateSystem(extent={{-100,-500},{100,500}}))); +end ToConnector; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.mo new file mode 100644 index 0000000..f7b3011 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification.Scenarios; +package Connector +end Connector; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.order new file mode 100644 index 0000000..0be7ea7 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Connector/package.order @@ -0,0 +1,4 @@ +ToConnector +ScenarioConnector +BooleanExpression +RealExpression diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_1echangeur.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_1echangeur.mo new file mode 100644 index 0000000..611ea3f --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_1echangeur.mo @@ -0,0 +1,36 @@ +within cooling_system.Verification.Scenarios; +model Scenario0_1echangeur + extends Utils.Scenario_init; + cooling_system.Verification.Scenarios.Utils.RemoveClient deconnectClient + annotation (Placement(transformation(origin={-138,16}, extent={{-10,-10},{ + 10,10}}))); + Utils.IsoleBranche isoleBranche(at=50) + annotation (Placement(transformation(extent={{-50,56},{-30,76}}))); +equation + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(False.yL, toConnector.encP3) annotation (Line(points={{-179,56},{-92, + 56},{-92,27.6},{31.6,27.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{-92,56},{-92,28},{20,28},{20,11.2},{31.6,11.2}}, color={0,0,255})); + connect(True.yL, toConnector.encP2) annotation (Line(points={{-179,84},{18,84}, + {18,43.6},{31.6,43.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{18,84}, + {18,59.6},{31.6,59.6}}, color={0,0,255})); + connect(toConnector.load, deconnectClient.outputReal) annotation (Line(points + ={{32,-26.4},{-122,-26.4},{-122,15.8},{-127.2,15.8}}, color={0,0,255})); + connect(HotPower_init.y, deconnectClient.inputReal) annotation (Line(points={ + {-179,16},{-178,15.8},{-148.8,15.8}}, color={0,0,255})); + connect(Tsf_init.y, toConnector.Tsf) annotation (Line(points={{-179,-10},{ + -124,-10},{-124,-42.8},{32,-42.8}}, color={0,0,255})); + connect(Psf_init.y, toConnector.Psf) annotation (Line(points={{-179,-36},{ + -126,-36},{-126,-59.2},{32,-59.2}}, color={0,0,255})); + connect(Util_init.y, toConnector.comUtil) annotation (Line(points={{-179,-64}, + {18,-64},{18,-75.6},{32,-75.6}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); + connect(toConnector.ouvreBranche2, isoleBranche.outputLogical) annotation ( + Line(points={{31.6,75.6},{6,75.6},{6,66},{-29,66}}, color={0,0,255})); + connect(True.yL, isoleBranche.inputLogical) annotation (Line(points={{-179,84}, + {-56,84},{-56,66},{-51,66}}, color={0,0,255})); +end Scenario0_1echangeur; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_2echangeurs.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_2echangeurs.mo new file mode 100644 index 0000000..546815c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario0_2echangeurs.mo @@ -0,0 +1,31 @@ +within cooling_system.Verification.Scenarios; +model Scenario0_2echangeurs + extends Utils.Scenario_init; + Utils.RemoveClient deconnectClient annotation (Placement(transformation( + origin={-146,16}, extent={{-10,-10},{10,10}}))); +equation + connect(deconnectClient.outputReal, toConnector.load) annotation (Line(points + ={{-135.2,15.8},{-52,15.8},{-52,-26.4},{32,-26.4}}, color={0,0,255})); + connect(HotPower_init.y, deconnectClient.inputReal) annotation (Line(points={ + {-179,16},{-168,16},{-168,15.8},{-156.8,15.8}}, color={0,0,255})); + connect(Tsf_init.y, toConnector.Tsf) annotation (Line(points={{-179,-10},{-54, + -10},{-54,-42.8},{32,-42.8}}, color={0,0,255})); + connect(Psf_init.y, toConnector.Psf) annotation (Line(points={{-179,-36},{-56, + -36},{-56,-59.2},{32,-59.2}}, color={0,0,255})); + connect(Util_init.y, toConnector.comUtil) annotation (Line(points={{-179,-64}, + {18,-64},{18,-75.6},{32,-75.6}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(True.yL, toConnector.ouvreBranche2) annotation (Line(points={{-179,84}, + {18,84},{18,75.6},{31.6,75.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{18,84}, + {18,59.6},{31.6,59.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP2) annotation (Line(points={{-179,84},{18,84}, + {18,43.6},{31.6,43.6}}, color={0,0,255})); + connect(False.yL, toConnector.encP3) annotation (Line(points={{-179,56},{14, + 56},{14,27.6},{31.6,27.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{14,56},{14,28},{20,28},{20,11.2},{31.6,11.2}}, color={0,0,255})); +end Scenario0_2echangeurs; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario1.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario1.mo new file mode 100644 index 0000000..cfe4053 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario1.mo @@ -0,0 +1,83 @@ +within cooling_system.Verification.Scenarios; +model Scenario1 + Connector.ToConnector toConnector + annotation (Placement(transformation(extent={{40,-100},{80,100}}))); + Connector.ScenarioConnector scenarioConnector + annotation (Placement(transformation(extent={{100,-8},{120,12}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante True + annotation (Placement(transformation(extent={{-200,74},{-180,94}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante False(K=false) + annotation (Placement(transformation(extent={{-200,46},{-180,66}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante HotPower_init( + k=25E6) + annotation (Placement(transformation(extent={{-200,6},{-180,26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Tsf_init(k= + 285) + annotation (Placement(transformation(extent={{-200,-20},{-180,0}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Psf_init(k= + 3E5) + annotation (Placement(transformation(extent={{-200,-46},{-180,-26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Fuite_init1(k + =0.0) + annotation (Placement(transformation(extent={{-200,-100},{-180,-80}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Util_init(k= + 0.36) + annotation (Placement(transformation(extent={{-200,-74},{-180,-54}}))); + Utils.RemoveClient removeClient(at=200) + annotation (Placement(transformation(extent={{-162,6},{-142,26}}))); + Utils.AddClient addClient(at=700) + annotation (Placement(transformation(extent={{-52,6},{-32,26}}))); + Utils.AddClient addClient1(power=5E6, at=750) + annotation (Placement(transformation(extent={{-20,6},{0,26}}))); + Utils.IsoleBranche isoleBranche(at=500) + annotation (Placement(transformation(extent={{-74,54},{-54,74}}))); + Utils.ArretPompe arretPompe(at=400) + annotation (Placement(transformation(extent={{-140,58},{-120,78}}))); + Utils.StartPompe startPompe(at=413) + annotation (Placement(transformation(extent={{-114,36},{-94,56}}))); +equation + + connect(toConnector.c, scenarioConnector) + annotation (Line(points={{88.4,0},{88.4,2},{110,2}}, color={0,0,0})); + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(Tsf_init.y, toConnector.Tsf) annotation (Line(points={{-179,-10},{-16, + -10},{-16,-42.8},{32,-42.8}}, color={0,0,255})); + connect(Psf_init.y, toConnector.Psf) annotation (Line(points={{-179,-36},{-30, + -36},{-30,-60},{2,-60},{2,-59.2},{32,-59.2}}, color={0,0,255})); + connect(Util_init.y, toConnector.comUtil) annotation (Line(points={{-179,-64}, + {-36,-64},{-36,-75.6},{32,-75.6}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); + connect(HotPower_init.y, removeClient.inputReal) annotation (Line(points={{ + -179,16},{-178,15.8},{-162.8,15.8}}, color={0,0,255})); + connect(removeClient.outputReal, addClient.inputReal) + annotation (Line(points={{-141.2,15.8},{-52.8,15.8}}, color={0,0,255})); + connect(addClient.outputReal, addClient1.inputReal) + annotation (Line(points={{-31.2,15.8},{-20.8,15.8}}, color={0,0,255})); + connect(addClient1.outputReal, toConnector.load) annotation (Line(points={{ + 0.8,15.8},{18,15.8},{18,-26.4},{32,-26.4}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{14,84}, + {14,59.6},{31.6,59.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{-144,56},{-144,30},{18,30},{18,18},{20,18},{20,11.2},{31.6,11.2}}, + color={0,0,255})); + connect(toConnector.ouvreBranche2, isoleBranche.outputLogical) annotation ( + Line(points={{31.6,75.6},{14,75.6},{14,64},{-53,64}}, color={0,0,255})); + connect(True.yL, isoleBranche.inputLogical) annotation (Line(points={{-179,84}, + {-80,84},{-80,64},{-75,64}}, color={0,0,255})); + connect(True.yL, arretPompe.inputLogical) annotation (Line(points={{-179,84}, + {-148,84},{-148,68},{-141,68}}, color={0,0,255})); + connect(toConnector.encP2, arretPompe.outputLogical) annotation (Line(points= + {{31.6,43.6},{-82,43.6},{-82,68},{-119,68}}, color={0,0,255})); + connect(False.yL, startPompe.inputLogical) annotation (Line(points={{-179,56}, + {-144,56},{-144,30},{-122,30},{-122,46},{-115,46}}, color={0,0,255})); + connect(toConnector.encP3, startPompe.outputLogical) annotation (Line(points= + {{31.6,27.6},{20,27.6},{20,42},{-88,42},{-88,46},{-93,46}}, color={0, + 0,255})); + annotation ( + Icon(coordinateSystem(extent={{-200,-100},{100,100}}), + graphics={ Rectangle(fillColor = {220, 138, 221}, fillPattern = FillPattern.Solid, extent={{-200, + 100},{100,-100}}), Text(origin={-49,137}, extent = {{-177, 55}, {177, -55}}, textString = "%name")}), + Diagram(coordinateSystem(extent={{-200,-100},{100,100}}))); +end Scenario1; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario2.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario2.mo new file mode 100644 index 0000000..02706ad --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario2.mo @@ -0,0 +1,89 @@ +within cooling_system.Verification.Scenarios; +model Scenario2 + Connector.ToConnector toConnector + annotation (Placement(transformation(extent={{40,-100},{80,100}}))); + Connector.ScenarioConnector scenarioConnector + annotation (Placement(transformation(extent={{100,-8},{120,12}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante True + annotation (Placement(transformation(extent={{-200,74},{-180,94}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante False(K=false) + annotation (Placement(transformation(extent={{-200,46},{-180,66}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante HotPower_init( + k=25E6) + annotation (Placement(transformation(extent={{-200,6},{-180,26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Tsf_init(k= + 285) + annotation (Placement(transformation(extent={{-200,-20},{-180,0}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Psf_init(k= + 3E5) + annotation (Placement(transformation(extent={{-200,-46},{-180,-26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Fuite_init1(k + =0.0) + annotation (Placement(transformation(extent={{-200,-100},{-180,-80}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Util_init(k= + 0.36) + annotation (Placement(transformation(extent={{-200,-74},{-180,-54}}))); + Utils.RemoveClient removeClient + annotation (Placement(transformation(extent={{-156,6},{-136,26}}))); + Utils.ArretPompe arretPompe(at=500) + annotation (Placement(transformation(extent={{-100,58},{-80,78}}))); + Utils.StartPompe startPompe(at=513) + annotation (Placement(transformation(extent={{-96,26},{-76,46}}))); + Utils.change_Tsf change_Tsf( + delta=5, + at=400, + delai=50) + annotation (Placement(transformation(extent={{-130,-20},{-110,0}}))); + Utils.change_Psf change_Psf(delta=-1e5, at=600) + annotation (Placement(transformation(extent={{-72,-46},{-52,-26}}))); + Utils.change_Util change_Util( + delta=0.3, + at=800, + delai=5) + annotation (Placement(transformation(extent={{-32,-74},{-12,-54}}))); +equation + + connect(toConnector.c, scenarioConnector) + annotation (Line(points={{88.4,0},{88.4,2},{110,2}}, color={0,0,0})); + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(True.yL, toConnector.ouvreBranche2) annotation (Line(points={{-179,84}, + {18,84},{18,75.6},{31.6,75.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{18,84}, + {18,59.6},{31.6,59.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{4,56},{4,12},{18,12},{18,11.2},{31.6,11.2}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); + connect(HotPower_init.y, removeClient.inputReal) annotation (Line(points={{ + -179,16},{-178,15.8},{-156.8,15.8}}, color={0,0,255})); + connect(toConnector.load, removeClient.outputReal) annotation (Line(points={{ + 32,-26.4},{6,-26.4},{6,-26},{-22,-26},{-22,15.8},{-135.2,15.8}}, + color={0,0,255})); + connect(True.yL, arretPompe.inputLogical) annotation (Line(points={{-179,84}, + {-104,84},{-104,68},{-101,68}}, color={0,0,255})); + connect(arretPompe.outputLogical, toConnector.encP2) annotation (Line(points= + {{-79,68},{14,68},{14,43.6},{31.6,43.6}}, color={0,0,255})); + connect(False.yL, startPompe.inputLogical) annotation (Line(points={{-179,56}, + {-102,56},{-102,36},{-97,36}}, color={0,0,255})); + connect(startPompe.outputLogical, toConnector.encP3) annotation (Line(points= + {{-75,36},{18,36},{18,27.6},{31.6,27.6}}, color={0,0,255})); + connect(toConnector.Tsf, change_Tsf.outputReal) annotation (Line(points={{32, + -42.8},{-32,-42.8},{-32,-10.2},{-109.2,-10.2}}, color={0,0,255})); + connect(Tsf_init.y, change_Tsf.inputReal) annotation (Line(points={{-179,-10}, + {-178,-10.2},{-130.8,-10.2}}, color={0,0,255})); + connect(Psf_init.y, change_Psf.inputReal) annotation (Line(points={{-179,-36}, + {-178,-36.2},{-72.8,-36.2}}, color={0,0,255})); + connect(toConnector.Psf, change_Psf.outputReal) annotation (Line(points={{32, + -59.2},{4,-59.2},{4,-44},{-46,-44},{-46,-36.2},{-51.2,-36.2}}, color= + {0,0,255})); + connect(toConnector.comUtil, change_Util.outputReal) annotation (Line(points= + {{32,-75.6},{-6,-75.6},{-6,-64.2},{-11.2,-64.2}}, color={0,0,255})); + connect(Util_init.y, change_Util.inputReal) annotation (Line(points={{-179, + -64},{-178,-64.2},{-32.8,-64.2}}, color={0,0,255})); + annotation ( + Icon(coordinateSystem(extent={{-200,-100},{100,100}}), + graphics={ Rectangle(fillColor = {220, 138, 221}, fillPattern = FillPattern.Solid, extent={{-200, + 100},{100,-100}}), Text(origin={-49,137}, extent = {{-177, 55}, {177, -55}}, textString = "%name")}), + Diagram(coordinateSystem(extent={{-200,-100},{100,100}}))); +end Scenario2; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_GrandChaud.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_GrandChaud.mo new file mode 100644 index 0000000..61c5ad6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_GrandChaud.mo @@ -0,0 +1,51 @@ +within cooling_system.Verification.Scenarios; +model Scenario_GrandChaud + extends cooling_system.Verification.Scenarios.Utils.Scenario_init; + Utils.AddClient addClient1 annotation (Placement(transformation(origin={-116,16}, + extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient2(at=400) annotation (Placement(transformation( + origin={-84,16}, extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient3(at=600) annotation (Placement(transformation( + origin={-52,16}, extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient4(at=800) annotation (Placement(transformation( + origin={-18,16}, extent={{-10,-10},{10,10}}))); + Utils.change_Tsf change_Tsf(delta=13.15) + annotation (Placement(transformation(extent={{-154,-20},{-134,0}}))); + Utils.change_Psf change_Psf(delta=-1e5, at=50) + annotation (Placement(transformation(extent={{-154,-46},{-134,-26}}))); +equation + connect(addClient1.outputReal, addClient2.inputReal) annotation ( + Line(points={{-105.2,15.8},{-94.8,15.8}}, color = {0, 0, 255})); + connect(addClient2.outputReal, addClient3.inputReal) annotation ( + Line(points={{-73.2,15.8},{-62.8,15.8}}, color = {0, 0, 255})); + connect(addClient3.outputReal, addClient4.inputReal) annotation ( + Line(points={{-41.2,15.8},{-28.8,15.8}}, color = {0, 0, 255})); + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(True.yL, toConnector.ouvreBranche2) annotation (Line(points={{-179,84}, + {18,84},{18,75.6},{31.6,75.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{18,84}, + {18,59.6},{31.6,59.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP2) annotation (Line(points={{-179,84},{18,84}, + {18,43.6},{31.6,43.6}}, color={0,0,255})); + connect(False.yL, toConnector.encP3) annotation (Line(points={{-179,56},{14, + 56},{14,27.6},{31.6,27.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{14,56},{14,28},{20,28},{20,11.2},{31.6,11.2}}, color={0,0,255})); + connect(addClient4.outputReal, toConnector.load) annotation (Line(points={{-7.2, + 15.8},{18,15.8},{18,-26.4},{32,-26.4}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); + connect(Util_init.y, toConnector.comUtil) annotation (Line(points={{-179,-64}, + {-36,-64},{-36,-75.6},{32,-75.6}}, color={0,0,255})); + connect(HotPower_init.y, addClient1.inputReal) annotation (Line(points={{-179,16}, + {-130,16},{-130,15.8},{-126.8,15.8}}, color={0,0,255})); + connect(Tsf_init.y, change_Tsf.inputReal) annotation (Line(points={{-179,-10}, + {-178,-10.2},{-154.8,-10.2}}, color={0,0,255})); + connect(toConnector.Tsf, change_Tsf.outputReal) annotation (Line(points={{32, + -42.8},{-82,-42.8},{-82,-10.2},{-133.2,-10.2}}, color={0,0,255})); + connect(toConnector.Psf, change_Psf.outputReal) annotation (Line(points={{32, + -59.2},{-128,-59.2},{-128,-36.2},{-133.2,-36.2}}, color={0,0,255})); + connect(Psf_init.y, change_Psf.inputReal) annotation (Line(points={{-179,-36}, + {-178,-36.2},{-154.8,-36.2}}, color={0,0,255})); +end Scenario_GrandChaud; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_limites.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_limites.mo new file mode 100644 index 0000000..7f5f686 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Scenario_limites.mo @@ -0,0 +1,43 @@ +within cooling_system.Verification.Scenarios; +model Scenario_limites + extends Utils.Scenario_init; + Utils.AddClient addClient1 annotation (Placement(transformation(origin={-128,-2}, + extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient2(at=400) annotation (Placement(transformation( + origin={-98,-2}, extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient3(at=600) annotation (Placement(transformation( + origin={-66,-2}, extent={{-10,-10},{10,10}}))); + Utils.AddClient addClient4(at=800) annotation (Placement(transformation( + origin={-34,-2}, extent={{-10,-10},{10,10}}))); +equation + connect(addClient1.outputReal, addClient2.inputReal) annotation ( + Line(points={{-117.2,-2.2},{-108.8,-2.2}}, color = {0, 0, 255})); + connect(addClient2.outputReal, addClient3.inputReal) annotation ( + Line(points={{-87.2,-2.2},{-76.8,-2.2}}, color = {0, 0, 255})); + connect(addClient3.outputReal, addClient4.inputReal) annotation ( + Line(points={{-55.2,-2.2},{-44.8,-2.2}}, color = {0, 0, 255})); + connect(True.yL, toConnector.ouvreBranche1) annotation (Line(points={{-179,84}, + {18,84},{18,91.6},{31.6,91.6}}, color={0,0,255})); + connect(True.yL, toConnector.ouvreBranche2) annotation (Line(points={{-179,84}, + {18,84},{18,75.6},{31.6,75.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP1) annotation (Line(points={{-179,84},{18,84}, + {18,59.6},{31.6,59.6}}, color={0,0,255})); + connect(True.yL, toConnector.encP2) annotation (Line(points={{-179,84},{18,84}, + {18,60},{20,60},{20,43.6},{31.6,43.6}}, color={0,0,255})); + connect(False.yL, toConnector.comVanneBache) annotation (Line(points={{-179, + 56},{18,56},{18,11.2},{31.6,11.2}}, color={0,0,255})); + connect(False.yL, toConnector.encP3) annotation (Line(points={{-179,56},{18, + 56},{18,27.6},{31.6,27.6}}, color={0,0,255})); + connect(HotPower_init.y, addClient1.inputReal) annotation (Line(points={{-179, + 16},{-158,16},{-158,-2.2},{-138.8,-2.2}}, color={0,0,255})); + connect(toConnector.load, addClient4.outputReal) annotation (Line(points={{32, + -26.4},{4,-26.4},{4,-2.2},{-23.2,-2.2}}, color={0,0,255})); + connect(Tsf_init.y, toConnector.Tsf) annotation (Line(points={{-179,-10},{ + -144,-10},{-144,-42.8},{32,-42.8}}, color={0,0,255})); + connect(Psf_init.y, toConnector.Psf) annotation (Line(points={{-179,-36},{ + -146,-36},{-146,-59.2},{32,-59.2}}, color={0,0,255})); + connect(Util_init.y, toConnector.comUtil) annotation (Line(points={{-179,-64}, + {18,-64},{18,-75.6},{32,-75.6}}, color={0,0,255})); + connect(Fuite_init1.y, toConnector.leak) annotation (Line(points={{-179,-90}, + {20,-90},{20,-91},{32,-91}}, color={0,0,255})); +end Scenario_limites; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/AddClient.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/AddClient.mo new file mode 100644 index 0000000..f1d1299 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/AddClient.mo @@ -0,0 +1,27 @@ +within cooling_system.Verification.Scenarios.Utils; +model AddClient + + parameter Real power=10E6 "puissance du client (en W)"; + parameter Real at=200 "date à laquelle le client est ajouté"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Echelon echelon(hauteur = power, startTime = at) annotation ( + Placement(transformation(origin = {-62, -36}, extent = {{-10, -10}, {10, 10}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + connect(add.y, outputReal) annotation ( + Line(points={{3,-8},{108,-8},{108,-2}}, color = {0, 0, 255})); + connect(echelon.y, add.u2) annotation ( + Line(points={{-51,-36},{-42,-36},{-42,-14},{-19,-14}}, color = {0, 0, 255})); + +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end AddClient; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ArretPompe.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ArretPompe.mo new file mode 100644 index 0000000..6841255 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ArretPompe.mo @@ -0,0 +1,30 @@ +within cooling_system.Verification.Scenarios.Utils; +model ArretPompe + + parameter Real at=200 "date à laquelle le client est ajouté"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical inputLogical + annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical outputLogical + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Echelon echelon( + startTime=at) + annotation (Placement(transformation(extent={{-84,-48},{-64,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL non + annotation (Placement(transformation(extent={{-38,-48},{-18,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.AND et + annotation (Placement(transformation(extent={{12,-24},{32,-4}}))); +equation + + connect(echelon.yL, non.uL) + annotation (Line(points={{-63,-38},{-39,-38}}, color={0,0,255})); + connect(non.yL, et.uL2) annotation (Line(points={{-17,-38},{6,-38},{6,-20},{ + 11,-20}}, color={0,0,255})); + connect(inputLogical, et.uL1) + annotation (Line(points={{-110,0},{6,0},{6,-8},{11,-8}}, color={0,0,255})); + connect(et.yL, outputLogical) annotation (Line(points={{33,-14},{94,-14},{94, + 0},{110,0}}, color={0,0,255})); + annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end ArretPompe; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ConnectBranche.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ConnectBranche.mo new file mode 100644 index 0000000..9e4126c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/ConnectBranche.mo @@ -0,0 +1,26 @@ +within cooling_system.Verification.Scenarios.Utils; +model ConnectBranche + + parameter Real at=200 "date à laquelle le client est ajouté"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical inputLogical + annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical outputLogical + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Echelon echelon( + startTime=at) + annotation (Placement(transformation(extent={{-84,-48},{-64,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.OR ou + annotation (Placement(transformation(extent={{-18,-16},{2,4}}))); +equation + + connect(echelon.yL, ou.uL2) annotation (Line(points={{-63,-38},{-24,-38},{-24, + -12},{-19,-12}}, color={0,0,255})); + connect(inputLogical, ou.uL1) + annotation (Line(points={{-110,0},{-19,0}}, color={0,0,255})); + connect(ou.yL, outputLogical) + annotation (Line(points={{3,-6},{94,-6},{94,0},{110,0}}, color={0,0,255})); + annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end ConnectBranche; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/IsoleBranche.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/IsoleBranche.mo new file mode 100644 index 0000000..34720d6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/IsoleBranche.mo @@ -0,0 +1,30 @@ +within cooling_system.Verification.Scenarios.Utils; +model IsoleBranche + + parameter Real at=200 "date à laquelle le client est ajouté"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical inputLogical + annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical outputLogical + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Echelon echelon( + startTime=at) + annotation (Placement(transformation(extent={{-84,-48},{-64,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.NONL non + annotation (Placement(transformation(extent={{-38,-48},{-18,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.AND et + annotation (Placement(transformation(extent={{12,-24},{32,-4}}))); +equation + + connect(echelon.yL, non.uL) + annotation (Line(points={{-63,-38},{-39,-38}}, color={0,0,255})); + connect(non.yL, et.uL2) annotation (Line(points={{-17,-38},{6,-38},{6,-20},{ + 11,-20}}, color={0,0,255})); + connect(inputLogical, et.uL1) + annotation (Line(points={{-110,0},{6,0},{6,-8},{11,-8}}, color={0,0,255})); + connect(et.yL, outputLogical) annotation (Line(points={{33,-14},{94,-14},{94, + 0},{110,0}}, color={0,0,255})); + annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end IsoleBranche; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/RemoveClient.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/RemoveClient.mo new file mode 100644 index 0000000..1638a5d --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/RemoveClient.mo @@ -0,0 +1,27 @@ +within cooling_system.Verification.Scenarios.Utils; +model RemoveClient + + parameter Real power=10E6 "puissance du client (en W)"; + parameter Real at=200 "date à laquelle le client est ajouté"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add(k2 = -1) annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Echelon echelon(hauteur = power, startTime = at) annotation ( + Placement(transformation(origin = {-62, -36}, extent = {{-10, -10}, {10, 10}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + connect(add.y, outputReal) annotation ( + Line(points={{3,-8},{108,-8},{108,-2}}, color = {0, 0, 255})); + connect(echelon.y, add.u2) annotation ( + Line(points={{-51,-36},{-42,-36},{-42,-14},{-19,-14}}, color = {0, 0, 255})); + +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-4, 126}, extent = {{-114, 30}, {114, -30}}, textString = "%name")})); +end RemoveClient; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/Scenario_init.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/Scenario_init.mo new file mode 100644 index 0000000..71defae --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/Scenario_init.mo @@ -0,0 +1,35 @@ +within cooling_system.Verification.Scenarios.Utils; +model Scenario_init + Connector.ToConnector toConnector + annotation (Placement(transformation(extent={{40,-100},{80,100}}))); + Connector.ScenarioConnector scenarioConnector + annotation (Placement(transformation(extent={{100,-8},{120,12}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante True + annotation (Placement(transformation(extent={{-200,74},{-180,94}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante False(K=false) + annotation (Placement(transformation(extent={{-200,46},{-180,66}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante HotPower_init( + k=25E6) + annotation (Placement(transformation(extent={{-200,6},{-180,26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Tsf_init(k= + 285) + annotation (Placement(transformation(extent={{-200,-20},{-180,0}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Psf_init(k= + 3E5) + annotation (Placement(transformation(extent={{-200,-46},{-180,-26}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Fuite_init1(k + =0.0) + annotation (Placement(transformation(extent={{-200,-100},{-180,-80}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Util_init(k= + 0.36) + annotation (Placement(transformation(extent={{-200,-74},{-180,-54}}))); +equation + + connect(toConnector.c, scenarioConnector) + annotation (Line(points={{88.4,0},{88.4,2},{110,2}}, color={0,0,0})); + annotation ( + Icon(coordinateSystem(extent={{-200,-100},{100,100}}), + graphics={ Rectangle(fillColor = {220, 138, 221}, fillPattern = FillPattern.Solid, extent={{-200, + 100},{100,-100}}), Text(origin={-49,137}, extent = {{-177, 55}, {177, -55}}, textString = "%name")}), + Diagram(coordinateSystem(extent={{-200,-100},{100,100}}))); +end Scenario_init; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/StartPompe.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/StartPompe.mo new file mode 100644 index 0000000..cb1d7c6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/StartPompe.mo @@ -0,0 +1,26 @@ +within cooling_system.Verification.Scenarios.Utils; +model StartPompe + + parameter Real at=200 "date à laquelle le client est ajouté"; + ThermoSysPro.InstrumentationAndControl.Connectors.InputLogical inputLogical + annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputLogical outputLogical + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Echelon echelon( + startTime=at) + annotation (Placement(transformation(extent={{-84,-48},{-64,-28}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.OR ou + annotation (Placement(transformation(extent={{-18,-16},{2,4}}))); +equation + + connect(echelon.yL, ou.uL2) annotation (Line(points={{-63,-38},{-24,-38},{-24, + -12},{-19,-12}}, color={0,0,255})); + connect(inputLogical, ou.uL1) + annotation (Line(points={{-110,0},{-19,0}}, color={0,0,255})); + connect(ou.yL, outputLogical) + annotation (Line(points={{3,-6},{94,-6},{94,0},{110,0}}, color={0,0,255})); + annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end StartPompe; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Fuite.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Fuite.mo new file mode 100644 index 0000000..d8d33b8 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Fuite.mo @@ -0,0 +1,36 @@ +within cooling_system.Verification.Scenarios.Utils; +model change_Fuite + + parameter Real delta=0.5 "différence d'ouverture à appliquer à la vanne modélisant une fuite (doit rester entre 0 et 1)"; + parameter Real at=200 "date à laquelle la pente de température commence"; + parameter Real delai=50 "délai d'atteinte de la nouvelle température"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( + Starttime=at, + Duration=delai, + Initialvalue=0, + Finalvalue=delta) + annotation (Placement(transformation(extent={{-70,-40},{-50,-20}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Limiteur limiteur( + minval=0) annotation (Placement(transformation(extent={{40,-18},{60,2}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + + connect(add.u2, rampe.y) annotation (Line(points={{-19,-14},{-34,-14},{-34,-30}, + {-49,-30}}, color={0,0,255})); + connect(add.y, limiteur.u) + annotation (Line(points={{3,-8},{39,-8}}, color={0,0,255})); + connect(limiteur.y, outputReal) + annotation (Line(points={{61,-8},{108,-8},{108,-2}}, color={0,0,255})); +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end change_Fuite; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Psf.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Psf.mo new file mode 100644 index 0000000..531770e --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Psf.mo @@ -0,0 +1,32 @@ +within cooling_system.Verification.Scenarios.Utils; +model change_Psf + + parameter Real delta=1e5 "différence de pression (de la source froide) à appliquer (en Pascal)"; + parameter Real at=200 "date à laquelle la pente de température commence"; + parameter Real delai=50 "délai d'atteinte de la nouvelle température"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( + Starttime=at, + Duration=delai, + Initialvalue=0, + Finalvalue=delta) + annotation (Placement(transformation(extent={{-70,-40},{-50,-20}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + + connect(add.u2, rampe.y) annotation (Line(points={{-19,-14},{-34,-14},{-34,-30}, + {-49,-30}}, color={0,0,255})); + connect(add.y, outputReal) annotation (Line(points={{3,-8},{92,-8},{92,-2},{108, + -2}}, color={0,0,255})); +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end change_Psf; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Tsf.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Tsf.mo new file mode 100644 index 0000000..e7f1e74 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Tsf.mo @@ -0,0 +1,32 @@ +within cooling_system.Verification.Scenarios.Utils; +model change_Tsf + + parameter Real delta=5 "différence de température (de la source froide) à appliquer (en K)"; + parameter Real at=200 "date à laquelle la pente de température commence"; + parameter Real delai=50 "délai d'atteinte de la nouvelle température"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( + Starttime=at, + Duration=delai, + Initialvalue=0, + Finalvalue=delta) + annotation (Placement(transformation(extent={{-70,-40},{-50,-20}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + connect(add.y, outputReal) annotation ( + Line(points={{3,-8},{108,-8},{108,-2}}, color = {0, 0, 255})); + + connect(add.u2, rampe.y) annotation (Line(points={{-19,-14},{-34,-14},{-34,-30}, + {-49,-30}}, color={0,0,255})); +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end change_Tsf; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Util.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Util.mo new file mode 100644 index 0000000..f254a0d --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/change_Util.mo @@ -0,0 +1,36 @@ +within cooling_system.Verification.Scenarios.Utils; +model change_Util + + parameter Real delta=0.5 "différence d'ouverture à appliquer à la vanne réglante du ciruit SRI (doit rester entre 0 et 1)"; + parameter Real at=200 "date à laquelle la pente de température commence"; + parameter Real delai=50 "délai d'atteinte de la nouvelle température"; + + ThermoSysPro.InstrumentationAndControl.Connectors.InputReal inputReal annotation ( + Placement(transformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal annotation ( + Placement(transformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {108, -2}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Math.Add add annotation ( + Placement(transformation(origin = {-8, -8}, extent = {{-10, -10}, {10, 10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( + Starttime=at, + Duration=delai, + Initialvalue=0, + Finalvalue=delta) + annotation (Placement(transformation(extent={{-70,-40},{-50,-20}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.NonLineaire.Limiteur limiteur( + minval=0) annotation (Placement(transformation(extent={{40,-18},{60,2}}))); +equation + connect(inputReal, add.u1) annotation ( + Line(points={{-108,-2},{-19,-2}})); + + connect(add.u2, rampe.y) annotation (Line(points={{-19,-14},{-34,-14},{-34,-30}, + {-49,-30}}, color={0,0,255})); + connect(add.y, limiteur.u) + annotation (Line(points={{3,-8},{39,-8}}, color={0,0,255})); + connect(limiteur.y, outputReal) + annotation (Line(points={{61,-8},{108,-8},{108,-2}}, color={0,0,255})); +annotation ( + Icon(graphics={ Rectangle(extent = {{-100, 100}, {100, -100}}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text(origin = {-5, 129}, extent = {{-117, 33}, {117, -33}}, textString = "%name")})); +end change_Util; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.mo new file mode 100644 index 0000000..f2d1d9c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification.Scenarios; +package Utils +end Utils; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.order new file mode 100644 index 0000000..5f4d6c1 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/Utils/package.order @@ -0,0 +1,11 @@ +AddClient +RemoveClient +ArretPompe +StartPompe +IsoleBranche +ConnectBranche +change_Tsf +change_Psf +change_Util +change_Fuite +Scenario_init diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.mo new file mode 100644 index 0000000..fe35d96 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.mo @@ -0,0 +1,3 @@ +within cooling_system.Verification; +package Scenarios +end Scenarios; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.order new file mode 100644 index 0000000..2ac4266 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Scenarios/package.order @@ -0,0 +1,8 @@ +Connector +Utils +Scenario0_2echangeurs +Scenario0_1echangeur +Scenario1 +Scenario2 +Scenario_limites +Scenario_GrandChaud diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif.mo new file mode 100644 index 0000000..4d12c1c --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif.mo @@ -0,0 +1,34 @@ +within cooling_system.Verification; +model Verif + Modelica.Blocks.Sources.RealExpression Q_echangeur_1(y = SRI.EchangeurAPlaques1D1.Ec.Q) annotation ( + Placement(transformation(origin={27,64}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed annotation (Placement(transformation(origin + ={78,64}, extent={{-10,-10},{10,10}}))); + Requirements.Req_speed req_speed annotation (Placement(transformation(origin= + {160,54}, extent={{-10,-10},{10,10}}))); + Modelica.Blocks.Sources.RealExpression Q_echangeur_2(y = SRI.EchangeurAPlaques1D2.Ec.Q) annotation ( + Placement(transformation(origin = {29, 38}, extent = {{-17, -14}, {17, 14}}))); + Observers.FlowToSpeed flowToSpeed1 annotation (Placement(transformation( + origin={80,36}, extent={{-10,-10},{10,10}}))); + Scenarios.Scenario0_2echangeurs scenario0_2echangeurs annotation (Placement( + transformation(origin={-156,54}, extent={{-18,-12},{18,12}}))); + Scenarios.Scenario0_1echangeur scenario0_1echangeur annotation (Placement( + transformation(origin={-98,32}, extent={{-18,-12},{17.9999,12}}))); + Behavior.SRIN4_v4.SRI SRI + annotation (Placement(transformation(extent={{-54,-10},{0,32}}))); +equation + connect(Q_echangeur_1.y, flowToSpeed.u) annotation (Line(points={{45.7,64},{ + 57.4,64},{57.4,65.2},{66,65.2}}, color={0,0,127})); + connect(Q_echangeur_2.y, flowToSpeed1.u) annotation (Line(points={{47.7,38},{ + 58,38},{58,37.2},{68,37.2}}, color={0,0,127})); + connect(flowToSpeed.y, req_speed.u1) annotation (Line(points={{89.8,65.2},{ + 119.8,65.2},{119.8,57.8},{148,57.8}}, color={0,0,127})); + connect(flowToSpeed1.y, req_speed.u) annotation (Line(points={{91.8,37.2},{ + 119.8,37.2},{119.8,48.4},{148,48.4}}, color={0,0,127})); + connect(scenario0_1echangeur.scenarioConnector, SRI.scenario) annotation( + Line(points = {{-78, 32}, {-70, 32}, {-70, 10}, {-54, 10}})); + annotation ( + Diagram(graphics={ Rectangle(origin = {54, 0}, fillColor = {143, 240, 164}, fillPattern = FillPattern.Solid, extent = {{-50, 96}, {50, -96}}), Text(origin = {53, 87}, extent = {{-27, 9}, {27, -9}}, textString = "Observers"), Rectangle(origin = {158, 0}, fillColor = {249, 240, 107}, fillPattern = FillPattern.Solid, extent = {{-32, 96}, {32, -96}}), Text(origin = {159, 87}, extent = {{-27, 7}, {27, -7}}, textString = "Requirements"), Rectangle(origin = {-127, 0}, fillColor = {255, 190, 111}, fillPattern = FillPattern.Solid, extent = {{-67, 96}, {67, -96}}), Text(origin = {-131, 87}, extent = {{-35, 7}, {35, -7}}, textString = "Scenarios")}, coordinateSystem(extent = {{-200, -100}, {200, 100}})), + Icon(coordinateSystem(extent = {{-200, -100}, {200, 100}})), + experiment(StartTime = 0, StopTime = 1000, Tolerance = 1e-06, Interval = 2)); +end Verif; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif_corrige.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif_corrige.mo new file mode 100644 index 0000000..8076e75 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/Verif_corrige.mo @@ -0,0 +1,190 @@ +within cooling_system.Verification; +model Verif_corrige + import cooling_system; + Modelica.Blocks.Sources.RealExpression Q_echangeur_1(y=SRI_corrige.EchangeurAPlaques1D1.Ec.Q) + annotation (Placement(transformation(origin={27,64}, extent={{-17,-14},{17, + 14}}))); + Observers.FlowToSpeed flowToSpeed annotation (Placement(transformation(origin + ={78,64}, extent={{-10,-10},{10,10}}))); + Requirements.Req_speed req_speed annotation (Placement(transformation(origin= + {160,54}, extent={{-10,-10},{10,10}}))); + Modelica.Blocks.Sources.RealExpression Q_echangeur_2(y=SRI_corrige.EchangeurAPlaques1D2.Ec.Q) + annotation (Placement(transformation(origin={25,36}, extent={{-17,-14},{17, + 14}}))); + Observers.FlowToSpeed flowToSpeed1 annotation (Placement(transformation( + origin={80,36}, extent={{-10,-10},{10,10}}))); + Scenarios.Scenario0_2echangeurs scenario0_2echangeurs annotation (Placement( + transformation(origin={-156,54}, extent={{-18,-12},{18,12}}))); + Scenarios.Scenario0_1echangeur scenario0_1echangeur annotation (Placement( + transformation(origin={-98,36}, extent={{-18,-12},{17.9999,12}}))); + Scenarios.Scenario_GrandChaud scenarioGrandChaud annotation (Placement( + transformation(origin={-101,-75}, extent={{-19,-13},{18.9999,13}}))); + cooling_system.Behavior.SRIN4_v4.SRI_corrige SRI_corrige annotation ( + Placement(transformation(origin={-26,9}, extent={{-26,-22},{26,22}}))); + Scenarios.Scenario_limites scenario_limites annotation (Placement( + transformation(origin={-157,-55}, extent={{-19,-13},{19,13}}))); + Scenarios.Scenario2 scenario_perturbations annotation (Placement( + transformation(origin={-98,-20.6667}, extent={{-19,-12.6667},{19, + 12.6667}}))); + Scenarios.Scenario1 scenario_test + annotation (Placement(transformation(extent={{-176,-14},{-136,12}}))); + Requirements.Req_flow req_flow + annotation (Placement(transformation(extent={{150,-48},{170,-28}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe1(y=SRI_corrige.PompeCentrifugeDyn1.Q) + annotation (Placement(transformation(origin={25,-14}, extent={{-17,-14},{17, + 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe1(y=SRI_corrige.PompeCentrifugeDyn1.M.Ctr) + annotation (Placement(transformation(origin={23,10}, extent={{-17,-14},{17, + 14}}))); + Observers.FlowConversion flowConversion + annotation (Placement(transformation(extent={{68,-26},{88,-6}}))); + Observers.PompeEnService pompeEnService + annotation (Placement(transformation(extent={{68,0},{88,20}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe2(y=SRI_corrige.PompeCentrifugeDyn2.Q) + annotation (Placement(transformation(origin={25,-66}, extent={{-17,-14},{17, + 14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe2(y=SRI_corrige.PompeCentrifugeDyn2.M.Ctr) + annotation (Placement(transformation(origin={23,-42}, extent={{-17,-14},{17, + 14}}))); + Observers.PompeEnService pompeEnService1 + annotation (Placement(transformation(extent={{68,-52},{88,-32}}))); + Observers.FlowConversion flowConversion1 + annotation (Placement(transformation(extent={{68,-78},{88,-58}}))); + Modelica.Blocks.Sources.RealExpression Q_Pompe3(y=SRI_corrige.PompeCentrifugeDyn3.Q) + annotation (Placement(transformation(origin={25,-118}, extent={{-17,-14},{ + 17,14}}))); + Modelica.Blocks.Sources.RealExpression Couple_Pompe3(y=SRI_corrige.PompeCentrifugeDyn3.M.Ctr) + annotation (Placement(transformation(origin={23,-94}, extent={{-17,-14},{17, + 14}}))); + Observers.PompeEnService pompeEnService2 + annotation (Placement(transformation(extent={{68,-104},{88,-84}}))); + Observers.FlowConversion flowConversion2 + annotation (Placement(transformation(extent={{68,-130},{88,-110}}))); + Modelica.Blocks.Sources.RealExpression T_SRI(y=SRI_corrige.CapteurT1.T) + annotation (Placement(transformation(origin={27,-148}, extent={{-17,-14},{ + 17,14}}))); + Requirements.Req_Tsri req_Tsri + annotation (Placement(transformation(extent={{146,-158},{166,-138}}))); + Observers.KtoDeg ktoDeg + annotation (Placement(transformation(extent={{68,-160},{88,-140}}))); + Requirements.Req_DTsf req_DTsf + annotation (Placement(transformation(extent={{144,-212},{164,-192}}))); + Observers.KtoDeg ktoDeg1 + annotation (Placement(transformation(extent={{68,-230},{88,-210}}))); + Observers.KtoDeg ktoDeg2 + annotation (Placement(transformation(extent={{68,-200},{88,-180}}))); + Modelica.Blocks.Sources.RealExpression T_input_sf(y=SRI_corrige.EchangeurAPlaques1D2.Tef) + annotation (Placement(transformation(origin={25,-218}, extent={{-17,-14},{ + 17,14}}))); + Modelica.Blocks.Sources.RealExpression T_output_sf(y=SRI_corrige.EchangeurAPlaques1D2.Tsf) + annotation (Placement(transformation(origin={27,-190}, extent={{-17,-14},{ + 17,14}}))); + Requirements.Req_speed_all_CRML req_speed_all_CRML + annotation (Placement(transformation(extent={{212,42},{232,62}}))); + Requirements.Req_flow_all_CRML req_flow_all_CRML + annotation (Placement(transformation(extent={{214,-46},{234,-26}}))); + Requirements.Req_Tsri_CRML req_Tsri_CRML + annotation (Placement(transformation(extent={{210,-158},{230,-138}}))); + inner CRML.TimeLocators.Continuous.Master master + annotation (Placement(transformation(origin = {-6, 8}, extent = {{232, -228}, {252, -208}}))); + CRML.Blocks.Logical.BooleanPulse booleanPulse( + width=980, + period=1000, + startTime=10) + annotation (Placement(transformation(origin = {-4, 8}, extent = {{194, -228}, {214, -208}}))); + CRML.Blocks.Logical4.BooleanToBoolean4 booleanToBoolean4_1 + annotation (Placement(transformation(extent={{218,-222},{226,-214}}))); +equation + connect(Q_echangeur_1.y, flowToSpeed.u) annotation (Line(points={{45.7,64},{ + 57.4,64},{57.4,65.2},{66,65.2}}, color={0,0,127})); + connect(Q_echangeur_2.y, flowToSpeed1.u) annotation (Line(points={{43.7,36},{ + 58,36},{58,37.2},{68,37.2}}, color={0,0,127})); + connect(flowToSpeed.y, req_speed.u1) annotation (Line(points={{89.8,65.2},{ + 119.8,65.2},{119.8,57.8},{148,57.8}}, color={0,0,127})); + connect(flowToSpeed1.y, req_speed.u) annotation (Line(points={{91.8,37.2},{ + 119.8,37.2},{119.8,48.4},{148,48.4}}, color={0,0,127})); + connect(Q_Pompe1.y, flowConversion.u) annotation (Line(points={{43.7,-14},{ + 43.7,-14.8},{66,-14.8}}, color={0,0,127})); + connect(Couple_Pompe1.y, pompeEnService.u) annotation (Line(points={{41.7,10}, + {58,10},{58,11.2},{66,11.2}}, color={0,0,127})); + connect(flowConversion.y, req_flow.u) annotation (Line(points={{89.8,-14.8},{ + 138,-14.8},{138,-34},{148,-34}}, color={0,0,127})); + connect(req_flow.u3, pompeEnService.y) annotation (Line(points={{148,-30},{ + 140,-30},{140,10.6},{89,10.6}}, color={255,0,255})); + connect(Couple_Pompe2.y, pompeEnService1.u) annotation (Line(points={{41.7, + -42},{58,-42},{58,-40.8},{66,-40.8}}, color={0,0,127})); + connect(Q_Pompe2.y, flowConversion1.u) annotation (Line(points={{43.7,-66},{ + 46,-66.8},{66,-66.8}}, color={0,0,127})); + connect(Couple_Pompe3.y, pompeEnService2.u) annotation (Line(points={{41.7, + -94},{58,-94},{58,-92.8},{66,-92.8}}, color={0,0,127})); + connect(Q_Pompe3.y, flowConversion2.u) annotation (Line(points={{43.7,-118},{ + 46,-118.8},{66,-118.8}}, color={0,0,127})); + connect(flowConversion2.y, req_flow.u2) annotation (Line(points={{89.8,-118.8}, + {148,-118.8},{148,-49.8}}, color={0,0,127})); + connect(pompeEnService2.y, req_flow.u5) annotation (Line(points={{89,-93.4},{ + 142,-93.4},{142,-58},{140,-58},{140,-45.8},{148,-45.8}}, color={255,0, + 255})); + connect(flowConversion1.y, req_flow.u1) annotation (Line(points={{89.8,-66.8}, + {138,-66.8},{138,-44},{140,-44},{140,-41.8},{148,-41.8}}, color={0,0, + 127})); + connect(pompeEnService1.y, req_flow.u4) annotation (Line(points={{89,-41.4},{ + 138,-41.4},{138,-37.8},{148,-37.8}}, color={255,0,255})); + connect(T_SRI.y, ktoDeg.u) annotation (Line(points={{45.7,-148},{58,-148},{58, + -148.8},{66,-148.8}}, color={0,0,127})); + connect(req_Tsri.u, ktoDeg.y) annotation (Line(points={{144,-148},{142,-148.8}, + {89.8,-148.8}}, color={0,0,127})); + connect(ktoDeg1.u, T_input_sf.y) annotation (Line(points={{66,-218.8},{64, + -218},{43.7,-218}}, color={0,0,127})); + connect(ktoDeg2.u, T_output_sf.y) annotation (Line(points={{66,-188.8},{50, + -188.8},{50,-190},{45.7,-190}}, color={0,0,127})); + connect(ktoDeg2.y, req_DTsf.u) annotation (Line(points={{89.8,-188.8},{134, + -188.8},{134,-197},{142,-197}}, color={0,0,127})); + connect(ktoDeg1.y, req_DTsf.u1) annotation (Line(points={{89.8,-218.8},{134, + -218.8},{134,-206},{142,-206}}, color={0,0,127})); + connect(flowToSpeed.y, req_speed_all_CRML.v1) annotation (Line(points={{89.8, + 65.2},{144,65.2},{144,70},{196,70},{196,56.4},{210,56.4}}, color={0,0, + 127})); + connect(flowToSpeed1.y, req_speed_all_CRML.v2) annotation (Line(points={{91.8, + 37.2},{196,37.2},{196,48},{210,48}}, color={0,0,127})); + connect(pompeEnService.y, req_flow_all_CRML.pump_in_service_1) annotation (Line(points={{89, + 10.6},{140,10.6},{140,10},{202,10},{202,-28},{212,-28}}, color={255,0, + 255})); + connect(flowConversion.y, req_flow_all_CRML.flow1) annotation (Line(points={{89.8, + -14.8},{200,-14.8},{200,-32},{212,-32}}, color={0,0,127})); + connect(pompeEnService1.y, req_flow_all_CRML.pump_in_service_2) annotation (Line(points={{89, + -41.4},{136,-41.4},{136,-54},{192,-54},{192,-35.8},{212,-35.8}}, + color={255,0,255})); + connect(flowConversion1.y, req_flow_all_CRML.flow2) annotation (Line(points={{ + 89.8,-66.8},{196,-66.8},{196,-39.8},{212,-39.8}}, color={0,0,127})); + connect(pompeEnService2.y, req_flow_all_CRML.pump_in_service_3) annotation (Line(points={{89, + -93.4},{142,-93.4},{142,-94},{200,-94},{200,-43.8},{212,-43.8}}, + color={255,0,255})); + connect(flowConversion2.y, req_flow_all_CRML.flow3) annotation (Line(points={{ + 89.8,-118.8},{148,-118.8},{148,-120},{208,-120},{208,-48},{212,-48},{ + 212,-47.8}}, color={0,0,127})); + connect(ktoDeg.y, req_Tsri_CRML.T) annotation (Line(points={{89.8,-148.8},{ + 136,-148.8},{136,-132},{200,-132},{200,-148},{208,-148}}, color={0,0, + 127})); + connect(master.u, booleanToBoolean4_1.y) + annotation (Line(points={{225, -210}, {228.7, -210}, {228.7, -218},{226.4,-218}}, color={162,29,33})); + connect(booleanPulse.y, booleanToBoolean4_1.u) + annotation (Line(points={{211, -210}, {216.3, -210}, {216.3, -218},{217.6,-218}}, color={217,67,180})); + connect(scenario0_2echangeurs.scenarioConnector, SRI_corrige.scenario) annotation( + Line(points={{-136.8,54.24},{-64,54.24},{-64,8.18519},{-51.7111,8.18519}})); + connect(req_Tsri_CRML.T, ktoDeg.y) annotation( + Line(points = {{212, -150}, {198, -150}, {198, -128}, {110, -128}, {110, -148}, {90, -148}}, color = {0, 0, 127})); + annotation ( + Diagram(graphics={ Rectangle(origin={56,-70}, fillColor = {143, 240, 164}, fillPattern = FillPattern.Solid, extent={{-52,166}, + {52,-166}}), Text(origin = {53, 87}, extent = {{-27, 9}, {27, -9}}, textString = "Observers"), Rectangle(origin={158,-71}, fillColor = {249, 240, 107}, fillPattern = FillPattern.Solid, extent={{-32,167}, + {32,-167}}), Text(origin = {159, 87}, extent = {{-27, 7}, {27, -7}}, textString = "Requirements"), Rectangle(origin = {-127, 0}, fillColor = {255, 190, 111}, fillPattern = FillPattern.Solid, extent = {{-67, 96}, {67, -96}}), Text(origin = {-131, 87}, extent = {{-35, 7}, {35, -7}}, textString = "Scenarios"), + Rectangle(origin={222,-71}, fillColor={170,255, + 255}, fillPattern + = FillPattern.Solid, extent={{-32,167}, + {32,-167}}), + Text( + extent={{202,96},{240,76}}, + textString="CRML")}, coordinateSystem(extent={{-200, + 100},{260,-240}})), + Icon(coordinateSystem(extent={{-200,-300},{260,100}})), + experiment(StartTime = 0, StopTime = 1000, Tolerance = 1e-06, Interval = 2)); +end Verif_corrige; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.mo new file mode 100644 index 0000000..f2d1c7f --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.mo @@ -0,0 +1,4 @@ +within cooling_system; +package Verification + +end Verification; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.order new file mode 100644 index 0000000..b9180c6 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/Verification/package.order @@ -0,0 +1,8 @@ +Scenarios +Observers +Requirements +Reqs_sri_CRML +Verif +Verif_corrige +Reqs_sri_CRML_verif +Reqs_sri_CRML_externals diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.mo b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.mo new file mode 100644 index 0000000..f6d5581 --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.mo @@ -0,0 +1,10 @@ +within ; +package cooling_system + //annotation (uses(ThermoSysPro(version="4.0"), Modelica(version="4.0.0"))); + + + + + annotation( + uses(Modelica(version = "4.0.0"))); +end cooling_system; diff --git a/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.order b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.order new file mode 100644 index 0000000..f6c90ac --- /dev/null +++ b/src/test/resources/verificationModels/use-cases/ics_educational/lib/SRI_v4_EI/cooling_system/package.order @@ -0,0 +1,2 @@ +Behavior +Verification