Maybe you will need a loop followed by an if (right after the lp solving)

loop(i,t,

if(x(i,t) > 1.0e-5,

*force the MPEC variable to be zero

MPEC_x(i,t).lo=0;

MPEC_x(i,t).up=0;

*if

);

*loop

);

2011/5/4 sapeksh vemulapati

Thank you Edson and Ana,

I have read the manual. I have learnt how to set a limit on the whole set.

What I need to particularly do is assign an upper limit to few of the whole set of variables.

- Solve the LP (in which i define variables x(i,t) ).
- Find all variables x(i,t) equal to 0.
- Force them to be 0 in the MPEC formulation.

I have tried to simply integrate an if command, but it is not working. Can anyone tell me how to do this?

Any kind of information or link is appreciated.

Regards,

Sapeksh.

On Tue, May 3, 2011 at 6:07 PM, Edson Cordeiro do Valle wrote:

Sapeksh

First run your LP model. Before run the MPEC model, do something like:

MPEC_Variable.up = LP_variable.l

.up is the upper bound of the variable.

.lo is the lower bound

.l is the level: final value or if the optimization has not started, the initial guess.

This is very clear in the Gams manual, I suggest you to read it.

Regards

sapeksh vemulapati escreveu:

Hello,

I am trying to solve an MPEC problem where I want to give the solution from an equivalent LP problem as initial values.

I need to set the upper limit for a certain set of variables to equal the value in the LP solution.

Is this possible? Any help is appreciated.

Sapeksh Vemulapati

Department of Civil Engineering

Final Year, B.Tech

IIT Madras

Edson Valle

edsoncv@gmail.com

–

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.