Calling an equation marginal value

Problems with syntax of GAMS
Post Reply
Louis
User
User
Posts: 1
Joined: 2 years ago

Calling an equation marginal value

Post by Louis »

Hello, i'm working on a GAMS code for Transmission Expansion Planning where I have two models working together a master problem feeding results to the subproblem and viceversa, in the later I need to take the marginal value of equations present on the master problem model, is there any syntax or command to do that? I've tried calling the equation like it was a variable for example:

EQ48.m(n,w)

But it does not work like that, if anyone knows how to do that I would appreciate it very much, greetings.
User avatar
dirkse
Moderator
Moderator
Posts: 214
Joined: 7 years ago
Location: Fairfax, VA

Re: Calling an equation marginal value

Post by dirkse »

Louis,

It should work exactly as you seem to expect.

For example, if you add these lines to the end of the trnsport.gms model you get the behavior you desire:

Code: Select all

parameter sprice(i);
sprice(i) = supply.m(i);
HTH,

-Steve
Post Reply