Search found 23 matches

by Lucas
4 years ago
Forum: Syntax
Topic: How to compare the two parameters
Replies: 7
Views: 8052

How to compare the two parameters

Hi all, How to compare the two parameters (0-1 parameters) together and find out if they are the same or not? I wanted to use the Sameas command but I could not do it. example compare 'a' set i/1*5/ k(i); parameters a(i) /1 1,2 0,3 1,4 0,5 0/ b(i) /1 0,2 1,3 1,4 0,5 0/ c(i) /1 1,2 0,3 1,4 0,5 0/ d(i...
by Lucas
4 years ago
Forum: Archive Google Group
Topic: The way to control total solve time
Replies: 4
Views: 37908

Re: The way to control total solve time

Yes! Thanks so much!
by Lucas
4 years ago
Forum: Archive Google Group
Topic: The way to control total solve time
Replies: 4
Views: 37908

The way to control total solve time

Hi expertise, In a GAMS file, I have a number of Solve command and the option reslim = 3600 is at the beginning of the program . Need to be given to each solve statements 1 hour time, But the total solve time should not be more than 1 hour.(That is, the total of the time spent for all Solve's comman...
by Lucas
4 years ago
Forum: Bugs
Topic: Debugging in GAMS studio
Replies: 2
Views: 38228

Re: Debugging in GAMS studio

Hi Fred ,OK. thanks a lot for your answer and support!
by Lucas
4 years ago
Forum: Bugs
Topic: Debugging in GAMS studio
Replies: 2
Views: 38228

Debugging in GAMS studio

Hi expertise ,
Is there debug tools in GAMS Studio?
Thanks!
by Lucas
4 years ago
Forum: Syntax
Topic: Find & change in parameter
Replies: 2
Views: 3475

Re: Find & change in parameter

Hi @Michael could you pleas tell me what's the cnt is? why I got Erro? " 158 * Undo previous change 159 cnt=0; loop(a, cnt=cnt+(c(a)=4); if (cnt=1, c(a)=1; break;)); **** $140,36" which version of GAMS has break? Macro command need to be written in a single line, is it Right? Thanks
by Lucas
4 years ago
Forum: Tools
Topic: 3 question about documentation code
Replies: 2
Views: 23016

3 question about documentation code

Hi, in GAMS documentation > Examples > benders_2stage_mt.py> https://www.gams.com/latest/docs/apis/examples_python/namespacebenders__2stage__mt.html#a2b7b38c885143e5392557dff2b87ea54 1- what are .py file? 2- How can I use def function? (e.g. How to use scen_solve ?) 3- is it possible to have own fun...
by Lucas
4 years ago
Forum: Syntax
Topic: Find & change in parameter
Replies: 2
Views: 3475

Find & change in parameter

Hi! How to find the third one and changed it to 4?(without loop ?Is it possible?) Generally How may I get the nth repetitive element (1,2or 3) from set A and change it?Is there anyway to do that? Set A/1*9/; Parameter c(A); *Suppose p is c(A)=121311332 c(A) /1 1,2 2,3 1,4 3,5 1,6 1,7 3,8 3,9 2/; *==...