-1

In bi-level programming, I have variable that is the dual variable of a constraint of the sub-model. It means that, after a decision is made, the dual variable from the sub-model will be updated in the objective and this changes the decisions.

Is is possible in Pyomo? Or what are the alternatives of implementation, or modules(e.g PyPSA)? Lagrange relaxation is possible, but the problem becomes non-linear.

Thanks a lot!

Very similar to this question, but no further discussions are there: https://groups.google.com/forum/#!msg/pyomo-forum/1Wv28SzN78M/f-YRZVBNBAAJ

kur ag
  • 591
  • 8
  • 19
nwa
  • 11
  • 3
  • Sometimes this is handled by writing the first order conditions of the inner problem. This yields explicit dual variables. When you add this to the outer problem you have direct access to the duals of the inner problem. – Erwin Kalvelagen Sep 25 '18 at 12:59
  • Thanks Erwin. Do you mean adding the Lagrange term in the objective of the inner problem as shown in the given link? Then the dual variables of the constraint in the inner problem become explicit pyomo variable indeed. However, this will make the problem non-linear, or at least the bilevel transform (bilevel-mpec) is not working, see https://github.com/Pyomo/pyomo/issues/29. The problem is If I want to use dual variables, I don't know how to do this in an automated interative way. Please correct me, if I didn't understand you completely, or my problem is still not clear. Thanks again! – nwa Oct 02 '18 at 11:28
  • The nonlinearities introduced by the complementarity conditions from a linear inner problem can be linearized using binary (or SOS1) variables. If the inner and outer problems are linear you end up with a linear MIP model. This can be solved with any MIP solver and modeling tool. – Erwin Kalvelagen Oct 02 '18 at 14:25

1 Answers1

0

If you solve the sub model then solve the main model, it is possible. Simply you will get the first model solutions and add however you want. But you think something in given link, it isn't possible. Maybe you can develop something related to the equation on a primal model which is your dual variable.

kur ag
  • 591
  • 8
  • 19
  • Thanks for the answer. As you suggested, I will get the first model solutions, and add to the objective, and then solve the objective again...this will be an iterative optimization process. Are you suggesting that this iterative process is not possible? – nwa Sep 25 '18 at 11:57
  • Iterative is posible, if you look the first sentence. – kur ag Sep 25 '18 at 12:24
  • it might be possible if I manually update the new value of the dual variable to do this iteratively, after getting the final solution. I don't see how this can be done in an automated way, since I only have the solution(of the dual variable) when I get the final solution. That's also why I'm considering using bilevel, instead of the single level problem as shown in the given link. Will you help me? – nwa Oct 02 '18 at 11:37