Beispiel #1
0
 def __init__(self, action_space):
     Converter.__init__(self, action_space)
     self.__class__ = IdToAct.init_grid(action_space)
     self.all_actions = []
     # add the do nothing topology
     self.all_actions.append(super().__call__())
     self.n = 1
 def __init__(self, action_space):
     Converter.__init__(self, action_space)
     self.__class__ = ConnectivityConverter.init_grid(action_space)
     self.subs_ids = np.array([], dtype=dt_int)
     self.obj_type = []
     self.pos_topo = np.array([], dtype=dt_int)
     self.n = 1
     self.last_obs = None
     self.max_sub_changed = self.n_sub
     self.last_disagreement = None
Beispiel #3
0
    def __init__(self, action_space):
        Converter.__init__(self, action_space)
        self.init_action_space = action_space
        self.__class__ = ToVect.init_grid(action_space)
        self.do_nothing_vect = action_space({}).to_vect()

        # for gym conversion
        self.__gym_action_space = None
        self.__dict_space = None
        self.__order_gym = None
        self.__dtypes_gym = None
        self.__shapes_gym = None

        self.__order_gym_2_me = None
        self.__order_me_2_gym = None
    def __init__(self, action_space):
        if not action_space.supports_type("set_bus"):
            raise RuntimeError(
                "It is not possible to use the connectivity converter if the action space do not "
                "support the \"set_bus\" argument.")

        Converter.__init__(self, action_space)
        self.__class__ = ConnectivityConverter.init_grid(action_space)
        self.subs_ids = np.array([], dtype=dt_int)
        self.obj_type = []
        self.pos_topo = np.array([], dtype=dt_int)

        self.n = -1
        self.last_obs = None
        self.max_sub_changed = self.n_sub
        self.last_disagreement = None
        self.indx_sel = None  # for explore in "convert_act"
Beispiel #5
0
 def __init__(self, action_space):
     Converter.__init__(self, action_space)
     self.do_nothing_vect = action_space({}).to_vect()
Beispiel #6
0
 def __init__(self, action_space):
     Converter.__init__(self, action_space)
     self.__class__ = ToVect.init_grid(action_space)
     self.do_nothing_vect = action_space({}).to_vect()