Source code for grid2op.Exceptions.EnvExceptions

from grid2op.Exceptions.Grid2OpException import Grid2OpException


# Exception bad environment configured
[docs]class EnvError(Grid2OpException): """ This exception indicate that the :class:`grid2op.Environment.Environment` is poorly configured. It is for example thrown when assessing if a backend is properly set up with :func:`grid2op.Backend.Backend.assert_grid_correct` """ pass
[docs]class IncorrectNumberOfLoads(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the total number of loads of the powergrid. """ pass
[docs]class IncorrectNumberOfGenerators(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the total number of generators of the powergrid. """ pass
[docs]class IncorrectNumberOfLines(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the total number of powerlines of the powergrid. """ pass
[docs]class IncorrectNumberOfSubstation(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the total number of substation of the powergrid. """ pass
[docs]class IncorrectNumberOfElements(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the total number of elements of the powergrid. """ pass
[docs]class IncorrectPositionOfLoads(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the number of loads at a substation. """ pass
[docs]class IncorrectPositionOfGenerators(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the number of generators at a substation. """ pass
[docs]class IncorrectPositionOfLines(EnvError): """ This is a more precise exception than :class:`EnvError` indicating that there is a mismatch in the number of power lines at a substation. """ pass
# Unknown environment at creating
[docs]class UnknownEnv(Grid2OpException): """ This exception indicate that a bad argument has been sent to the :func:`grid2op.make` function. It does not recognize the name of the :class:`grid2op.Environment.Environment`. """ pass
# multi environment
[docs]class MultiEnvException(Grid2OpException): """General exception raised by :class:`grid2Op.MultiEnv.MultiEnvironment` """ pass