Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Add service_level flag to powerflow meters #1162

Merged
merged 4 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/Module/Powerflow/Meter.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ GLM:
topological_parent "<string>";
phases "[ABCDNSG]";
nominal_voltage "<decimal> V";
supernode_name "<string>";
service_level "{LOW,NORMAL,HIGH,CRITICAL}";
}
~~~

Expand Down Expand Up @@ -1285,13 +1285,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

Expand Down Expand Up @@ -1435,7 +1435,7 @@ TODO
GFA_trip_method "0";
phases "0";
nominal_voltage "0.0";
supernode_name "";
service_level "NORMAL";
}
~~~

Expand Down
10 changes: 5 additions & 5 deletions docs/Module/Powerflow/Triplex_meter.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ GLM:
measured_frequency "<decimal> Hz";
phases "[ABCDNSG]";
nominal_voltage "<decimal> V";
supernode_name "<string>";
service_level {LOW,NORMAL,HIGH,CRITICAL};
}
~~~

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -1384,7 +1384,7 @@ TODO
measured_frequency "0.0";
phases "0";
nominal_voltage "0.0";
supernode_name "";
service_level "NORMAL";
}
~~~

Expand Down
8 changes: 8 additions & 0 deletions module/powerflow/meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ 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_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__);

Expand Down
6 changes: 6 additions & 0 deletions module/powerflow/meter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -42,6 +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
enumeration service_level; ///< reliability service level (LOW, NORMAL, HIGH, CRITICAL)
TIMESTAMP next_time;
TIMESTAMP dt;
TIMESTAMP last_t;
Expand Down
8 changes: 8 additions & 0 deletions module/powerflow/triplex_meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions module/powerflow/triplex_meter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down