From 1c6ff5d3374c930ba90e0e5d9da73266d09c1364 Mon Sep 17 00:00:00 2001 From: minsoo Date: Thu, 24 Sep 2026 10:52:10 -0500 Subject: [PATCH 1/6] Safe state of CML for support of GNC_PAR upgrade from ramtares_main --- .../constraint_check/include/constraint.hh | 34 ++++++++----- .../include/constraint_set.hh | 8 ++- .../include/constraint_test.hh | 14 +++++- .../include/constraint_test_templates.hh | 17 +++++-- .../constraint_test_timed_templates.hh | 10 ++++ .../constraint_check/src/constraint.cc | 49 ++++++++++--------- .../constraint_check/src/constraint_set.cc | 8 ++- .../src/constraint_test_templates.cc | 13 +++-- .../constraint_check/verif/SIM_verif/S_define | 6 +++ .../verif/SIM_verif/test_constraint_set.hh | 12 +++++ .../RUN_1_constraints/log_interval_i2t.csv | 2 +- .../RUN_1_constraints/log_interval_x2t.csv | 2 +- .../log_interval_x2t_neg.csv | 2 +- .../RUN_1_constraints/log_threshold_i4t.csv | 2 +- .../RUN_1_constraints/log_threshold_x3s.csv | 2 +- .../log_threshold_x3s_neg.csv | 2 +- .../RUN_1_constraints/log_threshold_x4s.csv | 2 +- .../RUN_1_constraints/log_threshold_x4t.csv | 2 +- .../RUN_1_constraints/log_threshold_x5s.csv | 2 +- .../log_interval_i2t.csv | 2 +- .../log_interval_x2t.csv | 2 +- .../log_interval_x2t_neg.csv | 2 +- .../log_threshold_x4t.csv | 2 +- .../log_threshold_x3s.csv | 2 +- .../log_threshold_x5s.csv | 2 +- 25 files changed, 133 insertions(+), 68 deletions(-) diff --git a/models/utilities/constraint_check/include/constraint.hh b/models/utilities/constraint_check/include/constraint.hh index dfdf353f..beb85108 100644 --- a/models/utilities/constraint_check/include/constraint.hh +++ b/models/utilities/constraint_check/include/constraint.hh @@ -33,7 +33,7 @@ Purpose: *****************************************************************************/ class Constraint { - public: + public: ConstraintEnum::ViolationCondition violation_condition{ConstraintEnum::Undefined}; /* (--) The default violation-condition to be appllied to all constraint-tests within this cosntraint, unless they are configured separately.*/ @@ -52,6 +52,25 @@ class Constraint Flag indicating this constraint is intended to be evaluated. Constraints may be disabled, which prevents them from being activated. An active constraint gets processed.*/ + + // the following are all outputs of constraint.cc + unsigned int test_violated_index; /* (--) + Record of which test caused the constraint to be violated. */ + double test_violated_time_limit; /* (s) + The time-limit -- where applicable -- of (one of) the test(s) that + resulted in a violation. + If multiple tests result in a violation, the value recorded here is that + of the lowest indexed test. + If the tests do not include time limits, this value will remain 0.0 */ + double test_violated_threshold; /* (--) + The threshold -- where applicable -- of (one of) the test(s) that + resulted in a violation, cast to a double for logging purposes. + If multiple tests result in a violation, the value recorded here is that + of the lowest indexed test. + If the tests do not include thresholdss, this value will remain 0.0. + Technically in the units of the threhold / test, which are unknown. */ + + protected: bool active{false}; /* (--) Flag indicating this constraint is going to be checked by the next cycle @@ -59,21 +78,11 @@ class Constraint bool initialized{false}; /* (--) Flag indicating this constraint-checker has passed sanity checks and is ready to be used.*/ - bool prev_violated{false}; /* (--) - Copy of previous value of violated.*/ const size_t num_tests; /* (--) Record of the number of tests in the constraint.*/ std::vector test_list; /* (--) List of pointers to constraint-tests, used for baseline functionality.*/ - unsigned int test_violated_index{0}; /* (--) - Record of which test caused the constraint to be violated. */ - double test_violated_time_limit{0.0}; /* (--) - The time-limit -- where applicable -- of (one of) the test(s) that - resulted in a violation. - If multiple tests result in a violation, the value recorded here is that - of the lowest indexed test. - If the tests do not include time limits, this value will remain 0.0*/ public: Constraint( size_t num_tests_ = 1); @@ -93,7 +102,6 @@ class Constraint void activate(); void deactivate() {active = false;} protected: - void count_violations(); void post_update(); }; -#endif \ No newline at end of file +#endif diff --git a/models/utilities/constraint_check/include/constraint_set.hh b/models/utilities/constraint_check/include/constraint_set.hh index 1d6678a3..d9fc0343 100644 --- a/models/utilities/constraint_check/include/constraint_set.hh +++ b/models/utilities/constraint_check/include/constraint_set.hh @@ -36,13 +36,16 @@ Notes: *****************************************************************************/ class ConstraintSet : public SubscriptionBase { - protected: + protected: unsigned int num_violations{0}; /* (--) Counts the number of constraints violated in each cycle. Do not confuse with ConstraintBase::violate_count, which counts the number of occurrences of a specific constraint violation. across all cycles.*/ + std::string violated_constraints; /* (--) + Comma-separated list of the names of all constraints in the set that are + violated on this timestep.*/ - public: + public: std::list< Constraint *> constraints; /* (--) Set of pointers to the instances of ConstraintBase being managed by this class. Constraints should be instantiated independently and added to the @@ -56,5 +59,6 @@ class ConstraintSet : public SubscriptionBase void update(); void activate() override; static bool constraint_disabled( const Constraint * c); + std::string & get_violated_constraints() { return violated_constraints;} }; #endif diff --git a/models/utilities/constraint_check/include/constraint_test.hh b/models/utilities/constraint_check/include/constraint_test.hh index fecb9f97..9fc70db6 100644 --- a/models/utilities/constraint_check/include/constraint_test.hh +++ b/models/utilities/constraint_check/include/constraint_test.hh @@ -60,7 +60,17 @@ class ConstraintTest void count_violations(); - virtual double get_time_limit() {return 0.0;} + /* Note -- get_time_limit and get_threshold are needed at the top level + because they are called for all constraint-tests that show a violation + within a constraint. They are meaningless for constraint-test types that + have no time-limit or no single threshold and simply return 0.0 for + those classes. They are meaningful for constraint-test types: + - {ConstraintTestTimed} and its derivatives, and + - {ConstraintTest_Threshold, ConstraintTest_ThresholdTimed} + respectively, and are redefined in those specfic classes.*/ + virtual double get_time_limit() { return 0.0;} + virtual double get_threshold() { return 0.0;} + void activate() {active = (initialized && enabled);} bool is_initialized() const {return initialized;} @@ -96,7 +106,7 @@ class ConstraintTestTimed : public ConstraintTest bool use_timer{true}; /* (--) Allows a ConstrainTestTimed to be treated as a ConstraintTest, circumventing the timing aspect.*/ - double time_limit{0.0}; /* (--) + double time_limit{0.0}; /* (s) The duration for which a domain violation may exist before triggering a test violation. Not used in all cases.*/ double gap_time_limit{0.0}; /* (s) diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index fc38b121..6a3667a7 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -21,6 +21,7 @@ PROGRAMMERS: #include "constraint_enum.hh" #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +#include "cml/models/utilities/math_utils/include/math_utils.hh" // MathUtils /***************************************************************************** Notes: @@ -104,6 +105,16 @@ class ConstraintTest_Threshold : public ConstraintTest } return violation; } + + /**************************************************************************** + * get_threshold + * Purpose: Returns the threshold, cast to double, for logging purposes. + ****************************************************************************/ + double get_threshold() override + { + return static_cast(threshold); + } + /**************************************************************************** * query_equals * Purpose: evaluates (variable == threshold) @@ -158,12 +169,12 @@ class ConstraintTest_Interval : public ConstraintTest lower_bound = temporary; } - if (upper_bound == lower_bound) { + if (MathUtils::is_within_abs_tolerance(upper_bound, lower_bound, equality_threshold)) { CMLMessage::error( __FILE__,__LINE__, "Cannot initialize an interval constraint-test with a \n" "zero-width interval. Bounds are set to:\n", - lower_bound," and ",upper_bound,".\n" - "Initialization failed.\n"); + lower_bound," and ",upper_bound," with equality threshold\n", + equality_threshold,". Initialization failed.\n"); return false; } initialize_interval(); diff --git a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh index 14a939bf..a44e8424 100644 --- a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh @@ -118,6 +118,16 @@ class ConstraintTest_ThresholdTimed : public ConstraintTestTimed } return violation; } + + /**************************************************************************** + * get_threshold + * Purpose: Returns the threshold, cast to double, for logging purposes. + ****************************************************************************/ + double get_threshold() override + { + return static_cast(threshold); + } + /**************************************************************************** * query_equals * Purpose: evaluates (variable == threshold) diff --git a/models/utilities/constraint_check/src/constraint.cc b/models/utilities/constraint_check/src/constraint.cc index 2c14ef01..a57d6055 100644 --- a/models/utilities/constraint_check/src/constraint.cc +++ b/models/utilities/constraint_check/src/constraint.cc @@ -25,7 +25,11 @@ Constructor *****************************************************************************/ Constraint::Constraint( size_t num_tests_) : - num_tests(num_tests_) + test_violated_index(0), + test_violated_time_limit(0.0), + test_violated_threshold(0.0), + num_tests(num_tests_), + test_list() {} /***************************************************************************** @@ -68,47 +72,44 @@ Name: post_update void Constraint::post_update() { + bool violated_ = false; // local temporary measure of constraint status // If configured with "Any", trip on the first test that is violated; // record its index. if (violate_on_any_test) { - bool violated_ = false; // Step through by index because we want to record which test violated. for (size_t ii = 0; ii < num_tests; ii++) { if (test_list[ii]->get_violation()) { test_violated_index = ii; test_violated_time_limit = test_list[ii]->get_time_limit(); + test_violated_threshold = test_list[ii]->get_threshold(); violated_ = true; - violated = true; - count_violations(); + /* increment the count if this violation is not a holdover from the + previous cycle (violated is the copy held over from the previous + cycle). */ + violation_count += static_cast(!violated); break; } } - violated = violated_; // in case violated_ is still false. } // If configured with "All", require all test violations to trip the - // constraint violation: + // constraint violation. Start with an assumption that there is a + // violation, and correct that assumption as necessary: else { - violated = std::all_of(test_list.begin(), test_list.end(), - [](const auto& test) {return test->get_violation();}); - if (violated) { - count_violations(); + violated_ = true; + // Don't need to record which test violated, so don't need indices. + for (ConstraintTest * test : test_list) { + if (!test->get_violation()) { + violated_ = false; + break; + } } + /* increment the count if this violation is not a holdover from the + previous cycle (violated is the copy held over from the previous + cycle). */ + violation_count += static_cast(violated_ && !violated); } - prev_violated = violated; -} - -/***************************************************************************** -Name: count_violations -Purpose: Counts the number of unique violations -*****************************************************************************/ -void -Constraint::count_violations() -{ - if (violated != prev_violated) { - violation_count += static_cast(violated); - prev_violated = violated; - } + violated = violated_; } /***************************************************************************** diff --git a/models/utilities/constraint_check/src/constraint_set.cc b/models/utilities/constraint_check/src/constraint_set.cc index dfd64a59..9f935e4e 100644 --- a/models/utilities/constraint_check/src/constraint_set.cc +++ b/models/utilities/constraint_check/src/constraint_set.cc @@ -53,9 +53,13 @@ ConstraintSet::update() if (!active) {return;} num_violations = 0; + violated_constraints.erase(); for (Constraint * constraint : constraints) { constraint->update(); - num_violations += static_cast(constraint->violated); + if (constraint->violated) { + num_violations++; + violated_constraints += (constraint->name + ", "); + } } } @@ -67,4 +71,4 @@ bool ConstraintSet::constraint_disabled( const Constraint * c) { return !(c->enabled); -} \ No newline at end of file +} diff --git a/models/utilities/constraint_check/src/constraint_test_templates.cc b/models/utilities/constraint_check/src/constraint_test_templates.cc index 4cf76cba..503992ed 100644 --- a/models/utilities/constraint_check/src/constraint_test_templates.cc +++ b/models/utilities/constraint_check/src/constraint_test_templates.cc @@ -9,7 +9,6 @@ ) *******************************************************************************/ -#include "cml/models/utilities/math_utils/include/math_utils.hh" #include "../include/constraint_test_templates.hh" /***************************************************************************** @@ -24,15 +23,15 @@ Template specializations template<> bool ConstraintTest_Threshold::query_equals( double variable) const { - return (MathUtils::is_within_range( variable, - threshold, - equality_threshold)); + return (MathUtils::is_within_abs_tolerance( variable, + threshold, + equality_threshold)); } template<> bool ConstraintTest_Threshold::query_equals( float variable) const { - return (MathUtils::is_within_range( static_cast(variable), - static_cast(threshold), - equality_threshold)); + return (MathUtils::is_within_abs_tolerance( static_cast(variable), + static_cast(threshold), + equality_threshold)); } diff --git a/models/utilities/constraint_check/verif/SIM_verif/S_define b/models/utilities/constraint_check/verif/SIM_verif/S_define index 835dec3a..cf96788d 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/S_define +++ b/models/utilities/constraint_check/verif/SIM_verif/S_define @@ -36,6 +36,7 @@ class VerifUnitSimObject: public Trick::SimObject { ("initialization") constraints.set.initialize(); (0.1, "environment") constraints.set.update(); + (0.1, "environment") print_violations(); } void update_vals() @@ -43,6 +44,11 @@ class VerifUnitSimObject: public Trick::SimObject { var_x = var_i * 1.0; var_x_neg = -var_x; } + + void print_violations() + { + std::cout << constraints.set.get_violated_constraints() << "\n**\n"; + } private: VerifUnitSimObject (const VerifUnitSimObject&); VerifUnitSimObject & operator = (const VerifUnitSimObject&); diff --git a/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh b/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh index 2f4ac317..4fc8fcee 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh +++ b/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh @@ -79,12 +79,14 @@ class TestConstraintSet threshold_x4t.tests[2].time_limit = 0.8; threshold_x4t.tests[3].time_limit = 0.5; threshold_x4t.violation_condition = ConstraintEnum::GE; + threshold_x4t.name = "x4t"; threshold_x4i.tests[0].threshold = 10.0; threshold_x4i.tests[1].threshold = 20.0; threshold_x4i.tests[2].threshold = 30.0; threshold_x4i.tests[3].threshold = 35.0; threshold_x4i.violation_condition = ConstraintEnum::GT; + threshold_x4i.name = "x4i"; threshold_i4t.tests[0].threshold = 10; threshold_i4t.tests[1].threshold = 20; @@ -95,12 +97,14 @@ class TestConstraintSet threshold_i4t.tests[2].time_limit = 1.8; threshold_i4t.tests[3].time_limit = 2.5; threshold_i4t.violation_condition = ConstraintEnum::LT; + threshold_i4t.name = "i4t"; threshold_i4i.tests[0].threshold = 10; threshold_i4i.tests[1].threshold = 20; threshold_i4i.tests[2].threshold = 30; threshold_i4i.tests[3].threshold = 40; threshold_i4i.violation_condition = ConstraintEnum::EQ; + threshold_i4i.name = "i4i"; threshold_x4s.threshold_spec[0] = 10.0; threshold_x4s.threshold_spec[1] = 20.0; @@ -111,6 +115,7 @@ class TestConstraintSet threshold_x4s.time_spec[2] = 1.8; threshold_x4s.time_spec[3] = 2.5; threshold_x4s.violation_condition = ConstraintEnum::LE; + threshold_x4s.name = "x4s"; threshold_x3s.threshold_spec[0] = 10.0; threshold_x3s.threshold_spec[1] = 20.0; @@ -121,6 +126,7 @@ class TestConstraintSet threshold_x3s.time_spec[2] = 1.8; threshold_x3s.time_spec[3] = 1.5; threshold_x3s.violation_condition = ConstraintEnum::LT; + threshold_x3s.name = "x3s"; threshold_x3s_neg.threshold_spec[0] = -10.0; threshold_x3s_neg.threshold_spec[1] = -20.0; @@ -131,6 +137,7 @@ class TestConstraintSet threshold_x3s_neg.time_spec[2] = 1.8; threshold_x3s_neg.time_spec[3] = 1.5; threshold_x3s_neg.violation_condition = ConstraintEnum::GT; + threshold_x3s_neg.name = "x3s_neg"; threshold_x5s.threshold_spec[0] = 10.0; threshold_x5s.threshold_spec[1] = 20.0; @@ -141,6 +148,7 @@ class TestConstraintSet threshold_x5s.time_spec[2] = 0.3; threshold_x5s.time_spec[3] = 0.1; threshold_x5s.violation_condition = ConstraintEnum::GT; + threshold_x5s.name = "x5s"; interval_x2t.tests[0].lower_bound = 10.0; interval_x2t.tests[0].upper_bound = 20.0; @@ -149,6 +157,7 @@ class TestConstraintSet interval_x2t.tests[0].time_limit = 0.5; interval_x2t.tests[1].time_limit = 0.8; interval_x2t.violation_condition = ConstraintEnum::In; + interval_x2t.name = "x2t"; interval_x2t_neg.tests[0].lower_bound = -20.0; interval_x2t_neg.tests[0].upper_bound = -10.0; @@ -157,6 +166,7 @@ class TestConstraintSet interval_x2t_neg.tests[0].time_limit = 0.5; interval_x2t_neg.tests[1].time_limit = 0.8; interval_x2t_neg.violation_condition = ConstraintEnum::In; + interval_x2t_neg.name = "x2t_neg"; interval_i2t.tests[0].lower_bound = 10; interval_i2t.tests[0].upper_bound = 20; @@ -165,12 +175,14 @@ class TestConstraintSet interval_i2t.tests[0].time_limit = 0.5; interval_i2t.tests[1].time_limit = 0.8; interval_i2t.violation_condition = ConstraintEnum::In; + interval_i2t.name = "i2t"; interval_x2i.tests[0].lower_bound = 10.0; interval_x2i.tests[0].upper_bound = 20.0; interval_x2i.tests[1].lower_bound = 30.0; interval_x2i.tests[1].upper_bound = 40.0; interval_x2i.violation_condition = ConstraintEnum::In; + interval_x2i.name = "x2i"; } void run_4_config() diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_i2t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_i2t.csv index 3645e13e..72859c40 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_i2t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_i2t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_i2t.violation_count {--},test.constraints.interval_i2t.violated {--},test.constraints.interval_i2t.tests[0].violation {--},test.constraints.interval_i2t.tests[1].violation {--},test.constraints.interval_i2t.tests[0].violation_timer {s},test.constraints.interval_i2t.tests[1].violation_timer {s},test.constraints.interval_i2t.test_violated_time_limit {--},test.constraints.interval_i2t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_i2t.violation_count {--},test.constraints.interval_i2t.violated {--},test.constraints.interval_i2t.tests[0].violation {--},test.constraints.interval_i2t.tests[1].violation {--},test.constraints.interval_i2t.tests[0].violation_timer {s},test.constraints.interval_i2t.tests[1].violation_timer {s},test.constraints.interval_i2t.test_violated_time_limit {s},test.constraints.interval_i2t.test_violated_index {--} 0,9,0,0,0,0, 0, 0, 0,0 0.1,9,0,0,0,0, 0, 0, 0,0 0.2,9,0,0,0,0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t.csv index 1536ed82..d55aa9ce 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t.violation_count {--},test.constraints.interval_x2t.violated {--},test.constraints.interval_x2t.tests[0].violation {--},test.constraints.interval_x2t.tests[1].violation {--},test.constraints.interval_x2t.tests[0].violation_timer {s},test.constraints.interval_x2t.tests[1].violation_timer {s},test.constraints.interval_x2t.test_violated_time_limit {--},test.constraints.interval_x2t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t.violation_count {--},test.constraints.interval_x2t.violated {--},test.constraints.interval_x2t.tests[0].violation {--},test.constraints.interval_x2t.tests[1].violation {--},test.constraints.interval_x2t.tests[0].violation_timer {s},test.constraints.interval_x2t.tests[1].violation_timer {s},test.constraints.interval_x2t.test_violated_time_limit {s},test.constraints.interval_x2t.test_violated_index {--} 0,9,0,0,0,0, 0, 0, 0,0 0.1,9,0,0,0,0, 0, 0, 0,0 0.2,9,0,0,0,0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t_neg.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t_neg.csv index 1e90129f..bf53a175 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t_neg.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_interval_x2t_neg.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t_neg.violation_count {--},test.constraints.interval_x2t_neg.violated {--},test.constraints.interval_x2t_neg.tests[0].violation {--},test.constraints.interval_x2t_neg.tests[1].violation {--},test.constraints.interval_x2t_neg.tests[0].violation_timer {s},test.constraints.interval_x2t_neg.tests[1].violation_timer {s},test.constraints.interval_x2t_neg.test_violated_time_limit {--},test.constraints.interval_x2t_neg.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t_neg.violation_count {--},test.constraints.interval_x2t_neg.violated {--},test.constraints.interval_x2t_neg.tests[0].violation {--},test.constraints.interval_x2t_neg.tests[1].violation {--},test.constraints.interval_x2t_neg.tests[0].violation_timer {s},test.constraints.interval_x2t_neg.tests[1].violation_timer {s},test.constraints.interval_x2t_neg.test_violated_time_limit {s},test.constraints.interval_x2t_neg.test_violated_index {--} 0,9,0,0,0,0, 0, 0, 0,0 0.1,9,0,0,0,0, 0, 0, 0,0 0.2,9,0,0,0,0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_i4t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_i4t.csv index 37e7a09f..84d00bd1 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_i4t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_i4t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_i4t.violation_count {--},test.constraints.threshold_i4t.violated {--},test.constraints.threshold_i4t.tests[0].violation {--},test.constraints.threshold_i4t.tests[1].violation {--},test.constraints.threshold_i4t.tests[2].violation {--},test.constraints.threshold_i4t.tests[3].violation {--},test.constraints.threshold_i4t.tests[0].violation_timer {s},test.constraints.threshold_i4t.tests[1].violation_timer {s},test.constraints.threshold_i4t.tests[2].violation_timer {s},test.constraints.threshold_i4t.tests[3].violation_timer {s},test.constraints.threshold_i4t.test_violated_time_limit {--},test.constraints.threshold_i4t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_i4t.violation_count {--},test.constraints.threshold_i4t.violated {--},test.constraints.threshold_i4t.tests[0].violation {--},test.constraints.threshold_i4t.tests[1].violation {--},test.constraints.threshold_i4t.tests[2].violation {--},test.constraints.threshold_i4t.tests[3].violation {--},test.constraints.threshold_i4t.tests[0].violation_timer {s},test.constraints.threshold_i4t.tests[1].violation_timer {s},test.constraints.threshold_i4t.tests[2].violation_timer {s},test.constraints.threshold_i4t.tests[3].violation_timer {s},test.constraints.threshold_i4t.test_violated_time_limit {s},test.constraints.threshold_i4t.test_violated_index {--} 0,9,0,0,0,0,0,0, 0.1, 0.1, 0.1, 0.1, 0,0 0.1,9,1,1,1,0,0,0, 0.2, 0.2, 0.2, 0.2, 0.2,0 0.2,9,1,1,1,0,0,0, 0.3, 0.3, 0.3, 0.3, 0.2,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s.csv index 8b7171a2..042dec1e 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s.violation_count {--},test.constraints.threshold_x3s.violated {--},test.constraints.threshold_x3s.tests[0].violation {--},test.constraints.threshold_x3s.tests[1].violation {--},test.constraints.threshold_x3s.tests[2].violation {--},test.constraints.threshold_x3s.tests[0].violation_timer {s},test.constraints.threshold_x3s.tests[1].violation_timer {s},test.constraints.threshold_x3s.tests[2].violation_timer {s},test.constraints.threshold_x3s.test_violated_time_limit {--},test.constraints.threshold_x3s.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s.violation_count {--},test.constraints.threshold_x3s.violated {--},test.constraints.threshold_x3s.tests[0].violation {--},test.constraints.threshold_x3s.tests[1].violation {--},test.constraints.threshold_x3s.tests[2].violation {--},test.constraints.threshold_x3s.tests[0].violation_timer {s},test.constraints.threshold_x3s.tests[1].violation_timer {s},test.constraints.threshold_x3s.tests[2].violation_timer {s},test.constraints.threshold_x3s.test_violated_time_limit {s},test.constraints.threshold_x3s.test_violated_index {--} 0,9,0,0,0,0,0, 0.1, 0.1, 0.1, 0,0 0.1,9,0,0,0,0,0, 0.2, 0.2, 0.2, 0,0 0.2,9,0,0,0,0,0, 0.3, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s_neg.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s_neg.csv index d4e92524..80adade1 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s_neg.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x3s_neg.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s_neg.violation_count {--},test.constraints.threshold_x3s_neg.violated {--},test.constraints.threshold_x3s_neg.tests[0].violation {--},test.constraints.threshold_x3s_neg.tests[1].violation {--},test.constraints.threshold_x3s_neg.tests[2].violation {--},test.constraints.threshold_x3s_neg.tests[0].violation_timer {s},test.constraints.threshold_x3s_neg.tests[1].violation_timer {s},test.constraints.threshold_x3s_neg.tests[2].violation_timer {s},test.constraints.threshold_x3s_neg.test_violated_time_limit {--},test.constraints.threshold_x3s_neg.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s_neg.violation_count {--},test.constraints.threshold_x3s_neg.violated {--},test.constraints.threshold_x3s_neg.tests[0].violation {--},test.constraints.threshold_x3s_neg.tests[1].violation {--},test.constraints.threshold_x3s_neg.tests[2].violation {--},test.constraints.threshold_x3s_neg.tests[0].violation_timer {s},test.constraints.threshold_x3s_neg.tests[1].violation_timer {s},test.constraints.threshold_x3s_neg.tests[2].violation_timer {s},test.constraints.threshold_x3s_neg.test_violated_time_limit {s},test.constraints.threshold_x3s_neg.test_violated_index {--} 0,9,0,0,0,0,0, 0.1, 0.1, 0.1, 0,0 0.1,9,0,0,0,0,0, 0.2, 0.2, 0.2, 0,0 0.2,9,0,0,0,0,0, 0.3, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4s.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4s.csv index 0468b8a8..74f095e3 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4s.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4s.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4s.violation_count {--},test.constraints.threshold_x4s.violated {--},test.constraints.threshold_x4s.tests[0].violation {--},test.constraints.threshold_x4s.tests[1].violation {--},test.constraints.threshold_x4s.tests[2].violation {--},test.constraints.threshold_x4s.tests[3].violation {--},test.constraints.threshold_x4s.tests[0].violation_timer {s},test.constraints.threshold_x4s.tests[1].violation_timer {s},test.constraints.threshold_x4s.tests[2].violation_timer {s},test.constraints.threshold_x4s.tests[3].violation_timer {s},test.constraints.threshold_x4s.test_violated_time_limit {--},test.constraints.threshold_x4s.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4s.violation_count {--},test.constraints.threshold_x4s.violated {--},test.constraints.threshold_x4s.tests[0].violation {--},test.constraints.threshold_x4s.tests[1].violation {--},test.constraints.threshold_x4s.tests[2].violation {--},test.constraints.threshold_x4s.tests[3].violation {--},test.constraints.threshold_x4s.tests[0].violation_timer {s},test.constraints.threshold_x4s.tests[1].violation_timer {s},test.constraints.threshold_x4s.tests[2].violation_timer {s},test.constraints.threshold_x4s.tests[3].violation_timer {s},test.constraints.threshold_x4s.test_violated_time_limit {s},test.constraints.threshold_x4s.test_violated_index {--} 0,9,0,0,0,0,0,0, 0.1, 0.1, 0.1, 0.1, 0,0 0.1,9,0,0,0,0,0,0, 0.2, 0.2, 0.2, 0.2, 0,0 0.2,9,0,0,0,0,0,0, 0.3, 0.3, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4t.csv index be5c0ea7..8b1f939d 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x4t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4t.violation_count {--},test.constraints.threshold_x4t.violated {--},test.constraints.threshold_x4t.tests[0].violation {--},test.constraints.threshold_x4t.tests[1].violation {--},test.constraints.threshold_x4t.tests[2].violation {--},test.constraints.threshold_x4t.tests[3].violation {--},test.constraints.threshold_x4t.tests[0].violation_timer {s},test.constraints.threshold_x4t.tests[1].violation_timer {s},test.constraints.threshold_x4t.tests[2].violation_timer {s},test.constraints.threshold_x4t.tests[3].violation_timer {s},test.constraints.threshold_x4t.test_violated_time_limit {--},test.constraints.threshold_x4t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4t.violation_count {--},test.constraints.threshold_x4t.violated {--},test.constraints.threshold_x4t.tests[0].violation {--},test.constraints.threshold_x4t.tests[1].violation {--},test.constraints.threshold_x4t.tests[2].violation {--},test.constraints.threshold_x4t.tests[3].violation {--},test.constraints.threshold_x4t.tests[0].violation_timer {s},test.constraints.threshold_x4t.tests[1].violation_timer {s},test.constraints.threshold_x4t.tests[2].violation_timer {s},test.constraints.threshold_x4t.tests[3].violation_timer {s},test.constraints.threshold_x4t.test_violated_time_limit {s},test.constraints.threshold_x4t.test_violated_index {--} 0,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 0.1,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 0.2,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x5s.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x5s.csv index 7367267b..8bb2387b 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x5s.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_1_constraints/log_threshold_x5s.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x5s.violation_count {--},test.constraints.threshold_x5s.violated {--},test.constraints.threshold_x5s.tests[0].violation {--},test.constraints.threshold_x5s.tests[1].violation {--},test.constraints.threshold_x5s.tests[2].violation {--},test.constraints.threshold_x5s.tests[3].violation {--},test.constraints.threshold_x5s.tests[4].violation {--},test.constraints.threshold_x5s.tests[0].violation_timer {s},test.constraints.threshold_x5s.tests[1].violation_timer {s},test.constraints.threshold_x5s.tests[2].violation_timer {s},test.constraints.threshold_x5s.tests[3].violation_timer {s},test.constraints.threshold_x5s.tests[4].violation_timer {s},test.constraints.threshold_x5s.test_violated_time_limit {--},test.constraints.threshold_x5s.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x5s.violation_count {--},test.constraints.threshold_x5s.violated {--},test.constraints.threshold_x5s.tests[0].violation {--},test.constraints.threshold_x5s.tests[1].violation {--},test.constraints.threshold_x5s.tests[2].violation {--},test.constraints.threshold_x5s.tests[3].violation {--},test.constraints.threshold_x5s.tests[4].violation {--},test.constraints.threshold_x5s.tests[0].violation_timer {s},test.constraints.threshold_x5s.tests[1].violation_timer {s},test.constraints.threshold_x5s.tests[2].violation_timer {s},test.constraints.threshold_x5s.tests[3].violation_timer {s},test.constraints.threshold_x5s.tests[4].violation_timer {s},test.constraints.threshold_x5s.test_violated_time_limit {s},test.constraints.threshold_x5s.test_violated_index {--} 0,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 0.1,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 0.2,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_i2t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_i2t.csv index 2717a078..71efe462 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_i2t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_i2t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_i2t.violation_count {--},test.constraints.interval_i2t.violated {--},test.constraints.interval_i2t.tests[0].violation {--},test.constraints.interval_i2t.tests[1].violation {--},test.constraints.interval_i2t.tests[0].violation_timer {s},test.constraints.interval_i2t.tests[1].violation_timer {s},test.constraints.interval_i2t.test_violated_time_limit {--},test.constraints.interval_i2t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_i2t.violation_count {--},test.constraints.interval_i2t.violated {--},test.constraints.interval_i2t.tests[0].violation {--},test.constraints.interval_i2t.tests[1].violation {--},test.constraints.interval_i2t.tests[0].violation_timer {s},test.constraints.interval_i2t.tests[1].violation_timer {s},test.constraints.interval_i2t.test_violated_time_limit {s},test.constraints.interval_i2t.test_violated_index {--} 0,9,0,0,0,0, 0.1, 0.1, 0,0 0.1,9,0,0,0,0, 0.2, 0.2, 0,0 0.2,9,0,0,0,0, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t.csv index e3b3acb7..97a956a9 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t.violation_count {--},test.constraints.interval_x2t.violated {--},test.constraints.interval_x2t.tests[0].violation {--},test.constraints.interval_x2t.tests[1].violation {--},test.constraints.interval_x2t.tests[0].violation_timer {s},test.constraints.interval_x2t.tests[1].violation_timer {s},test.constraints.interval_x2t.test_violated_time_limit {--},test.constraints.interval_x2t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t.violation_count {--},test.constraints.interval_x2t.violated {--},test.constraints.interval_x2t.tests[0].violation {--},test.constraints.interval_x2t.tests[1].violation {--},test.constraints.interval_x2t.tests[0].violation_timer {s},test.constraints.interval_x2t.tests[1].violation_timer {s},test.constraints.interval_x2t.test_violated_time_limit {s},test.constraints.interval_x2t.test_violated_index {--} 0,9,0,0,0,0, 0.1, 0.1, 0,0 0.1,9,0,0,0,0, 0.2, 0.2, 0,0 0.2,9,0,0,0,0, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t_neg.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t_neg.csv index 928279b4..5fe355d2 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t_neg.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_3_interval_outside/log_interval_x2t_neg.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t_neg.violation_count {--},test.constraints.interval_x2t_neg.violated {--},test.constraints.interval_x2t_neg.tests[0].violation {--},test.constraints.interval_x2t_neg.tests[1].violation {--},test.constraints.interval_x2t_neg.tests[0].violation_timer {s},test.constraints.interval_x2t_neg.tests[1].violation_timer {s},test.constraints.interval_x2t_neg.test_violated_time_limit {--},test.constraints.interval_x2t_neg.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.interval_x2t_neg.violation_count {--},test.constraints.interval_x2t_neg.violated {--},test.constraints.interval_x2t_neg.tests[0].violation {--},test.constraints.interval_x2t_neg.tests[1].violation {--},test.constraints.interval_x2t_neg.tests[0].violation_timer {s},test.constraints.interval_x2t_neg.tests[1].violation_timer {s},test.constraints.interval_x2t_neg.test_violated_time_limit {s},test.constraints.interval_x2t_neg.test_violated_index {--} 0,9,0,0,0,0, 0.1, 0.1, 0,0 0.1,9,0,0,0,0, 0.2, 0.2, 0,0 0.2,9,0,0,0,0, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_4_use_timer_false/log_threshold_x4t.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_4_use_timer_false/log_threshold_x4t.csv index 8268de79..d8d47bfe 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_4_use_timer_false/log_threshold_x4t.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_4_use_timer_false/log_threshold_x4t.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4t.violation_count {--},test.constraints.threshold_x4t.violated {--},test.constraints.threshold_x4t.tests[0].violation {--},test.constraints.threshold_x4t.tests[1].violation {--},test.constraints.threshold_x4t.tests[2].violation {--},test.constraints.threshold_x4t.tests[3].violation {--},test.constraints.threshold_x4t.tests[0].violation_timer {s},test.constraints.threshold_x4t.tests[1].violation_timer {s},test.constraints.threshold_x4t.tests[2].violation_timer {s},test.constraints.threshold_x4t.tests[3].violation_timer {s},test.constraints.threshold_x4t.test_violated_time_limit {--},test.constraints.threshold_x4t.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x4t.violation_count {--},test.constraints.threshold_x4t.violated {--},test.constraints.threshold_x4t.tests[0].violation {--},test.constraints.threshold_x4t.tests[1].violation {--},test.constraints.threshold_x4t.tests[2].violation {--},test.constraints.threshold_x4t.tests[3].violation {--},test.constraints.threshold_x4t.tests[0].violation_timer {s},test.constraints.threshold_x4t.tests[1].violation_timer {s},test.constraints.threshold_x4t.tests[2].violation_timer {s},test.constraints.threshold_x4t.tests[3].violation_timer {s},test.constraints.threshold_x4t.test_violated_time_limit {s},test.constraints.threshold_x4t.test_violated_index {--} 0,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 0.1,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 0.2,9,0,0,0,0,0,0, 0, 0, 0, 0, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x3s.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x3s.csv index f5135134..a4e2725a 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x3s.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x3s.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s.violation_count {--},test.constraints.threshold_x3s.violated {--},test.constraints.threshold_x3s.tests[0].violation {--},test.constraints.threshold_x3s.tests[1].violation {--},test.constraints.threshold_x3s.tests[2].violation {--},test.constraints.threshold_x3s.tests[0].violation_timer {s},test.constraints.threshold_x3s.tests[1].violation_timer {s},test.constraints.threshold_x3s.tests[2].violation_timer {s},test.constraints.threshold_x3s.test_violated_time_limit {--},test.constraints.threshold_x3s.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x3s.violation_count {--},test.constraints.threshold_x3s.violated {--},test.constraints.threshold_x3s.tests[0].violation {--},test.constraints.threshold_x3s.tests[1].violation {--},test.constraints.threshold_x3s.tests[2].violation {--},test.constraints.threshold_x3s.tests[0].violation_timer {s},test.constraints.threshold_x3s.tests[1].violation_timer {s},test.constraints.threshold_x3s.tests[2].violation_timer {s},test.constraints.threshold_x3s.test_violated_time_limit {s},test.constraints.threshold_x3s.test_violated_index {--} 0,9,0,0,0,0,0, 0.1, 0.1, 0.1, 0,0 0.1,9,0,0,0,0,0, 0.2, 0.2, 0.2, 0,0 0.2,9,0,0,0,0,0, 0.3, 0.3, 0.3, 0,0 diff --git a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x5s.csv b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x5s.csv index 868ebc5d..e5467d53 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x5s.csv +++ b/models/utilities/constraint_check/verif/SIM_verif/verif_data/RUN_5_log_interpolation/log_threshold_x5s.csv @@ -1,4 +1,4 @@ -sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x5s.violation_count {--},test.constraints.threshold_x5s.violated {--},test.constraints.threshold_x5s.tests[0].violation {--},test.constraints.threshold_x5s.tests[1].violation {--},test.constraints.threshold_x5s.tests[2].violation {--},test.constraints.threshold_x5s.tests[3].violation {--},test.constraints.threshold_x5s.tests[4].violation {--},test.constraints.threshold_x5s.tests[0].violation_timer {s},test.constraints.threshold_x5s.tests[1].violation_timer {s},test.constraints.threshold_x5s.tests[2].violation_timer {s},test.constraints.threshold_x5s.tests[3].violation_timer {s},test.constraints.threshold_x5s.tests[4].violation_timer {s},test.constraints.threshold_x5s.test_violated_time_limit {--},test.constraints.threshold_x5s.test_violated_index {--} +sys.exec.out.time {s},test.var_i {1},test.constraints.threshold_x5s.violation_count {--},test.constraints.threshold_x5s.violated {--},test.constraints.threshold_x5s.tests[0].violation {--},test.constraints.threshold_x5s.tests[1].violation {--},test.constraints.threshold_x5s.tests[2].violation {--},test.constraints.threshold_x5s.tests[3].violation {--},test.constraints.threshold_x5s.tests[4].violation {--},test.constraints.threshold_x5s.tests[0].violation_timer {s},test.constraints.threshold_x5s.tests[1].violation_timer {s},test.constraints.threshold_x5s.tests[2].violation_timer {s},test.constraints.threshold_x5s.tests[3].violation_timer {s},test.constraints.threshold_x5s.tests[4].violation_timer {s},test.constraints.threshold_x5s.test_violated_time_limit {s},test.constraints.threshold_x5s.test_violated_index {--} 0,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 0.1,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 0.2,9,0,0,0,0,0,0,0, 0, 0, 0, 0, 0, 0,0 From 53aa2f13616a4578b4b750482a6718556e579e4c Mon Sep 17 00:00:00 2001 From: Minsoo Kang Date: Thu, 1 Oct 2026 19:00:40 -0500 Subject: [PATCH 2/6] Fix return type to const, cleanup code for better readability --- .../constraint_check/include/constraint_set.hh | 2 +- .../include/constraint_test.hh | 6 +++--- .../include/constraint_test_templates.hh | 2 +- .../constraint_check/src/constraint.cc | 18 ++++++------------ .../constraint_check/src/constraint_set.cc | 7 +++++-- 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/models/utilities/constraint_check/include/constraint_set.hh b/models/utilities/constraint_check/include/constraint_set.hh index d9fc0343..fff54861 100644 --- a/models/utilities/constraint_check/include/constraint_set.hh +++ b/models/utilities/constraint_check/include/constraint_set.hh @@ -59,6 +59,6 @@ class ConstraintSet : public SubscriptionBase void update(); void activate() override; static bool constraint_disabled( const Constraint * c); - std::string & get_violated_constraints() { return violated_constraints;} + const std::string & get_violated_constraints() const { return violated_constraints;} }; #endif diff --git a/models/utilities/constraint_check/include/constraint_test.hh b/models/utilities/constraint_check/include/constraint_test.hh index 9fc70db6..4f78efb3 100644 --- a/models/utilities/constraint_check/include/constraint_test.hh +++ b/models/utilities/constraint_check/include/constraint_test.hh @@ -68,8 +68,8 @@ class ConstraintTest - {ConstraintTestTimed} and its derivatives, and - {ConstraintTest_Threshold, ConstraintTest_ThresholdTimed} respectively, and are redefined in those specfic classes.*/ - virtual double get_time_limit() { return 0.0;} - virtual double get_threshold() { return 0.0;} + virtual double get_time_limit() const { return 0.0;} + virtual double get_threshold() const { return 0.0;} void activate() {active = (initialized && enabled);} @@ -138,7 +138,7 @@ class ConstraintTestTimed : public ConstraintTest ConstraintTestTimed() = default; ~ConstraintTestTimed() override = default; - double get_time_limit() override {return time_limit;} + double get_time_limit() const override {return time_limit;} void initialize_gap_time(); void update_timer(double delta_time); }; diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index 6a3667a7..021a33dd 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -21,7 +21,7 @@ PROGRAMMERS: #include "constraint_enum.hh" #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" -#include "cml/models/utilities/math_utils/include/math_utils.hh" // MathUtils +#include "cml/models/utilities/math_utils/include/math_utils.hh" /***************************************************************************** Notes: diff --git a/models/utilities/constraint_check/src/constraint.cc b/models/utilities/constraint_check/src/constraint.cc index a57d6055..7898b726 100644 --- a/models/utilities/constraint_check/src/constraint.cc +++ b/models/utilities/constraint_check/src/constraint.cc @@ -72,7 +72,7 @@ Name: post_update void Constraint::post_update() { - bool violated_ = false; // local temporary measure of constraint status + bool new_violation_status = false; // local temporary measure of constraint status // If configured with "Any", trip on the first test that is violated; // record its index. if (violate_on_any_test) { @@ -82,7 +82,7 @@ Constraint::post_update() test_violated_index = ii; test_violated_time_limit = test_list[ii]->get_time_limit(); test_violated_threshold = test_list[ii]->get_threshold(); - violated_ = true; + new_violation_status = true; /* increment the count if this violation is not a holdover from the previous cycle (violated is the copy held over from the previous cycle). */ @@ -96,20 +96,14 @@ Constraint::post_update() // constraint violation. Start with an assumption that there is a // violation, and correct that assumption as necessary: else { - violated_ = true; - // Don't need to record which test violated, so don't need indices. - for (ConstraintTest * test : test_list) { - if (!test->get_violation()) { - violated_ = false; - break; - } - } + new_violation_status = std::all_of(test_list.begin(), test_list.end(), + [](const auto& test) {return test->get_violation();}); /* increment the count if this violation is not a holdover from the previous cycle (violated is the copy held over from the previous cycle). */ - violation_count += static_cast(violated_ && !violated); + violation_count += static_cast(new_violation_status && !violated); } - violated = violated_; + violated = new_violation_status; } /***************************************************************************** diff --git a/models/utilities/constraint_check/src/constraint_set.cc b/models/utilities/constraint_check/src/constraint_set.cc index 9f935e4e..c302c11c 100644 --- a/models/utilities/constraint_check/src/constraint_set.cc +++ b/models/utilities/constraint_check/src/constraint_set.cc @@ -53,12 +53,15 @@ ConstraintSet::update() if (!active) {return;} num_violations = 0; - violated_constraints.erase(); + violated_constraints.clear(); for (Constraint * constraint : constraints) { constraint->update(); if (constraint->violated) { num_violations++; - violated_constraints += (constraint->name + ", "); + if (!violated_constraints.empty()) { + violated_constraints += ", "; + } + violated_constraints += constraint->name; } } } From fb90b00580e0961a795e8979931652202900c658 Mon Sep 17 00:00:00 2001 From: Minsoo Kang Date: Thu, 1 Oct 2026 19:19:14 -0500 Subject: [PATCH 3/6] Fix derived methods to match the base-class declaration --- .../constraint_check/include/constraint_test_templates.hh | 2 +- .../constraint_check/include/constraint_test_timed_templates.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index 021a33dd..b5d2a7d4 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -110,7 +110,7 @@ class ConstraintTest_Threshold : public ConstraintTest * get_threshold * Purpose: Returns the threshold, cast to double, for logging purposes. ****************************************************************************/ - double get_threshold() override + double get_threshold() const override { return static_cast(threshold); } diff --git a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh index a44e8424..0bdef388 100644 --- a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh @@ -123,7 +123,7 @@ class ConstraintTest_ThresholdTimed : public ConstraintTestTimed * get_threshold * Purpose: Returns the threshold, cast to double, for logging purposes. ****************************************************************************/ - double get_threshold() override + double get_threshold() const override { return static_cast(threshold); } From 58346c7ddcd93d8bd0f34e717b37eb944b712bd8 Mon Sep 17 00:00:00 2001 From: Minsoo Kang Date: Thu, 1 Oct 2026 19:45:48 -0500 Subject: [PATCH 4/6] Add default initialization for class members, remove redundant initialization from constructor --- models/utilities/constraint_check/include/constraint.hh | 6 +++--- models/utilities/constraint_check/src/constraint.cc | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/models/utilities/constraint_check/include/constraint.hh b/models/utilities/constraint_check/include/constraint.hh index beb85108..710fd1d8 100644 --- a/models/utilities/constraint_check/include/constraint.hh +++ b/models/utilities/constraint_check/include/constraint.hh @@ -54,15 +54,15 @@ class Constraint An active constraint gets processed.*/ // the following are all outputs of constraint.cc - unsigned int test_violated_index; /* (--) + unsigned int test_violated_index{0}; /* (--) Record of which test caused the constraint to be violated. */ - double test_violated_time_limit; /* (s) + double test_violated_time_limit{0.0}; /* (s) The time-limit -- where applicable -- of (one of) the test(s) that resulted in a violation. If multiple tests result in a violation, the value recorded here is that of the lowest indexed test. If the tests do not include time limits, this value will remain 0.0 */ - double test_violated_threshold; /* (--) + double test_violated_threshold{0.0}; /* (--) The threshold -- where applicable -- of (one of) the test(s) that resulted in a violation, cast to a double for logging purposes. If multiple tests result in a violation, the value recorded here is that diff --git a/models/utilities/constraint_check/src/constraint.cc b/models/utilities/constraint_check/src/constraint.cc index 7898b726..5d72fab8 100644 --- a/models/utilities/constraint_check/src/constraint.cc +++ b/models/utilities/constraint_check/src/constraint.cc @@ -25,11 +25,7 @@ Constructor *****************************************************************************/ Constraint::Constraint( size_t num_tests_) : - test_violated_index(0), - test_violated_time_limit(0.0), - test_violated_threshold(0.0), - num_tests(num_tests_), - test_list() + num_tests(num_tests_) {} /***************************************************************************** From 0a3303562c906ee57156a80df8b3ed1253b91295 Mon Sep 17 00:00:00 2001 From: Minsoo Kang <327114246+Minsoo-Kang-space@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:40:01 -0500 Subject: [PATCH 5/6] Move dependency from header file to source file --- .../constraint_check/include/constraint_test_templates.hh | 1 - .../utilities/constraint_check/src/constraint_test_templates.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index b5d2a7d4..92c499b7 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -21,7 +21,6 @@ PROGRAMMERS: #include "constraint_enum.hh" #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" -#include "cml/models/utilities/math_utils/include/math_utils.hh" /***************************************************************************** Notes: diff --git a/models/utilities/constraint_check/src/constraint_test_templates.cc b/models/utilities/constraint_check/src/constraint_test_templates.cc index 503992ed..5a53a86a 100644 --- a/models/utilities/constraint_check/src/constraint_test_templates.cc +++ b/models/utilities/constraint_check/src/constraint_test_templates.cc @@ -10,6 +10,7 @@ *******************************************************************************/ #include "../include/constraint_test_templates.hh" +#include "cml/models/utilities/math_utils/include/math_utils.hh" /***************************************************************************** Template specializations From b5d4c3e09b12822051c4c5a2718e60708fc61e14 Mon Sep 17 00:00:00 2001 From: Minsoo Kang <327114246+Minsoo-Kang-space@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:58:17 -0500 Subject: [PATCH 6/6] Add MathUtils include back on header --- .../constraint_check/include/constraint_test_templates.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index 92c499b7..b5d2a7d4 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -21,6 +21,7 @@ PROGRAMMERS: #include "constraint_enum.hh" #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +#include "cml/models/utilities/math_utils/include/math_utils.hh" /***************************************************************************** Notes: