scensol5.gms : Test handling of scenario dictionary sets with more than 50 entries

Description

This test makes sure that we can handle scenario dictionary sets with more than
50 entries. With GAMS releases before 24.2.3 this caused an error potentially.

Contributor: Lutz Westermann


Small Model of Type : GAMS


Category : GAMS Test library


Main file : scensol5.gms

$title Test handling of scenario dictionary sets with more than 50 entries (SCENSOL5,SEQ=659)

$onText
This test makes sure that we can handle scenario dictionary sets with more than
50 entries. With GAMS releases before 24.2.3 this caused an error potentially.

Contributor: Lutz Westermann
$offText


Sets  i     units              / Depot1*Depot5 /
      j     inputs and outputs / stock, wages, issues, receipts, reqs /
      ji(j) inputs             / stock, wages                         /
      jo(j) outputs            /               issues, receipts, reqs / ;

alias(i,k);

Table data(i,j)
         stock  wages  issues  receipts  reqs
Depot1     3      5      40       55      30
Depot2     2.5    4.5    45       50      40
Depot3     4      6      55       45      30
Depot4     6      7      48       20      60
Depot5     2.3    3.5    28       50      25
;

Parameter slice(j)     / #j 0 /
          Rand1_k(i)   / #i 0 /
          Rand2_k(i)   / #i 0 /
          Rand3_k(i)   / #i 0 /
          Rand4_k(i)   / #i 0 /
          Rand5_k(i)   / #i 0 /
          Rand6_k(i)   / #i 0 /
          Rand7_k(i)   / #i 0 /
          Rand8_k(i)   / #i 0 /
          Rand9_k(i)   / #i 0 /
          Rand10_k(i)  / #i 0 /
          Rand11_k(i)  / #i 0 /
          Rand12_k(i)  / #i 0 /
          Rand13_k(i)  / #i 0 /
          Rand14_k(i)  / #i 0 /
          Rand15_k(i)  / #i 0 /
          Rand16_k(i)  / #i 0 /
          Rand17_k(i)  / #i 0 /
          Rand18_k(i)  / #i 0 /
          Rand19_k(i)  / #i 0 /
          Rand20_k(i)  / #i 0 /
          Rand21_k(i)  / #i 0 /
          Rand22_k(i)  / #i 0 /
          Rand23_k(i)  / #i 0 /
          Rand24_k(i)  / #i 0 /
          Rand25_k(i)  / #i 0 /
          Rand26_k(i)  / #i 0 /
          Rand27_k(i)  / #i 0 /
          Rand28_k(i)  / #i 0 /
          Rand29_k(i)  / #i 0 /
          Rand30_k(i)  / #i 0 /
          Rand31_k(i)  / #i 0 /
          Rand32_k(i)  / #i 0 /
          Rand33_k(i)  / #i 0 /
          Rand34_k(i)  / #i 0 /
          Rand35_k(i)  / #i 0 /
          Rand36_k(i)  / #i 0 /
          Rand37_k(i)  / #i 0 /
          Rand38_k(i)  / #i 0 /
          Rand39_k(i)  / #i 0 /
          Rand40_k(i)  / #i 0 /
          Rand41_k(i)  / #i 0 /
          Rand42_k(i)  / #i 0 /
          Rand43_k(i)  / #i 0 /
          Rand44_k(i)  / #i 0 /
          Rand45_k(i)  / #i 0 /
          Rand46_k(i)  / #i 0 /
          Rand47_k(i)  / #i 0 /
          Rand48_k(i)  / #i 0 /
          Rand49_k(i)  / #i 0 /
          Rand50_k(i)  / #i 0 /  ;

