## MCP pair ... has empty equation but associated variable is NOT fixed

**Moderator:** aileen

**Forum rules**

Please ask questions in the other sub-forums

### MCP pair ... has empty equation but associated variable is NOT fixed

GAMS gives the error "MCP pair ... has empty equation but associated variable is NOT fixed".

### Re: MCP pair ... has empty equation but associated variable is NOT fixed

The MCP framework is related to ideas from linear algebra. If you have a square system,

The message indicates that one of the equations is empty - essentially, you have too many variables to be determined uniquely from the given equations.

The model below will give (correctly) the same error:

The equation above is a "degenerate" case in the sense that the lhs vanishes. In that case the matching variable must be fixed (

Most likely however you want to prevent such a situation from happening. Use an appropriate dollar condition on the equation such that this equation is not generated.

*Ax = b*, there will typically be a unique solution when the number of columns equals the number of rows (and*A*is non-singular). In the MCP framework, we rule out models in which the number of non-empty equations is less than the number of variables.The message indicates that one of the equations is empty - essentially, you have too many variables to be determined uniquely from the given equations.

The model below will give (correctly) the same error:

Code: Select all

```
Set i /i1,i2/;
Alias (i,ii);
Variables x(i);
Equations e(i);
e(i).. sum(ii$(ord(ii)=-1), x(ii)) =e= 0;
Model m /e.x/;
solve m using mcp;
```

*x.fx(i)=0;*).Most likely however you want to prevent such a situation from happening. Use an appropriate dollar condition on the equation such that this equation is not generated.