Hi,
> I have some always true constraints like 1<=1 after the modification of the model. I would like to know if presolve is able to remove these constraints in the model?
>
Yes, presolve will remove these constraints.
> By the way, I add this line of code
>
> model = model.presolve();
>
> and it gives me a crash of the application while running.
First question: Why do you want to call presolve directly? This routine is normally used for debugging, you don't have to call it in order to optimize your problem. If you just call model.optimize() Gurobi will automatically start the presolve routines (unless you have not turned them off). Additionally, please note that model.presolve() returns the presolved model. This is not the original model anymore, for example some variables and constraints could be removed. So you have to be very careful what you do with the model object after this call.
Second question: Can you give some more details of this "crash"? When I call this line on a model, everything seems to run normal. To be able to reproduce this, we definitely need more details.
Thanks and best regards,
Sonja
-----------------------------------------------------------------
Dr. Sonja Mars
Gurobi Optimization
>
> Thanks for your suggestion,
>
>
>
> --
>
> ---
> 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.