User Tools

Site Tools


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, A x = 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 :

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.

gams/mcp_pair_..._has_empty_equation_but_associated_variable_is_not_fixed.txt · Last modified: 2008/01/10 09:41 by franz