citylearn.internal.demand_response module
- class citylearn.internal.demand_response.CityLearnDemandResponseService(env: CityLearnEnv)[source]
Bases:
objectDataset-driven demand response requests and settlement.
- DEFAULT_BASELINE_METHOD = 'rolling_pre_event_average'
- DEFAULT_BASELINE_WINDOW_SECONDS = 3600.0
- DIRECTION_CODES = {'down': -1.0, 'up': 1.0}
- ISSUER_CODES = {'dso': 1.0, 'tso': 2.0}
- observation_values() Mapping[str, float][source]
Return current active DR fields for entity district observations.
- property requests: Sequence[DemandResponseRequest]
- settle_current_time_step()[source]
Measure and settle the current step after physical variables are updated.
- property settlement_history: Sequence[Mapping[str, Any]]
- class citylearn.internal.demand_response.DemandResponseRequest(request_id: str, issuer: str, direction: str, start_time_step: int, end_time_step: int, target_power_kw: float, activation_price_eur_per_kwh: float, shortfall_penalty_eur_per_kwh: float, tolerance_power_kw: float, order: int)[source]
Bases:
objectCanonical demand-response request loaded from a dataset file.
- activation_price_eur_per_kwh: float
- direction: str
- end_time_step: int
- issuer: str
- order: int
- request_id: str
- shortfall_penalty_eur_per_kwh: float
- start_time_step: int
- target_power_kw: float
- tolerance_power_kw: float