int Dev = 10;// Deviation
extern const int CNN = 2;// Case Index
extern const int P = 6;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 36;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 749;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 18;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6,6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17},{18,19,20,21,22,23},{24,25,26,27,28,29},{30,31,32,33,34,35}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{10959,0,0,0,0,0},{11149,0,0,0,0,0},{11208,0,0,0,0,0},{11177,0,0,0,0,0},{10924,0,0,0,0,0},{11104,0,0,0,0,0},{11050,0,0,0,0,0},{11005,0,0,0,0,0},{11085,0,0,0,0,0},{11029,0,0,0,0,0}},{{10944,0,0,0,0,0},{11049,0,0,0,0,0},{10879,0,0,0,0,0},{11090,0,0,0,0,0},{11047,0,0,0,0,0},{11069,0,0,0,0,0},{11211,0,0,0,0,0},{11029,0,0,0,0,0},{11007,0,0,0,0,0},{11065,0,0,0,0,0}},{{10941,0,0,0,0,0},{10893,0,0,0,0,0},{11083,0,0,0,0,0},{11037,0,0,0,0,0},{10979,0,0,0,0,0},{11230,0,0,0,0,0},{11229,0,0,0,0,0},{10971,0,0,0,0,0},{10995,0,0,0,0,0},{10872,0,0,0,0,0}},{{11207,0,0,0,0,0},{11072,0,0,0,0,0},{10885,0,0,0,0,0},{11138,0,0,0,0,0},{10928,0,0,0,0,0},{10889,0,0,0,0,0},{10923,0,0,0,0,0},{11154,0,0,0,0,0},{11054,0,0,0,0,0},{11153,0,0,0,0,0}},{{11100,0,0,0,0,0},{10928,0,0,0,0,0},{10981,0,0,0,0,0},{11032,0,0,0,0,0},{11087,0,0,0,0,0},{11109,0,0,0,0,0},{11176,0,0,0,0,0},{11030,0,0,0,0,0},{10940,0,0,0,0,0},{11058,0,0,0,0,0}},{{11033,0,0,0,0,0},{10963,0,0,0,0,0},{11213,0,0,0,0,0},{11137,0,0,0,0,0},{11061,0,0,0,0,0},{11101,0,0,0,0,0},{10971,0,0,0,0,0},{11000,0,0,0,0,0},{11140,0,0,0,0,0},{11079,0,0,0,0,0}}},{{{-206,-206,-222,-231,-228,-222},{-242,-204,-222,-235,-235,-202},{-231,-226,-240,-235,-242,-228},{-220,-233,-224,-208,-224,-237},{-226,-217,-228,-226,-228,-233},{-235,-233,-204,-246,-237,-237},{-204,-204,-211,-244,-224,-204},{-217,-215,-235,-246,-228,-217},{-242,-244,-213,-202,-226,-204},{-233,-213,-244,-224,-246,-244}},{{-222,-222,-222,-215,-231,-213},{-206,-237,-233,-220,-237,-208},{-246,-233,-242,-237,-206,-211},{-213,-246,-226,-215,-215,-208},{-244,-233,-240,-215,-211,-246},{-246,-228,-213,-237,-235,-211},{-246,-233,-235,-204,-220,-220},{-215,-211,-246,-240,-246,-217},{-206,-217,-226,-206,-208,-237},{-228,-226,-226,-244,-233,-217}},{{-204,-231,-233,-220,-246,-228},{-228,-235,-237,-220,-206,-235},{-240,-204,-215,-208,-206,-242},{-240,-244,-222,-244,-237,-202},{-240,-235,-215,-228,-240,-211},{-226,-228,-240,-244,-237,-208},{-228,-215,-246,-220,-244,-211},{-211,-208,-222,-217,-237,-224},{-224,-233,-237,-220,-228,-246},{-240,-204,-204,-224,-202,-208}},{{-246,-240,-222,-244,-226,-244},{-237,-235,-240,-213,-202,-226},{-228,-222,-220,-228,-217,-226},{-220,-217,-228,-204,-222,-217},{-235,-233,-233,-233,-237,-215},{-240,-228,-215,-228,-208,-217},{-220,-224,-240,-242,-228,-220},{-224,-208,-231,-215,-211,-211},{-217,-228,-222,-206,-244,-213},{-211,-242,-215,-213,-233,-202}},{{-246,-233,-206,-206,-222,-246},{-233,-228,-240,-231,-208,-206},{-204,-215,-208,-204,-220,-222},{-240,-222,-202,-228,-244,-222},{-235,-204,-246,-231,-244,-211},{-202,-224,-220,-211,-213,-222},{-246,-206,-220,-215,-242,-211},{-220,-220,-213,-240,-208,-220},{-228,-208,-240,-224,-222,-240},{-246,-222,-213,-217,-240,-242}},{{-224,-240,-228,-208,-206,-217},{-244,-233,-228,-235,-202,-202},{-220,-240,-202,-217,-246,-226},{-244,-231,-211,-240,-244,-242},{-246,-208,-237,-242,-231,-244},{-217,-237,-222,-211,-231,-233},{-204,-231,-213,-213,-220,-215},{-215,-206,-233,-246,-204,-204},{-235,-204,-242,-237,-220,-237},{-231,-231,-224,-235,-244,-206}}},{{{-221,-252,-238,-231,-243,-255},{-228,-255,-228,-236,-240,-262},{-224,-245,-224,-250,-214,-248},{-226,-262,-214,-257,-217,-214},{-226,-221,-231,-252,-262,-250},{-233,-233,-226,-224,-228,-257},{-257,-231,-231,-248,-255,-259},{-245,-240,-221,-257,-236,-228},{-231,-240,-252,-219,-252,-226},{-240,-217,-236,-217,-243,-217}},{{-219,-226,-214,-221,-245,-245},{-255,-243,-236,-243,-221,-221},{-248,-233,-214,-214,-259,-214},{-252,-252,-233,-262,-255,-236},{-240,-262,-252,-257,-243,-255},{-219,-231,-250,-236,-228,-257},{-250,-221,-243,-252,-259,-224},{-259,-219,-228,-240,-255,-231},{-221,-259,-250,-250,-231,-240},{-236,-231,-259,-257,-214,-228}},{{-259,-250,-243,-217,-226,-262},{-226,-245,-226,-240,-214,-233},{-259,-250,-240,-250,-238,-257},{-255,-240,-248,-259,-214,-245},{-255,-240,-243,-245,-221,-214},{-250,-259,-243,-217,-252,-245},{-228,-252,-257,-233,-214,-262},{-259,-231,-248,-217,-255,-217},{-236,-217,-245,-257,-233,-240},{-219,-226,-255,-257,-221,-243}},{{-257,-236,-217,-257,-214,-217},{-257,-257,-257,-259,-214,-257},{-259,-214,-226,-217,-221,-221},{-240,-228,-238,-255,-217,-236},{-250,-240,-214,-231,-219,-259},{-226,-217,-250,-221,-236,-262},{-262,-243,-228,-236,-219,-250},{-262,-250,-226,-262,-245,-243},{-250,-233,-231,-250,-214,-243},{-243,-236,-245,-250,-228,-231}},{{-259,-233,-224,-245,-243,-243},{-231,-255,-252,-240,-252,-250},{-226,-243,-236,-214,-224,-248},{-252,-238,-259,-259,-214,-221},{-217,-240,-236,-221,-245,-219},{-248,-238,-214,-262,-252,-243},{-259,-219,-219,-257,-257,-252},{-219,-219,-233,-224,-226,-252},{-248,-233,-217,-252,-219,-221},{-257,-255,-243,-214,-214,-224}},{{-219,-240,-259,-243,-214,-252},{-217,-219,-228,-245,-240,-214},{-236,-259,-240,-236,-238,-214},{-217,-228,-231,-255,-248,-236},{-259,-252,-250,-214,-214,-248},{-252,-245,-259,-238,-257,-238},{-231,-262,-214,-219,-243,-255},{-236,-226,-219,-245,-238,-250},{-217,-219,-224,-255,-231,-233},{-257,-226,-214,-214,-240,-226}}},{{{-295,-292,-300,-268,-278,-276},{-265,-246,-287,-276,-246,-300},{-257,-268,-289,-281,-292,-292},{-300,-289,-251,-246,-248,-281},{-289,-248,-248,-289,-265,-251},{-257,-257,-287,-246,-276,-276},{-248,-287,-270,-251,-276,-298},{-278,-273,-276,-300,-284,-281},{-287,-248,-295,-251,-262,-254},{-289,-268,-246,-265,-259,-300}},{{-251,-265,-248,-287,-276,-254},{-251,-287,-278,-281,-246,-289},{-248,-278,-254,-276,-259,-265},{-268,-287,-259,-262,-298,-289},{-246,-248,-259,-284,-289,-281},{-246,-278,-273,-287,-295,-251},{-298,-284,-259,-254,-262,-281},{-281,-281,-300,-273,-262,-259},{-254,-268,-289,-248,-248,-268},{-287,-276,-300,-292,-268,-246}},{{-248,-257,-257,-268,-295,-270},{-265,-273,-251,-284,-273,-262},{-270,-265,-292,-295,-270,-284},{-300,-251,-300,-268,-270,-246},{-268,-278,-276,-268,-298,-257},{-284,-270,-298,-284,-257,-284},{-298,-270,-259,-265,-284,-287},{-259,-254,-273,-276,-284,-268},{-262,-278,-281,-257,-257,-257},{-273,-268,-254,-246,-251,-246}},{{-300,-262,-300,-248,-278,-270},{-276,-268,-257,-284,-284,-278},{-251,-251,-248,-257,-276,-262},{-254,-295,-284,-278,-257,-300},{-278,-273,-287,-257,-287,-259},{-281,-246,-257,-259,-254,-246},{-278,-281,-259,-295,-259,-246},{-270,-300,-287,-262,-257,-254},{-281,-289,-251,-289,-273,-254},{-254,-254,-300,-300,-298,-281}},{{-295,-265,-298,-262,-248,-284},{-273,-300,-276,-257,-295,-254},{-278,-257,-257,-287,-273,-251},{-281,-254,-268,-298,-276,-251},{-298,-295,-281,-254,-281,-257},{-295,-273,-284,-251,-257,-287},{-289,-251,-276,-300,-276,-270},{-257,-276,-287,-281,-262,-248},{-265,-246,-276,-265,-254,-295},{-276,-265,-257,-246,-265,-278}},{{-262,-298,-270,-281,-248,-268},{-300,-248,-246,-259,-259,-289},{-287,-298,-300,-300,-278,-262},{-276,-298,-287,-292,-257,-287},{-292,-287,-289,-265,-273,-292},{-287,-248,-298,-273,-284,-281},{-276,-246,-295,-292,-262,-273},{-276,-289,-248,-248,-276,-246},{-265,-262,-284,-254,-298,-295},{-281,-270,-251,-276,-246,-289}}},{{{-143,-146,-142,-162,-152,-149},{-139,-168,-152,-156,-165,-166},{-146,-152,-151,-149,-160,-159},{-162,-166,-162,-140,-163,-152},{-142,-156,-160,-160,-151,-163},{-143,-165,-140,-160,-148,-168},{-162,-157,-152,-146,-157,-140},{-140,-154,-148,-159,-166,-156},{-156,-168,-169,-148,-166,-162},{-160,-149,-142,-151,-154,-145}},{{-157,-151,-149,-163,-157,-160},{-162,-160,-169,-168,-145,-146},{-139,-140,-151,-159,-160,-166},{-169,-142,-168,-162,-149,-142},{-165,-156,-168,-157,-143,-157},{-159,-165,-146,-157,-165,-166},{-149,-151,-163,-166,-160,-145},{-163,-168,-143,-169,-143,-163},{-154,-159,-145,-156,-151,-156},{-168,-159,-146,-140,-139,-169}},{{-149,-148,-145,-148,-163,-140},{-159,-156,-162,-139,-148,-145},{-165,-151,-146,-145,-151,-146},{-143,-162,-154,-139,-151,-145},{-146,-148,-168,-145,-159,-142},{-151,-140,-160,-156,-163,-154},{-151,-151,-152,-152,-163,-169},{-143,-140,-154,-148,-151,-159},{-140,-166,-139,-139,-149,-142},{-160,-154,-152,-143,-165,-152}},{{-146,-156,-168,-163,-151,-139},{-142,-148,-139,-146,-169,-146},{-145,-151,-162,-145,-159,-152},{-160,-162,-169,-143,-140,-143},{-162,-163,-162,-139,-154,-168},{-162,-142,-166,-148,-146,-151},{-140,-146,-154,-139,-169,-148},{-162,-143,-148,-146,-149,-148},{-152,-160,-162,-154,-143,-162},{-149,-152,-149,-143,-151,-154}},{{-163,-146,-143,-160,-146,-160},{-159,-140,-140,-165,-140,-139},{-146,-142,-166,-169,-146,-166},{-149,-169,-148,-149,-154,-140},{-149,-152,-165,-160,-152,-166},{-149,-151,-169,-142,-146,-157},{-146,-154,-160,-162,-142,-159},{-166,-159,-143,-156,-162,-148},{-145,-168,-159,-148,-166,-145},{-148,-145,-157,-154,-166,-159}},{{-168,-152,-152,-146,-165,-151},{-145,-146,-163,-148,-157,-146},{-154,-154,-166,-152,-146,-148},{-149,-146,-165,-149,-156,-169},{-168,-166,-165,-160,-142,-140},{-151,-160,-142,-148,-140,-148},{-143,-152,-169,-156,-145,-142},{-152,-163,-168,-162,-152,-151},{-162,-156,-146,-156,-145,-162},{-152,-149,-166,-169,-154,-156}}},{{{-166,-164,-177,-191,-184,-178},{-193,-173,-164,-195,-187,-193},{-180,-189,-189,-175,-195,-173},{-184,-184,-178,-166,-195,-195},{-171,-191,-178,-186,-186,-191},{-177,-177,-167,-169,-182,-200},{-175,-178,-173,-167,-180,-171},{-164,-186,-184,-175,-195,-178},{-177,-164,-197,-191,-169,-195},{-180,-177,-189,-191,-191,-167}},{{-186,-187,-166,-198,-178,-191},{-189,-164,-189,-186,-178,-169},{-166,-184,-184,-191,-186,-167},{-166,-164,-171,-175,-171,-193},{-187,-193,-164,-173,-200,-180},{-182,-186,-198,-166,-169,-195},{-193,-175,-195,-189,-175,-200},{-186,-167,-187,-180,-167,-198},{-167,-173,-180,-182,-200,-173},{-198,-166,-198,-171,-184,-197}},{{-166,-184,-180,-169,-198,-180},{-166,-166,-189,-173,-191,-167},{-175,-177,-171,-177,-177,-195},{-191,-171,-171,-177,-198,-166},{-193,-182,-164,-186,-187,-173},{-175,-193,-182,-164,-178,-169},{-180,-200,-178,-178,-169,-177},{-193,-173,-177,-173,-191,-184},{-169,-167,-191,-175,-195,-178},{-184,-195,-178,-189,-166,-180}},{{-177,-193,-173,-180,-200,-197},{-177,-167,-167,-166,-189,-191},{-186,-173,-180,-182,-186,-186},{-178,-177,-186,-173,-187,-191},{-167,-184,-191,-166,-164,-175},{-180,-173,-177,-197,-180,-189},{-191,-173,-173,-166,-195,-184},{-177,-198,-191,-195,-182,-171},{-180,-180,-198,-186,-178,-195},{-191,-180,-198,-167,-191,-187}},{{-197,-189,-180,-200,-164,-178},{-197,-180,-193,-189,-195,-169},{-191,-191,-189,-169,-189,-166},{-180,-187,-177,-189,-184,-175},{-177,-197,-197,-197,-180,-189},{-180,-173,-178,-169,-198,-171},{-167,-178,-180,-167,-177,-198},{-193,-175,-197,-193,-180,-200},{-177,-178,-169,-173,-197,-200},{-184,-200,-182,-191,-167,-200}},{{-169,-187,-200,-195,-198,-178},{-198,-173,-186,-187,-171,-166},{-166,-180,-182,-180,-175,-193},{-189,-167,-191,-186,-182,-177},{-198,-178,-187,-175,-200,-177},{-167,-193,-171,-193,-186,-200},{-164,-186,-164,-187,-193,-197},{-193,-178,-167,-200,-177,-175},{-191,-186,-171,-193,-198,-187},{-182,-200,-200,-197,-178,-180}}},{{{-228,-235,-223,-230,-260,-225},{-267,-257,-245,-223,-235,-260},{-250,-247,-270,-243,-220,-250},{-247,-270,-255,-260,-223,-267},{-223,-220,-223,-247,-252,-220},{-228,-228,-240,-267,-265,-245},{-228,-267,-233,-262,-262,-230},{-260,-228,-240,-228,-245,-247},{-267,-230,-247,-223,-270,-233},{-235,-267,-250,-270,-243,-240}},{{-262,-243,-252,-220,-233,-228},{-250,-220,-245,-270,-220,-255},{-260,-225,-235,-247,-243,-257},{-230,-260,-250,-233,-265,-267},{-247,-238,-230,-225,-245,-245},{-238,-243,-252,-228,-245,-235},{-233,-243,-245,-220,-267,-262},{-235,-257,-230,-223,-245,-228},{-235,-250,-265,-238,-270,-225},{-233,-228,-235,-262,-247,-240}},{{-235,-267,-233,-245,-267,-235},{-223,-225,-228,-267,-233,-255},{-257,-228,-257,-228,-220,-247},{-220,-250,-228,-233,-260,-270},{-230,-262,-223,-225,-235,-230},{-252,-233,-260,-265,-228,-250},{-257,-223,-240,-255,-265,-267},{-262,-233,-223,-230,-220,-257},{-223,-223,-228,-223,-262,-243},{-233,-252,-267,-243,-243,-240}},{{-250,-223,-233,-228,-250,-250},{-223,-260,-230,-245,-220,-250},{-262,-262,-243,-247,-233,-245},{-243,-238,-250,-255,-245,-267},{-225,-230,-233,-267,-260,-228},{-257,-233,-238,-220,-260,-228},{-240,-265,-228,-252,-225,-225},{-252,-245,-225,-267,-257,-267},{-230,-243,-220,-243,-230,-250},{-245,-225,-257,-262,-267,-243}},{{-243,-245,-238,-250,-225,-267},{-233,-255,-230,-240,-235,-228},{-250,-270,-267,-260,-225,-257},{-252,-220,-260,-223,-238,-225},{-257,-250,-265,-247,-225,-243},{-233,-255,-247,-255,-233,-260},{-243,-252,-247,-243,-262,-252},{-228,-225,-257,-255,-270,-223},{-243,-235,-262,-220,-247,-260},{-230,-267,-225,-265,-233,-223}},{{-223,-223,-225,-255,-255,-247},{-240,-230,-252,-267,-260,-245},{-267,-267,-255,-252,-257,-270},{-265,-265,-252,-257,-223,-230},{-245,-233,-240,-223,-247,-225},{-238,-238,-257,-230,-247,-267},{-243,-252,-235,-243,-250,-247},{-233,-245,-225,-255,-243,-252},{-225,-270,-270,-267,-262,-243},{-220,-223,-247,-260,-265,-260}}},{{{-213,-245,-210,-231,-208,-243},{-226,-247,-222,-229,-236,-210},{-238,-254,-247,-240,-233,-240},{-249,-252,-231,-229,-215,-231},{-222,-243,-213,-249,-245,-217},{-240,-219,-247,-238,-240,-231},{-236,-252,-224,-252,-222,-231},{-249,-226,-236,-226,-208,-222},{-229,-213,-238,-243,-240,-254},{-254,-236,-213,-236,-247,-213}},{{-254,-217,-247,-224,-217,-240},{-224,-215,-229,-245,-240,-249},{-210,-231,-217,-210,-222,-233},{-231,-208,-236,-231,-210,-245},{-240,-210,-249,-208,-236,-208},{-224,-254,-236,-222,-247,-224},{-236,-245,-243,-252,-252,-208},{-240,-213,-222,-215,-254,-224},{-215,-247,-233,-213,-245,-217},{-243,-252,-222,-231,-213,-226}},{{-226,-229,-224,-217,-252,-226},{-233,-236,-233,-233,-245,-219},{-245,-231,-229,-240,-222,-215},{-238,-219,-231,-217,-249,-243},{-240,-226,-208,-238,-208,-226},{-213,-245,-254,-252,-231,-245},{-240,-222,-229,-215,-243,-254},{-252,-231,-254,-245,-229,-222},{-231,-219,-252,-252,-231,-249},{-219,-233,-245,-222,-245,-222}},{{-219,-243,-254,-233,-215,-247},{-240,-243,-231,-247,-252,-245},{-254,-208,-224,-247,-208,-208},{-224,-245,-226,-247,-238,-233},{-208,-229,-213,-219,-213,-249},{-226,-219,-238,-254,-238,-215},{-219,-233,-247,-219,-213,-236},{-238,-252,-210,-245,-245,-236},{-238,-236,-224,-252,-247,-236},{-215,-229,-238,-254,-233,-215}},{{-243,-219,-224,-254,-208,-215},{-217,-222,-213,-236,-236,-240},{-231,-240,-226,-243,-219,-210},{-238,-238,-233,-243,-217,-210},{-213,-233,-247,-252,-231,-238},{-217,-254,-243,-219,-245,-238},{-247,-252,-247,-247,-222,-240},{-233,-222,-229,-245,-254,-222},{-208,-243,-222,-233,-231,-238},{-243,-229,-210,-231,-245,-231}},{{-238,-222,-224,-238,-224,-224},{-226,-236,-249,-247,-252,-217},{-247,-238,-229,-240,-215,-236},{-243,-252,-243,-219,-238,-217},{-213,-213,-208,-231,-231,-245},{-213,-233,-238,-208,-215,-231},{-215,-238,-233,-229,-247,-226},{-252,-217,-226,-224,-224,-245},{-240,-249,-213,-240,-215,-252},{-226,-219,-226,-233,-229,-252}}},{{{-318,-279,-285,-320,-276,-312},{-300,-318,-323,-323,-300,-268},{-300,-303,-270,-279,-297,-323},{-323,-312,-300,-297,-312,-306},{-270,-309,-282,-297,-282,-285},{-303,-320,-320,-315,-291,-279},{-294,-303,-309,-309,-270,-306},{-279,-320,-309,-265,-265,-270},{-276,-309,-312,-300,-268,-323},{-300,-291,-312,-270,-282,-273}},{{-294,-320,-315,-291,-268,-300},{-285,-303,-282,-320,-315,-265},{-294,-318,-268,-312,-276,-291},{-309,-297,-297,-318,-270,-285},{-318,-285,-270,-268,-312,-265},{-279,-273,-309,-285,-318,-282},{-282,-312,-323,-315,-285,-282},{-309,-276,-312,-270,-270,-309},{-306,-279,-320,-297,-312,-318},{-279,-273,-270,-300,-323,-285}},{{-303,-270,-297,-282,-279,-270},{-285,-309,-291,-270,-303,-291},{-294,-312,-306,-306,-320,-265},{-282,-303,-265,-276,-306,-294},{-315,-315,-288,-315,-279,-291},{-279,-312,-309,-306,-306,-279},{-323,-291,-318,-309,-276,-309},{-300,-303,-282,-309,-270,-303},{-268,-315,-285,-303,-315,-315},{-282,-276,-285,-312,-297,-297}},{{-297,-297,-315,-303,-306,-323},{-318,-276,-291,-265,-273,-315},{-276,-294,-306,-323,-318,-276},{-276,-320,-276,-323,-318,-315},{-276,-273,-303,-300,-276,-291},{-306,-265,-285,-282,-320,-303},{-279,-288,-291,-291,-291,-273},{-294,-270,-323,-312,-297,-291},{-273,-309,-315,-303,-288,-279},{-318,-291,-320,-323,-279,-291}},{{-309,-282,-318,-315,-288,-273},{-265,-291,-265,-265,-291,-279},{-273,-268,-303,-318,-309,-315},{-323,-300,-312,-288,-276,-306},{-288,-297,-279,-285,-268,-273},{-315,-318,-273,-320,-323,-282},{-315,-306,-268,-320,-288,-270},{-323,-320,-288,-297,-268,-294},{-273,-273,-291,-312,-303,-268},{-294,-303,-288,-323,-273,-318}},{{-315,-270,-320,-315,-309,-268},{-291,-273,-320,-306,-285,-273},{-323,-270,-297,-273,-303,-279},{-282,-282,-303,-273,-273,-270},{-288,-265,-297,-273,-282,-303},{-270,-312,-297,-297,-285,-315},{-297,-297,-320,-285,-279,-273},{-300,-309,-315,-306,-318,-268},{-297,-273,-300,-265,-288,-306},{-270,-312,-285,-323,-297,-288}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1841,192,221,150,198,208,315,198,294}; // initial inventory 
int ubiv[I]={2104,384,442,300,396,416,630,396,588}; // the upper bounds of inventory 
int len[I1][I2]={{5,3,2,2,1,1,2,3}}; // the traveling time between two sites 
// cost parameters: 
double c1[I]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // inventory holding cost 
double c2[I]={0.05,13.32,8.46,5.6,4.24,2.89,1.51,4.53,7.74}; // cost of leftover and unmet 
double c3[BN]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // transportation cost for capacity contracts 
double c4[I1][I2]={{12.11,7.69,5.09,3.85,2.63,1.37,4.12,7.04}}; // cost of spot market 
// bid parameters: 
int RLBN[I1][I2]={{9,9,9,9,9,9,9,9}}; // number of bids on each arc 
int LBset[I1][I2][LBN]={{{0,1,2,3,4,5,6,7,8},{9,10,11,12,13,14,15,16,17},{18,19,20,21,22,23,24,25,26},{27,28,29,30,31,32,33,34,35},{36,37,38,39,40,41,42,43,44},{45,46,47,48,49,50,51,52,53},{54,55,56,57,58,59,60,61,62},{63,64,65,66,67,68,69,70,71}}}; // set of bids on each arc 
double frt[BN]={9.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,6.15,6.15,6.15,5.38,5.38,5.38,4.61,4.61,4.61,4.07,4.07,4.07,3.56,3.56,3.56,3.05,3.05,3.05,3.08,3.08,3.08,2.7,2.7,2.7,2.31,2.31,2.31,2.1,2.1,2.1,1.84,1.84,1.84,1.58,1.58,1.58,1.1,1.1,1.1,0.96,0.96,0.96,0.82,0.82,0.82,3.3,3.3,3.3,2.88,2.88,2.88,2.47,2.47,2.47,5.63,5.63,5.63,4.93,4.93,4.93,4.22,4.22,4.22}; // freight rate of each bid 
int lbcap[BN]={75,75,75,1,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226}; // capacity lower bound of each bid 
int ubcap[BN]={150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300}; // capacity upper bound of each bid 
// shipment parameters: 
int SHN[BN]={16,8,6,15,8,6,16,8,5,17,8,6,16,9,6,17,8,6,16,9,6,17,9,6,17,9,6,17,9,6,17,9,6,16,9,6,17,9,6,17,9,6,17,9,6,18,9,6,18,9,6,17,9,6,17,9,6,16,9,6,17,8,6,16,8,6,16,8,6,16,8,6}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},{16,17,18,19,20,21,22,23},{24,25,26,27,28,29},{30,31,32,33,34,35,36,37,38,39,40,41,42,43,44},{45,46,47,48,49,50,51,52},{53,54,55,56,57,58},{59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74},{75,76,77,78,79,80,81,82},{83,84,85,86,87},{88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104},{105,106,107,108,109,110,111,112},{113,114,115,116,117,118},{119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134},{135,136,137,138,139,140,141,142,143},{144,145,146,147,148,149},{150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166},{167,168,169,170,171,172,173,174},{175,176,177,178,179,180},{181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196},{197,198,199,200,201,202,203,204,205},{206,207,208,209,210,211},{212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228},{229,230,231,232,233,234,235,236,237},{238,239,240,241,242,243},{244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260},{261,262,263,264,265,266,267,268,269},{270,271,272,273,274,275},{276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292},{293,294,295,296,297,298,299,300,301},{302,303,304,305,306,307},{308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324},{325,326,327,328,329,330,331,332,333},{334,335,336,337,338,339},{340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355},{356,357,358,359,360,361,362,363,364},{365,366,367,368,369,370},{371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387},{388,389,390,391,392,393,394,395,396},{397,398,399,400,401,402},{403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419},{420,421,422,423,424,425,426,427,428},{429,430,431,432,433,434},{435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451},{452,453,454,455,456,457,458,459,460},{461,462,463,464,465,466},{467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484},{485,486,487,488,489,490,491,492,493},{494,495,496,497,498,499},{500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517},{518,519,520,521,522,523,524,525,526},{527,528,529,530,531,532},{533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549},{550,551,552,553,554,555,556,557,558},{559,560,561,562,563,564},{565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581},{582,583,584,585,586,587,588,589,590},{591,592,593,594,595,596},{597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612},{613,614,615,616,617,618,619,620,621},{622,623,624,625,626,627},{628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644},{645,646,647,648,649,650,651,652},{653,654,655,656,657,658},{659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674},{675,676,677,678,679,680,681,682},{683,684,685,686,687,688},{689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704},{705,706,707,708,709,710,711,712},{713,714,715,716,717,718},{719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734},{735,736,737,738,739,740,741,742},{743,744,745,746,747,748}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,1,7,13,19,25,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,1,7,13,19,25,31}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,5,11,17,23,29,35,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,5,11,17,23,29,35,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,6,12,18,24,30,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,5,11,17,23,29,35,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,3,9,15,21,27,33,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,5,11,17,23,29,35,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34}; // set of end times of each shipment 
