citylearn.internal.runtime module

class citylearn.internal.runtime.CityLearnRuntimeService(env: CityLearnEnv)[source]

Bases: object

Internal runtime orchestration for CityLearnEnv.

associate_chargers_to_electric_vehicles()[source]

Associate charger to its corresponding EV based on charger simulation state.

next_time_step()[source]

Advance all buildings to next time_step.

parse_actions(actions) List[Mapping[str, float]][source]

Return mapping of action name to action value for each building.

simulate_unconnected_ev_soc()[source]

Simulate SOC changes for EVs that are not under charger control at t+1.

step(actions)[source]

Apply actions, update env variables/reward, then advance time.

step_many(action, repeat_steps: int = 1, stop_on_done: bool = True, return_substeps: bool = False)[source]

Apply one action over multiple internal simulator steps.

step_without_feedback(actions)[source]

Apply actions and advance state without reward, observation or info output.

This is used by internal sidecar rollouts whose policy reads state directly from the environment and whose outputs are only evaluated after rollout.

update_variables()[source]

Update district aggregate series from current building states.