idxperm3.gms : Check correct behavior when permuting indices of symbol used on LHS and RHS

Description

With GAMS 24.5 we improved the way how we "search" for non-default records in a
symobl.
While testing there was an error that could be reproduced with this example.
The problem occured if we assigned to a symbol that was also referenced on the
RHS, with permuted indices and we actually set some of the records to zero which
were non-zero before.

Before this error was fixed we got an execution error:

    Unexpected Exception from eassertionfailed
    executing line 14
    Please report to support@gams.com
    Msg=TSR.CheckSRTyp, pij: elemcnt(9999)<>downLinkCnt(10100) (searchrecs.c:760)

Keyword: Sys15

Contributor: Lutz Westermann, September 2015


Small Model of Type : GAMS


Category : GAMS Test library


Main file : idxperm3.gms

$title 'Check correct behavior when permuting indices of symbol used on LHS and RHS' (IDXPERM3,SEQ=686)

$onText
With GAMS 24.5 we improved the way how we "search" for non-default records in a
symobl.
While testing there was an error that could be reproduced with this example.
The problem occured if we assigned to a symbol that was also referenced on the
RHS, with permuted indices and we actually set some of the records to zero which
were non-zero before.

Before this error was fixed we got an execution error:

*** Unexpected Exception from eassertionfailed
*** executing line 14
*** Please report to support@gams.com
*** Msg=TSR.CheckSRTyp, pij: elemcnt(9999)<>downLinkCnt(10100) (searchrecs.c:760)

Keyword: Sys15

Contributor: Lutz Westermann, September 2015
$offText

$onEcho > test.gms
set i /i1*i101/
    j /j1*j101/;

alias (i,ia);

parameter pij(i,j),pj(j);

pij(i,j)    = 1;
pij(i,'j2') = 0;

pj(j) = 1;
pj('j3') = 0;

pij(i,j)$sum(ia,pij(ia,j)) = pij(i,j)*pj(j) /sum(ia,pij(ia,j));
$offEcho

$call gams test.gms lo=%GAMS.lo% sys15=1 gdx=old.gdx
$if errorlevel 1 $abort problem running with sys15=1

$call gams test.gms lo=%GAMS.lo% sys15=0 gdx=new.gdx
$if errorlevel 1 $abort problem running with sys15=0

$call gdxdiff old.gdx new.gdx > %system.nullfile%
$if errorlevel 1 $abort "GDX files differ"