Search found 29 matches

by dunyayigezerken
4 years ago
Forum: Syntax
Topic: Sum with index as a function
Replies: 5
Views: 3811

Re: Sum with index as a function

Hello,

Maybe you can try this:

Code: Select all


set j /1*20/, i /1*20/;

parameter a /-2/, b(i), x(j);

x(j) = uniform(1,10);
b(i) = Sum ( j$(j.val = i.val - a + 1 and ord(j) GE 2) , x(j));

display b, x;

by dunyayigezerken
4 years ago
Forum: Syntax
Topic: Is there a way for GAMS interruption and re-run from where it lasted?
Replies: 6
Views: 10996

Is there a way for GAMS interruption and re-run from where it lasted?

Hello, If I have 5 hours to wait for GAMS result on Monday and 3 hours on Tuesday, and if I know that the model will be solved after 8 hours first run, is there a way to interrupt GAMS on Monday after 5 hours and run again on Tuesday from where it stopped on Monday. So, I will get result on Tuesday ...
by dunyayigezerken
5 years ago
Forum: Syntax
Topic: dual objective value
Replies: 1
Views: 2177

dual objective value

Is there a way to change dual objective value to reduce duration of solution period in MIP? So, maybe the program starts to search closer to the optimal solution to save time. Check the screenshot, please.
by dunyayigezerken
5 years ago
Forum: Modeling
Topic: Non equal linearization
Replies: 0
Views: 1688

Non equal linearization

Hello,

I want to write as (x - y not equal 0), in MIP, to check the entering the system of 2 products. Entering time of two products can not be same. How can I write in GAMS and still stay in linear?

Thanks in advance.
by dunyayigezerken
5 years ago
Forum: Modeling
Topic: pair & check variables
Replies: 2
Views: 4778

Re: pair & check variables

Hello, Actually,I have o() values as parameter and a()=o() - e(), e() which is variable lower than 40, the new a(j) (6th a in the example) must be greater than c(i)-5 while j>i however; every new a must use just 1 c(i). For example, if we use 67 for finding 6th a(j), 7th a(j) can not use 67 to check...
by dunyayigezerken
5 years ago
Forum: Modeling
Topic: pair & check variables
Replies: 2
Views: 4778

pair & check variables

Hello, I have a problem with check 2 variables. For example; Assume that a(i) and c(i) as a(j) c(i) 60 105 22 67 64 109 66 111 68 113 for new a(j) value the model checks that a(j)>c(i)-5 for example if new value can be 70 due 70>67-5 however if it is realized, the model use c(i) that is the result o...
by dunyayigezerken
5 years ago
Forum: Syntax
Topic: sorting values in a variable
Replies: 4
Views: 5387

Re: sorting values in a variable

Thank you very much again.
by dunyayigezerken
5 years ago
Forum: Syntax
Topic: sorting values in a variable
Replies: 4
Views: 5387

Re: sorting values in a variable

Actually, that is what I want to do below. a(j) c(j) 1 60 72 2 64 95 3 66 38 4 68 65 5 ??? the last indice for a(j) must be under the value of c(j) - 5, it may be good for all of them. but, there is also a constraint for a(j) like max or min value for a(j) as determined in parameters so not all c(j)...
by dunyayigezerken
5 years ago
Forum: Syntax
Topic: sorting values in a variable
Replies: 4
Views: 5387

sorting values in a variable

Hello, I have a problem for my PhD thesis in GAMS. The problem is I have a variable (not parameter) c(j) and I calculated it with my function. And after 5 indices the 6th indice value must be made by comparing the rest of 5 c(j) values, it is a condition. However, it has to be done by sorting as I g...