From 837d10e143ca33cfe0ee25d97829b8b9ad726b4c Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Mon, 2 May 2022 16:11:44 -0700 Subject: [PATCH 1/3] Add is_critical flag to powerflow meter --- module/powerflow/meter.cpp | 4 ++++ module/powerflow/meter.h | 1 + 2 files changed, 5 insertions(+) diff --git a/module/powerflow/meter.cpp b/module/powerflow/meter.cpp index ce0bbe49e..0b891dc5a 100644 --- a/module/powerflow/meter.cpp +++ b/module/powerflow/meter.cpp @@ -262,6 +262,10 @@ meter::meter(MODULE *mod) : node(mod) PT_double, "third_tier_energy[kWh]", PADDR(tier_energy[2]), PT_DESCRIPTION,"switching point between second tier price and third tier price", + PT_bool, "is_critical", PADDR(is_critical), + PT_DEFAULT,"FALSE", + PT_DESCRIPTION,"indicates whether the meter is for a facility that provide critical/emergency services (used by resilience module)", + //PT_double, "measured_reactive[kVar]", PADDR(measured_reactive), has not implemented yet NULL)<1) GL_THROW("unable to publish properties in %s",__FILE__); diff --git a/module/powerflow/meter.h b/module/powerflow/meter.h index 4f3515ec9..ebe18be81 100644 --- a/module/powerflow/meter.h +++ b/module/powerflow/meter.h @@ -42,6 +42,7 @@ class meter : public node bool meter_interrupted; ///< Reliability flag - goes active if the customer is in an "interrupted" state bool meter_interrupted_secondary; ///< Reliability flag - goes active if the customer is in an "secondary interrupted" state - i.e., momentary bool meter_NR_servered; ///< Flag for NR solver, server mode (not standalone), and SWING designation + bool is_critical; ///< flag whether the facility is provide critical/emergency services (used by resilience module) TIMESTAMP next_time; TIMESTAMP dt; TIMESTAMP last_t; From 4696cd303fa8bdcc637ce1bbabf3094d85305e59 Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Mon, 2 May 2022 16:17:08 -0700 Subject: [PATCH 2/3] Update Meter.md --- docs/Module/Powerflow/Meter.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Module/Powerflow/Meter.md b/docs/Module/Powerflow/Meter.md index 14530d8a7..b6670e8ca 100644 --- a/docs/Module/Powerflow/Meter.md +++ b/docs/Module/Powerflow/Meter.md @@ -147,6 +147,7 @@ GLM: topological_parent ""; phases "[ABCDNSG]"; nominal_voltage " V"; + is_critical ; supernode_name ""; } ~~~ @@ -1293,6 +1294,14 @@ TODO TODO +### `is_critical` + +~~~ + bool is_critical; +~~~ + +This flag indicates whether the meter serves a facility that provide critical/emergency services. This is used by the resilience module to determine whether PSPS must consider the services as must-run/must-serve. + # Example ~~~ From 23c73173978c930aae282c6297185c4dbc413ea2 Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Fri, 6 May 2022 10:51:05 -0700 Subject: [PATCH 3/3] Change to service_level instead of is_critical --- docs/Module/Powerflow/Meter.md | 19 +++++-------------- docs/Module/Powerflow/Triplex_meter.md | 10 +++++----- module/powerflow/meter.cpp | 10 +++++++--- module/powerflow/meter.h | 7 ++++++- module/powerflow/triplex_meter.cpp | 8 ++++++++ module/powerflow/triplex_meter.h | 1 + 6 files changed, 32 insertions(+), 23 deletions(-) diff --git a/docs/Module/Powerflow/Meter.md b/docs/Module/Powerflow/Meter.md index b6670e8ca..5e3e5cd06 100644 --- a/docs/Module/Powerflow/Meter.md +++ b/docs/Module/Powerflow/Meter.md @@ -147,8 +147,7 @@ GLM: topological_parent ""; phases "[ABCDNSG]"; nominal_voltage " V"; - is_critical ; - supernode_name ""; + service_level "{LOW,NORMAL,HIGH,CRITICAL}"; } ~~~ @@ -1286,21 +1285,13 @@ TODO TODO -### `supernode_name` +### `service_level` ~~~ - char1024 supernode_name; + enumeration {LOW,NORMAL,HIGH,CRITICAL} service_level; ~~~ -TODO - -### `is_critical` - -~~~ - bool is_critical; -~~~ - -This flag indicates whether the meter serves a facility that provide critical/emergency services. This is used by the resilience module to determine whether PSPS must consider the services as must-run/must-serve. +This enumeration indicates whether the meter serves a facility requires a particular level of service reliability. `LOW` should be used for customers that have relatively unlimited self-generation backup. `NORMAL` should be used for customers that have typical service reliability (i.e., no backup). `HIGH` should be used for customer that need higher than normal reliability but do not provide critical life-support services or have sufficient backup to operate up to 48 hours on backup supply. `CRITICAL` should be used for customers that need high than normal reliability, provide critical life-support services, and do not have sufficient backup resources to operate 48 hours on backup supply. This is used by the resilience module to determine whether PSPS must consider the services as must-run/must-serve. # Example @@ -1444,7 +1435,7 @@ This flag indicates whether the meter serves a facility that provide critical/em GFA_trip_method "0"; phases "0"; nominal_voltage "0.0"; - supernode_name ""; + service_level "NORMAL"; } ~~~ diff --git a/docs/Module/Powerflow/Triplex_meter.md b/docs/Module/Powerflow/Triplex_meter.md index a9e3a1257..f93b4cf21 100644 --- a/docs/Module/Powerflow/Triplex_meter.md +++ b/docs/Module/Powerflow/Triplex_meter.md @@ -142,7 +142,7 @@ GLM: measured_frequency " Hz"; phases "[ABCDNSG]"; nominal_voltage " V"; - supernode_name ""; + service_level {LOW,NORMAL,HIGH,CRITICAL}; } ~~~ @@ -1239,13 +1239,13 @@ TODO TODO -### `supernode_name` +### `service_level` ~~~ - char1024 supernode_name; + enumeration {LOW,NORMAL,HIGH,CRITICAL} service_level; ~~~ -TODO +This enumeration indicates whether the meter serves a facility requires a particular level of service reliability. `LOW` should be used for customers that have relatively unlimited self-generation backup. `NORMAL` should be used for customers that have typical service reliability (i.e., no backup). `HIGH` should be used for customer that need higher than normal reliability but do not provide critical life-support services or have sufficient backup to operate up to 48 hours on backup supply. `CRITICAL` should be used for customers that need high than normal reliability, provide critical life-support services, and do not have sufficient backup resources to operate 48 hours on backup supply. This is used by the resilience module to determine whether PSPS must consider the services as must-run/must-serve. # Example @@ -1384,7 +1384,7 @@ TODO measured_frequency "0.0"; phases "0"; nominal_voltage "0.0"; - supernode_name ""; + service_level "NORMAL"; } ~~~ diff --git a/module/powerflow/meter.cpp b/module/powerflow/meter.cpp index 0b891dc5a..c18b75ad9 100644 --- a/module/powerflow/meter.cpp +++ b/module/powerflow/meter.cpp @@ -262,9 +262,13 @@ meter::meter(MODULE *mod) : node(mod) PT_double, "third_tier_energy[kWh]", PADDR(tier_energy[2]), PT_DESCRIPTION,"switching point between second tier price and third tier price", - PT_bool, "is_critical", PADDR(is_critical), - PT_DEFAULT,"FALSE", - PT_DESCRIPTION,"indicates whether the meter is for a facility that provide critical/emergency services (used by resilience module)", + PT_enumeration, "service_level", PADDR(service_level), + PT_KEYWORD,"LOW", MSL_LOW, + PT_KEYWORD,"NORMAL", MSL_NORMAL, + PT_KEYWORD,"HIGH", MSL_HIGH, + PT_KEYWORD,"CRITICAL", MSL_CRITICAL, + PT_DEFAULT,"NORMAL", + PT_DESCRIPTION,"indicates the level of service required for the customer served by this meter", //PT_double, "measured_reactive[kVar]", PADDR(measured_reactive), has not implemented yet NULL)<1) GL_THROW("unable to publish properties in %s",__FILE__); diff --git a/module/powerflow/meter.h b/module/powerflow/meter.h index ebe18be81..14c8aa34d 100644 --- a/module/powerflow/meter.h +++ b/module/powerflow/meter.h @@ -12,6 +12,11 @@ EXPORT SIMULATIONMODE interupdate_meter(OBJECT *obj, unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos); +#define MSL_LOW ((enumeration)0x00) +#define MSL_NORMAL ((enumeration)0x01) +#define MSL_HIGH ((enumeration)0x02) +#define MSL_CRITICAL ((enumeration)0x03) + class meter : public node { public: @@ -42,7 +47,7 @@ class meter : public node bool meter_interrupted; ///< Reliability flag - goes active if the customer is in an "interrupted" state bool meter_interrupted_secondary; ///< Reliability flag - goes active if the customer is in an "secondary interrupted" state - i.e., momentary bool meter_NR_servered; ///< Flag for NR solver, server mode (not standalone), and SWING designation - bool is_critical; ///< flag whether the facility is provide critical/emergency services (used by resilience module) + enumeration service_level; ///< reliability service level (LOW, NORMAL, HIGH, CRITICAL) TIMESTAMP next_time; TIMESTAMP dt; TIMESTAMP last_t; diff --git a/module/powerflow/triplex_meter.cpp b/module/powerflow/triplex_meter.cpp index 21fa05db9..9539cea65 100644 --- a/module/powerflow/triplex_meter.cpp +++ b/module/powerflow/triplex_meter.cpp @@ -115,6 +115,14 @@ triplex_meter::triplex_meter(MODULE *mod) : triplex_node(mod) PT_double, "third_tier_price[$/kWh]", PADDR(tier_price[2]),PT_DESCRIPTION,"first tier price of energy greater than third tier energy", PT_double, "third_tier_energy[kWh]", PADDR(tier_energy[2]),PT_DESCRIPTION,"price of energy on tier above second tier", + PT_enumeration, "service_level", PADDR(service_level), + PT_KEYWORD,"LOW", MSL_LOW, + PT_KEYWORD,"NORMAL", MSL_NORMAL, + PT_KEYWORD,"HIGH", MSL_HIGH, + PT_KEYWORD,"CRITICAL", MSL_CRITICAL, + PT_DEFAULT,"NORMAL", + PT_DESCRIPTION,"indicates the level of service required for the customer served by this meter", + NULL)<1) GL_THROW("unable to publish properties in %s",__FILE__); //Deltamode functions diff --git a/module/powerflow/triplex_meter.h b/module/powerflow/triplex_meter.h index ea9f891c1..de0a8bc06 100644 --- a/module/powerflow/triplex_meter.h +++ b/module/powerflow/triplex_meter.h @@ -37,6 +37,7 @@ class triplex_meter : public triplex_node complex tpmeter_power_consumption; ///< power consumed by meter operation bool tpmeter_interrupted; ///< Reliability flag - goes active if the customer is in an "interrupted" state bool tpmeter_interrupted_secondary; ///< Reliability flag - goes active if the customer is in a "secondary interrupted" state - i.e., momentary + enumeration service_level; ///< reliability service level (LOW, NORMAL, HIGH, CRITICAL) TIMESTAMP next_time; TIMESTAMP dt; TIMESTAMP last_t;