[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding if/then/else statement to GMPL
From: |
Andrew Makhorin |
Subject: |
Re: Adding if/then/else statement to GMPL |
Date: |
Sat, 29 Aug 2020 18:01:06 +0300 |
On Sat, 2020-08-29 at 15:29 +0200, Domingo Alvarez Duarte wrote:
> Hello !
>
> With this commit I'm close for a proof of concept of GMPL with multi
> problem, multi solve, repeat and let statements.
>
> The let needs work for the dependence hell when update a parameter.
>
> The multi solve statements is implemented as calling a user provided
> callaback (see in examples/glpsol.c for a crude example).
>
> https://github.com/mingodad/GLPK/commit/65655c05fc8e315b3e43b98a1f2324
> 66614a0b46
>
> It compiles and run examples/cut2.mod on an infinite loop due to
> problems with propagation of updates with 'let' statement.
>
> Ideally it should be compatible with existing models (not yet fully
> implemented/checked).
>
> Any comment/suggestion/help is welcome !
What about this:
...
var z;
...
if (z >= 0)
s.t. foo: sum{j in J} x[j] >= 0;
else
s.t. bar: sum{j in J} x[j] <= 1;
...
solve;
...
;)
>
> Cheers !
>
>
- Re: Adding if/then/else statement to GMPL, (continued)
- RE: Adding if/then/else statement to GMPL, Meketon, Marc, 2020/08/24
- Re: Adding if/then/else statement to GMPL, Domingo Alvarez Duarte, 2020/08/27
- Re: Adding if/then/else statement to GMPL, Andrew Makhorin, 2020/08/27
- Re: Adding if/then/else statement to GMPL, Domingo Alvarez Duarte, 2020/08/27
- Re: Adding if/then/else statement to GMPL, Domingo Alvarez Duarte, 2020/08/27
- Re: Adding if/then/else statement to GMPL, Domingo Alvarez Duarte, 2020/08/29
- Re: Adding if/then/else statement to GMPL,
Andrew Makhorin <=
- Re: Adding if/then/else statement to GMPL, Domingo Alvarez Duarte, 2020/08/30
- Re: Adding if/then/else statement to GMPL, Andrew Makhorin, 2020/08/24
- Message not available
- Re: Adding if/then/else statement to GMPL, Meketon, Marc, 2020/08/24
- Re: Adding if/then/else statement to GMPL, Andrew Makhorin, 2020/08/24