Skip to content

Clarification on EV spawn scaling and timescale sensitivity #27

@bumj00712

Description

@bumj00712

Hi EV2Gym developers,

First, thank you for this excellent framework — it’s been extremely helpful for my research.
Following up from Issue #26 (charging port configuration), I’m now focusing on the EV spawning behavior and how the number of generated EV profiles changes with simulation parameters.


⚙️ Setup

Here’s my configuration (YAML summary):

# EV2Gym Simulation Configuration

##############################################################################
# Simulation Parameters
##############################################################################
timescale: 15 # minutes per step
simulation_length: 96 # 96 steps = 24 hours

##############################################################################
# Date and Time
##############################################################################
year: 2019 # valid years: 2015–2023
month: 1
day: 17
random_day: True # True or False
random_hour: False # True or False
hour: 0 # simulation start hour (24-hour format)
minute: 0 # simulation start minute
simulation_days: weekdays # weekdays, weekends, or both

##############################################################################
# EV Spawn Behavior
##############################################################################
scenario: public # public, private, or workplace
spawn_multiplier: 1000 # controls EV arrivals; higher = more EVs

##############################################################################
# Prices
##############################################################################
discharge_price_factor: 1 # discharge cost multiplier vs charge

##############################################################################
# Charging Network
##############################################################################
v2g_enabled: True # enable vehicle-to-grid
number_of_charging_stations: 3
number_of_transformers: 3
number_of_ports_per_cs: 6
charging_network_topology: None # or path to JSON topology file

##############################################################################
# Power Setpoint Settings
##############################################################################
power_setpoint_enabled: False
power_setpoint_flexiblity: 80 # ± percentage flexibility

##############################################################################
# Inflexible Loads, Solar Generation, and Demand Response
##############################################################################
tr_seed: -1 # random seed for transformer loads

inflexible_loads:
include: False
inflexible_loads_capacity_multiplier_mean: 1
forecast_mean: 30
forecast_std: 5

solar_power:
include: False
solar_power_capacity_multiplier_mean: 1
forecast_mean: 20
forecast_std: 5

demand_response:
include: False
events_per_day: 1
event_capacity_percentage_mean: 35
event_capacity_percentage_std: 5
event_length_minutes_min: 60
event_length_minutes_max: 60
event_start_hour_mean: 12
event_start_hour_std: 2
notification_of_event_minutes: 60

##############################################################################
# EV Specifications
##############################################################################
heterogeneous_ev_specs: True
ev_specs_file: C:\Users\Hp\anaconda3\envs\Dynamic\Lib\site-packages\ev2gym\data\ev_specs_v2g_2025.json

##############################################################################
# Default Model Values
##############################################################################
transformer:
max_power: 250 # kW

charging_station:
min_charge_current: 0 # A
max_charge_current: 96 # A (≈ 11 kW per port × 6 ports = 66 kW per CS)
min_discharge_current: 0 # A
max_discharge_current: -96 # A
voltage: 400 # V (line-to-line)
phases: 3

ev:
battery_capacity: 50 # kWh
max_ac_charge_power: 11 # kW
min_ac_charge_power: 0 # kW
max_dc_charge_power: 50 # kW
max_discharge_power: -11 # kW
min_discharge_power: 0 # kW
ev_phases: 3
charge_efficiency: 0.95
discharge_efficiency: 0.95
transition_soc: 1.0

# Heterogeneous EV settings set to True
min_battery_capacity: 5 # kWh
min_time_of_stay: 30 # minutes
min_emergency_battery_capacity: 25 # kWh
desired_capacity: 0.8
transition_soc_multiplier: 1.0

I’m running EV2Gym inside a custom environment that follows your original ev2gym_env.py logic,
but I have not modified any of the EV2Gym source files (loaders.py, utils.py, etc.).
All tuning is done through the configuration file.


📊 Observed Results

empty_ports_end_simulation: false
spawn_multiplier timescale (min) EV profiles generated
100 15 53
200 15 56
500 15 66
1000 15 66

The number of EV profiles increases slightly with higher spawn_multiplier,
but seems to saturate beyond a certain point, and also shows sensitivity to the timescale.
(Previously, using timescale = 30, the same setup produced only ~36 EV profiles.)


❓ Questions

  1. Which parameters primarily control the number of EVs generated per episode (e.g., spawn_multiplier, min_time_of_stay, or timescale)?

  2. Is there a recommended way to scale spawn_multiplier when changing the timescale so that the EV arrival rate per day remains consistent?

  3. Does the 3-step empty-port rule or min_time_of_stay constraint cause this saturation effect?

  4. How does the flag empty_ports_end_simulation influence the total number of EVs spawned or retained?

  5. 👉 If I want to intentionally generate approximately 200 EVs per day (or 500 EVs per day), what combination of configuration parameters (without modifying code) would you recommend adjusting — for example, should I tune spawn_multiplier, min_time_of_stay, or the number of ports?


🧠 Goal

I’m trying to reproduce realistic or high-demand EV arrival scenarios (e.g., 200–500 EVs/day)
without modifying the EV2Gym source code — only through YAML configuration parameters.


🙏 Request

Could you please clarify how these parameters interact,
and how one can target a specific approximate number of EVs per day (e.g., 200 or 500)
by tuning configuration values like spawn_multiplier and min_time_of_stay?

Thank you for your time and for maintaining this great simulator!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions