Lazy callback ignored bey the solver

83 views
Skip to first unread message

kianoush....@gmail.com

unread,
Mar 26, 2019, 3:27:24 AM3/26/19
to Gurobi Optimization
Hi,

I'm applying benders cut to my problem, here is the part of the code that I apply the lazy constraint:


        if (status==GRB.INFEASIBLE):
                    print Pai
                    print Gamma
                    print Beta
                    cut=LinExpr()
                    cut=quicksum( (1-model._y[j])*Pai[j] for j in range(J))+ quicksum(Gamma[k] for k in range(K))+quicksum(model._w[i,j]*Beta[i,j,k] for i in range(I) for j in range(J) for k in range(K))>=0
                    print cut
                    model.cblazy( cut >=0)

I checked the cut linear expression and it seems fine but the solver gives me the error below:

Exception AttributeError: AttributeError("'gurobipy.Model' object has no attribute 'cblazy'",) in 'gurobipy.callbackstub' ignored

I also applied set these parameters as below:
self.MP.params.LazyConstraints = 1
        self.MP.params.Presolve = 0
        self.MP.Params.DualReductions =  0


Do you have any idea what elase could be the source of this error?

Thanks!

-Kianoush

Silke Horn

unread,
Mar 26, 2019, 3:38:36 AM3/26/19
to gur...@googlegroups.com
Hi Kianoush,

The method is called “cbLazy” (with an upper case L).

- 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.

Reply all
Reply to author
Forward
0 new messages