evnrg.common package¶
Submodules¶
evnrg.common.bank module¶
-
class
evnrg.common.bank.QueueMode[source]¶ Bases:
enum.IntEnumAn enumeration.
-
DEFAULT= 1¶
-
RANDOM= 3¶
-
RSOC= 6¶
-
RTIME= 7¶
-
SOC= 4¶
-
STACK= 2¶
-
TIME= 5¶
-
-
class
evnrg.common.bank.Bank(max_power: float = 0.0, capacity: float = 0.0, queue_probability: float = 1.0, dynamic_size: bool = False, queue_mode: evnrg.common.bank.QueueMode = <QueueMode.DEFAULT: 1>, evse: list = [], demand_profile: numpy.array = array([], dtype=float64), occupancy_profile: numpy.array = array([], dtype=float64))[source]¶ Bases:
object-
available_evse¶
-
capacity¶
-
demand_profile¶
-
disconnect_completed_vehicles(idx: int)[source]¶ Disconnects any vehicles that are effectively done charging.
-
dynamic_size¶
-
max_power¶
-
num_available¶
-
num_occupied¶
-
num_operating¶
-
occupancy¶
-
occupancy_profile¶
-
occupied_evse¶
-
pct_capacity¶
-
process_queue()[source]¶ Checks each EVSE in the bank. If the EVSE is not connected to a vehicle, dequeue one and connect it.
-
queue¶
-
queue_mode¶
-
queue_probability¶
-
size¶
-
total_demand¶
-
evnrg.common.evse module¶
-
class
evnrg.common.evse.EVSE(model: evnrg.common.evse.EVSEType = EVSEType(max_power=0.0, dc=False, max_soc=1.0, dc_plugs=(None, ), v2g_buffer=0.2, v2g_capable=False))[source]¶ Bases:
object-
charge_completed¶
-
demand¶
-
is_available¶
-
is_connected¶
-
-
class
evnrg.common.evse.EVSEType(max_power, dc, max_soc, dc_plugs, v2g_buffer, v2g_capable)[source]¶ Bases:
tuple-
dc¶ Alias for field number 1
-
dc_plugs¶ Alias for field number 3
-
max_power¶ Alias for field number 0
-
max_soc¶ Alias for field number 2
-
v2g_buffer¶ Alias for field number 4
-
v2g_capable¶ Alias for field number 5
-
evnrg.common.fuel module¶
-
class
evnrg.common.fuel.Fuel[source]¶ Bases:
tupleA NamedTuple that holds numeric values relevant to a fuel.
Parameters: - gwp (float) – Gloabl warming potential (CO2e) in kg/L.
- ( (id) – obj: str, optional): Short description (i.e. “E10”).
- to an empty string (Defaults) –
-
gwp¶ Gloabl warming potential (CO2e) in kg/L.
Type: float
-
id¶ A short code describing the fuel.
Type: str
-
code¶ Alias for field number 1
-
gwp Alias for field number 0
evnrg.common.plug module¶
evnrg.common.powertrain module¶
-
class
evnrg.common.powertrain.PType[source]¶ Bases:
enum.IntEnumConstants that refer to the type of drive.
Valid values are: * ICEV: Conventional combustion and hybrids
(i.e. Honda Civic, Toyota Prius)- PHEV: Plug-in hybrids (i.e. Chevrolet Volt)
- BEV: Battery electric vehicles (i.e. Tesla Model 3)
-
BEV= 3¶
-
ICEV= 1¶
-
PHEV= 2¶
-
class
evnrg.common.powertrain.Powertrain[source]¶ Bases:
tupleA NamedTuple that contains information about the powertrain of a vehicle.
Since the powertrain technical info is all that’s needed for the simulation; make and model information don’t really matter.
However, a code (optional) is useful to keep track of what powertrain has been used.
- Attrributes:
id (str): A short code useful for looking up the object in a database. ice_eff (float): Fuel efficiency of the powertrain in km/L. ev_eff (float): Electric efficiency in km/kWh. batt_cap (float): Energy capacity of the battery in kWh. ac_power (float): Maximum input AC power in kW. dc_power (float): Maximum input DC power in kW. dc_plug (int): Connector type for DCFC. ptype (int): Type of powertrain as represented by a PType.
Values may be of PType.ICEV, PType.PHEV, or PType.BEV.- fuel (Fuel): The fuel that this powertrain uses. May be None
- if ptype is PType.BEV.
-
ac_capable¶ Returns True if the powertrain can accept DC connections.
-
ac_power¶ Alias for field number 4
-
batt_cap¶ Alias for field number 3
-
bev¶ Returns True if the vehicle is a BEV
-
dc_capable¶ Returns True if the powertrain can accept AC conenctions.
-
dc_plug¶ Alias for field number 6
-
dc_power¶ Alias for field number 5
-
ev_eff¶ Alias for field number 2
-
fuel¶ Alias for field number 8
-
has_ice¶ Returns True there’s a fuel-powered engine (ICEV or PHEV)
-
ice_eff¶ Alias for field number 1
-
icev¶ Returns True if the powertrain is a conventional ICEV/HEV
-
id¶ Alias for field number 0
-
pev¶ Returns True if the powertrain is a plug-in(BEV or PHEV)
-
phev¶ Returns True if the the powertrain is a PHEV.
-
ptype¶ Alias for field number 7
evnrg.common.scenario module¶
-
class
evnrg.common.scenario.Scenario(powertrains, distribution, dataset_id, obj_path, run_id, home_threshold_min, away_threshold_min, soc_deferrment_buffer, home_mask_rules)[source]¶ Bases:
tuple-
away_banks= [{'probability': 0.1, 'evse': [EVSEType(max_power=50, dc=True, max_soc=0.8, dc_plugs=(<DCPlug.CHADEMO: 1>, <DCPlug.COMBO: 2>), v2g_buffer=0.2, v2g_capable=False)]}, {'probability': 0.2, 'evse': [EVSEType(max_power=7.0, dc=False, max_soc=1.0, dc_plugs=(None,), v2g_buffer=0.2, v2g_capable=False)]}]¶
-
away_threshold_min¶ Alias for field number 6
-
dataset_id¶ Alias for field number 2
-
distribution¶ Alias for field number 1
-
home_banks= [{'probability': 1.0, 'queue': <QueueMode.DEFAULT: 1>, 'evse': [EVSEType(max_power=7, dc=False, max_soc=1.0, dc_plugs=(None,), v2g_buffer=0.2, v2g_capable=False), EVSEType(max_power=7, dc=False, max_soc=1.0, dc_plugs=(None,), v2g_buffer=0.2, v2g_capable=False), EVSEType(max_power=6, dc=False, max_soc=1.0, dc_plugs=(None,), v2g_buffer=0.2, v2g_capable=False), EVSEType(max_power=6, dc=False, max_soc=1.0, dc_plugs=(None,), v2g_buffer=0.2, v2g_capable=False)]}]¶
-
home_mask_rules¶ Alias for field number 8
-
home_threshold_min¶ Alias for field number 5
-
obj_path¶ Alias for field number 3
-
powertrains¶ Alias for field number 0
-
run_id¶ Alias for field number 4
-
soc_deferrment_buffer¶ Alias for field number 7
-