champpy.ChargingProfiles¶
The ChargingProfiles class is a wrapper class that integrates three interconnected data components for managing charging profiles.
These three components are instances of ChargingTimeseries, ElectricVehicles, and Clusters.
Each component contains a DataFrame that holds the data for that component.
The components are linked via IDs, ensuring data consistency and enabling seamless workflows for analyzing and modifying the data.
The structure is as follows:
ChargingProfiles
├── charging_timeseries # Charging data for each timestep
│ └── df # DataFrame with one row for each timestep and vehicle
├── vehicles # Information of the vehicles
│ └── df # DataFrame with one row for each vehicle
└── clusters # Groups of vehicles with similar behaviour
└── df # DataFrame with one row for each cluster
- class champpy.ChargingProfiles(charging_array, vehicles, clusters)[source]¶
Wrapper class for charging data in the champpy framework. It contains instances of the following classes:
ChargingTimeseries,ElectricVehicles,Clusters. This class is genereated by theChargingModelclass. Don’t instantiate it directly.- charging_timeseries¶
Contains the charging data for each vehicle over time.
- Type:
- vehicles¶
Contains vehicle-specific data about each vehicle, such as its first and last day of activity, cluster assignment, battery capacity, max. charging power etc. It is connected to logbooks via id_vehicle.
- Type:
- class champpy.ChargingTimeseries(charging_array)[source]¶
Class to hold charging profiles as a DataFrame.
Each row corresponds to a time step and a vehicle and contains information about charging status, energy consumption, energy stored, charging power, and missing energy.
The DataFrame (accessible via the df property) contains the following columns:
Column
Type
Description
id_vehicle
Vehicle identifier.
datetime
Date and time of the time step.
connected
Boolean indicating whether the vehicle is connected to a charging station at the given time step.
energy_consumption_kwh
Energy consumption in kWh at the given time step.
energy_stored_kwh
Energy stored in the battery in kWh at the given time step.
power_charging_kw
Charging power in kW at the given time step.
energy_missing_kwh
Energy in kWh that is missing at the given time step (i.e., energy that should have been charged but was not because the vehicle was not connected).
- property df¶
Return a copy of the DataFrame containing the charging timeseries data.
- class champpy.ElectricVehicles(vehicles_data, user_params)[source]¶
Electric vehicle component extending
Vehicles.This class is based on the vehicles contained in
MobProfilesand adds charging-related parameters required for charging profile calculations.The DataFrame (accessible via the
dfproperty) contains all columns fromVehiclesplus additional charging-related parameters:Column
Type
Description
id_vehicle
Vehicle identifier.
first_day
First recorded day of the vehicle.
last_day
Last recorded day of the vehicle.
id_cluster
Cluster assignment.
first_loc
First location of the vehicle.
energy_consumption_kwh_per_km
Energy consumption per kilometer in kWh/km.
battery_capacity_kwh
Battery capacity in kWh.
charging_power_max_kw
Maximum charging power in kW.
efficiency_charging
Charging efficiency (0-1).
soc_min
Minimum state of charge (0-1).
soc_min_dep
Minimum state of charge at departure (0-1).