Description
This test checks that the shuffle example from the documentation works as expected.
Small Model of Type : GAMS
Category : GAMS Test library
Main file : shuffle1.gms
$title 'Test for option shuffle' (SHUFFLE1,SEQ=690)
$onText
This test checks that the shuffle example from the documentation works as
expected.
$offText
set i /i1*i6/,
rmi(i, i);
parameter A(i);
option shuffle=A;
rmi(i, i + (- Ord(i) + A(i))) = yes;
set error(i);
alias (i,row,col);
error(row) = sum(rmi(row, col), 1) <> 1;
Abort$card(error) 'rmi should have exactly one entry per row';
error(col) = sum(rmi(row, col), 1) <> 1;
Abort$card(error) 'rmi should have exactly one entry per col';