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

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
aileen
User
User
Posts: 136
Joined: 4 years ago

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

Post by aileen »

GAMS gives the error "MCP pair ... has empty equation but associated variable is NOT fixed".
aileen
User
User
Posts: 136
Joined: 4 years ago

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

Post by aileen »

The MCP framework is related to ideas from linear algebra. If you have a square system, 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;
The equation above is a "degenerate" case in the sense that the lhs vanishes. In that case the matching variable must be fixed (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.
Locked