Exception¶
-
exception
grid2op.Exceptions.ActiveSetPointAbovePmax[source]¶ Bases:
grid2op.Exceptions.IllegalActionExceptions.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:
grid2op.Exceptions.IllegalActionExceptions.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.AmbiguousAction[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.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.BackendError[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionBase class of all error regarding the Backend that might be badly configured.
-
exception
grid2op.Exceptions.ChronicsError[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionBase class of all error regarding the chronics and the gridValue (see
grid2op.ChronicsHandler.GridValuefor more information)
-
exception
grid2op.Exceptions.ChronicsNotFoundError[source]¶ Bases:
grid2op.Exceptions.ChronicsExceptions.ChronicsErrorThis exception is raised where there are no chronics folder found at the indicated location.
-
exception
grid2op.Exceptions.DivergingPowerFlow[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpException- 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 connex
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:
grid2op.Exceptions.Grid2OpException.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:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.AmbiguousActionExceptions.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.
-
__weakref__¶ list of weak references to the object (if defined)
-
-
exception
grid2op.Exceptions.IllegalAction[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.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.IncorrectNumberOfElements[source]¶ Bases:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.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.IncorrectNumberOfSubstation[source]¶ Bases:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.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:
grid2op.Exceptions.EnvExceptions.EnvErrorThis is a more precise exception than
EnvErrorindicating that there is a mismatch in the number of loads at a substation.
-
exception
grid2op.Exceptions.InsufficientData[source]¶ Bases:
grid2op.Exceptions.ChronicsExceptions.ChronicsErrorThis exception is raised where there are not enough data compare to the size of the episode asked.
-
exception
grid2op.Exceptions.InvalidBusStatus[source]¶ Bases:
grid2op.Exceptions.AmbiguousActionExceptions.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.InvalidLineStatus[source]¶ Bases:
grid2op.Exceptions.AmbiguousActionExceptions.AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous due to powerlines manipulation.
-
exception
grid2op.Exceptions.InvalidNumberOfGenerators[source]¶ Bases:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.IllegalActionExceptions.OnLinesThis is a more precise exception than
OnLinesindicating that thegrid2op.BaseAgenttried to reconnect a powerline illegally.
-
exception
grid2op.Exceptions.InvalidRedispatching[source]¶ Bases:
grid2op.Exceptions.AmbiguousActionExceptions.AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActiontry to apply an invalid redispatching strategy.
-
exception
grid2op.Exceptions.MultiEnvException[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionGeneral exception raised by
grid2Op.MultiEnv.MultiEnvironment
-
exception
grid2op.Exceptions.NoForecastAvailable[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionThis exception is mainly raised by the
grid2op.BaseObservation. It specifies thegrid2op.BaseAgent.BaseAgentthat thegrid2op.ChronicsHandler.GridValuedoesn’t produce any forecasts.In that case it is not possible to use the
grid2op.BaseObservation.BaseObservation.forecasts()method.
-
exception
grid2op.Exceptions.NotEnoughGenerators[source]¶ Bases:
grid2op.Exceptions.AmbiguousActionExceptions.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:
grid2op.Exceptions.IllegalActionExceptions.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:
grid2op.Exceptions.IllegalActionExceptions.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:
grid2op.Exceptions.IllegalActionExceptions.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:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionGeneral error for the
grid2op.Opponent
-
exception
grid2op.Exceptions.PlotError[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.Grid2OpExceptionGeneral exception raised by any class that handles plots
-
exception
grid2op.Exceptions.UnitCommitorRedispachingNotAvailable[source]¶ Bases:
grid2op.Exceptions.IllegalActionExceptions.IllegalActionattempt to use redispatching or unit commit method in an environment not set up.
-
exception
grid2op.Exceptions.UnknownEnv[source]¶ Bases:
grid2op.Exceptions.Grid2OpException.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:
grid2op.Exceptions.AmbiguousActionExceptions.AmbiguousActionThis is a more precise exception than
AmbiguousActionindicating that thegrid2op.BaseAction.BaseActionis ambiguous due to the bad formatting of the action.
-
exception
grid2op.Exceptions.VSetpointModified[source]¶ Bases:
grid2op.Exceptions.IllegalActionExceptions.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: