## Double bound variable in an MCP

Problems with modeling
Tatjana
User
Posts: 2
Joined: 1 year ago

### Double bound variable in an MCP

Dear all,

in the general explanation of MCPs, it is stated that MCP models can solve problems where
F(z) ⟂ z.lo ≤ z ≤ z.up
Meaning that one of three conditions can hold
F(z) > 0 while z.lo = z
F(z) = 0 while z.lo ≤ z ≤ z.up
F(z) < 0 while z = z.up
https://www.gams.com/latest/docs/UG_Mod ... Models_MCP

However, in all examples below on how to implement MCPs, the variable z seems to be reduced to a variable with only an upper bound OR a lower bound. In that case, the code goes something like
z.lo = 3;
...
eq_1 .. F(z) =g= 0;
...
model example eq_1.z ;

I don't see a statement anywhere that tells me how to implement a model where F(z) can be both ≤0 and ≥0, depending on the bound that z reaches. Moreover, I'm told in Table 2 that double bound variables can only be matched with =N= equations, and I don't think that's what I want (I want F(Z) to be equal to zero in all cases where z is between its bounds, so an inequality sign seems wrong to me).
I wasn't able to find an example for code written for an MCP, where a Variable has an upper and a lower bound, resulting in three possible stages.

dirkse
Moderator
Posts: 126
Joined: 3 years ago
Location: Fairfax, VA

### Re: Double bound variable in an MCP

Tatjana,

Let's take a simple MCP as an example. Let's start with an optimization problem, so we have some intuition from the optimization world we can lean on.

min f(x) := sqr(x-1) s.t. L <= x <= U, where L and U can be finite or the expected infinity.

Taking the KKT conditions we get this MCP:
F(x) := 2(x-1) perp to L <= x <= U

I've attached a GAMS version of this. Try this with all the interesting combinations: L = -INF or finite and less than 1 or 1 or greater than 1, similar for for U. That's 16 combinations. Try them all. If you understand this tiny example and each combination, I think you'll be in good shape regarding this part of MCP.
mcp.gms
To make the experiment explicit: L in {-inf, 0, 1, 2}, U in {0, 1, 2, +INF} yields 16 combinations.

-Steve

Tatjana
User
Posts: 2
Joined: 1 year ago

Hello Steve,