### Crash with GAMS v28.1 (x64)

Posted:

**Thu Aug 15, 2019 7:47 pm**The tiny GAMS program below (meaningless as such, only purpose is to reproduce the problem) causes a fully reproducible crash in GAMS v28.1 (discovered by a colleague, while trying my GAMS code). However, all earlier versions seem to work well with it, as I think should be the case. Can anyone explain why the new version crashes? Hopefully the earlier well-working status will be restored for such GAMS constructs.

$offlisting

$onempty

SETS

s hours /H01*H24/

lim /lo,up,fx,n/

bd(lim) bound /lo,up,fx/

bdneq(lim) /lo,up/

;

ALIAS (s, ts, sl);

PARAMETERS

win_time time window //

hours(s) timeslice hour //

cost_puts(s) cost of putsing //

winscost cost on winsing /1/

;

cost_puts(s)=4;

hours(s)=ord(s)-0.5;

win_time=4;

POSITIVE VARIABLES

var_puts(s) putty

var_wins(s,bd) winsing

;

FREE VARIABLES

Objz objective variable

;

EQUATIONS

eq_obj objective function

eq_win winning

;

eq_obj.. Objz =e= sum(s, cost_puts(s)*var_puts(s)+winscost*sum(bdneq(bd),var_wins(s,bd)));

eq_win(s)..

sum(bd,var_wins(s,bd)) =e=

sum(ts(sl--1)$(mod(hours(s)-hours(sl)+0.5+24,24)<win_time),var_puts(sl)+var_wins(sl,'up')-var_wins(ts,'up'));

model test/

eq_obj

eq_win

/;

solve test min objz using lp;

*---------------------------------------------------------------------------------------

Thank you.

*---------------------------------------------------------------------------------------$offlisting

$onempty

SETS

s hours /H01*H24/

lim /lo,up,fx,n/

bd(lim) bound /lo,up,fx/

bdneq(lim) /lo,up/

;

ALIAS (s, ts, sl);

PARAMETERS

win_time time window //

hours(s) timeslice hour //

cost_puts(s) cost of putsing //

winscost cost on winsing /1/

;

cost_puts(s)=4;

hours(s)=ord(s)-0.5;

win_time=4;

POSITIVE VARIABLES

var_puts(s) putty

var_wins(s,bd) winsing

;

FREE VARIABLES

Objz objective variable

;

EQUATIONS

eq_obj objective function

eq_win winning

;

eq_obj.. Objz =e= sum(s, cost_puts(s)*var_puts(s)+winscost*sum(bdneq(bd),var_wins(s,bd)));

eq_win(s)..

sum(bd,var_wins(s,bd)) =e=

sum(ts(sl--1)$(mod(hours(s)-hours(sl)+0.5+24,24)<win_time),var_puts(sl)+var_wins(sl,'up')-var_wins(ts,'up'));

model test/

eq_obj

eq_win

/;

solve test min objz using lp;

*---------------------------------------------------------------------------------------

Thank you.