int Dev = 10;// Deviation
extern const int CNN = 2;// Case Index
extern const int P = 3;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 18;// 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 = 348;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 9;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={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}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{11108,0,0,0,0,0},{10911,0,0,0,0,0},{11040,0,0,0,0,0},{10948,0,0,0,0,0},{11236,0,0,0,0,0},{11089,0,0,0,0,0},{11070,0,0,0,0,0},{11100,0,0,0,0,0},{11109,0,0,0,0,0},{10924,0,0,0,0,0},{11110,0,0,0,0,0},{11182,0,0,0,0,0},{11105,0,0,0,0,0},{10920,0,0,0,0,0},{11087,0,0,0,0,0},{11121,0,0,0,0,0},{11118,0,0,0,0,0},{11101,0,0,0,0,0},{11065,0,0,0,0,0},{11127,0,0,0,0,0}},{{10895,0,0,0,0,0},{11102,0,0,0,0,0},{10873,0,0,0,0,0},{11165,0,0,0,0,0},{10969,0,0,0,0,0},{11058,0,0,0,0,0},{11227,0,0,0,0,0},{11224,0,0,0,0,0},{11179,0,0,0,0,0},{10935,0,0,0,0,0},{11076,0,0,0,0,0},{11251,0,0,0,0,0},{11028,0,0,0,0,0},{11063,0,0,0,0,0},{10977,0,0,0,0,0},{11126,0,0,0,0,0},{11023,0,0,0,0,0},{11160,0,0,0,0,0},{10991,0,0,0,0,0},{11077,0,0,0,0,0}},{{10996,0,0,0,0,0},{11102,0,0,0,0,0},{10883,0,0,0,0,0},{10969,0,0,0,0,0},{10822,0,0,0,0,0},{10808,0,0,0,0,0},{10804,0,0,0,0,0},{10945,0,0,0,0,0},{11097,0,0,0,0,0},{11009,0,0,0,0,0},{10962,0,0,0,0,0},{11080,0,0,0,0,0},{11061,0,0,0,0,0},{10919,0,0,0,0,0},{10968,0,0,0,0,0},{11186,0,0,0,0,0},{11112,0,0,0,0,0},{11087,0,0,0,0,0},{11016,0,0,0,0,0},{11117,0,0,0,0,0}}},{{{-208,-242,-222,-231,-217,-215},{-244,-215,-202,-211,-242,-224},{-208,-231,-213,-242,-211,-235},{-217,-222,-206,-222,-233,-228},{-233,-220,-204,-235,-224,-224},{-213,-242,-213,-202,-213,-226},{-204,-202,-217,-224,-215,-240},{-222,-220,-235,-235,-237,-231},{-202,-204,-222,-217,-215,-231},{-220,-204,-226,-211,-240,-213},{-202,-246,-237,-231,-204,-220},{-228,-224,-213,-217,-224,-240},{-242,-237,-224,-222,-217,-242},{-237,-206,-237,-215,-246,-240},{-228,-204,-244,-224,-222,-233},{-224,-215,-233,-237,-208,-224},{-246,-231,-233,-233,-211,-231},{-202,-202,-206,-206,-215,-208},{-215,-202,-235,-237,-240,-237},{-208,-215,-228,-222,-240,-231}},{{-215,-204,-226,-215,-215,-224},{-228,-228,-246,-204,-226,-215},{-204,-213,-202,-240,-226,-244},{-237,-235,-244,-233,-235,-231},{-233,-226,-240,-213,-204,-206},{-235,-237,-213,-220,-226,-215},{-208,-231,-208,-220,-231,-215},{-204,-220,-231,-222,-237,-228},{-242,-244,-206,-215,-242,-244},{-211,-213,-237,-228,-202,-213},{-208,-242,-233,-215,-204,-246},{-246,-233,-240,-228,-213,-208},{-233,-222,-246,-208,-213,-231},{-237,-228,-235,-242,-206,-222},{-204,-233,-220,-228,-233,-228},{-224,-244,-224,-208,-220,-226},{-244,-217,-213,-202,-228,-206},{-226,-235,-202,-224,-233,-242},{-231,-226,-228,-206,-246,-226},{-246,-240,-240,-206,-222,-240}},{{-226,-231,-213,-244,-228,-224},{-220,-228,-228,-217,-206,-222},{-204,-202,-235,-233,-204,-217},{-204,-231,-213,-240,-206,-237},{-220,-226,-217,-224,-202,-217},{-217,-204,-246,-217,-240,-246},{-228,-246,-206,-235,-213,-206},{-224,-233,-233,-206,-237,-217},{-220,-220,-246,-228,-208,-217},{-228,-242,-202,-237,-208,-211},{-211,-226,-204,-213,-224,-220},{-217,-246,-202,-244,-235,-204},{-211,-246,-226,-224,-211,-231},{-213,-213,-213,-222,-244,-202},{-217,-208,-202,-244,-204,-233},{-213,-211,-235,-208,-246,-211},{-220,-206,-228,-202,-215,-233},{-231,-226,-222,-211,-202,-246},{-213,-233,-222,-206,-226,-202},{-244,-246,-235,-246,-242,-244}}},{{{-221,-257,-248,-240,-240,-240},{-233,-221,-217,-226,-233,-257},{-217,-238,-262,-221,-240,-240},{-252,-245,-228,-259,-236,-243},{-262,-252,-240,-257,-262,-224},{-257,-250,-217,-262,-252,-238},{-228,-257,-252,-250,-248,-214},{-255,-236,-240,-221,-245,-252},{-240,-236,-245,-228,-262,-224},{-217,-236,-255,-226,-255,-245},{-250,-250,-257,-259,-240,-262},{-255,-233,-238,-243,-228,-259},{-228,-231,-243,-259,-233,-252},{-214,-233,-243,-257,-221,-257},{-252,-214,-238,-257,-236,-217},{-259,-262,-214,-231,-217,-257},{-245,-217,-226,-231,-259,-231},{-224,-250,-245,-226,-224,-240},{-259,-214,-233,-224,-236,-219},{-245,-257,-221,-248,-243,-224}},{{-238,-219,-217,-219,-226,-240},{-259,-238,-221,-243,-221,-240},{-243,-231,-245,-217,-217,-245},{-224,-236,-231,-252,-240,-224},{-228,-245,-226,-221,-262,-238},{-217,-233,-236,-250,-231,-214},{-228,-255,-262,-255,-228,-226},{-236,-262,-231,-262,-248,-219},{-255,-255,-214,-217,-238,-262},{-252,-252,-228,-250,-221,-214},{-233,-219,-221,-252,-248,-236},{-228,-233,-257,-214,-255,-240},{-228,-255,-252,-238,-214,-238},{-252,-236,-221,-243,-243,-226},{-262,-214,-236,-233,-219,-250},{-255,-221,-252,-245,-228,-257},{-221,-231,-257,-257,-219,-226},{-245,-255,-231,-228,-228,-228},{-224,-231,-224,-231,-259,-243},{-245,-255,-217,-262,-226,-240}},{{-221,-245,-221,-240,-224,-240},{-233,-231,-245,-231,-248,-259},{-252,-233,-243,-228,-228,-233},{-236,-236,-248,-226,-219,-240},{-243,-226,-240,-252,-245,-219},{-231,-219,-224,-240,-214,-245},{-226,-224,-221,-262,-217,-248},{-243,-233,-226,-228,-250,-214},{-221,-245,-252,-245,-238,-236},{-243,-221,-226,-245,-248,-240},{-243,-238,-262,-233,-219,-252},{-255,-221,-231,-248,-250,-250},{-262,-257,-231,-236,-252,-245},{-226,-219,-255,-217,-236,-226},{-245,-238,-217,-214,-219,-233},{-238,-252,-252,-228,-257,-221},{-257,-252,-231,-245,-243,-217},{-221,-240,-231,-238,-259,-224},{-214,-243,-250,-231,-238,-259},{-245,-243,-214,-245,-233,-214}}},{{{-289,-257,-298,-287,-292,-276},{-287,-289,-259,-259,-278,-259},{-259,-246,-270,-270,-273,-262},{-262,-287,-265,-289,-281,-270},{-292,-276,-284,-284,-254,-278},{-281,-265,-273,-259,-268,-284},{-298,-248,-254,-292,-295,-270},{-259,-281,-248,-284,-262,-295},{-248,-300,-292,-276,-265,-257},{-295,-268,-246,-270,-268,-270},{-270,-284,-248,-262,-281,-262},{-287,-262,-265,-276,-298,-281},{-273,-289,-278,-284,-295,-265},{-248,-265,-298,-259,-268,-287},{-281,-281,-265,-276,-287,-287},{-292,-281,-273,-278,-278,-265},{-276,-259,-257,-246,-259,-273},{-265,-298,-295,-300,-278,-300},{-281,-284,-278,-248,-289,-273},{-298,-284,-300,-257,-270,-265}},{{-287,-262,-257,-259,-265,-257},{-248,-259,-254,-287,-289,-300},{-248,-246,-257,-300,-265,-273},{-298,-273,-257,-251,-273,-246},{-276,-295,-295,-246,-254,-289},{-298,-265,-292,-246,-292,-300},{-257,-292,-287,-295,-298,-300},{-289,-295,-265,-262,-298,-270},{-295,-295,-254,-287,-254,-289},{-259,-246,-287,-273,-287,-287},{-259,-298,-278,-248,-270,-278},{-278,-254,-268,-281,-278,-281},{-257,-248,-289,-259,-262,-276},{-273,-281,-278,-270,-300,-246},{-254,-278,-257,-265,-278,-292},{-259,-254,-246,-298,-292,-273},{-298,-265,-289,-300,-300,-265},{-300,-300,-254,-257,-295,-298},{-289,-246,-265,-273,-300,-281},{-278,-273,-268,-259,-273,-284}},{{-273,-257,-268,-246,-281,-295},{-270,-270,-265,-268,-257,-287},{-257,-273,-270,-281,-259,-300},{-270,-259,-262,-248,-295,-284},{-248,-268,-292,-248,-248,-248},{-251,-248,-284,-265,-292,-251},{-276,-262,-259,-300,-254,-268},{-257,-251,-276,-251,-298,-273},{-262,-273,-298,-295,-273,-265},{-257,-246,-300,-278,-292,-262},{-270,-292,-248,-300,-295,-259},{-281,-289,-254,-281,-300,-254},{-246,-281,-281,-289,-273,-265},{-254,-273,-248,-262,-281,-270},{-273,-257,-273,-257,-284,-273},{-251,-287,-292,-284,-262,-298},{-246,-300,-265,-298,-289,-268},{-248,-300,-248,-295,-295,-281},{-300,-284,-248,-248,-254,-300},{-259,-262,-289,-257,-259,-270}}},{{{-169,-156,-142,-169,-139,-145},{-154,-143,-157,-140,-169,-166},{-156,-165,-142,-148,-154,-159},{-140,-156,-157,-169,-146,-143},{-148,-149,-143,-162,-165,-154},{-163,-163,-169,-149,-157,-163},{-145,-168,-152,-169,-152,-157},{-166,-139,-140,-143,-166,-165},{-148,-160,-165,-139,-169,-162},{-143,-162,-154,-146,-166,-139},{-156,-139,-149,-140,-160,-162},{-168,-160,-168,-148,-168,-152},{-151,-152,-160,-169,-148,-151},{-168,-159,-152,-143,-154,-162},{-148,-162,-159,-163,-165,-149},{-159,-142,-168,-157,-142,-168},{-157,-159,-163,-156,-156,-151},{-169,-146,-159,-139,-169,-169},{-156,-163,-143,-156,-148,-146},{-168,-151,-160,-169,-156,-159}},{{-159,-142,-159,-145,-149,-152},{-165,-156,-149,-140,-165,-166},{-152,-159,-162,-156,-139,-149},{-154,-162,-166,-166,-143,-151},{-157,-159,-168,-156,-146,-142},{-165,-152,-151,-142,-148,-169},{-165,-160,-168,-151,-160,-145},{-154,-152,-140,-143,-139,-160},{-156,-142,-159,-145,-156,-168},{-162,-143,-157,-140,-154,-169},{-145,-166,-169,-163,-166,-168},{-162,-160,-148,-160,-148,-159},{-149,-145,-159,-169,-160,-169},{-169,-168,-140,-166,-148,-148},{-146,-151,-151,-163,-152,-156},{-154,-145,-154,-149,-149,-143},{-148,-148,-159,-154,-149,-142},{-143,-145,-156,-152,-165,-166},{-142,-148,-151,-156,-152,-140},{-140,-151,-145,-151,-166,-159}},{{-160,-168,-143,-149,-160,-159},{-139,-139,-156,-169,-165,-149},{-154,-146,-169,-139,-159,-142},{-140,-146,-156,-168,-143,-151},{-159,-151,-146,-149,-146,-148},{-146,-145,-159,-143,-159,-163},{-139,-139,-139,-160,-152,-146},{-169,-152,-146,-156,-139,-143},{-146,-140,-152,-149,-151,-143},{-154,-142,-166,-156,-163,-159},{-139,-143,-149,-157,-139,-159},{-157,-166,-146,-152,-148,-145},{-169,-166,-154,-168,-146,-165},{-151,-163,-163,-142,-139,-168},{-152,-165,-159,-149,-169,-165},{-159,-140,-168,-165,-151,-143},{-169,-169,-169,-156,-146,-145},{-157,-146,-160,-157,-165,-145},{-152,-166,-140,-149,-156,-140},{-142,-166,-156,-159,-152,-156}}},{{{-191,-180,-187,-184,-191,-166},{-169,-198,-166,-167,-173,-191},{-164,-173,-171,-177,-198,-197},{-167,-191,-177,-182,-164,-166},{-193,-184,-184,-178,-187,-189},{-178,-180,-195,-191,-167,-173},{-169,-173,-173,-184,-175,-186},{-164,-182,-200,-189,-167,-175},{-191,-173,-171,-169,-197,-193},{-182,-167,-175,-177,-197,-193},{-180,-164,-198,-186,-177,-166},{-167,-164,-193,-182,-187,-189},{-177,-171,-195,-164,-171,-166},{-186,-166,-195,-182,-164,-198},{-191,-198,-191,-191,-198,-169},{-198,-175,-193,-186,-197,-166},{-200,-187,-186,-180,-171,-186},{-195,-164,-197,-187,-186,-193},{-193,-193,-198,-189,-171,-175},{-187,-182,-198,-193,-166,-175}},{{-173,-166,-180,-175,-166,-198},{-193,-187,-177,-166,-182,-195},{-178,-180,-198,-164,-187,-177},{-177,-184,-167,-193,-180,-171},{-164,-164,-173,-184,-198,-164},{-169,-195,-167,-177,-173,-186},{-167,-169,-175,-180,-167,-193},{-180,-182,-198,-197,-186,-191},{-177,-171,-164,-191,-193,-191},{-171,-178,-187,-169,-195,-166},{-180,-180,-200,-200,-169,-187},{-186,-189,-175,-187,-169,-177},{-198,-193,-175,-175,-191,-167},{-197,-169,-166,-193,-191,-182},{-167,-191,-191,-171,-200,-180},{-193,-198,-189,-164,-193,-200},{-164,-164,-195,-184,-178,-189},{-197,-197,-169,-177,-189,-167},{-171,-193,-193,-197,-166,-182},{-171,-189,-164,-178,-177,-166}},{{-189,-171,-189,-184,-189,-167},{-197,-191,-171,-167,-177,-169},{-175,-198,-178,-169,-164,-189},{-178,-198,-200,-171,-182,-200},{-186,-193,-166,-193,-198,-173},{-180,-166,-167,-187,-186,-169},{-167,-177,-187,-182,-175,-197},{-171,-200,-200,-193,-173,-195},{-175,-195,-191,-164,-193,-187},{-171,-167,-182,-195,-200,-178},{-169,-167,-186,-178,-175,-197},{-193,-200,-184,-169,-198,-189},{-191,-169,-178,-169,-186,-191},{-187,-189,-187,-197,-166,-175},{-171,-178,-186,-178,-178,-187},{-175,-182,-175,-175,-182,-195},{-171,-171,-197,-186,-173,-182},{-173,-186,-195,-182,-175,-177},{-191,-182,-175,-182,-197,-189},{-195,-175,-200,-169,-177,-200}}},{{{-255,-243,-245,-228,-247,-243},{-267,-235,-265,-247,-247,-223},{-230,-225,-255,-247,-267,-243},{-225,-223,-260,-250,-247,-270},{-228,-223,-265,-235,-223,-255},{-243,-240,-252,-270,-257,-243},{-228,-257,-270,-247,-223,-270},{-260,-238,-247,-220,-260,-223},{-247,-260,-270,-252,-267,-240},{-223,-225,-260,-245,-257,-257},{-238,-238,-255,-238,-270,-243},{-265,-225,-255,-247,-233,-220},{-243,-265,-225,-260,-220,-223},{-257,-240,-225,-225,-228,-223},{-252,-252,-260,-223,-245,-257},{-257,-267,-223,-233,-228,-223},{-247,-262,-223,-267,-238,-262},{-245,-267,-220,-230,-245,-267},{-245,-257,-230,-247,-225,-267},{-267,-250,-228,-262,-240,-240}},{{-235,-233,-228,-262,-228,-255},{-235,-223,-240,-223,-250,-247},{-228,-243,-267,-230,-238,-228},{-255,-252,-267,-267,-235,-247},{-230,-240,-223,-267,-225,-235},{-250,-225,-245,-240,-267,-225},{-262,-265,-220,-252,-250,-240},{-235,-270,-223,-265,-233,-270},{-233,-238,-252,-252,-262,-220},{-252,-255,-223,-233,-257,-245},{-240,-267,-220,-238,-230,-252},{-252,-243,-262,-252,-270,-245},{-220,-223,-225,-262,-228,-228},{-267,-240,-230,-260,-238,-243},{-235,-220,-247,-250,-260,-267},{-252,-233,-257,-247,-252,-270},{-270,-240,-252,-250,-255,-250},{-228,-270,-260,-247,-265,-225},{-230,-265,-265,-265,-228,-235},{-233,-238,-252,-235,-255,-243}},{{-228,-225,-238,-235,-240,-220},{-267,-265,-240,-257,-225,-262},{-245,-257,-255,-225,-230,-245},{-230,-257,-230,-257,-223,-243},{-220,-255,-230,-233,-233,-238},{-270,-260,-223,-235,-220,-252},{-247,-250,-228,-223,-240,-230},{-260,-245,-247,-235,-255,-220},{-233,-262,-228,-255,-238,-260},{-252,-257,-235,-238,-225,-220},{-225,-223,-225,-250,-220,-255},{-235,-250,-262,-250,-228,-257},{-262,-230,-235,-243,-270,-245},{-250,-265,-235,-255,-233,-235},{-223,-235,-267,-238,-265,-223},{-225,-262,-228,-252,-265,-262},{-228,-270,-252,-252,-245,-230},{-252,-238,-260,-238,-245,-235},{-255,-245,-252,-250,-228,-228},{-225,-225,-240,-255,-267,-240}}},{{{-231,-254,-236,-231,-224,-252},{-224,-226,-224,-215,-226,-210},{-222,-231,-222,-233,-254,-247},{-215,-210,-217,-208,-233,-229},{-247,-231,-245,-208,-217,-254},{-229,-245,-215,-243,-236,-229},{-236,-252,-210,-226,-249,-254},{-208,-226,-226,-240,-249,-245},{-213,-249,-215,-249,-252,-219},{-224,-222,-236,-254,-208,-236},{-219,-217,-243,-245,-240,-217},{-226,-233,-245,-224,-208,-226},{-215,-231,-210,-231,-224,-252},{-233,-231,-224,-215,-222,-229},{-233,-236,-226,-208,-243,-226},{-238,-208,-247,-249,-222,-231},{-226,-226,-229,-254,-249,-238},{-245,-226,-217,-233,-238,-233},{-247,-217,-247,-229,-247,-240},{-215,-240,-240,-233,-240,-243}},{{-243,-249,-226,-254,-224,-236},{-222,-254,-236,-247,-254,-247},{-252,-252,-240,-210,-210,-208},{-252,-240,-233,-226,-240,-249},{-254,-226,-245,-238,-238,-238},{-229,-238,-249,-243,-210,-224},{-224,-247,-247,-226,-240,-245},{-249,-236,-233,-215,-249,-254},{-247,-247,-236,-229,-224,-240},{-233,-213,-210,-226,-245,-231},{-254,-245,-217,-245,-217,-245},{-215,-233,-226,-213,-243,-240},{-226,-245,-219,-233,-224,-231},{-231,-240,-236,-229,-226,-231},{-222,-240,-245,-208,-210,-233},{-254,-233,-219,-208,-254,-238},{-231,-245,-217,-254,-229,-213},{-224,-224,-222,-254,-249,-226},{-213,-231,-208,-217,-210,-252},{-219,-238,-238,-240,-243,-238}},{{-249,-249,-231,-217,-226,-245},{-219,-247,-226,-231,-236,-226},{-247,-247,-229,-240,-226,-210},{-240,-247,-226,-222,-247,-229},{-243,-215,-254,-215,-233,-213},{-210,-210,-222,-252,-226,-222},{-215,-238,-219,-238,-222,-224},{-229,-231,-229,-226,-219,-236},{-240,-215,-252,-240,-247,-249},{-236,-213,-245,-222,-208,-249},{-254,-245,-215,-240,-233,-249},{-217,-238,-213,-245,-210,-245},{-208,-208,-231,-210,-213,-247},{-238,-236,-213,-219,-219,-217},{-243,-247,-229,-243,-245,-254},{-208,-238,-231,-219,-249,-252},{-233,-245,-229,-249,-243,-252},{-243,-208,-238,-249,-222,-224},{-224,-236,-249,-233,-247,-215},{-231,-215,-249,-210,-252,-240}}},{{{-303,-279,-268,-294,-297,-279},{-265,-279,-288,-312,-309,-300},{-288,-285,-306,-323,-297,-323},{-276,-291,-323,-265,-318,-285},{-312,-273,-323,-315,-318,-323},{-294,-265,-297,-268,-300,-300},{-294,-291,-270,-282,-288,-312},{-318,-309,-294,-312,-303,-268},{-323,-279,-323,-268,-276,-306},{-300,-315,-279,-270,-279,-268},{-309,-279,-323,-306,-268,-320},{-323,-303,-318,-309,-282,-323},{-282,-312,-306,-282,-315,-320},{-279,-312,-270,-265,-306,-276},{-297,-303,-288,-273,-270,-265},{-318,-285,-279,-320,-318,-276},{-276,-309,-282,-300,-291,-323},{-303,-279,-323,-285,-309,-279},{-309,-291,-273,-268,-268,-323},{-323,-265,-312,-265,-268,-276}},{{-323,-306,-320,-282,-312,-270},{-294,-303,-268,-300,-303,-309},{-312,-291,-265,-294,-294,-294},{-297,-276,-265,-318,-315,-297},{-291,-294,-312,-279,-297,-265},{-297,-318,-279,-300,-320,-285},{-323,-294,-270,-323,-315,-288},{-273,-312,-276,-312,-312,-306},{-297,-320,-294,-279,-294,-294},{-323,-268,-279,-297,-306,-288},{-320,-279,-288,-303,-265,-270},{-323,-312,-309,-323,-320,-315},{-323,-309,-320,-273,-300,-320},{-323,-265,-291,-279,-288,-270},{-265,-323,-279,-282,-312,-276},{-303,-288,-270,-294,-288,-309},{-309,-273,-270,-300,-265,-288},{-315,-318,-279,-291,-291,-268},{-306,-297,-306,-273,-291,-279},{-320,-265,-315,-297,-265,-312}},{{-294,-291,-309,-306,-282,-306},{-273,-318,-309,-309,-312,-306},{-273,-315,-291,-270,-268,-276},{-303,-282,-273,-303,-273,-297},{-306,-323,-270,-303,-282,-265},{-282,-268,-276,-309,-288,-279},{-303,-285,-320,-276,-265,-270},{-291,-285,-282,-300,-265,-303},{-297,-276,-294,-268,-306,-309},{-323,-279,-309,-306,-273,-300},{-276,-276,-300,-306,-294,-309},{-273,-282,-276,-273,-320,-297},{-273,-291,-291,-309,-306,-270},{-268,-312,-288,-309,-320,-306},{-268,-270,-297,-288,-282,-323},{-315,-288,-323,-320,-320,-273},{-315,-323,-270,-265,-294,-268},{-320,-312,-285,-300,-291,-291},{-268,-318,-282,-285,-323,-288},{-320,-294,-282,-276,-279,-323}}}}; // 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]={7,4,2,6,3,3,6,3,2,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,5,3,9,5,3,8,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3}; // 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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,0,4,8,12,1,7,2,4,6,8,10,12,1,5,9,0,6,12,1,3,5,7,9,11,1,5,9,2,8,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,16,0,4,8,12,16,2,8,14,0,2,4,6,8,10,12,14,16,0,4,8,12,16,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,0,4,8,12,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,0,4,8,12,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,5,9,13,17,6,12,7,9,11,13,15,17,6,10,14,5,11,17,6,8,10,12,14,16,6,10,14,7,13,3,5,7,9,11,13,15,17,4,8,12,16,5,11,17,5,7,9,11,13,15,17,4,8,12,16,5,11,17,5,7,9,11,13,15,17,5,9,13,17,5,11,17,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,1,3,5,7,9,11,13,15,17,1,5,9,13,17,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,2,6,10,14,2,8,14,4,6,8,10,12,14,16,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,5,7,9,11,13,15,17,3,7,11,15,5,11,17}; // set of end times of each shipment 
