From 217590a9f0a5c0c6962220e425bfc13736fca3a5 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Thu, 30 Jun 2022 14:23:09 +0200 Subject: [PATCH] change lightsim2grid import, notebook works --- chronix2grid/generation/dispatch/dispatch_loss_utils.py | 4 ++-- getting_started/getting_started_api.ipynb | 2 +- getting_started/running_chronics_grid2op.ipynb | 4 ++-- getting_started/scripts/check_loss_adjustement.py | 4 ++-- getting_started/scripts/run_DoNothing_grid2op_onChronix.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/chronix2grid/generation/dispatch/dispatch_loss_utils.py b/chronix2grid/generation/dispatch/dispatch_loss_utils.py index 649ff71..75dbc0a 100644 --- a/chronix2grid/generation/dispatch/dispatch_loss_utils.py +++ b/chronix2grid/generation/dispatch/dispatch_loss_utils.py @@ -91,12 +91,12 @@ def run_grid2op_simulation_donothing(grid_path, agent_result_path, nb_core = 1, print('Grid2op simulation for loss') try: - from lightsim2grid.LightSimBackend import LightSimBackend + from lightsim2grid import LightSimBackend backend = LightSimBackend() except: from grid2op.Backend import PandaPowerBackend backend = PandaPowerBackend() - print("You might need to install the LightSimBackend (provisory name) to gain massive speed up") + print("You might need to install the LightSimBackend) to gain massive speed up") # don't disconnect powerline on overflow, the thermal limit are not set for now, it would not make sens param = Parameters() param.init_from_dict({"NO_OVERFLOW_DISCONNECTION": True}) diff --git a/getting_started/getting_started_api.ipynb b/getting_started/getting_started_api.ipynb index d237cd3..bac0b07 100644 --- a/getting_started/getting_started_api.ipynb +++ b/getting_started/getting_started_api.ipynb @@ -1028,7 +1028,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.8.10 64-bit", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/getting_started/running_chronics_grid2op.ipynb b/getting_started/running_chronics_grid2op.ipynb index d7360de..53be518 100644 --- a/getting_started/running_chronics_grid2op.ipynb +++ b/getting_started/running_chronics_grid2op.ipynb @@ -117,12 +117,12 @@ "from grid2op.Chronics import Multifolder, GridStateFromFileWithForecasts\n", "from grid2op.Parameters import Parameters\n", "try:\n", - " from lightsim2grid.LightSimBackend import LightSimBackend\n", + " from lightsim2grid import LightSimBackend\n", " backend = LightSimBackend()\n", "except:\n", " from grid2op.Backend import PandaPowerBackend\n", " backend = PandaPowerBackend()\n", - " print(\"You might need to install the LightSimBackend (provisory name) to gain massive speed up\")\n", + " print(\"You might need to install the LightSimBackend to gain massive speed up\")\n", "# don't disconnect powerline on overflow, the thermal limit are not set for now, it would not make sens\n", "param = Parameters()\n", "param.init_from_dict({\"NO_OVERFLOW_DISCONNECTION\": True})\n", diff --git a/getting_started/scripts/check_loss_adjustement.py b/getting_started/scripts/check_loss_adjustement.py index fea61f6..4045201 100644 --- a/getting_started/scripts/check_loss_adjustement.py +++ b/getting_started/scripts/check_loss_adjustement.py @@ -18,12 +18,12 @@ import os try: - from lightsim2grid.LightSimBackend import LightSimBackend + from lightsim2grid import LightSimBackend backend = LightSimBackend() except: from grid2op.Backend import PandaPowerBackend backend = PandaPowerBackend() - print("You might need to install the LightSimBackend (provisory name) to gain massive speed up") + print("You might need to install the LightSimBackend to gain massive speed up") #we will check that losses were properly adjusted by rerunning grid2op one more time on the chronic #and checking that the slack production is not modified much more compare to original one diff --git a/getting_started/scripts/run_DoNothing_grid2op_onChronix.py b/getting_started/scripts/run_DoNothing_grid2op_onChronix.py index bd2d98e..e4578f5 100644 --- a/getting_started/scripts/run_DoNothing_grid2op_onChronix.py +++ b/getting_started/scripts/run_DoNothing_grid2op_onChronix.py @@ -46,12 +46,12 @@ print('the number of cores used is: '+str(NB_CORE)) print('the number of scenarios we consider is: '+str(nb_episode)) try: - from lightsim2grid.LightSimBackend import LightSimBackend + from lightsim2grid import LightSimBackend backend = LightSimBackend() except: from grid2op.Backend import PandaPowerBackend backend = PandaPowerBackend() - print("You might need to install the LightSimBackend (provisory name) to gain massive speed up") + print("You might need to install the LightSimBackend to gain massive speed up") # don't disconnect powerline on overflow, the thermal limit are not set for now, it would not make sens param = Parameters() param.init_from_dict({"NO_OVERFLOW_DISCONNECTION": True})