Dear Alice,

I have two decision variable,p_dr(t) and p_imb(t),i need to define when p_dr(t)=0 must be p_imb(t) =0 as a constraint,please guide me how can do this?

thank you

On Friday, 22 February 2013 04:31:34 UTC+8, alicja....@gmail.com wrote:

Dear Henry,

Thank you very much!!! I have been struggling with that for so long time and now it works. Thank you again!

Best regards,

Alice

W dniu czwartek, 21 lutego 2013 17:35:11 UTC+1 uÅ¼ytkownik Henry JW Vermue napisaÅ‚:

Dear Alice,

I have had a similar problem [in order to keep track the inventory], I solved it doing the following:

I defined the initial value for each unit (say L0(p)),

then I defined the equation like this (I started the conditional parts on a separate line for clarification reasons):

eq(p,h)

(ord(p)1)
.. L(p,h)=e=L0(p)
(ord(h)=1)

+L(p,h-1)

$(ord(h)1)

-x(p,h);

So, without the using the subset. But I realize this will not work straight-away in your model, because 1 I used multiple tanks at the same time, 2 I used a slightly different definition of the time-frames, and 3 I used the production of a dummy product to see how the model would work when more products are added.

Kind regards,

Henry Vermue

On Thursday, February 21, 2013 3:18:10 PM UTC+1, alicja....@gmail.com wrote:

Dear GAMS users,

I have the following problem:

I have a constraint:

L(h1)=L(h1-1)-x(h1)

where

Set

h hours /1…36/

h1(h) /2…36/

Variables

L(h)

x(h)

I would like to fix the value for L(1) so that it will be taken into account in the computation of L(h1), where h1=2…36.

So I do the following:

L.fx(‘1’)=initial_value;

However, it seems that GAMS does not take this fixed value into account. It takes L(‘1’)=0 instead.

How can I make GAMS take into account the fixed value for L(1) instead of the default one?

Any ideas are highly appreciated.

Thank you,

Best regards,

Alice

–

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.