citylearn.electric_vehicle module

class citylearn.electric_vehicle.ElectricVehicle(episode_tracker: EpisodeTracker, battery: Battery = None, name: str = None, **kwargs)[source]

Bases: Environment

as_dict() dict[source]

Return a dictionary representation of the current state for use in rendering or logging.

property battery: Battery

Battery for Electric_Vehicle.

property name: str

Unique building name.

next_time_step() Mapping[int, str][source]

Advance to next time_step value.

Notes

Override in subclass for custom implementation when advancing to next time_step.

observations() Mapping[str, float][source]

Observations at current time step.

Return type:

observations

render_simulation_end_data() dict[source]

Return a dictionary containing all simulation data across all time steps. The returned dictionary is structured with a general simulation name and, for each time step, a dictionary with the simulation data and battery data.

Returns:

result – A JSON-like dictionary with the simulation name and per-time-step data.

Return type:

dict

reset()[source]

Reset the EVCar to its initial state.