def __init__(self, *args, **kwargs): BaseAction.__init__(self, *args, **kwargs) warnings.warn( "Action class has been renamed \"BaseAction\" if it was the Base class of each Action class," "or \"CompleteAction\" for the action that gives the possibility to do every grid " "manipulation in grid2op. This class Action will be removed in future versions.", category=PendingDeprecationWarning)
def __init__(self, gridobj): BaseAction.__init__(self, gridobj) self.authorized_keys = set([ k for k in self.authorized_keys if k != "injection" and k != "hazards" and k != "maintenance" ]) self.attr_list_vect = [ "_set_line_status", "_switch_line_status", "_set_topo_vect", "_change_bus_vect", "_redispatch" ]
def __init__(self, gridobj): """ See the definition of :func:`BaseAction.__init__` and of :class:`BaseAction` for more information. Nothing more is done in this constructor. """ BaseAction.__init__(self, gridobj) self.authorized_keys = {"injection"} self.attr_list_vect = ["prod_v"] if self.shunts_data_available: self.attr_list_vect += ["shunt_p", "shunt_q", "shunt_bus"] self.authorized_keys.add("shunt")
def __init__(self, gridobj): """ See the definition of :func:`BaseAction.__init__` and of :class:`BaseAction` for more information. Nothing more is done in this constructor. """ BaseAction.__init__(self, gridobj) # the injection keys is not authorized, meaning it will send a warning is someone try to implement some # modification injection. self.authorized_keys = set() self.attr_list_vect = []
def __init__(self): """ See the definition of :func:`BaseAction.__init__` and of :class:`BaseAction` for more information. Nothing more is done in this constructor. """ BaseAction.__init__(self) if VoltageOnlyAction.shunt_added is False and self.shunts_data_available: VoltageOnlyAction.attr_list_vect += ["shunt_p", "shunt_q", "shunt_bus"] VoltageOnlyAction.authorized_keys.add("shunt") self._update_value_set()
def __init__(self, gridobj): """ See the definition of :func:`BaseAction.__init__` and of :class:`BaseAction` for more information. Nothing more is done in this constructor. """ BaseAction.__init__(self, gridobj) # the injection keys is not authorized, meaning it will send a warning is someone try to implement some # modification injection. self.authorized_keys = set([ k for k in self.authorized_keys if k != "injection" and k != "set_bus" and k != "change_bus" and k != "change_line_status" and k != "redispatch" ]) self.attr_list_vect = ["_set_line_status"]
def __init__(self): BaseAction.__init__(self)