Exception
This page is organized as follow:
Objectives
Grid2op defined some specific kind of exception to help debugging programs that lead didn’t execute properly.
Detailed Documentation by class
Exceptions:
This is a more precise exception than |
|
This is a more precise exception than |
|
This exception indicate that there is an error in the creation of an agent |
|
This exception indicate that the |
|
Raise if the type of action is ambiguous due to the 'raiseAlert' part |
|
Base class of all error regarding the Backend that might be badly configured. |
|
Generic type of exceptions raised by the observation |
|
Base class of all error regarding the chronics and the gridValue (see |
|
This exception is raised where there are no chronics folder found at the indicated location. |
|
Specific error raised by the backend when a generator is disconnected |
|
Specific error raised by the backend when a load is disconnected |
|
This exception indicate that the |
|
This exception indicate that the |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
Base Exception from which all Grid2Op raise exception derived. |
|
This class indicates that the "handler" you are trying to use is not suitable. |
|
This exception indicate that the |
|
Specific error raised by the backend |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This exception is raised where there are not enough data compare to the size of the episode asked. |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
Specific error when then backend "fails" because of an islanded grid |
|
Specific error that should be raised when a element is alone on a bus (islanded grid when only one element is islanded) |
|
General exception raised by |
|
This exception is mainly raised by the |
|
This is a more precise exception than |
|
This exception is raised when the player attempted to alert the "human operator" but it has not enough budget to do so. |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
This is a more precise exception than |
|
General error for the |
|
General exception raised by any class that handles plots |
|
This is the generic exception related to |
|
This exception is raised by the |
|
This exception is raised by the |
|
This exception indicate that the simulator you are trying to use is not initialized. |
|
This is a more precise exception saying that, at the end of the simulation, some generator would have their production above pmax, which is not possible in practice. |
|
This is a more precise exception saying that, at the end of the simulation, some generator would have their production vary too much, which is not possible in practice. |
|
This is a more precise exception saying that, at the end of the simulation, some generator would have their production below pmin, which is not possible in practice. |
|
This is a more precise exception saying that, at the end of the simulation, some generator would have their production vary too much, which is not possible in practice. |
|
attempt to use redispatching or unit commit method in an environment not set up. |
|
This exception indicate that a bad argument has been sent to the |
|
This is a more precise exception than |
|
This exception indicate that runner (object of |
|
This is a more precise exception than |
- exception grid2op.Exceptions.ActiveSetPointAbovePmax[source]
Bases:
OnProductionThis is a more precise exception than
OnProductionindicating that the action is illegal because the setpoint active power of a production is set to be higher than Pmax.
- exception grid2op.Exceptions.ActiveSetPointBelowPmin[source]
Bases:
OnProductionThis is a more precise exception than
OnProductionindicating that the action is illegal because the setpoint active power of a production is set to be lower than Pmin.
- exception grid2op.Exceptions.AgentError[source]
Bases:
Grid2OpExceptionThis exception indicate that there is an error in the creation of an agent
- exception grid2op.Exceptions.AmbiguousAction[source]
Bases:
Grid2OpExceptionThis exception indicate that the
grid2op.BaseActionis ambiguous. It could be understood differently according to the backend used.Such a kind of action are forbidden in this package. These kind of exception are mainly thrown by the
grid2op.BaseAction.BaseActionin thegrid2op.BaseAction.update()andgrid2op.BaseAction.__call__()methods.As opposed to a
IllegalActionanAmbiguousActionis forbidden for all the backend, in all the scenarios.It doesn’t depend on the implemented rules.
- exception grid2op.Exceptions.AmbiguousActionRaiseAlert[source]
Bases:
AmbiguousActionRaise if the type of action is ambiguous due to the ‘raiseAlert’ part
- exception grid2op.Exceptions.BackendError[source]
Bases:
Grid2OpExceptionBase class of all error regarding the Backend that might be badly configured.
- exception grid2op.Exceptions.BaseObservationError[source]
Bases:
Grid2OpExceptionGeneric type of exceptions raised by the observation
- exception grid2op.Exceptions.ChronicsError[source]
Bases:
Grid2OpExceptionBase class of all error regarding the chronics and the gridValue (see
grid2op.ChronicsHandler.GridValuefor more information)
- exception grid2op.Exceptions.ChronicsNotFoundError[source]
Bases:
ChronicsErrorThis exception is raised where there are no chronics folder found at the indicated location.
- exception grid2op.Exceptions.DisconnectedGenerator[source]
Bases:
BackendErrorSpecific error raised by the backend when a generator is disconnected
- exception grid2op.Exceptions.DisconnectedLoad[source]
Bases:
BackendErrorSpecific error raised by the backend when a load is disconnected
- exception grid2op.Exceptions.DivergingPowerflow[source]
Bases:
BackendError- This exception indicate that the
grid2op.Backend.Backendis not able to find a valid solution to the physical _grid it represents.
This divergence can be due to:
the system is not feasible: there is no solution to Kirchhoff’s law given the state
the powergrid is not connected and some area of the grid do not have slack buses
there is a “voltage collapse” : the voltages are ill conditioned making the _grid un realistic.
the method to solve the powerflow fails to find a valid solution. In this case, adopting a different
grid2op.Backend.Backendmight solve the problem.
- This exception indicate that the
- exception grid2op.Exceptions.EnvError[source]
Bases:
Grid2OpExceptionThis exception indicate that the
grid2op.Environment.Environmentis poorly configured.It is for example thrown when assessing if a backend is properly set up with
grid2op.Backend.Backend.assert_grid_correct()
- exception grid2op.Exceptions.GeneratorTurnedOffTooSoon[source]
Bases:
InvalidRedispatchingThis is a more precise exception than
AmbiguousActionindicating that a generator has been turned off before gen_min_down_time time steps.
- exception grid2op.Exceptions.GeneratorTurnedOnTooSoon[source]
Bases:
InvalidRedispatchingThis is a more precise exception than
AmbiguousActionindicating that a generator has been turned on before gen_min_up_time time steps.
- exception grid2op.Exceptions.Grid2OpException[source]
Bases:
RuntimeErrorBase Exception from which all Grid2Op raise exception derived.
Methods:
__repr__()Return repr(self).
__str__()Return str(self).
Attributes:
list of weak references to the object (if defined)
- __weakref__
list of weak references to the object (if defined)
- exception grid2op.Exceptions.HandlerError[source]
Bases:
ChronicsErrorThis class indicates that the “handler” you are trying to use is not suitable.
- exception grid2op.Exceptions.IllegalAction[source]
Bases:
Grid2OpExceptionThis exception indicate that the
grid2op.BaseActionis illegal.It is for example thrown when an
grid2op.BaseAgenttries to perform an action against the rule. This is handled ingrid2op.Environment.Environment.step()An
grid2op.BaseActionis said to be illegal depending on some rules implemented ingrid2op.BaseAction.ActionSpace.is_legal()method. An action can be legal in some context, but illegal in others.
- exception grid2op.Exceptions.ImpossibleTopology[source]
Bases:
BackendErrorSpecific error raised by the backend
grid2op.Backend.Backend.apply_action()when the player asked a topology (for example using set_bus) that cannot be applied by the backend.
- exception grid2op.Exceptions.IncorrectNumberOfElements[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of elements of the powergrid.
- exception grid2op.Exceptions.IncorrectNumberOfGenerators[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of generators of the powergrid.
- exception grid2op.Exceptions.IncorrectNumberOfLines[source]
Bases:
EnvError- This is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of powerlines of the powergrid.
- This is a more precise exception than
- exception grid2op.Exceptions.IncorrectNumberOfLoads[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of loads of the powergrid.
- exception grid2op.Exceptions.IncorrectNumberOfStorages[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of storage of the powergrid.
- exception grid2op.Exceptions.IncorrectNumberOfSubstation[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the total number of substation of the powergrid.
- exception grid2op.Exceptions.IncorrectPositionOfGenerators[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the number of generators at a substation.
- exception grid2op.Exceptions.IncorrectPositionOfLines[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the number of power lines at a substation.
- exception grid2op.Exceptions.IncorrectPositionOfLoads[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the number of loads at a substation.
- exception grid2op.Exceptions.IncorrectPositionOfStorages[source]
Bases:
EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the number of storage unit at a substation.
- exception grid2op.Exceptions.InsufficientData[source]
Bases:
ChronicsErrorThis exception is raised where there are not enough data compare to the size of the episode asked.
- exception grid2op.Exceptions.InvalidBusStatus[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActiontry to both “set” and “switch” some bus to which an object is connected.
- exception grid2op.Exceptions.InvalidCurtailment[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActiontry to apply an invalid curtailment strategy.
- exception grid2op.Exceptions.InvalidLineStatus[source]
Bases:
AmbiguousAction- This is a more precise exception than
AmbiguousActionindicating that the grid2op.BaseAction.BaseActionis ambiguous due to powerlines manipulation.
- This is a more precise exception than
- exception grid2op.Exceptions.InvalidNumberOfGenerators[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous because an incorrect number of generator tries to be modified.
- exception grid2op.Exceptions.InvalidNumberOfLines[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous because an incorrect number of lines tries to be modified.
- exception grid2op.Exceptions.InvalidNumberOfLoads[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous because an incorrect number of loads tries to be modified.
- exception grid2op.Exceptions.InvalidNumberOfObjectEnds[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous because an incorrect number of object at a substation try to be modified.
- exception grid2op.Exceptions.InvalidReconnection[source]
Bases:
OnLinesThis is a more precise exception than
OnLinesindicating that thegrid2op.BaseAgenttried to reconnect a powerline illegally.
- exception grid2op.Exceptions.InvalidRedispatching[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActiontry to apply an invalid redispatching strategy.
- exception grid2op.Exceptions.InvalidStorage[source]
Bases:
AmbiguousAction- This is a more precise exception than
AmbiguousActionindicating that the grid2op.BaseAction.BaseActionis ambiguous due to storage unit manipulation.
- This is a more precise exception than
- exception grid2op.Exceptions.IslandedGrid[source]
Bases:
BackendErrorSpecific error when then backend “fails” because of an islanded grid
- exception grid2op.Exceptions.IsolatedElement[source]
Bases:
IslandedGridSpecific error that should be raised when a element is alone on a bus (islanded grid when only one element is islanded)
- exception grid2op.Exceptions.MultiEnvException[source]
Bases:
Grid2OpExceptionGeneral exception raised by
grid2Op.MultiEnv.MultiEnvironment
- exception grid2op.Exceptions.NoForecastAvailable[source]
Bases:
Grid2OpExceptionThis exception is mainly raised by the
grid2op.Observation.BaseObservation. It specifies thegrid2op.Agent.BaseAgentthat thegrid2op.Chronics.GridValuedoesn’t produce any forecasts.In that case it is not possible to use the
grid2op.Observation.BaseObservation.forecasts()method.
- exception grid2op.Exceptions.NonFiniteElement[source]
Bases:
InvalidRedispatchingThis is a more precise exception than
AmbiguousActionindicating that an action / observation non initialized (full of Nan) has been loaded by the “from_vect” method.
- exception grid2op.Exceptions.NotEnoughAttentionBudget[source]
Bases:
Grid2OpExceptionThis exception is raised when the player attempted to alert the “human operator” but it has not enough budget to do so.
- exception grid2op.Exceptions.NotEnoughGenerators[source]
Bases:
InvalidRedispatchingThis is a more precise exception than
AmbiguousActionindicating that there is not enough turned off generators to meet the demand.
- exception grid2op.Exceptions.OnLines[source]
Bases:
IllegalAction- This is a more precise exception than
IllegalActionindicating that the action is illegal due to setting wrong values to lines (reconnection impossible, disconnection impossible etc).
- This is a more precise exception than
- exception grid2op.Exceptions.OnLoad[source]
Bases:
IllegalActionThis is a more precise exception than
IllegalActionindicating that the action is illegal due to setting wrong values to loads.
- exception grid2op.Exceptions.OnProduction[source]
Bases:
IllegalActionThis is a more precise exception than
IllegalActionindicating that the action is illegal due to setting wrong values to generators.
- exception grid2op.Exceptions.OpponentError[source]
Bases:
Grid2OpExceptionGeneral error for the
grid2op.Opponent
- exception grid2op.Exceptions.PlotError[source]
Bases:
Grid2OpExceptionGeneral exception raised by any class that handles plots
- exception grid2op.Exceptions.SimulateError[source]
Bases:
BaseObservationErrorThis is the generic exception related to
grid2op.Observation.BaseObservation.simulate()function
- exception grid2op.Exceptions.SimulateUsedTooMuchThisEpisode[source]
Bases:
SimulateUsedTooMuchThis exception is raised by the
grid2op.Observation.BaseObservationwhen using “obs.simulate(…)”.It is raised when the total number of calls to obs.simulate(…) exceeds the maximum number of allowed calls to it for this episode.
The only way to use “obs.simulate(…)” again is to call “env.reset(…)”
- exception grid2op.Exceptions.SimulateUsedTooMuchThisStep[source]
Bases:
SimulateUsedTooMuchThis exception is raised by the
grid2op.Observation.BaseObservationwhen using “obs.simulate(…)”.It is raised when the total number of calls to obs.simulate(…) exceeds the maximum number of allowed calls to it, for a given step.
You can do more “obs.simulate” if you call “env.step”.
- exception grid2op.Exceptions.SimulatorError[source]
Bases:
Grid2OpExceptionThis exception indicate that the simulator you are trying to use is not initialized.
You might want to call simulator.set_state(…) before using it.
- exception grid2op.Exceptions.SomeGeneratorAbovePmax[source]
Bases:
EnvErrorThis is a more precise exception saying that, at the end of the simulation, some generator would have their production above pmax, which is not possible in practice.
New in version 1.11.0.
This can only be triggered if
grid2op.Parameters.Parameters.STOP_EP_IF_GEN_BREAK_CONSTRAINTSisTrue(which is not the default).
- exception grid2op.Exceptions.SomeGeneratorAboveRampmax[source]
Bases:
EnvErrorThis is a more precise exception saying that, at the end of the simulation, some generator would have their production vary too much, which is not possible in practice.
New in version 1.11.0.
This can only be triggered if
grid2op.Parameters.Parameters.STOP_EP_IF_GEN_BREAK_CONSTRAINTSisTrue(which is not the default).
- exception grid2op.Exceptions.SomeGeneratorBelowPmin[source]
Bases:
EnvErrorThis is a more precise exception saying that, at the end of the simulation, some generator would have their production below pmin, which is not possible in practice.
New in version 1.11.0.
This can only be triggered if
grid2op.Parameters.Parameters.STOP_EP_IF_GEN_BREAK_CONSTRAINTSisTrue(which is not the default).
- exception grid2op.Exceptions.SomeGeneratorBelowRampmin[source]
Bases:
EnvErrorThis is a more precise exception saying that, at the end of the simulation, some generator would have their production vary too much, which is not possible in practice.
New in version 1.11.0.
This can only be triggered if
grid2op.Parameters.Parameters.STOP_EP_IF_GEN_BREAK_CONSTRAINTSisTrue(which is not the default).
- exception grid2op.Exceptions.UnitCommitorRedispachingNotAvailable[source]
Bases:
IllegalActionattempt to use redispatching or unit commit method in an environment not set up.
- exception grid2op.Exceptions.UnknownEnv[source]
Bases:
Grid2OpExceptionThis exception indicate that a bad argument has been sent to the
grid2op.make()function.It does not recognize the name of the
grid2op.Environment.Environment.
- exception grid2op.Exceptions.UnrecognizedAction[source]
Bases:
AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous due to the bad formatting of the action.
- exception grid2op.Exceptions.UsedRunnerError[source]
Bases:
Grid2OpExceptionThis exception indicate that runner (object of
grid2op.Runner.Runner) has already been used.This behaviour is not supported on windows / macos given the way the Multiprocessing package works (spawning a process where grid2op objects are made is not completly supported at the moment).
The best solution is to recreate a runner, and then use this new one.
- exception grid2op.Exceptions.VSetpointModified[source]
Bases:
OnProduction- This is a more precise exception than
OnProductionindicating that the action is illegal because the setpoint voltage magnitude of a production has been changed.
- This is a more precise exception than
If you still can’t find what you’re looking for, try in one of the following pages:
Still trouble finding the information ? Do not hesitate to send a github issue about the documentation at this link: Documentation issue template
Copyright © Grid2Op a Series of LF Projects, LLC For website terms of use, trademark policy and other project policies please see https://lfprojects.org.