Thanks a lot for the suggestions.
Best,
Jia
Search found 16 matches
- 2 years ago
- Forum: Syntax
- Topic: email notification when iteration reaches to the 10th loop
- Replies: 4
- Views: 3145
- 2 years ago
- Forum: Syntax
- Topic: email notification when iteration reaches to the 10th loop
- Replies: 4
- Views: 3145
Re: email notification when iteration reaches to the 10th loop
Is this the 10th iteration in a solver or your own iteration inside the GAMS code? For the latter you can implement some logic inside your code (if(iter=10, ...);) and use the "execute" command to call the mailer program on the system to email. If this is inside the solver, you could have...
- 2 years ago
- Forum: Syntax
- Topic: email notification when iteration reaches to the 10th loop
- Replies: 4
- Views: 3145
email notification when iteration reaches to the 10th loop
Hi, I am running a huge model on Linux with 15 iterations. I am not sure whether it would be feasible or not. But I would like to get an email notification when the iteration within the GAMS model moves to its 10th iteration. Thus I can speed up the two-step maximization problem on the cluster. I kn...
- 3 years ago
- Forum: Syntax
- Topic: The easiest way to get the last item from a indexed parameter
- Replies: 5
- Views: 3222
Re: The easiest way to get the last item from a indexed parameter
You solution "blend(iter)$(ord(iter) eq sum(iter2$blend(iter2),1))" works but is expensive (quadratic effort). You can use .last (see https://www.gams.com/34/docs/UG_SetDefinition.html#UG_SetDefinition_SetAttributes) but this only works on sets not parameters. So you need to copy your ble...
- 3 years ago
- Forum: Syntax
- Topic: parameter with undefined set
- Replies: 2
- Views: 1793
Re: parameter with undefined set
Thank you Michael!
- 3 years ago
- Forum: Syntax
- Topic: The easiest way to get the last item from a indexed parameter
- Replies: 5
- Views: 3222
Re: The easiest way to get the last item from a indexed parameter
Hi Atharv, Thanks for the answer. Maybe I should put it more clear about "dynamic". The set "iter" is defined firstly with 15 different numbers /1*15/. So the card(iter) is always 15. But the parameter blend(iter) is dynamic and start to fill the space one by one, while the rest ...
- 3 years ago
- Forum: Syntax
- Topic: The easiest way to get the last item from a indexed parameter
- Replies: 5
- Views: 3222
Re: The easiest way to get the last item from a indexed parameter
Hi Atharv, Thanks for the answer. Maybe I should put it more clear about "dynamic". The set "iter" is defined firstly with 15 different numbers /1*15/. So the card(iter) is always 15. But the parameter blend(iter) is dynamic and start to fill the space one by one, while the rest ...
- 3 years ago
- Forum: Syntax
- Topic: parameter with undefined set
- Replies: 2
- Views: 1793
parameter with undefined set
Hi all, I got a problem with a parameter with the undefined set. For example record(*). I defined a parameter record(*) and have data input using the flexible name of the index. i.e. record('anything I want')=number for hundreds of them; Now I would like to process this parameter with simple operati...
- 3 years ago
- Forum: Syntax
- Topic: The easiest way to get the last item from a indexed parameter
- Replies: 5
- Views: 3222
The easiest way to get the last item from a indexed parameter
Hello all, I have a dynamic set "iter" that defines the parameter blend(iter). I would like to take the last value from the blend(iter) when the iter might increase as the simulation goes along. I know that if we have a deterministic set iter=15, its easy to call blend('15'). But since ite...
- 3 years ago
- Forum: Syntax
- Topic: Multiple mixed conditions (string and value) using $Ifthen
- Replies: 5
- Views: 2915
Re: Multiple mixed conditions (string and value) using $Ifthen
Thank you Michael!