citylearn.internal.entity_observations module

Populate entity observation tables and relation masks for one time boundary.

The facade owns topology-aware buffers and feature helpers. Population uses the current exogenous index and previous settled endogenous index, then sanitises buffers and returns independent copies. Fault/information masking remains in the observation contract and robustness services at their established outer stages.

class citylearn.internal.entity_observations.ObservationContext(time_step: 'int', endogenous_time_step: 'int', step_hours: 'float', core: 'bool', community: 'bool', forecast: 'bool', derived_forecast: 'bool', temporal: 'bool', action_feedback: 'bool', demand_response: 'bool', robustness: 'bool')[source]

Bases: object

action_feedback: bool
community: bool
core: bool
demand_response: bool
derived_forecast: bool
endogenous_time_step: int
forecast: bool
robustness: bool
step_hours: float
temporal: bool
time_step: int
citylearn.internal.entity_observations.context_for(entity: CityLearnEntityInterfaceService) → ObservationContext[source]
citylearn.internal.entity_observations.fill_building_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext)[source]
citylearn.internal.entity_observations.fill_charger_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.fill_deferrable_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.fill_district_row(entity: CityLearnEntityInterfaceService, context: ObservationContext, building_data)[source]
citylearn.internal.entity_observations.fill_ev_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.fill_pv_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.fill_relation_masks(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.fill_storage_rows(entity: CityLearnEntityInterfaceService, context: ObservationContext) → None[source]
citylearn.internal.entity_observations.reset_buffers(entity: CityLearnEntityInterfaceService) → None[source]
citylearn.internal.entity_observations.sanitize_tables(entity: CityLearnEntityInterfaceService) → None[source]
citylearn.internal.entity_observations.snapshot_payload(entity: CityLearnEntityInterfaceService, context: ObservationContext) → Mapping[str, Any][source]