Ejemplo n.º 1
0
 def get_all_pi_cells(self):
     pa = self.pa
     #print(self.pi_cons, pa.pi_eps)
     pi_cells = CM.get_cells_from_ival_constraints(self.pi_cons, pa.pi_eps)
     #print(pi_cells)
     #raw_input('..')
     #return [c for c in zip(*pi_cells)]
     return pi_cells
Ejemplo n.º 2
0
    def get_abs_state_set_from_ival_constraints(
            self,
            x_cons,
            n,
            d,
            pvt,
            ):

        # ================== MANIPULATES FORMAT =============== of abs_state
        # Assumes abs_state_format as tuple
        # takes in a tuple with each element as numpy array and converts them to a
        # tuple with ints
        # This is done because numpy arrays are not hashable and can not be stored
        # in a set
        # Best advise to sort it out is to use objects for abstract states instead
        # of rudimentary tuples!
        cell_list = CM.get_cells_from_ival_constraints(x_cons, self.eps)
        abs_state_list = [PlantAbstraction.get_abs_state(cell, n, d, pvt) for cell in cell_list]

        return abs_state_list
Ejemplo n.º 3
0
    def get_abs_state_set_from_ival_constraints(
        self,
        x_cons,
        n,
        d,
        pvt,
    ):

        # ================== MANIPULATES FORMAT =============== of abs_state
        # Assumes abs_state_format as tuple
        # takes in a tuple with each element as numpy array and converts them to a
        # tuple with ints
        # This is done because numpy arrays are not hashable and can not be stored
        # in a set
        # Best advise to sort it out is to use objects for abstract states instead
        # of rudimentary tuples!
        cell_list = CM.get_cells_from_ival_constraints(x_cons, self.eps)
        abs_state_list = [
            PlantAbstraction.get_abs_state(cell, n, d, pvt)
            for cell in cell_list
        ]

        return abs_state_list
Ejemplo n.º 4
0
 def get_all_i_cells(self):
     eps = self.eps
     #i_cells = CM.get_i_cells_from_ival_constraints(self.i_cons, eps)
     i_cells = CM.get_cells_from_ival_constraints(self.i_cons, eps)
     return i_cells
Ejemplo n.º 5
0
 def get_all_i_cells(self):
     return CM.get_cells_from_ival_constraints(self.i_cons, self.eps)
Ejemplo n.º 6
0
 def get_all_i_cells(self):
     eps = self.eps
     #i_cells = CM.get_i_cells_from_ival_constraints(self.i_cons, eps)
     i_cells = CM.get_cells_from_ival_constraints(self.i_cons, eps)
     return i_cells