[NLP] [Tech variable] Hecksher-Ohlin Model

Hello everyone,
I am new to GAMS, but I have discovered it is great for making certain simulations! I have prepared a file which works perfectly, but I would love to know if it is possible to get the same results without having to add additional variable to my code.

Everything is explained as well as I could do it in GAMS file.

I have 8 equations to solve, but in order to do that I need to add another variable and and maximixe it. I am not sure why. I have just heard that GAMS thinks that what I want to do is too simple and obvious and I have to add another variable for him.

I have heard that I souldn’t use NLP function for that.

Unfortunately, I am not very experienced with GAMS - I just know the very basics.

I would really appreciate it if you could have a look at my GAMS file (I have described everything there as well as possible with additional [IMPORTANT] tag in places I believe should be changed).

I hope I have described what I would like to achieve.

Thank you!


hecksher problem.gms (4.86 KB)

After having defined those variables:

ZZ(I)…
PROD(J, (PC(J) / alfa(J,I))**alfa(J,I)) / A(I) =E= P(I);

DOCH_K…
DOCH =E= SUM(J, wyposazenie(J) * PC(J));

POP_D(I)…
C(I) =E= BETA(I) * DOCH / P(I);

POP_C(J,I)…
ZATR(J,I) =E= alfa(J,I) * P(I) * X(I) / PC(J) ;

RYN_D(I)…
C(I) + NEKSPORT(I) =E= X(I);

RYN_C(J)…
wyposazenie(J) =E= SUM(I, ZATR(J,I));

BOP…
SUM(I, NEKSPORT(I) * P(I)) =E= 0;

WW…
W =E= PROD(I, C(I)**BETA(I));


*RTECH - I would like to get rid of it
RTECH… ZTECH=E=1;

*I am doing this

MODEL SIMPLE

option nlp = pathnlp;

SOLVE SIMPLE USING NLP maximizing ZTECH;

*It would be great to simply get rid of ZTECH variable and use a different method.


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/d/optout.

Luke,

If you have a square system of nonlinear equations you can solve it via the MCP or CNS model types. More info can be found at:

http://www.gams.com/modtype/index.htm

HTH,

-Steve

On Mon, Dec 1, 2014 at 5:21 PM, GAMS fan wrote:

After having defined those variables:

ZZ(I)…
PROD(J, (PC(J) / alfa(J,I))**alfa(J,I)) / A(I) =E= P(I);

DOCH_K…
DOCH =E= SUM(J, wyposazenie(J) * PC(J));

POP_D(I)…
C(I) =E= BETA(I) * DOCH / P(I);

POP_C(J,I)…
ZATR(J,I) =E= alfa(J,I) * P(I) * X(I) / PC(J) ;

RYN_D(I)…
C(I) + NEKSPORT(I) =E= X(I);

RYN_C(J)…
wyposazenie(J) =E= SUM(I, ZATR(J,I));

BOP…
SUM(I, NEKSPORT(I) * P(I)) =E= 0;

WW…
W =E= PROD(I, C(I)**BETA(I));


*RTECH - I would like to get rid of it
RTECH… ZTECH=E=1;

*I am doing this

MODEL SIMPLE

option nlp = pathnlp;

SOLVE SIMPLE USING NLP maximizing ZTECH;

*It would be great to simply get rid of ZTECH variable and use a different method.


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/d/optout.



\

Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com