Thursday, October 22, 2015

MCP Constraints

When expressing complementarity models it is often needed to “flip” equations around to match the sign of a dual. E.g. a ≥ equation can be paired to a positive dual variable. This sometimes leads to (at least for me) somewhat unnatural formulations such as:

image 

or in GAMS:

image

I really prefer the follow format:

image

I was unaware of this, but this can actually be done in GAMS by using a – sign in the model statement: this will negate the equation:

model production / FOCproducer.q, −eCapacity.lambda, ePrice.p/;
solve production using mcp;

No comments:

Post a Comment