or-fusion/pao

pao.duality.plugins.create_linear_dual issue when bilinear terms are present

barguel opened this issue · 5 comments

When a term of the force u*x exists in a constraint where u is binary and x is continuous, this term is overlooked when collecting dual data.

Do we have a simple example that illustrates this? I'm not sure what error I'm looking for.

We are testing the collect_dual_representation() with script: pao/bilevel/tests/test_bilevel_dualize.py to dualize the SubModel in barguel.py. Issues:

  1. We should throw an error if the constraint bodies have nonlinear terms
  2. We are currently providing _create_using() for 'pao.duality.linear_dual' with the block to dualize and the fixed variables on that block; however the collect_dual_representation() is not create a constraint and objective expression for one of the variables (e.g., in this model there is the expression u*y in the SubModel where u is fixed; there is no associated constraint in the dual problem or expression in the dual problem's objective).
  3. We did the dual by hand and noted it in the bottom of pao\bilevel\tests\auxiliary\barguel.py