Search found 7 matches
- 1 month ago
- Forum: Syntax
- Topic: A problem with parentheses
- Replies: 3
- Views: 1496
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;
- 1 month ago
- Forum: Syntax
- Topic: The problem of equations
- Replies: 1
- Views: 2716
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
*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
- 2 years ago
- Forum: Syntax
- Topic: Set is under control already
- Replies: 2
- Views: 2675
Re: Set is under control already
Thanks, Atharv. It works!
- 2 years ago
- Forum: Syntax
- Topic: Set is under control already
- Replies: 2
- Views: 2675
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...
- 3 years ago
- Forum: Syntax
- Topic: Question about ord function and ASCII
- Replies: 2
- Views: 2326
Re: Question about ord function and ASCII
Thanks, Michael. Both work just fine.
- 3 years ago
- Forum: Syntax
- Topic: Question about ord function and ASCII
- Replies: 2
- Views: 2326
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...
- 3 years ago
- Forum: API
- Topic: GAMS R API
- Replies: 0
- Views: 4473
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
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