• Gurobi Staff

Hi Sven,

Thank you for pointing this out! This is indeed a missing feature and we will most likely add it for the next version.

Cheers,
Matthias

• Gurobi Staff

I wonder about one detail in your message though:  In your callback you do

    v = m.cbGetNodeRel([m._visitors])    vv = v.getAttr('x')

where m._visitors is an MVar object, so my expectation would be that v (and not vv) is an ndarray containing the relaxation values for m._visitors.  What would you expect v to be instead?

Dear Robert,

probably you're right. I thought that v would be something like an Mvar populated with the values in attribute x, but I suppose cbGet NodeRel gives you directly the ndarray? In any case, the error suggests that this is indeed not implemented yet.

Thanks for the observation.

Best,

Sven

• Gurobi Staff

Hello Sven,

in the next bugfix release 9.0.1 (due in the next few weeks or so), you'll be able to query relaxation and solution values on MVar objects in the callback. The result of such a query is an ndarray of the same shape as the MVar itself.

Robert

Hello Robert,

that is excellent news; thank you.

Sven