Complementarity constraints or sigmoid ?

Problems with modeling
Post Reply
Sisco
User
User
Posts: 6
Joined: 6 years ago

Complementarity constraints or sigmoid ?

Post by Sisco »

Hello,

as I'm writing an NLP problem, I understand there are two possibilities to smoothly model a valve-like behaviour (0/1) :
  • Sigmoids
  • Complementarity constraints
What are the advantages and drawbacks of each methods ? Do solvers prefer one or the other ?

As I understand it, complementarity constraints are not convex formulations... is that right ? What does it mean for the solvers ?


Thanks in advance for your expertise ;)
Best regards,
Sisco
User avatar
dirkse
Moderator
Moderator
Posts: 215
Joined: 7 years ago
Location: Fairfax, VA

Re: Complementarity constraints or sigmoid ?

Post by dirkse »

Sisco,

You ask about modeling a 0/1 variable using smooth constraints.

If all you want is x to be binary, you could do x * (1-x) = 0. This won't be convex but that's to be expected if you have binary variables.

There is some relationship between 0/1 variables and complementarity, but they are not the same thing. Usually a model can be more directly put into one form or the other. For example, a model with a lot of yes/no decisions (e.g. do we build a warehouse here or not?) is naturally modeled with binary variables. A model with regime changes or phase changes (e.g. production is set to satisfy an optimality condition, as long as it is above the contractual or physical lower bound) is more naturally done with complementarity. Also there is the whole weight of previous work - if you use binary variables in cases where most others do, you'll likely have a wealth of examples and help available. Ditto for complementarity.

If you throw in the possibility of approximating the complementarity with a sigmoid or other smooth function (there are several options in GAMS, see the table here https://www.gams.com/latest/docs/UG_Par ... ch=sigmoid), you introduce other issues. The problem may get easier to solve and you can use different solvers, but you solve only an approximation. As the approximation gets better, it also gets more difficult: it will have a tighter kink and perhaps other scaling issues.

It isn't really a matter of solver preference as much as capability. If you use binary variables, you must use a solver that can handle discrete variables. If you use complementarity, you have to use an MCP or MPEC solver. If you use smoothing functions, you can use an NLP solver. There's not a lot of overlap between these three.

HTH,

-Steve
Post Reply