diff --git a/gsy_framework/constants_limits.py b/gsy_framework/constants_limits.py index c5527c3c..f3c7d27b 100644 --- a/gsy_framework/constants_limits.py +++ b/gsy_framework/constants_limits.py @@ -258,7 +258,13 @@ class SCMSettings: """Default settings for the community manager.""" GRID_FEES_REDUCTION = 0.28 MARKET_ALGORITHM = CoefficientAlgorithm.STATIC.value - MARKET_ALGORITHM_LIMIT = RangeLimit(1, 2) + MARKET_ALGORITHM_LIMIT = RangeLimit(1, 3) + + +def is_no_community_self_consumption() -> bool: + """Check whether the SCM mode is set to no-community-self-consumption.""" + return (ConstSettings.SCMSettings.MARKET_ALGORITHM == + CoefficientAlgorithm.NO_COMMUNITY_SELF_CONSUMPTION.value) class GlobalConfig: diff --git a/gsy_framework/enums.py b/gsy_framework/enums.py index eed54bae..b2c445c7 100644 --- a/gsy_framework/enums.py +++ b/gsy_framework/enums.py @@ -24,6 +24,7 @@ class CoefficientAlgorithm(Enum): STATIC = 1 DYNAMIC = 2 + NO_COMMUNITY_SELF_CONSUMPTION = 3 class CloudCoverage(Enum): diff --git a/gsy_framework/schema/avro_schemas/simulation_state.json b/gsy_framework/schema/avro_schemas/simulation_state.json index 2f79d9e2..d998d709 100644 --- a/gsy_framework/schema/avro_schemas/simulation_state.json +++ b/gsy_framework/schema/avro_schemas/simulation_state.json @@ -239,6 +239,44 @@ } ] }, + { + "name": "SmartMeterAreaStats", + "type": "record", + "fields": [ + { + "name": "current_tick", + "type": [ + "null", + "int" + ] + }, + { + "name": "energy_production_forecast_kWh", + "type": { + "type": "map", + "values": "float" + } + }, + { + "name": "available_energy_kWh", + "type": { + "type": "map", + "values": "float" + } + }, + { + "name": "desired_energy_Wh", + "type": { + "type": "map", + "values": "float" + } + }, + { + "name": "total_energy_demanded_Wh", + "type": "float" + } + ] + }, { "name": "StorageAreaStats", "type": "record",