1
$\begingroup$

I am currently working on a scheduling problem (MIP) to minimize cost, and my idea is to first generate a set of discrete initial solutions, and build an LP model with the discrete initial solution to get the shadow price for each constraint. With the shadow price of each constraint, maybe I can better decide which part of the discrete initial solution should I adjust to get a better value, then put the discrete initial solution into the MIP model to solve faster.

I have now solved the LP model using Gurobi and used .pi attribute to get the shadow price for each constraint. However, the shadow prices I got are all positive. Is there a way I can do to get the negative shadow prices in Gurobi?

$\endgroup$
2
  • 1
    $\begingroup$ Are you sure that not all shadow prices should be nonnegative? Do you have $\le$ constraints in your model and, if so, are you sure that at least some of them should be binding? $\endgroup$
    – prubin
    Commented Mar 24, 2022 at 16:29
  • $\begingroup$ Welcome to OR.SE. Would you elaborate more on what you mean by "first generate a set of discrete initial solutions, and build an LP model with the discrete initial solution to get the shadow price for each constraint"? $\endgroup$
    – A.Omidi
    Commented Mar 24, 2022 at 17:41

1 Answer 1

4
$\begingroup$

Please note that the notion of shadow prices or dual values only makes sense for LPs, that is, when ignoring all integrality restrictions. One should not interpret too much into those values when the actual underlying problem is a MIP. That's also the reason why these values are not available.

Instead, you might want to look into Multi-Scenario optimization to explore different options.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.