Hi,
First you need to get a hold of that constraint. The easiest way would be to save it to a variable upon creation, e.g.:
c = m.addConstr( sum(Wi[(e)] * expert_costs.get(e) for e in Experts) <= 270 )
(You could also use the model’s getConstrByName method if you know the constraint’s name, but if possible I’d recommend to store it directly.)
Then you can simply set the RHS attribute to a new value, e.g.:
c.RHS = 300
- Silke
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
gurobi+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.