Search found 7 matches

by vistro
2 weeks ago
Forum: Syntax
Topic: A problem with parentheses
Replies: 3
Views: 997

Re: A problem with parentheses

Try this: W.lo(i, j)$(D(i, j)/55 <= (FV0(i, j)* P(i) * 55) ) = FV0(i, j)/55;
by vistro
1 month ago
Forum: Syntax
Topic: The problem of equations
Replies: 1
Views: 633

Re: The problem of equations

Maybe you can try the following:

*work_zone / zone1, zone2, zone3, zone4/;
work_zone(j) / zone1, zone2, zone3, zone4/;

*assign_employee(j, t).. sum(i, x(i, j, t)) =e= 1;
assign_employee(j, t)$work_zone(j).. sum(i, x(i, j, t)) =e= 1;


Best/JG
by vistro
2 years ago
Forum: Syntax
Topic: Set is under control already
Replies: 2
Views: 2545

Re: Set is under control already

Thanks, Atharv. It works!
by vistro
2 years ago
Forum: Syntax
Topic: Set is under control already
Replies: 2
Views: 2545

Set is under control already

Hi, All, I found a strange thing when dealing with sum syntax. The model works if I choose DATA('CTOTS',J2)=DATA('CTOTS',J2)*sum(I2,DATA(I2,'RTOTS'))/P_scale; where P_scale=sum(J2,DATA('CTOTS',J2)); However, if I simple replace P_scale DATA('CTOTS',J2)=DATA('CTOTS',J2)*sum(I2,DATA(I2,'RTOTS'))/sum(J...
by vistro
3 years ago
Forum: Syntax
Topic: Question about ord function and ASCII
Replies: 2
Views: 2254

Re: Question about ord function and ASCII

Thanks, Michael. Both work just fine. :D
by vistro
3 years ago
Forum: Syntax
Topic: Question about ord function and ASCII
Replies: 2
Views: 2254

Question about ord function and ASCII

Hi Folks, I tried to use $ifThen ($ifThenR) and ord functions to differentiate the scenarios containing 's'. So I would expect the set fest to only have one element, b . When I run the following code, fest always has two elements a , b . Please help me figure out what went wrong. $set Scenarios stat...
by vistro
3 years ago
Forum: API
Topic: GAMS R API
Replies: 0
Views: 4176

GAMS R API

Hi, GAMS folks
I am a ggplot2 user and wondering if there is GAMS R API (like embeddedCode: Python) to smooth the data exchange between R and GAMS.
Best/JG