Ejemplo n.º 1
0
 def _remove_constraints(self, constraints):
     if len(constraints) > 0:
         constraint_indices = [constraint._index for constraint in constraints]
         super(Model, self)._remove_constraints(constraints)
         num = intArray(len(constraints) + 1)
         for i, constraint_index in enumerate(constraint_indices):
             num[i + 1] = constraint_index
         glp_del_rows(self.problem, len(constraints), num)
Ejemplo n.º 2
0
 def _remove_constraints(self, constraints):
     if len(constraints) > 0:
         constraint_indices = [constraint.index for constraint in constraints]
         super(Model, self)._remove_constraints(constraints)
         num = intArray(len(constraints) + 1)
         for i, constraint_index in enumerate(constraint_indices):
             num[i + 1] = constraint_index
         glp_del_rows(self.problem, len(constraints), num)