Source code for grid2op.Exceptions.AmbiguousActionExceptions

from grid2op.Exceptions.Grid2OpException import Grid2OpException


# ambiguous action
[docs]class AmbiguousAction(Grid2OpException): """ This exception indicate that the :class:`grid2op.BaseAction` is 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 :class:`grid2op.BaseAction.BaseAction` in the :func:`grid2op.BaseAction.update` and :func:`grid2op.BaseAction.__call__` methods. As opposed to a :class:`IllegalAction` an :class:`AmbiguousAction` is forbidden for all the backend, in all the scenarios. It doesn't depend on the implemented rules. """ pass
[docs]class InvalidLineStatus(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous due to powerlines manipulation. """ pass
[docs]class UnrecognizedAction(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous due to the bad formatting of the action. """ pass
[docs]class InvalidNumberOfLoads(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous because an incorrect number of loads tries to be modified. """ pass
[docs]class InvalidNumberOfGenerators(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous because an incorrect number of generator tries to be modified. """ pass
[docs]class InvalidNumberOfLines(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous because an incorrect number of lines tries to be modified. """ pass
[docs]class InvalidNumberOfObjectEnds(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` is ambiguous because an incorrect number of object at a substation try to be modified. """ pass
[docs]class InvalidBusStatus(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` try to both "set" and "switch" some bus to which an object is connected. """ pass
[docs]class InvalidRedispatching(AmbiguousAction): """ This is a more precise exception than :class:`AmbiguousAction` indicating that the :class:`grid2op.BaseAction.BaseAction` try to apply an invalid redispatching strategy. """ pass
[docs]class GeneratorTurnedOnTooSoon(InvalidRedispatching): """ This is a more precise exception than :class:`AmbiguousAction` indicating that a generator has been turned on before gen_min_up_time time steps. """ pass
[docs]class GeneratorTurnedOffTooSoon(InvalidRedispatching): """ This is a more precise exception than :class:`AmbiguousAction` indicating that a generator has been turned off before gen_min_down_time time steps. """ pass
[docs]class NotEnoughGenerators(InvalidRedispatching): """ This is a more precise exception than :class:`AmbiguousAction` indicating that there is not enough turned off generators to meet the demand. """ pass