Model.remove()


Model.remove()

remove ( item )

Remove a variable, linear constraint, quadratic constraint, or SOS from a model.

Arguments:

item: The item to remove from the model. The item can be a Var, a Constr, QConstr, or an SOS

Example usage:

  model.remove(model.getVars()[0])
  model.remove(model.getConstrs()[0])
  model.remove(model.getQConstrs()[0])
  model.remove(model.getSOS()[0])