4

I am trying to transfer a model written in GAMS using CPLEX solver to Pyomo. CPLEX has a feature allowing modelers to relax constraints & decision variables if a model is infeasible - FeasOpt (for Feasible Optimization). I am having trouble recreating this automated infeasibility relaxation feature in Pyomo without having to use slack variables.

Below is a snippet of my GAMS/CPLEX code:

Constraint for relaxation that costs infeasibility:

RotationOnce1(R)$(sum(W$B1(W), VAC(R,W))<4 or sum(W$B1(W), AIRP(R,W))<4).. | sum(Rot$Act(Rot), y1(R,Rot))=e=1;

Assigning relaxation preference:

*$ontext
$onecho > cplex.opt
feasopt 1
feasoptmode 1

x.feaspref 0
RotationOnce1.feaspref 1

How can i recreate constraint relaxation (without slack variables) in pyomo? Rewriting the CPLEX snippet above in Pyomo would be helpful

Community
  • 1
  • 1
Steve
  • 135
  • 1
  • 10
  • I don't know if this can help (I have no idea of how to make work FeasOpt), but if you know the Pyomo constraint that you want to relax, you can always deactivate it using `model.your_contraint.deactivate()`. Is this what you are trying to do? – V. Brunelle Apr 05 '19 at 17:39
  • @V.Brunelle Looking for an automated approach – Steve Apr 05 '19 at 17:54

1 Answers1

1

It seems that Pyomo doesn't implement the FeasOpt feature: https://github.com/Pyomo/pyomo/search?q=feasopt&unscoped_q=feasopt

Xavier Nodet
  • 5,033
  • 2
  • 37
  • 48
  • 1
    But its still unclear to me if pyomo has a similar feature to accomplish a similar task. It does not have to be called "FeasOpt" – Steve Apr 09 '19 at 19:57