{"id":297122,"name":"EV2Gym","description":"A V2G Simulation Environment for large scale EV charging optimization.","url":"https://github.com/stavrosorf/ev2gym","last_synced_at":"2026-04-13T01:02:11.803Z","repository":{"id":231115449,"uuid":"667407131","full_name":"StavrosOrf/EV2Gym","owner":"StavrosOrf","description":"A V2G Simulation Environment for large scale EV charging optimization","archived":false,"fork":false,"pushed_at":"2026-01-30T10:19:59.000Z","size":123166,"stargazers_count":194,"open_issues_count":4,"forks_count":49,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-03T21:31:05.365Z","etag":null,"topics":["deep-reinforcement-learning","electric-vehicles","gurobi","gym","mathematical-programming","model-predictive-control","simulator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StavrosOrf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-17T12:39:41.000Z","updated_at":"2026-04-03T11:36:18.000Z","dependencies_parsed_at":"2024-04-02T14:47:53.332Z","dependency_job_id":"b3973076-f4dd-44fc-991f-69b170530e1b","html_url":"https://github.com/StavrosOrf/EV2Gym","commit_stats":{"total_commits":374,"total_committers":3,"mean_commits":"124.66666666666667","dds":"0.19518716577540107","last_synced_commit":"bf5f2f01a9b95dd6d1b51b155eda92bbb8033d38"},"previous_names":["stavrosorf/ev2gym"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/StavrosOrf/EV2Gym","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StavrosOrf%2FEV2Gym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StavrosOrf%2FEV2Gym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StavrosOrf%2FEV2Gym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StavrosOrf%2FEV2Gym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StavrosOrf","download_url":"https://codeload.github.com/StavrosOrf/EV2Gym/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StavrosOrf%2FEV2Gym/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31491097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"StavrosOrf","name":"Stavros Orfanoudakis","uuid":"17108978","kind":"user","description":"Ph.D. Candidate, EEMCS TU Delft | \r\nA.I. for the Smart Grid","email":"","website":null,"location":"The Netherlands","twitter":null,"company":"Machine Learning Researcher","icon_url":"https://avatars.githubusercontent.com/u/17108978?u=de1171f1866a444e2809bf3e21d70cf21b69ea06\u0026v=4","repositories_count":1,"last_synced_at":"2023-11-23T18:41:07.811Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/StavrosOrf","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2023-03-10T04:37:03.435Z","updated_at":"2023-11-23T18:41:07.815Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StavrosOrf","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StavrosOrf/repositories"},"packages":[],"commits":{"id":1638926,"full_name":"stavrosorf/ev2gym","default_branch":"main","total_commits":403,"total_committers":4,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":100.75,"dds":0.07692307692307687,"past_year_total_commits":19,"past_year_total_committers":2,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":9.5,"past_year_dds":0.21052631578947367,"last_synced_at":"2026-04-06T22:04:20.298Z","last_synced_commit":"3d576a7bbc16bd0845762a4eaeeb096d25df8c7c","created_at":"2024-07-25T00:04:32.488Z","updated_at":"2026-04-06T22:04:04.715Z","committers":[{"name":"Stavros Orfanoudakis","email":"stayros_1@yahoo.gr","login":"StavrosOrf","count":372},{"name":"StavrosOrf","email":"stayros123456789@gmail.com","login":null,"count":26},{"name":"Philipp Miotti","email":"philipp.miotti@kinit.sk","login":"philipp91roberto","count":4},{"name":"bob.elders","email":"bob.elders@gmail.com","login":"COMMEX147","count":1}],"past_year_committers":[{"name":"Stavros Orfanoudakis","email":"s.orfanoudakis@tudelft.nl","login":"StavrosOrf","count":15},{"name":"Philipp Miotti","email":"philipp.miotti@kinit.sk","login":"philipp91roberto","count":4}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/stavrosorf%2Fev2gym/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-08T00:00:24.542Z","repositories_count":6212507,"commits_count":914691192,"contributors_count":35335977,"owners_count":1143250,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"stavrosorf/ev2gym","html_url":"https://github.com/stavrosorf/ev2gym","last_synced_at":"2026-04-03T21:00:57.439Z","status":"active","issues_count":18,"pull_requests_count":17,"avg_time_to_close_issue":1687790.5333333334,"avg_time_to_close_pull_request":10070.066666666668,"issues_closed_count":15,"pull_requests_closed_count":15,"pull_request_authors_count":4,"issue_authors_count":14,"avg_comments_per_issue":1.1666666666666667,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":14,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":9,"past_year_pull_requests_count":3,"past_year_avg_time_to_close_issue":2791963.375,"past_year_avg_time_to_close_pull_request":16.0,"past_year_issues_closed_count":8,"past_year_pull_requests_closed_count":2,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":6,"past_year_avg_comments_per_issue":1.222222222222222,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":1,"created_at":"2024-07-25T00:04:46.312Z","updated_at":"2026-04-03T21:00:57.439Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/stavrosorf%2Fev2gym","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/stavrosorf%2Fev2gym/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":18},"pull_request_author_associations_count":{"OWNER":13,"NONE":2,"CONTRIBUTOR":2},"issue_authors":{"bumj00712":4,"STW1994":2,"chadmercs":1,"aryangarg794":1,"stephaniefeng63-blip":1,"GanMocai":1,"lqhdehub":1,"Efsilvaa":1,"VicKolo":1,"shhuang666":1,"Sweetbill0":1,"Kallinteris-Andreas":1,"seonjin13":1,"Electric-V":1},"pull_request_authors":{"StavrosOrf":13,"COMMEX147":2,"helenafig":1,"philipp91roberto":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-08T00:00:09.900Z","repositories_count":14151939,"issues_count":34542162,"pull_requests_count":112876556,"authors_count":11230735,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"NONE":9},"past_year_pull_request_author_associations_count":{"CONTRIBUTOR":1,"NONE":1,"OWNER":1},"past_year_issue_authors":{"bumj00712":4,"aryangarg794":1,"chadmercs":1,"Efsilvaa":1,"shhuang666":1,"stephaniefeng63-blip":1},"past_year_pull_request_authors":{"helenafig":1,"philipp91roberto":1,"StavrosOrf":1},"maintainers":[{"login":"StavrosOrf","count":13,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/StavrosOrf"}],"active_maintainers":[{"login":"StavrosOrf","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/StavrosOrf"}]},"events":{"total":{"ReleaseEvent":1,"DeleteEvent":2,"PullRequestEvent":9,"ForkEvent":17,"IssuesEvent":16,"WatchEvent":105,"IssueCommentEvent":15,"PushEvent":41,"CreateEvent":9},"last_year":{"DeleteEvent":2,"PullRequestEvent":5,"ForkEvent":7,"IssuesEvent":6,"WatchEvent":54,"IssueCommentEvent":5,"PushEvent":25,"CreateEvent":7}},"keywords":["deep-reinforcement-learning","electric-vehicles","gurobi","gym","mathematical-programming","model-predictive-control","simulator"],"dependencies":[{"ecosystem":"pypi","filepath":"docs/requirements.txt","sha":null,"kind":"manifest","created_at":"2024-04-02T14:47:52.909Z","updated_at":"2024-04-02T14:47:52.909Z","repository_link":"https://github.com/StavrosOrf/EV2Gym/blob/main/docs/requirements.txt","dependencies":[{"id":17191356511,"package_name":"autoapi","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"pypi","filepath":"setup.py","sha":null,"kind":"manifest","created_at":"2024-04-02T14:47:53.254Z","updated_at":"2024-04-02T14:47:53.254Z","repository_link":"https://github.com/StavrosOrf/EV2Gym/blob/main/setup.py","dependencies":[{"id":17191356739,"package_name":"gymnasium","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":17191356740,"package_name":"pyyaml","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":17191356741,"package_name":"matplotlib","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":17191356742,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":17191356743,"package_name":"networkx","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":17191356744,"package_name":"gurobipy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]}],"score":6.674561391814426,"created_at":"2024-07-25T00:04:31.305Z","updated_at":"2026-04-13T01:02:11.805Z","avatar_url":"https://github.com/StavrosOrf.png","language":"Python","category":"Consumption","sub_category":"Mobility and Transportation","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\n# EV2Gym: A Realistic EV-V2G-Gym Simulator for EV Smart Charging\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/86e921ad-d711-4dbb-b7b9-c69dee20da11\" width=\"55%\"/\u003e\n\u003c/div\u003e\n\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)\n---\n\nDevelop and evaluate **any type of smart charging algorithm**: from simple heuristics, Model Predictive Control, Mathematical Programming, to Reinforcement Learning!\n\nEV2Gym is **fully customizable** and easily **configurable**! Now can also **simulate the grid**, thanks to [RL-ADN](https://github.com/EnergyQuantResearch/RL-ADN)!\n\nThe EV2Gym **Paper** can be found at: [arXiv](https://arxiv.org/abs/2404.01849) and [IEEE](https://dl.acm.org/doi/abs/10.1109/TITS.2024.3510945).\n\n**Highly recommended** related works and repositories:\n| Title                                                                                                                          | Paper                                                                                | GitHub repository                                                                                  |\n| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |\n| Physics-Informed Reinforcement Learning for Large-Scale EV Smart Charging Considering Distribution Network Voltage Constraints | [arXiv](https://arxiv.org/abs/2510.12335)                                            | [https://github.com/StavrosOrf/EV2Gym_PI-TD3](https://github.com/StavrosOrf/EV2Gym_PI-TD3)         |\n| GNN-DT: Graph Neural Network Enhanced Decision Transformer for Efficient Optimization in Dynamic Environments                  | [arXiv](https://arxiv.org/abs/2502.01778)/ [*Energy and AI*](https://www.sciencedirect.com/science/article/pii/S2666546826000054)                                            | [https://github.com/StavrosOrf/DT4EVs](https://github.com/StavrosOrf/DT4EVs)                       |\n| Scalable Reinforcement Learning for Dynamic Electric Vehicle Charging Optimization Using Graph Neural Networks                 | [*Nature Comm. Eng.*](https://www.nature.com/articles/s44172-025-00457-8)                                   | [https://github.com/StavrosOrf/EV-GNN](https://github.com/StavrosOrf/EV-GNN)                       |\n| Open-source algorithms for maximizing V2G flexibility based on model predictive control                                        | [*Electr. Power. System Research*](https://www.sciencedirect.com/science/article/pii/S0378779625006704) | [https://github.com/CesarDiazLondono/MPC-G2V-V2G](https://github.com/CesarDiazLondono/MPC-G2V-V2G) |\n\n\n## Installation\n\nInstall the package using pip:\n```bash\npip install ev2gym\n```\n\n Run the example code below to get started ...\n```python\nfrom ev2gym.models.ev2gym_env import EV2Gym\nfrom ev2gym.baselines.mpc.V2GProfitMax import V2GProfitMaxOracle\nfrom ev2gym.baselines.heuristics import ChargeAsFastAsPossible\n\nconfig_file = \"ev2gym/example_config_files/V2GProfitPlusLoads.yaml\"\n\n# Initialize the environment\nenv = EV2Gym(config_file=config_file,\n              save_replay=True,\n              save_plots=True)\nstate, _ = env.reset()\nagent = V2GProfitMaxOracle(env,verbose=True) # optimal solution\n#        or \nagent = ChargeAsFastAsPossible() # heuristic\nfor t in range(env.simulation_length):\n    actions = agent.get_action(env) # get action from the agent/ algorithm\n    new_state, reward, done, truncated, stats = env.step(actions)  # takes action\n\n```\n- ### For Reinforcement Learning:\nTo train an RL agent, using the [StableBaselines3](https://stable-baselines3.readthedocs.io/en/master/) library, you can use the following code:\n```python\nimport gymnasium as gym\nfrom stable_baselines3 import PPO, A2C, DDPG, SAC, TD3\nfrom sb3_contrib import TQC, TRPO, ARS, RecurrentPPO\n\nfrom ev2gym.models.ev2gym_env import EV2Gym\n# Choose a default reward function and state function or create your own!!!\nfrom ev2gym.rl_agent.reward import profit_maximization, SquaredTrackingErrorReward, ProfitMax_TrPenalty_UserIncentives\nfrom ev2gym.rl_agent.state import V2G_profit_max, PublicPST, V2G_profit_max_loads\n\nconfig_file = \"ev2gym/example_config_files/V2GProfitPlusLoads.yaml\"\nenv = gym.make('EV2Gym-v1',\n                config_file=config_file,\n                reward_function=reward_function,\n                state_function=state_function)\n# Initialize the RL agent\nmodel = DDPG(\"MlpPolicy\", env)\n# Train the agent\nmodel.learn(total_timesteps=1_000_000,\n            progress_bar=True)\n# Evaluate the agent\nenv = model.get_env()\nobs = env.reset()\nstats = []\nfor i in range(1000):\n    action, _states = model.predict(obs, deterministic=True)\n    obs, reward, done, info = env.step(action)\n\n    if done:\n        stats.append(info)\n```\n!!! You can develop your own reward and state functions and use them in the environment.\n\n\n## Table of Contents\n\n- [Installation](#Installation)\n- [Overview](#Overview)\n- [Configuration File](#Configuration-File)\n- [File Structure](#File-Structure)\n- [Citing](#Citing-EV2Gym)\n- [License](#License)\n- [Contributing](#Contributing)\n\n\u003c!-- Bullet points with all the benefits --\u003e\n## Overview\n\n![EV2Gym](https://github.com/StavrosOrf/EV2Gym/assets/17108978/4695efa7-5c92-4118-9470-4cd16d262cf9)\n\n- The simulator can be used to evaluate any type of algorithm to gain insights into its efficiency.\n- The “gym environment” can readily support the development of RL algorithms.\n- Replays of simulations are saved and can be solved optimally using the Gurobi Solver.\n- Easy to incorporate additional functionality for any use-case.\n- Now, also simulates grid for voltage magnitude!\n- The number and the topology of Transformers, Charging stations, and Electric Vehicles are parameterizable.\n- The user can import custom data.\n- Uses only open-source data:\n  - EV spawn rate, time of stay, and energy required are based on realistic probability distributions *ElaadNL* conditioned on time, day, month and year.\n  - *Pecan Street* data is used for the load profiles.\n  - *Renewables Ninja* data is used for the PV generation profiles.\n  - EV and Charger characteristics are based on real EVs and chargers existing in NL (*RVO Survey*).\n  - Charging/ Discharging prices are based on historical day-ahead prices from *ENTSO-e*.\n\nFocused on **realistic** parameters and **fully customizable**:\n\n- **Power Transformer** model:\n  - Max Power Limit\n  - Inflexible Loads, PV, Capacity Reduction events\n- **Charging Stations** model:\n  - Min and Max charge/discharge power/ Current\n  - Voltage and phases, AC or DC\n  - List of connected transformers\n- **Electric Vehicle** model:\n  - Connected charging station and port\n  - Min and Max battery energy level\n  - Time of arrival and departure\n  - Energy at arrival/ desired energy at departure\n  - Min and Max power levels\n  - Charge and discharge efficiency\n  - Constant-Current/ Constant-Voltage load-curve option\n- **Battery Degradation** model:\n  - Cyclic aging\n  - Calendar aging\n\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/d15d258c-b454-498c-ba7f-634d858df3a6\" width=\"90%\"/\u003e\n\u003c/div\u003e\n\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.\n\n## Configuration File\n\nThe configuration file is used to set the parameters of the simulation. The configuration file is a YAML file that contains the following parameters:\n```yaml\n# This yml file is used to configure the evsim simulation\n\n##############################################################################\n# Simulation Parameters\n##############################################################################\ntimescale: 15 # in minutes per step\nsimulation_length: 96 #90 # in steps per simulation\n\n##############################################################################\n# Date and Time\n##############################################################################\n# Year, month, \nyear: 2022 # 2015-2023\nmonth: 1 # 1-12\nday: 17 # 1-31\n# Whether to get a random date every time the environment is reset\nrandom_day: True # True or False\nrandom_hour: False # True or False\n\n# Simulation Starting Time\n# Hour and minute do not change after the environment has been reset\nhour: 5 # Simulation starting hour (24 hour format)\nminute: 0 # Simulation starting minute (0-59)\n\n# Simulate weekdays, weekends, or both\nsimulation_days: weekdays # weekdays, weekends, or both\n\n# EV Spawn Behavior\nscenario: public # public, private, or workplace\nspawn_multiplier: 5 # 1 is default, the higher the number the more EVs spawn. Play somewhere between 3-7. With 1 often only 1/5 EVs show up.\n\n##############################################################################\n# Prices\n##############################################################################\ndischarge_price_factor: 1 # how many times more abs(expensive/cheaper) it is to discharge than to charge. Are similar, discharging cost could be a bit higher.\n\n##############################################################################\n# Distribution Network Settings\n##############################################################################\nv2g_enabled: True # True or False\nnumber_of_charging_stations: 150 # Play somewhere 5-20\nnumber_of_transformers: -1\nnumber_of_ports_per_cs: 1\n# Provide path if you want to load a specific charging topology\n# *(where chargers are located and what are their characteristics),\n# else write None for a randomized one with the above parameters\ncharging_network_topology: None #./config_files/charging_topology_10.json\n\nsimulate_grid: True # True or False\nnetwork_info: \n  vm_pu: 1.0 # Voltage magnitude in per unit\n  s_base: 1000 # Base power in kVA\n  load_multiplier: 1 # Load multiplier for the grid\n  pv_scale: 80 # Percentage% of maximum PV power with respect to the total load of the bus\n  bus_info_file: './ev2gym/data/network_data/node_34/Nodes_34.csv'\n  branch_info_file: './ev2gym/data/network_data/node_34/Lines_34.csv'\n  # bus_info_file: './ev2gym/data/network_data/node_123/Nodes_123.csv'\n  # branch_info_file: './ev2gym/data/network_data/node_123/Lines_123.csv'\n\npf_solver: 'Laurent' # 'Laurent' or 'PandaPower'\n\n##############################################################################\n# Power Setpoints Settings\n##############################################################################\n# How much the power setpoints can vary in percentage compared to the nominal power\n# The higher the number the easier it is to meet the power setpoints, the opposite for negative numbers\npower_setpoint_enabled: True # True or False\npower_setpoint_flexiblity: 80 # (in percentage +/- %)\n\n##############################################################################\n# Inflexible Loads, Solar Generation, and Demand Response (Not compatible with simulate_grid = True)\n##############################################################################\n# Whether to include inflexible loads in the transformer power limit, such as residential loads\ntr_seed: -1 # seed for the random number generator of transformer loads(-1 for random seed)\n\ninflexible_loads: # Offices, homes\n  include: False # True or False\n  inflexible_loads_capacity_multiplier_mean: 1 # 1 is default, the higher the number the more inflexible loads\n  forecast_mean: 30 # in percentage of load at time t%\n  forecast_std: 5 # in percentage of load at time t%\n\n# PV solar Power\nsolar_power:\n  include: False # True or False\n  solar_power_capacity_multiplier_mean: 1 # 1 is default, the higher the number the more solar power\n  forecast_mean: 20 # in percentage of load at time t%\n  forecast_std: 5 # in percentage of load at time t%\n\n# Whether to include demand response in the transformer power limit\ndemand_response:\n  include: False # True or False\n  events_per_day: 1\n  #How much of the transformer power limit can be used for demand response\n  event_capacity_percentage_mean: 35 # (in percentage +/- %) reduction\n  event_capacity_percentage_std: 5 # (in percentage +/- %)\n  event_length_minutes_min: 60\n  event_length_minutes_max: 60\n  event_start_hour_mean: 12\n  event_start_hour_std: 2\n  # How many minutes ahead we know the event is going to happen\n  notification_of_event_minutes: 60\n\n##############################################################################\n# EV Specifications\n##############################################################################\nheterogeneous_ev_specs: False #if False, each EV has the same specifications\n# such as battery capacity, charging rate, etc.\nev_specs_file: ./ev2gym/data/ev_specs_v2g_enabled2024.json # path to the file with the EV specifications\n\n##############################################################################\n# Default Model values\n##############################################################################\n# These values are used if not using a charging network topology file or \n# if the EV specifications are not provided\n\n# Default Transformer model\ntransformer:\n  max_power: 200 # in kW\n\n# Default Charging Station model\ncharging_station:  \n  min_charge_current: 0 # Amperes\n  max_charge_current: 32 # Amperes\n  min_discharge_current: 0 # Amperes (actual value \u003c=0)\n  max_discharge_current: -32 # Amperes (actual value \u003c=0)\n  voltage: 400 # Volts\n  phases: 3 # 1,2, or 3\n\n# Default EV model\nev:\n  #The following values are used if \"heterogeneous_ev_specs = False\"\n  battery_capacity: 70 # in kWh\n  max_ac_charge_power: 22 # in kW\n  min_ac_charge_power: 0 # in kW\n  max_dc_charge_power: 50 # in kW\n  max_discharge_power: -22 # in kW\n  min_discharge_power: 0 # in kW\n  ev_phases: 3  \n  charge_efficiency: 1 # 0-1 (0% - 100%)\n  discharge_efficiency: 1 # 0-1 (0% - 100%)\n  transition_soc: 1 # 0-1 (0% - 100%)\n\n  #The following values are also used if \"heterogeneous_ev_specs = True\"\n  min_battery_capacity: 15 # in kWh\n  min_time_of_stay: 200 # in minutes\n  min_emergency_battery_capacity: 15 # in kWh\n  desired_capacity: 1 # in (0-1) (0% - 100%) #Keep at 100% for now\n  #if trasition_soc is \u003c 1, the curve of the line is affected by:\n  transition_soc_multiplier: 50 # default 1 (the higher the number the shorter the effect of CCCV region)\n```\n\n## File Structure\nThe file structure of the EV2Gym package is as follows:\n```bash\n├── ev2gym\n│   ├── baselines\n│   │   ├── gurobi_models/\n│   │   ├── mpc/\n│   │   ├── heuristics.py\n│   ├── data/\n│   ├── models\n│   │   ├── ev2gym_env.py\n│   │   ├── ev.py\n│   │   ├── transformer.py\n│   │   ├── ev_charger.py\n│   │   ├── replay.py\n│   │   ├── grid.py\n│   ├── rl_agent\n│   │   ├── reward.py\n│   │   ├── state.py\n│   ├── utilities\n│   │   ├── loaders.py\n│   │   ├── utils.py\n│   │   ├── arg_parser.py\n│   ├── example_config_files\n│   │   ├── BusinessPST.yaml\n│   │   ├── PublicPST.yaml\n│   │   ├── V2GProfitPlusLoads.yaml\n│   ├── visuals\n│   │   ├── plots.py\n│   │   ├── renderer.py\n│   ├── scripts/\n```\n\nClass Diagram of the EV2Gym Environment:\n\u003cdiv align=\"center\"\u003e\n\u003cimg align=\"center\" src=\"https://github.com/StavrosOrf/EV2Gym/assets/17108978/8ca5bf11-6ed4-44f6-9faf-386382609af1\" width=\"55%\"/\u003e\n\u003c/div\u003e\n\n## Citing EV2Gym\n\nIf you use this code in your research, please cite as:\n```bibtex\n@ARTICLE{10803908,\n  author={Orfanoudakis, Stavros and Diaz-Londono, Cesar and Emre Yılmaz, Yunus and Palensky, Peter and Vergara, Pedro P.},\n  journal={IEEE Transactions on Intelligent Transportation Systems}, \n  title={EV2Gym: A Flexible V2G Simulator for EV Smart Charging Research and Benchmarking}, \n  year={2025},\n  volume={26},\n  number={2},\n  pages={2410-2421},\n  keywords={Vehicle-to-grid;Smart charging;Optimization;Benchmark testing;Batteries;Data models;Schedules;Reinforcement learning;Prediction algorithms;Power transformers;Electric vehicle optimization;gym environment;reinforcement learning;mathematical programming;model predictive control (MPC)},\n  doi={10.1109/TITS.2024.3510945}}\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.\n\n\n## Contributing\n\nEV2Gym is an open-source project and welcomes contributions! Please get in contact with us if you would like to discuss about the simulator.\n\n\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/297122","html_url":"https://ost.ecosyste.ms/projects/297122"}