Positive variables u(jo)
                   v(ji)
                   Rand1
                   Rand2
                   Rand3
                   Rand4
                   Rand5
                   Rand6
                   Rand7
                   Rand8
                   Rand9
                   Rand10
                   Rand11
                   Rand12
                   Rand13
                   Rand14
                   Rand15
                   Rand16
                   Rand17
                   Rand18
                   Rand19
                   Rand20
                   Rand21
                   Rand22
                   Rand23
                   Rand24
                   Rand25
                   Rand26
                   Rand27
                   Rand28
                   Rand29
                   Rand30
                   Rand31
                   Rand32
                   Rand33
                   Rand34
                   Rand35
                   Rand36
                   Rand37
                   Rand38
                   Rand39
                   Rand40
                   Rand41
                   Rand42
                   Rand43
                   Rand44
                   Rand45
                   Rand46
                   Rand47
                   Rand48
                   Rand49
                   Rand50;

Variable           eff;

Equations defe
          denom
          lime(i)
          randEq1
          randEq2
          randEq3
          randEq4
          randEq5
          randEq6
          randEq7
          randEq8
          randEq9
          randEq10
          randEq11
          randEq12
          randEq13
          randEq14
          randEq15
          randEq16
          randEq17
          randEq18
          randEq19
          randEq20
          randEq21
          randEq22
          randEq23
          randEq24
          randEq25
          randEq26
          randEq27
          randEq28
          randEq29
          randEq30
          randEq31
          randEq32
          randEq33
          randEq34
          randEq35
          randEq36
          randEq37
          randEq38
          randEq39
          randEq40
          randEq41
          randEq42
          randEq43
          randEq44
          randEq45
          randEq46
          randEq47
          randEq48
          randEq49
          randEq50;

defe..     eff =e= sum(jo, u(jo)*slice(jo));
denom..    sum(ji, v(ji)*slice(ji)) =e= 1;
lime(i)..  sum(jo, u(jo)*data(i,jo))=l= sum(ji, v(ji)*data(i,ji));
randEq1..  sum(jo, u(jo)*slice(jo)) =g= Rand1;
randEq2..  sum(jo, u(jo)*slice(jo)) =g= Rand2;
randEq3..  sum(jo, u(jo)*slice(jo)) =g= Rand3;
randEq4..  sum(jo, u(jo)*slice(jo)) =g= Rand4;
randEq5..  sum(jo, u(jo)*slice(jo)) =g= Rand5;
randEq6..  sum(jo, u(jo)*slice(jo)) =g= Rand6;
randEq7..  sum(jo, u(jo)*slice(jo)) =g= Rand7;
randEq8..  sum(jo, u(jo)*slice(jo)) =g= Rand8;
randEq9..  sum(jo, u(jo)*slice(jo)) =g= Rand9;
randEq10.. sum(jo, u(jo)*slice(jo)) =g= Rand10;
randEq11.. sum(jo, u(jo)*slice(jo)) =g= Rand11;
randEq12.. sum(jo, u(jo)*slice(jo)) =g= Rand12;
randEq13.. sum(jo, u(jo)*slice(jo)) =g= Rand13;
randEq14.. sum(jo, u(jo)*slice(jo)) =g= Rand14;
randEq15.. sum(jo, u(jo)*slice(jo)) =g= Rand15;
randEq16.. sum(jo, u(jo)*slice(jo)) =g= Rand16;
randEq17.. sum(jo, u(jo)*slice(jo)) =g= Rand17;
randEq18.. sum(jo, u(jo)*slice(jo)) =g= Rand18;
randEq19.. sum(jo, u(jo)*slice(jo)) =g= Rand19;
randEq20.. sum(jo, u(jo)*slice(jo)) =g= Rand20;
randEq21.. sum(jo, u(jo)*slice(jo)) =g= Rand21;
randEq22.. sum(jo, u(jo)*slice(jo)) =g= Rand22;
randEq23.. sum(jo, u(jo)*slice(jo)) =g= Rand23;
randEq24.. sum(jo, u(jo)*slice(jo)) =g= Rand24;
randEq25.. sum(jo, u(jo)*slice(jo)) =g= Rand25;
randEq26.. sum(jo, u(jo)*slice(jo)) =g= Rand26;
randEq27.. sum(jo, u(jo)*slice(jo)) =g= Rand27;
randEq28.. sum(jo, u(jo)*slice(jo)) =g= Rand28;
randEq29.. sum(jo, u(jo)*slice(jo)) =g= Rand29;
randEq30.. sum(jo, u(jo)*slice(jo)) =g= Rand30;
randEq31.. sum(jo, u(jo)*slice(jo)) =g= Rand31;
randEq32.. sum(jo, u(jo)*slice(jo)) =g= Rand32;
randEq33.. sum(jo, u(jo)*slice(jo)) =g= Rand33;
randEq34.. sum(jo, u(jo)*slice(jo)) =g= Rand34;
randEq35.. sum(jo, u(jo)*slice(jo)) =g= Rand35;
randEq36.. sum(jo, u(jo)*slice(jo)) =g= Rand36;
randEq37.. sum(jo, u(jo)*slice(jo)) =g= Rand37;
randEq38.. sum(jo, u(jo)*slice(jo)) =g= Rand38;
randEq39.. sum(jo, u(jo)*slice(jo)) =g= Rand39;
randEq40.. sum(jo, u(jo)*slice(jo)) =g= Rand40;
randEq41.. sum(jo, u(jo)*slice(jo)) =g= Rand41;
randEq42.. sum(jo, u(jo)*slice(jo)) =g= Rand42;
randEq43.. sum(jo, u(jo)*slice(jo)) =g= Rand43;
randEq44.. sum(jo, u(jo)*slice(jo)) =g= Rand44;
randEq45.. sum(jo, u(jo)*slice(jo)) =g= Rand45;
randEq46.. sum(jo, u(jo)*slice(jo)) =g= Rand46;
randEq47.. sum(jo, u(jo)*slice(jo)) =g= Rand47;
randEq48.. sum(jo, u(jo)*slice(jo)) =g= Rand48;
randEq49.. sum(jo, u(jo)*slice(jo)) =g= Rand49;
randEq50.. sum(jo, u(jo)*slice(jo)) =g= Rand50;

