Search found 6 matches

by Hussain_TUT
3 months ago
Forum: Modeling
Topic: Parameter of different length
Replies: 1
Views: 180

Parameter of different length

Hi, I have the following code (not exact one) set sh /1*50/ t /1*10/ ; Parameter large (sh) small(t); I have two parameters of different length ( large(sh) and small (t) ). During simulation, large(sh) is assigned with some random values and i want to copy (for example) the middle 10 values from it ...
by Hussain_TUT
3 months ago
Forum: Modeling
Topic: GAMS parameter issue
Replies: 6
Views: 369

Re: GAMS parameter issue

Hi,
I have not noticed that . It works.

Thanks
by Hussain_TUT
3 months ago
Forum: Syntax
Topic: Any element from a set, urgent
Replies: 4
Views: 210

Re: Any element from a set, urgent

Hi,
As far as i know, set need to be defined in advanced. You can also use subset concept e.g, P can be a super set while P1 can a subset. The issue you raised may be overcomes suing $ operator in constraint.
by Hussain_TUT
3 months ago
Forum: Syntax
Topic: Any element from a set, urgent
Replies: 4
Views: 210

Re: Any element from a set, urgent

Hi, If i am understand it corrctly, you want to get a single any single value (let's say frist) from the parameter p that contains three values. If this is the case then you may try this: set i /1*3/; ** here i assume that p has only 3 three elements parameter p1 j; loop(i$(j=0), p1 (i)=p(i); j=1$(p...
by Hussain_TUT
3 months ago
Forum: Modeling
Topic: GAMS parameter issue
Replies: 6
Views: 369

Re: GAMS parameter issue

Hi, Thank you for the message. A simplified version of the code in attached. I believe that understanding of the model is not important here but the parameters ( ltc1_time(cn) , ltc2_time(cn) and ltc3_time(cn) ) used in the master and slave loop is the issue. An an example from the code: after first...
by Hussain_TUT
3 months ago
Forum: Modeling
Topic: GAMS parameter issue
Replies: 6
Views: 369

GAMS parameter issue

Hello, I have two loops in my model. The first (while) loop is more like a master loop and the other (for) loop is a slave one. The master loop contains the slave loop. The slave loop runs and calculates some values . The master loop use those values and make some decision which are passed to the sl...