ev2gym


Nameev2gym JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryA realistic V2G simulator environment
upload_time2024-11-13 15:55:34
maintainerNone
docs_urlNone
authorStavros Orfanoudakis
requires_python>=3.6
licenseNone
keywords gym reinforcement learning v2x v2g g2v evs ev2gym electric vehicles electric vehicle simulator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# EV2Gym: A Realistic EV-V2G-Gym Simulator for EV Smart Charging

<div align="center">
<img align="center" src="https://github.com/StavrosOrf/EV2Gym/assets/17108978/86e921ad-d711-4dbb-b7b9-c69dee20da11" width="55%"/>
</div>

[![Python 3.6](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/release/python-360/) [![PyPI](https://img.shields.io/pypi/v/ev2gym.svg)](https://pypi.org/project/ev2gym/) ![License](https://img.shields.io/github/license/AI4Finance-Foundation/finrl.svg?color=brightgreen)
---

Develop and evaluate **any type of smart charging algorithm**: from simple heuristics, Model Predictive Control, Mathematical Programming, to Reinforcement Learning!

EV2Gym is **fully customizable** and easily **configurable**!

The EV2Gym **Paper** can be found at: [link](https://arxiv.org/abs/2404.01849).

The developed MPC algorithms **Paper** can be found at: [link](https://arxiv.org/abs/2405.11963).

## Installation

Install the package using pip:
```bash
pip install ev2gym
```

 Run the example code below to get started ...
```python
from ev2gym.models.ev2gym_env import EV2Gym
from ev2gym.baselines.mpc.V2GProfitMax import V2GProfitMaxOracle
from ev2gym.baselines.heuristics import ChargeAsFastAsPossible

config_file = "ev2gym/example_config_files/V2GProfitPlusLoads.yaml"

# Initialize the environment
env = EV2Gym(config_file=config_file,
              save_replay=True,
              save_plots=True)
state, _ = env.reset()
agent = V2GProfitMaxOracle(env,verbose=True) # optimal solution
#        or 
agent = ChargeAsFastAsPossible() # heuristic
for t in range(env.simulation_length):
    actions = agent.get_action(env) # get action from the agent/ algorithm
    new_state, reward, done, truncated, stats = env.step(actions)  # takes action

```
- ### For Reinforcement Learning:
To train an RL agent, using the [StableBaselines3](https://stable-baselines3.readthedocs.io/en/master/) library, you can use the following code:
```python
import gymnasium as gym
from stable_baselines3 import PPO, A2C, DDPG, SAC, TD3
from sb3_contrib import TQC, TRPO, ARS, RecurrentPPO

from ev2gym.models.ev2gym_env import EV2Gym
# Choose a default reward function and state function or create your own!!!
from ev2gym.rl_agent.reward import profit_maximization, SquaredTrackingErrorReward, ProfitMax_TrPenalty_UserIncentives
from ev2gym.rl_agent.state import V2G_profit_max, PublicPST, V2G_profit_max_loads

config_file = "ev2gym/example_config_files/V2GProfitPlusLoads.yaml"
env = gym.make('EV2Gym-v1',
                config_file=config_file,
                reward_function=reward_function,
                state_function=state_function)
# Initialize the RL agent
model = DDPG("MlpPolicy", env)
# Train the agent
model.learn(total_timesteps=1_000_000,
            progress_bar=True)
# Evaluate the agent
env = model.get_env()
obs = env.reset()
stats = []
for i in range(1000):
    action, _states = model.predict(obs, deterministic=True)
    obs, reward, done, info = env.step(action)

    if done:
        stats.append(info)
```
!!! You can develop your own reward and state functions and use them in the environment.


## Table of Contents

- [Installation](#Installation)
- [Overview](#Overview)
- [Configuration File](#Configuration-File)
- [File Structure](#File-Structure)
- [Citing](#Citing-EV2Gym)
- [License](#License)
- [Contributing](#Contributing)

<!-- Bullet points with all the benefits -->
## Overview

![EV2Gym](https://github.com/StavrosOrf/EV2Gym/assets/17108978/4695efa7-5c92-4118-9470-4cd16d262cf9)

- The simulator can be used to evaluate any type of algorithm to gain insights into its efficiency.
- The “gym environment” can readily support the development of RL algorithms.
- Replays of simulations are saved and can be solved optimally using the Gurobi Solver.
- Easy to incorporate additional functionality for any use-case.
- Does not simulate the grid yet, but groups EV chargers at the level of the transformer/ parking lot, etc, so extra functionality can be easily added.
- The number and the topology of Transformers, Charging stations, and Electric Vehicles are parameterizable.
- The user can import custom data.
- Uses only open-source data:
  - EV spawn rate, time of stay, and energy required are based on realistic probability distributions *ElaadNL* conditioned on time, day, month and year.
  - *Pecan Street* data is used for the load profiles.
  - *Renewables Ninja* data is used for the PV generation profiles.
  - EV and Charger characteristics are based on real EVs and chargers existing in NL (*RVO Survey*).
  - Charging/ Discharging prices are based on historical day-ahead prices from *ENTSO-e*.

Focused on **realistic** parameters and **fully customizable**:

- **Power Transformer** model:
  - Max Power Limit
  - Inflexible Loads, PV, Capacity Reduction events
- **Charging Stations** model:
  - Min and Max charge/discharge power/ Current
  - Voltage and phases, AC or DC
  - List of connected transformers
- **Electric Vehicle** model:
  - Connected charging station and port
  - Min and Max battery energy level
  - Time of arrival and departure
  - Energy at arrival/ desired energy at departure
  - Min and Max power levels
  - Charge and discharge efficiency
  - Constant-Current/ Constant-Voltage load-curve option
- **Battery Degradation** model:
  - Cyclic aging
  - Calendar aging


<div align="center">
<img align="center" src="https://github.com/StavrosOrf/EV2Gym/assets/17108978/d15d258c-b454-498c-ba7f-634d858df3a6" width="90%"/>
</div>

An EV2Gym simulation comprises three phases: the configuration phase, which initializes the models; the simulation phase, which spans $T$ steps, during which the state of models like EVs and charging stations is updated according to the decision-making algorithm; and finally, in the last phase, the simulator generates evaluation metrics for comparisons, produces replay files for reproducibility, and generates real-time renders for evaluation.

## Configuration File

The configuration file is used to set the parameters of the simulation. The configuration file is a YAML file that contains the following parameters:
```yaml
##############################################################################
# Simulation Parameters
##############################################################################
timescale: 15 # in minutes per step
simulation_length: 96 #90 # in steps per simulation

##############################################################################
# Date and Time
##############################################################################
# Year, month, 
year: 2022 # 2015-2023
month: 1 # 1-12
day: 17 # 1-31
# Whether to get a random date every time the environment is reset
random_day: False # True or False
# Simulation Starting Hour and minute do not change after the environment has been reset
hour: 12 # Simulation starting hour (24 hour format)
minute: 0 # Simulation starting minute (0-59)
# Simulate weekdays, weekends, or both
simulation_days: both # weekdays, weekends, or both
# EV Spawn Behavior
scenario: public # public, private, or workplace
spawn_multiplier: 10 # 1 is default, the higher the number the more EVs spawn

##############################################################################
# Prices
##############################################################################
discharge_price_factor: 1.2 # how many times more abs(expensive/cheaper) it is to discharge than to charge

##############################################################################
# Charging Network
##############################################################################
v2g_enabled: True # True or False
number_of_charging_stations: 15
number_of_transformers: 3
number_of_ports_per_cs: 2
# Provide path if you want to load a specific charging topology,
# else write None for a randomized one with the above parameters
charging_network_topology: None #./config_files/charging_topology_10.json

##############################################################################
# Power Setpoints Settings
##############################################################################
# How much the power setpoints can vary in percentage compared to the nominal power
# The higher the number the easier it is to meet the power setpoints, the opposite for negative numbers
power_setpoint_flexiblity: 20 # (in percentage +/- %)

##############################################################################
# Inflexible Loads, Solar Generation, and Demand Response
##############################################################################
# Whether to include inflexible loads in the transformer power limit, such as residential loads
tr_seed: -1 # Seed for the transformer loads, -1 for random

inflexible_loads:
  include: False # True or False
  inflexible_loads_capacity_multiplier_mean: 0.8 # 1 is default, the higher the number the more inflexible loads
  forecast_mean: 100 # in percentage of load at time t%
  forecast_std: 0 # in percentage of load at time t%

# PV solar Power
solar_power:
  include: False # True or False
  solar_power_capacity_multiplier_mean: 2 # 1 is default, the higher the number the more solar power
  forecast_mean: 100 # in percentage of load at time t%
  forecast_std: 0 # in percentage of load at time t%

# Whether to include demand response in the transformer power limit
demand_response:
  include: False # True or False
  events_per_day: 1
  #How much of the transformer power limit can be used for demand response
  event_capacity_percentage_mean: 25 # (in percentage +/- %)
  event_capacity_percentage_std: 5 # (in percentage +/- %)
  event_length_minutes_min: 60
  event_length_minutes_max: 60
  event_start_hour_mean: 18
  event_start_hour_std: 2
  # How many minutes ahead we know the event is going to happen
  notification_of_event_minutes: 15

##############################################################################
# EV Specifications
##############################################################################
heterogeneous_ev_specs: False #if False, each EV has the same specifications
# such as battery capacity, charging rate, etc.

##############################################################################
# Default Model values
##############################################################################
# These values are used if not using a charging network topology file or 
# if the EV specifications are not provided

# Default Transformer model
transformer:
  max_power: 100 # in kW
# Default Charging Station model
charging_station:  
  min_charge_current: 0 # Amperes
  max_charge_current: 56 # Amperes
  min_discharge_current: 0 # Amperes
  max_discharge_current: -56 # Amperes
  voltage: 230 # Volts
  phases: 3 # 1,2, or 3
# Default EV model
ev:
  battery_capacity: 50 # in kWh
  min_battery_capacity: 10 # in kWh
  desired_capacity: 40 # in kWh
  max_ac_charge_power: 22 # in kW
  min_ac_charge_power: 0 # in kW
  max_dc_charge_power: 50 # in kW
  max_discharge_power: -22 # in kW
  min_discharge_power: 0 # in kW
  ev_phases: 3
  transition_soc: 1 # 0-1 (0% - 100%)
  charge_efficiency: 1 # 0-1 (0% - 100%)
  discharge_efficiency: 1 # 0-1 (0% - 100%)
  min_time_of_stay: 120 # in minutes
```

## File Structure
The file structure of the EV2Gym package is as follows:
```bash
├── ev2gym
│   ├── baselines
│   │   ├── gurobi_models/
│   │   ├── mpc/
│   │   ├── heuristics.py
│   ├── data/
│   ├── models
│   │   ├── ev2gym_env.py
│   │   ├── ev.py
│   │   ├── transformer.py
│   │   ├── ev_charger.py
│   │   ├── replay.py
│   │   ├── grid.py
│   ├── rl_agent
│   │   ├── reward.py
│   │   ├── state.py
│   ├── utilities
│   │   ├── loaders.py
│   │   ├── utils.py
│   │   ├── arg_parser.py
│   ├── example_config_files
│   │   ├── BusinessPST.yaml
│   │   ├── PublicPST.yaml
│   │   ├── V2GProfitPlusLoads.yaml
│   ├── visuals
│   │   ├── plots.py
│   │   ├── renderer.py
│   ├── scripts/
```

Class Diagram of the EV2Gym Environment:
<div align="center">
<img align="center" src="https://github.com/StavrosOrf/EV2Gym/assets/17108978/8ca5bf11-6ed4-44f6-9faf-386382609af1" width="55%"/>
</div>

## Citing EV2Gym

If you use this code in your research, please cite as:
```bibtex
@misc{orfanoudakis2024ev2gym,
      title={EV2Gym: A Flexible V2G Simulator for EV Smart Charging Research and Benchmarking}, 
      author={Stavros Orfanoudakis and Cesar Diaz-Londono and Yunus E. Yılmaz and Peter Palensky and Pedro P. Vergara},
      year={2024},
      eprint={2404.01849},
      archivePrefix={arXiv}
}
```

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.


## Contributing

EV2Gym is an open-source project and welcomes contributions! Please get in contact with us if you would like to discuss about the simulator.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ev2gym",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "gym, Reinforcement Learning, V2X, V2G, G2V, EVs, ev2gym, Electric Vehicles, Electric Vehicle Simulator",
    "author": "Stavros Orfanoudakis",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5c/05/591a7554220511d95a6ec778b17366fd58408a505672150cdc4af761fdd7/ev2gym-1.1.0.tar.gz",
    "platform": null,
    "description": "\r\n# EV2Gym: A Realistic EV-V2G-Gym Simulator for EV Smart Charging\r\n\r\n<div align=\"center\">\r\n<img align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/86e921ad-d711-4dbb-b7b9-c69dee20da11\" width=\"55%\"/>\r\n</div>\r\n\r\n[![Python 3.6](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/release/python-360/) [![PyPI](https://img.shields.io/pypi/v/ev2gym.svg)](https://pypi.org/project/ev2gym/) ![License](https://img.shields.io/github/license/AI4Finance-Foundation/finrl.svg?color=brightgreen)\r\n---\r\n\r\nDevelop and evaluate **any type of smart charging algorithm**: from simple heuristics, Model Predictive Control, Mathematical Programming, to Reinforcement Learning!\r\n\r\nEV2Gym is **fully customizable** and easily **configurable**!\r\n\r\nThe EV2Gym **Paper** can be found at: [link](https://arxiv.org/abs/2404.01849).\r\n\r\nThe developed MPC algorithms **Paper** can be found at: [link](https://arxiv.org/abs/2405.11963).\r\n\r\n## Installation\r\n\r\nInstall the package using pip:\r\n```bash\r\npip install ev2gym\r\n```\r\n\r\n Run the example code below to get started ...\r\n```python\r\nfrom ev2gym.models.ev2gym_env import EV2Gym\r\nfrom ev2gym.baselines.mpc.V2GProfitMax import V2GProfitMaxOracle\r\nfrom ev2gym.baselines.heuristics import ChargeAsFastAsPossible\r\n\r\nconfig_file = \"ev2gym/example_config_files/V2GProfitPlusLoads.yaml\"\r\n\r\n# Initialize the environment\r\nenv = EV2Gym(config_file=config_file,\r\n              save_replay=True,\r\n              save_plots=True)\r\nstate, _ = env.reset()\r\nagent = V2GProfitMaxOracle(env,verbose=True) # optimal solution\r\n#        or \r\nagent = ChargeAsFastAsPossible() # heuristic\r\nfor t in range(env.simulation_length):\r\n    actions = agent.get_action(env) # get action from the agent/ algorithm\r\n    new_state, reward, done, truncated, stats = env.step(actions)  # takes action\r\n\r\n```\r\n- ### For Reinforcement Learning:\r\nTo train an RL agent, using the [StableBaselines3](https://stable-baselines3.readthedocs.io/en/master/) library, you can use the following code:\r\n```python\r\nimport gymnasium as gym\r\nfrom stable_baselines3 import PPO, A2C, DDPG, SAC, TD3\r\nfrom sb3_contrib import TQC, TRPO, ARS, RecurrentPPO\r\n\r\nfrom ev2gym.models.ev2gym_env import EV2Gym\r\n# Choose a default reward function and state function or create your own!!!\r\nfrom ev2gym.rl_agent.reward import profit_maximization, SquaredTrackingErrorReward, ProfitMax_TrPenalty_UserIncentives\r\nfrom ev2gym.rl_agent.state import V2G_profit_max, PublicPST, V2G_profit_max_loads\r\n\r\nconfig_file = \"ev2gym/example_config_files/V2GProfitPlusLoads.yaml\"\r\nenv = gym.make('EV2Gym-v1',\r\n                config_file=config_file,\r\n                reward_function=reward_function,\r\n                state_function=state_function)\r\n# Initialize the RL agent\r\nmodel = DDPG(\"MlpPolicy\", env)\r\n# Train the agent\r\nmodel.learn(total_timesteps=1_000_000,\r\n            progress_bar=True)\r\n# Evaluate the agent\r\nenv = model.get_env()\r\nobs = env.reset()\r\nstats = []\r\nfor i in range(1000):\r\n    action, _states = model.predict(obs, deterministic=True)\r\n    obs, reward, done, info = env.step(action)\r\n\r\n    if done:\r\n        stats.append(info)\r\n```\r\n!!! You can develop your own reward and state functions and use them in the environment.\r\n\r\n\r\n## Table of Contents\r\n\r\n- [Installation](#Installation)\r\n- [Overview](#Overview)\r\n- [Configuration File](#Configuration-File)\r\n- [File Structure](#File-Structure)\r\n- [Citing](#Citing-EV2Gym)\r\n- [License](#License)\r\n- [Contributing](#Contributing)\r\n\r\n<!-- Bullet points with all the benefits -->\r\n## Overview\r\n\r\n![EV2Gym](https://github.com/StavrosOrf/EV2Gym/assets/17108978/4695efa7-5c92-4118-9470-4cd16d262cf9)\r\n\r\n- The simulator can be used to evaluate any type of algorithm to gain insights into its efficiency.\r\n- The \u201cgym environment\u201d can readily support the development of RL algorithms.\r\n- Replays of simulations are saved and can be solved optimally using the Gurobi Solver.\r\n- Easy to incorporate additional functionality for any use-case.\r\n- Does not simulate the grid yet, but groups EV chargers at the level of the transformer/ parking lot, etc, so extra functionality can be easily added.\r\n- The number and the topology of Transformers, Charging stations, and Electric Vehicles are parameterizable.\r\n- The user can import custom data.\r\n- Uses only open-source data:\r\n  - EV spawn rate, time of stay, and energy required are based on realistic probability distributions *ElaadNL* conditioned on time, day, month and year.\r\n  - *Pecan Street* data is used for the load profiles.\r\n  - *Renewables Ninja* data is used for the PV generation profiles.\r\n  - EV and Charger characteristics are based on real EVs and chargers existing in NL (*RVO Survey*).\r\n  - Charging/ Discharging prices are based on historical day-ahead prices from *ENTSO-e*.\r\n\r\nFocused on **realistic** parameters and **fully customizable**:\r\n\r\n- **Power Transformer** model:\r\n  - Max Power Limit\r\n  - Inflexible Loads, PV, Capacity Reduction events\r\n- **Charging Stations** model:\r\n  - Min and Max charge/discharge power/ Current\r\n  - Voltage and phases, AC or DC\r\n  - List of connected transformers\r\n- **Electric Vehicle** model:\r\n  - Connected charging station and port\r\n  - Min and Max battery energy level\r\n  - Time of arrival and departure\r\n  - Energy at arrival/ desired energy at departure\r\n  - Min and Max power levels\r\n  - Charge and discharge efficiency\r\n  - Constant-Current/ Constant-Voltage load-curve option\r\n- **Battery Degradation** model:\r\n  - Cyclic aging\r\n  - Calendar aging\r\n\r\n\r\n<div align=\"center\">\r\n<img align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/d15d258c-b454-498c-ba7f-634d858df3a6\" width=\"90%\"/>\r\n</div>\r\n\r\nAn EV2Gym simulation comprises three phases: the configuration phase, which initializes the models; the simulation phase, which spans $T$ steps, during which the state of models like EVs and charging stations is updated according to the decision-making algorithm; and finally, in the last phase, the simulator generates evaluation metrics for comparisons, produces replay files for reproducibility, and generates real-time renders for evaluation.\r\n\r\n## Configuration File\r\n\r\nThe configuration file is used to set the parameters of the simulation. The configuration file is a YAML file that contains the following parameters:\r\n```yaml\r\n##############################################################################\r\n# Simulation Parameters\r\n##############################################################################\r\ntimescale: 15 # in minutes per step\r\nsimulation_length: 96 #90 # in steps per simulation\r\n\r\n##############################################################################\r\n# Date and Time\r\n##############################################################################\r\n# Year, month, \r\nyear: 2022 # 2015-2023\r\nmonth: 1 # 1-12\r\nday: 17 # 1-31\r\n# Whether to get a random date every time the environment is reset\r\nrandom_day: False # True or False\r\n# Simulation Starting Hour and minute do not change after the environment has been reset\r\nhour: 12 # Simulation starting hour (24 hour format)\r\nminute: 0 # Simulation starting minute (0-59)\r\n# Simulate weekdays, weekends, or both\r\nsimulation_days: both # weekdays, weekends, or both\r\n# EV Spawn Behavior\r\nscenario: public # public, private, or workplace\r\nspawn_multiplier: 10 # 1 is default, the higher the number the more EVs spawn\r\n\r\n##############################################################################\r\n# Prices\r\n##############################################################################\r\ndischarge_price_factor: 1.2 # how many times more abs(expensive/cheaper) it is to discharge than to charge\r\n\r\n##############################################################################\r\n# Charging Network\r\n##############################################################################\r\nv2g_enabled: True # True or False\r\nnumber_of_charging_stations: 15\r\nnumber_of_transformers: 3\r\nnumber_of_ports_per_cs: 2\r\n# Provide path if you want to load a specific charging topology,\r\n# else write None for a randomized one with the above parameters\r\ncharging_network_topology: None #./config_files/charging_topology_10.json\r\n\r\n##############################################################################\r\n# Power Setpoints Settings\r\n##############################################################################\r\n# How much the power setpoints can vary in percentage compared to the nominal power\r\n# The higher the number the easier it is to meet the power setpoints, the opposite for negative numbers\r\npower_setpoint_flexiblity: 20 # (in percentage +/- %)\r\n\r\n##############################################################################\r\n# Inflexible Loads, Solar Generation, and Demand Response\r\n##############################################################################\r\n# Whether to include inflexible loads in the transformer power limit, such as residential loads\r\ntr_seed: -1 # Seed for the transformer loads, -1 for random\r\n\r\ninflexible_loads:\r\n  include: False # True or False\r\n  inflexible_loads_capacity_multiplier_mean: 0.8 # 1 is default, the higher the number the more inflexible loads\r\n  forecast_mean: 100 # in percentage of load at time t%\r\n  forecast_std: 0 # in percentage of load at time t%\r\n\r\n# PV solar Power\r\nsolar_power:\r\n  include: False # True or False\r\n  solar_power_capacity_multiplier_mean: 2 # 1 is default, the higher the number the more solar power\r\n  forecast_mean: 100 # in percentage of load at time t%\r\n  forecast_std: 0 # in percentage of load at time t%\r\n\r\n# Whether to include demand response in the transformer power limit\r\ndemand_response:\r\n  include: False # True or False\r\n  events_per_day: 1\r\n  #How much of the transformer power limit can be used for demand response\r\n  event_capacity_percentage_mean: 25 # (in percentage +/- %)\r\n  event_capacity_percentage_std: 5 # (in percentage +/- %)\r\n  event_length_minutes_min: 60\r\n  event_length_minutes_max: 60\r\n  event_start_hour_mean: 18\r\n  event_start_hour_std: 2\r\n  # How many minutes ahead we know the event is going to happen\r\n  notification_of_event_minutes: 15\r\n\r\n##############################################################################\r\n# EV Specifications\r\n##############################################################################\r\nheterogeneous_ev_specs: False #if False, each EV has the same specifications\r\n# such as battery capacity, charging rate, etc.\r\n\r\n##############################################################################\r\n# Default Model values\r\n##############################################################################\r\n# These values are used if not using a charging network topology file or \r\n# if the EV specifications are not provided\r\n\r\n# Default Transformer model\r\ntransformer:\r\n  max_power: 100 # in kW\r\n# Default Charging Station model\r\ncharging_station:  \r\n  min_charge_current: 0 # Amperes\r\n  max_charge_current: 56 # Amperes\r\n  min_discharge_current: 0 # Amperes\r\n  max_discharge_current: -56 # Amperes\r\n  voltage: 230 # Volts\r\n  phases: 3 # 1,2, or 3\r\n# Default EV model\r\nev:\r\n  battery_capacity: 50 # in kWh\r\n  min_battery_capacity: 10 # in kWh\r\n  desired_capacity: 40 # in kWh\r\n  max_ac_charge_power: 22 # in kW\r\n  min_ac_charge_power: 0 # in kW\r\n  max_dc_charge_power: 50 # in kW\r\n  max_discharge_power: -22 # in kW\r\n  min_discharge_power: 0 # in kW\r\n  ev_phases: 3\r\n  transition_soc: 1 # 0-1 (0% - 100%)\r\n  charge_efficiency: 1 # 0-1 (0% - 100%)\r\n  discharge_efficiency: 1 # 0-1 (0% - 100%)\r\n  min_time_of_stay: 120 # in minutes\r\n```\r\n\r\n## File Structure\r\nThe file structure of the EV2Gym package is as follows:\r\n```bash\r\n\u251c\u2500\u2500 ev2gym\r\n\u2502   \u251c\u2500\u2500 baselines\r\n\u2502   \u2502   \u251c\u2500\u2500 gurobi_models/\r\n\u2502   \u2502   \u251c\u2500\u2500 mpc/\r\n\u2502   \u2502   \u251c\u2500\u2500 heuristics.py\r\n\u2502   \u251c\u2500\u2500 data/\r\n\u2502   \u251c\u2500\u2500 models\r\n\u2502   \u2502   \u251c\u2500\u2500 ev2gym_env.py\r\n\u2502   \u2502   \u251c\u2500\u2500 ev.py\r\n\u2502   \u2502   \u251c\u2500\u2500 transformer.py\r\n\u2502   \u2502   \u251c\u2500\u2500 ev_charger.py\r\n\u2502   \u2502   \u251c\u2500\u2500 replay.py\r\n\u2502   \u2502   \u251c\u2500\u2500 grid.py\r\n\u2502   \u251c\u2500\u2500 rl_agent\r\n\u2502   \u2502   \u251c\u2500\u2500 reward.py\r\n\u2502   \u2502   \u251c\u2500\u2500 state.py\r\n\u2502   \u251c\u2500\u2500 utilities\r\n\u2502   \u2502   \u251c\u2500\u2500 loaders.py\r\n\u2502   \u2502   \u251c\u2500\u2500 utils.py\r\n\u2502   \u2502   \u251c\u2500\u2500 arg_parser.py\r\n\u2502   \u251c\u2500\u2500 example_config_files\r\n\u2502   \u2502   \u251c\u2500\u2500 BusinessPST.yaml\r\n\u2502   \u2502   \u251c\u2500\u2500 PublicPST.yaml\r\n\u2502   \u2502   \u251c\u2500\u2500 V2GProfitPlusLoads.yaml\r\n\u2502   \u251c\u2500\u2500 visuals\r\n\u2502   \u2502   \u251c\u2500\u2500 plots.py\r\n\u2502   \u2502   \u251c\u2500\u2500 renderer.py\r\n\u2502   \u251c\u2500\u2500 scripts/\r\n```\r\n\r\nClass Diagram of the EV2Gym Environment:\r\n<div align=\"center\">\r\n<img align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/8ca5bf11-6ed4-44f6-9faf-386382609af1\" width=\"55%\"/>\r\n</div>\r\n\r\n## Citing EV2Gym\r\n\r\nIf you use this code in your research, please cite as:\r\n```bibtex\r\n@misc{orfanoudakis2024ev2gym,\r\n      title={EV2Gym: A Flexible V2G Simulator for EV Smart Charging Research and Benchmarking}, \r\n      author={Stavros Orfanoudakis and Cesar Diaz-Londono and Yunus E. Y\u0131lmaz and Peter Palensky and Pedro P. Vergara},\r\n      year={2024},\r\n      eprint={2404.01849},\r\n      archivePrefix={arXiv}\r\n}\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.\r\n\r\n\r\n## Contributing\r\n\r\nEV2Gym is an open-source project and welcomes contributions! Please get in contact with us if you would like to discuss about the simulator.\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A realistic V2G simulator environment",
    "version": "1.1.0",
    "project_urls": null,
    "split_keywords": [
        "gym",
        " reinforcement learning",
        " v2x",
        " v2g",
        " g2v",
        " evs",
        " ev2gym",
        " electric vehicles",
        " electric vehicle simulator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb0cd088d214812625465aa76adb771fbd2742c05ebfab6d79aa76a7d3bcc729",
                "md5": "6b09a53d1b5152f019424a0449de68b5",
                "sha256": "b98cd696e57600dff91daf5f55a06bccd72b692b385cfd44dec4b52f97feea49"
            },
            "downloads": -1,
            "filename": "ev2gym-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b09a53d1b5152f019424a0449de68b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2793723,
            "upload_time": "2024-11-13T15:55:30",
            "upload_time_iso_8601": "2024-11-13T15:55:30.184454Z",
            "url": "https://files.pythonhosted.org/packages/fb/0c/d088d214812625465aa76adb771fbd2742c05ebfab6d79aa76a7d3bcc729/ev2gym-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c05591a7554220511d95a6ec778b17366fd58408a505672150cdc4af761fdd7",
                "md5": "65112e22a9b01b3946b2b8f8f246ada3",
                "sha256": "739da745c358ad178611c7c656b6910b8c2560004750ee4fb528f80bc4f2d516"
            },
            "downloads": -1,
            "filename": "ev2gym-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "65112e22a9b01b3946b2b8f8f246ada3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 2697723,
            "upload_time": "2024-11-13T15:55:34",
            "upload_time_iso_8601": "2024-11-13T15:55:34.276572Z",
            "url": "https://files.pythonhosted.org/packages/5c/05/591a7554220511d95a6ec778b17366fd58408a505672150cdc4af761fdd7/ev2gym-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 15:55:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ev2gym"
}
        
Elapsed time: 0.62634s