Hi all

I am trying to implement a min cost flow problem (extend to multi commodity form) in GAMS as a MCP. The LP version as expected is optimal but I seem to run into some issues. I try to implement the complementarity slackness constraints and GAMS exits saying unbounded. When I check the list file, it says Lower Bound and =L= illegal on beta.

Could anyone point to the obvious error which I am not able to spot and debug.

Thanks a ton

Set

a arcs /1*3/*

n nodes /13/

Positive Variables

x(a), alpha(n), beta(a);

Parameters

c(a)

/1 10

2 50

3 15 /

cap(a)

/1 30

2 50

3 40/

demand(n)

/1 30

2 0

3 -30 /;

Table nodearc(n,a)

1 2 3

1 1 0 -1

2 -1 1 0

3 0 -1 1 ;

Equations

demandreq(n)

capacityreq(a)

rational(a) ;

demandreq(n)…sum(a,nodearc(n,a)* x(a))=e= demand(n);

capacityreq(a)…x(a) =l= cap(a) ;

rational(a)…sum(n,nodearc(n,a)*alpha(n))+beta(a)=g=0;

model mcf /demandreq.alpha, capacityreq.beta, rational.x/;

solve mcf using mcp;

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/groups/opt_out.

\

You maybe want to use the emp framework for this (see the gams docs for how to do this).

At the very least, you need to update the equation capacityreq so that it is a =g= equation (and thus consistent with your definition of positive variable beta).

On Jul 1, 2013, at 1:38 AM, Raoul wrote:

Hi all

I am trying to implement a min cost flow problem (extend to multi commodity form) in GAMS as a MCP. The LP version as expected is optimal but I seem to run into some issues. I try to implement the complementarity slackness constraints and GAMS exits saying unbounded. When I check the list file, it says Lower Bound and =L= illegal on beta.

Could anyone point to the obvious error which I am not able to spot and debug.

Thanks a ton

Set

a arcs /1*3/*

n nodes /13/

Positive Variables

x(a), alpha(n), beta(a);

Parameters

c(a)

/1 10

2 50

3 15 /

cap(a)

/1 30

2 50

3 40/

demand(n)

/1 30

2 0

3 -30 /;

Table nodearc(n,a)

1 2 3

1 1 0 -1

2 -1 1 0

3 0 -1 1 ;

Equations

demandreq(n)

capacityreq(a)

rational(a) ;

demandreq(n)…sum(a,nodearc(n,a)* x(a))=e= demand(n);

capacityreq(a)…x(a) =l= cap(a) ;

rational(a)…sum(n,nodearc(n,a)*alpha(n))+beta(a)=g=0;

model mcf /demandreq.alpha, capacityreq.beta, rational.x/;

solve mcf using mcp;

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/groups/opt_out.

\