model dea /all /;

parameter scopt / SkipBaseCase 1 /

set dict / k      . scenario. ''
           slice  . param   . data
           scopt  . opt     . ''
           Rand1  . level   . Rand1_k
           Rand2  . level   . Rand2_k
           Rand3  . level   . Rand3_k
           Rand4  . level   . Rand4_k
           Rand5  . level   . Rand5_k
           Rand6  . level   . Rand6_k
           Rand7  . level   . Rand7_k
           Rand8  . level   . Rand8_k
           Rand9  . level   . Rand9_k
           Rand10 . level   . Rand10_k
           Rand11 . level   . Rand11_k
           Rand12 . level   . Rand12_k
           Rand13 . level   . Rand13_k
           Rand14 . level   . Rand14_k
           Rand15 . level   . Rand15_k
           Rand16 . level   . Rand16_k
           Rand17 . level   . Rand17_k
           Rand18 . level   . Rand18_k
           Rand19 . level   . Rand19_k
           Rand20 . level   . Rand20_k
           Rand21 . level   . Rand21_k
           Rand22 . level   . Rand22_k
           Rand23 . level   . Rand23_k
           Rand24 . level   . Rand24_k
           Rand25 . level   . Rand25_k
           Rand26 . level   . Rand26_k
           Rand27 . level   . Rand27_k
           Rand28 . level   . Rand28_k
           Rand29 . level   . Rand29_k
           Rand30 . level   . Rand30_k
           Rand31 . level   . Rand31_k
           Rand32 . level   . Rand32_k
           Rand33 . level   . Rand33_k
           Rand34 . level   . Rand34_k
           Rand35 . level   . Rand35_k
           Rand36 . level   . Rand36_k
           Rand37 . level   . Rand37_k
           Rand38 . level   . Rand38_k
           Rand39 . level   . Rand39_k
           Rand40 . level   . Rand40_k
           Rand41 . level   . Rand41_k
           Rand42 . level   . Rand42_k
           Rand43 . level   . Rand43_k
           Rand44 . level   . Rand44_k
           Rand45 . level   . Rand45_k
           Rand46 . level   . Rand46_k
           Rand47 . level   . Rand47_k
           Rand48 . level   . Rand48_k
           Rand49 . level   . Rand49_k
           Rand50 . level   . Rand50_k /;

solve dea using lp max eff scenario dict;