int Dev = 40;// 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]={{{{11243,0,0,0,0,0},{11323,0,0,0,0,0},{11020,0,0,0,0,0},{10942,0,0,0,0,0},{10869,0,0,0,0,0},{11606,0,0,0,0,0},{11889,0,0,0,0,0},{10534,0,0,0,0,0},{10854,0,0,0,0,0},{10829,0,0,0,0,0},{10997,0,0,0,0,0},{11679,0,0,0,0,0},{10755,0,0,0,0,0},{11550,0,0,0,0,0},{11627,0,0,0,0,0},{11476,0,0,0,0,0},{10105,0,0,0,0,0},{10959,0,0,0,0,0},{10725,0,0,0,0,0},{11281,0,0,0,0,0}},{{10813,0,0,0,0,0},{10903,0,0,0,0,0},{11351,0,0,0,0,0},{11510,0,0,0,0,0},{11724,0,0,0,0,0},{11583,0,0,0,0,0},{11462,0,0,0,0,0},{12035,0,0,0,0,0},{10537,0,0,0,0,0},{11550,0,0,0,0,0},{11152,0,0,0,0,0},{10707,0,0,0,0,0},{11257,0,0,0,0,0},{10991,0,0,0,0,0},{11011,0,0,0,0,0},{10837,0,0,0,0,0},{10570,0,0,0,0,0},{10775,0,0,0,0,0},{11222,0,0,0,0,0},{10755,0,0,0,0,0}},{{10333,0,0,0,0,0},{11399,0,0,0,0,0},{10922,0,0,0,0,0},{10307,0,0,0,0,0},{10331,0,0,0,0,0},{11410,0,0,0,0,0},{10961,0,0,0,0,0},{11749,0,0,0,0,0},{10379,0,0,0,0,0},{11462,0,0,0,0,0},{11585,0,0,0,0,0},{11554,0,0,0,0,0},{10928,0,0,0,0,0},{10697,0,0,0,0,0},{11183,0,0,0,0,0},{11341,0,0,0,0,0},{11156,0,0,0,0,0},{11111,0,0,0,0,0},{10761,0,0,0,0,0},{11567,0,0,0,0,0}}},{{{-159,-217,-208,-179,-267,-199},{-242,-213,-296,-204,-289,-235},{-204,-226,-235,-258,-146,-311},{-166,-267,-291,-204,-197,-190},{-188,-152,-233,-175,-188,-206},{-228,-262,-246,-305,-284,-213},{-161,-302,-280,-170,-206,-273},{-255,-211,-278,-157,-159,-224},{-291,-280,-220,-186,-159,-143},{-181,-314,-249,-237,-215,-249},{-287,-202,-314,-141,-208,-211},{-246,-164,-186,-208,-282,-237},{-175,-181,-276,-287,-179,-278},{-260,-271,-289,-244,-253,-302},{-273,-146,-137,-282,-269,-240},{-206,-161,-204,-280,-202,-211},{-311,-199,-226,-291,-224,-148},{-202,-273,-287,-244,-278,-172},{-287,-152,-177,-137,-195,-217},{-314,-258,-181,-226,-282,-181}},{{-172,-302,-289,-296,-291,-213},{-242,-148,-291,-155,-253,-217},{-134,-134,-157,-231,-251,-152},{-211,-262,-258,-289,-251,-314},{-137,-253,-177,-298,-155,-296},{-267,-307,-293,-271,-309,-293},{-146,-159,-235,-307,-307,-271},{-293,-166,-311,-269,-217,-273},{-170,-155,-311,-233,-159,-184},{-307,-293,-152,-202,-166,-211},{-152,-233,-284,-152,-271,-235},{-184,-246,-244,-172,-244,-269},{-276,-253,-146,-311,-267,-305},{-269,-300,-148,-291,-146,-260},{-233,-168,-175,-242,-240,-280},{-240,-195,-143,-139,-195,-161},{-262,-193,-155,-168,-269,-271},{-273,-233,-204,-179,-202,-188},{-253,-213,-271,-202,-282,-287},{-282,-305,-157,-260,-242,-231}},{{-213,-289,-228,-155,-170,-280},{-302,-217,-255,-284,-155,-166},{-271,-309,-146,-235,-298,-267},{-170,-255,-213,-197,-226,-155},{-289,-282,-206,-170,-150,-228},{-287,-255,-177,-296,-262,-206},{-298,-208,-242,-233,-172,-278},{-197,-235,-311,-305,-226,-197},{-273,-226,-164,-175,-141,-204},{-293,-284,-150,-309,-204,-224},{-215,-190,-233,-260,-314,-258},{-202,-264,-195,-220,-246,-231},{-211,-267,-311,-242,-255,-152},{-188,-271,-186,-141,-255,-172},{-271,-278,-179,-137,-152,-280},{-197,-175,-235,-220,-204,-188},{-244,-172,-262,-137,-175,-184},{-177,-170,-255,-309,-137,-157},{-199,-271,-298,-159,-249,-305},{-305,-159,-159,-246,-296,-264}}},{{{-259,-228,-269,-150,-236,-328},{-162,-200,-319,-243,-319,-236},{-145,-186,-198,-209,-209,-288},{-157,-307,-186,-331,-202,-143},{-236,-226,-333,-157,-250,-221},{-271,-195,-193,-214,-312,-250},{-238,-262,-333,-300,-243,-257},{-157,-269,-167,-321,-214,-193},{-248,-169,-286,-298,-252,-183},{-252,-259,-271,-271,-174,-283},{-148,-155,-262,-143,-148,-231},{-219,-288,-171,-288,-302,-252},{-300,-224,-150,-207,-302,-224},{-219,-171,-300,-290,-238,-167},{-248,-248,-283,-181,-233,-243},{-219,-202,-259,-212,-269,-183},{-150,-264,-255,-205,-281,-202},{-214,-212,-255,-267,-309,-200},{-255,-276,-167,-309,-150,-143},{-145,-264,-283,-167,-245,-214}},{{-312,-226,-214,-167,-331,-174},{-186,-152,-286,-198,-317,-193},{-178,-324,-143,-302,-326,-195},{-307,-278,-212,-190,-164,-314},{-193,-226,-157,-309,-238,-295},{-148,-145,-209,-238,-278,-207},{-224,-224,-155,-328,-224,-302},{-281,-202,-267,-167,-286,-295},{-217,-200,-298,-214,-262,-248},{-255,-305,-148,-221,-240,-321},{-143,-276,-333,-269,-233,-181},{-245,-307,-174,-309,-217,-236},{-219,-271,-271,-321,-207,-248},{-143,-283,-209,-190,-255,-155},{-245,-171,-145,-200,-195,-162},{-221,-205,-257,-236,-278,-321},{-217,-157,-195,-238,-276,-159},{-281,-333,-217,-331,-255,-300},{-286,-314,-236,-167,-326,-217},{-259,-243,-205,-214,-240,-286}},{{-286,-309,-157,-148,-236,-186},{-319,-143,-286,-214,-248,-231},{-207,-186,-238,-176,-186,-233},{-224,-302,-224,-221,-255,-317},{-193,-240,-319,-171,-162,-183},{-245,-236,-264,-319,-174,-148},{-300,-271,-286,-245,-281,-238},{-188,-202,-288,-281,-224,-252},{-174,-250,-264,-152,-176,-281},{-293,-233,-293,-314,-228,-283},{-228,-148,-207,-274,-226,-186},{-274,-243,-195,-267,-271,-224},{-169,-183,-264,-250,-293,-300},{-228,-293,-248,-293,-228,-259},{-271,-162,-288,-214,-228,-145},{-257,-181,-274,-176,-326,-290},{-183,-276,-295,-298,-219,-202},{-333,-145,-226,-198,-200,-302},{-276,-164,-331,-205,-269,-155},{-257,-295,-257,-200,-143,-257}}},{{{-248,-379,-377,-259,-164,-374},{-202,-287,-276,-186,-164,-240},{-216,-284,-270,-322,-205,-336},{-360,-292,-292,-341,-207,-306},{-218,-194,-314,-276,-358,-303},{-270,-183,-194,-169,-248,-371},{-314,-311,-366,-347,-257,-167},{-218,-248,-238,-205,-177,-270},{-232,-355,-191,-363,-180,-194},{-369,-240,-317,-218,-210,-341},{-205,-344,-175,-358,-300,-207},{-330,-273,-369,-358,-344,-292},{-300,-298,-205,-278,-281,-276},{-221,-268,-186,-319,-194,-254},{-238,-366,-262,-355,-339,-172},{-238,-186,-339,-366,-325,-292},{-270,-164,-199,-270,-172,-227},{-194,-333,-246,-227,-183,-227},{-238,-371,-363,-202,-298,-221},{-257,-199,-363,-169,-205,-371}},{{-284,-328,-183,-330,-281,-175},{-298,-259,-240,-199,-183,-240},{-339,-339,-366,-374,-314,-180},{-207,-292,-314,-202,-306,-278},{-218,-328,-235,-360,-379,-210},{-352,-175,-322,-371,-308,-240},{-194,-240,-287,-341,-333,-276},{-374,-382,-374,-363,-270,-254},{-224,-218,-199,-232,-207,-186},{-382,-303,-218,-268,-317,-300},{-317,-246,-172,-349,-374,-191},{-183,-344,-254,-262,-169,-229},{-322,-202,-300,-322,-235,-180},{-259,-218,-180,-259,-262,-363},{-352,-366,-199,-270,-377,-292},{-186,-175,-194,-319,-379,-347},{-349,-311,-248,-210,-281,-298},{-262,-339,-325,-177,-197,-186},{-333,-229,-194,-344,-317,-322},{-197,-311,-232,-369,-254,-363}},{{-167,-213,-227,-232,-339,-216},{-210,-254,-218,-295,-303,-317},{-330,-251,-229,-199,-175,-254},{-363,-382,-257,-169,-213,-227},{-254,-164,-289,-308,-197,-333},{-333,-172,-358,-257,-229,-319},{-194,-169,-227,-243,-205,-265},{-328,-382,-347,-254,-197,-281},{-358,-339,-186,-259,-202,-374},{-218,-218,-229,-265,-205,-360},{-322,-259,-382,-330,-322,-341},{-306,-216,-270,-243,-355,-344},{-259,-328,-175,-292,-235,-371},{-221,-248,-175,-207,-238,-172},{-352,-183,-358,-276,-317,-235},{-221,-218,-341,-284,-276,-210},{-248,-262,-262,-202,-276,-314},{-172,-308,-298,-246,-300,-213},{-202,-213,-229,-238,-216,-268},{-379,-363,-248,-232,-377,-344}}},{{{-154,-209,-156,-160,-149,-160},{-171,-208,-200,-163,-196,-109},{-108,-126,-149,-168,-156,-159},{-203,-186,-140,-165,-186,-151},{-95,-116,-174,-209,-122,-192},{-136,-213,-177,-214,-119,-149},{-114,-171,-160,-189,-162,-152},{-128,-142,-169,-213,-160,-125},{-176,-139,-179,-182,-111,-136},{-205,-137,-103,-213,-149,-177},{-119,-159,-168,-205,-202,-160},{-199,-171,-166,-162,-152,-172},{-131,-205,-149,-213,-174,-129},{-177,-163,-140,-213,-185,-99},{-171,-95,-112,-191,-203,-95},{-166,-103,-203,-151,-168,-176},{-116,-106,-148,-165,-206,-132},{-145,-94,-94,-103,-92,-194},{-94,-188,-157,-122,-97,-214},{-171,-126,-177,-117,-139,-100}},{{-139,-103,-125,-148,-128,-169},{-200,-169,-146,-105,-176,-162},{-203,-106,-145,-95,-134,-171},{-129,-114,-186,-132,-105,-114},{-119,-162,-146,-149,-151,-171},{-112,-192,-200,-205,-151,-192},{-149,-189,-131,-125,-206,-214},{-202,-111,-197,-125,-203,-139},{-126,-145,-183,-152,-105,-95},{-136,-94,-102,-199,-100,-114},{-117,-97,-176,-165,-143,-182},{-132,-189,-183,-142,-194,-125},{-117,-151,-183,-142,-92,-139},{-117,-94,-117,-145,-92,-160},{-206,-154,-92,-172,-97,-213},{-137,-180,-114,-112,-128,-149},{-125,-171,-145,-117,-168,-146},{-111,-154,-169,-186,-126,-122},{-194,-162,-174,-192,-159,-168},{-205,-149,-151,-132,-208,-100}},{{-203,-163,-159,-95,-100,-125},{-165,-189,-157,-139,-136,-120},{-140,-142,-197,-100,-156,-106},{-163,-111,-163,-149,-140,-166},{-169,-160,-106,-116,-206,-117},{-151,-156,-142,-174,-168,-176},{-152,-185,-216,-129,-152,-108},{-99,-111,-197,-122,-99,-162},{-209,-171,-216,-116,-160,-117},{-117,-196,-142,-205,-163,-142},{-146,-186,-129,-216,-126,-211},{-103,-134,-125,-131,-142,-171},{-216,-146,-165,-100,-137,-177},{-169,-126,-189,-214,-97,-192},{-148,-189,-192,-206,-125,-100},{-97,-139,-102,-143,-176,-208},{-114,-108,-157,-134,-163,-140},{-197,-196,-143,-103,-100,-126},{-179,-159,-202,-197,-103,-105},{-176,-206,-122,-152,-114,-199}}},{{{-186,-226,-126,-171,-186,-162},{-118,-138,-155,-220,-129,-198},{-193,-171,-177,-180,-111,-153},{-149,-182,-142,-235,-133,-166},{-175,-207,-151,-255,-238,-180},{-222,-157,-182,-166,-140,-235},{-242,-144,-240,-235,-149,-109},{-217,-226,-151,-158,-187,-209},{-153,-124,-180,-171,-240,-235},{-166,-111,-255,-111,-135,-136},{-213,-180,-215,-182,-246,-197},{-193,-182,-242,-166,-113,-246},{-193,-189,-126,-153,-229,-173},{-157,-113,-200,-253,-187,-220},{-242,-240,-229,-233,-197,-202},{-171,-242,-131,-215,-200,-193},{-144,-167,-215,-253,-220,-215},{-147,-209,-151,-193,-206,-240},{-238,-127,-228,-193,-255,-167},{-162,-244,-136,-242,-224,-131}},{{-233,-220,-129,-198,-200,-167},{-248,-218,-166,-118,-160,-129},{-138,-109,-187,-248,-147,-153},{-186,-164,-160,-200,-218,-211},{-127,-149,-160,-186,-187,-238},{-193,-116,-136,-175,-169,-127},{-115,-177,-193,-133,-226,-202},{-204,-226,-218,-195,-255,-255},{-153,-173,-135,-222,-253,-127},{-198,-249,-184,-187,-167,-238},{-184,-242,-146,-186,-177,-140},{-133,-116,-186,-127,-206,-246},{-177,-177,-242,-233,-160,-237},{-173,-213,-211,-157,-218,-140},{-171,-157,-133,-215,-189,-218},{-207,-229,-151,-233,-184,-204},{-169,-109,-122,-147,-248,-162},{-118,-228,-187,-116,-171,-198},{-187,-157,-193,-171,-160,-206},{-142,-135,-235,-207,-173,-167}},{{-116,-253,-147,-142,-182,-220},{-127,-189,-164,-140,-158,-235},{-140,-193,-151,-135,-228,-238},{-204,-167,-111,-202,-142,-115},{-135,-171,-122,-113,-206,-113},{-131,-249,-253,-129,-220,-193},{-155,-173,-120,-233,-111,-213},{-115,-120,-133,-251,-202,-224},{-160,-115,-126,-202,-204,-151},{-155,-202,-166,-166,-153,-228},{-248,-135,-228,-229,-235,-182},{-202,-186,-127,-202,-226,-237},{-111,-218,-111,-138,-127,-213},{-218,-209,-153,-142,-175,-171},{-133,-207,-228,-222,-244,-197},{-244,-202,-193,-249,-213,-133},{-173,-251,-217,-222,-146,-187},{-191,-235,-124,-211,-222,-153},{-126,-175,-217,-111,-217,-135},{-135,-255,-229,-157,-111,-109}}},{{{-311,-304,-294,-247,-270,-289},{-341,-333,-262,-316,-235,-203},{-225,-194,-321,-336,-292,-235},{-277,-341,-149,-230,-201,-289},{-233,-301,-274,-252,-272,-172},{-284,-203,-213,-321,-338,-309},{-326,-328,-296,-270,-287,-299},{-191,-152,-191,-262,-186,-323},{-238,-299,-198,-194,-189,-318},{-194,-265,-176,-208,-238,-220},{-316,-299,-164,-341,-262,-191},{-341,-318,-201,-201,-311,-167},{-213,-245,-296,-284,-208,-301},{-314,-240,-289,-294,-198,-341},{-282,-198,-270,-262,-326,-233},{-341,-245,-338,-235,-225,-287},{-147,-167,-157,-230,-216,-152},{-257,-338,-309,-314,-262,-196},{-294,-257,-201,-211,-147,-257},{-172,-292,-296,-287,-179,-336}},{{-149,-218,-189,-216,-341,-176},{-333,-172,-179,-338,-270,-157},{-272,-265,-296,-321,-230,-294},{-211,-252,-267,-230,-296,-316},{-341,-341,-235,-247,-323,-279},{-287,-252,-223,-149,-287,-311},{-238,-181,-260,-230,-272,-282},{-201,-321,-257,-220,-189,-279},{-176,-250,-176,-243,-228,-309},{-289,-292,-169,-326,-213,-189},{-154,-257,-257,-284,-213,-255},{-216,-179,-164,-287,-157,-333},{-189,-189,-333,-257,-189,-191},{-189,-260,-309,-198,-245,-284},{-277,-172,-326,-211,-284,-252},{-162,-301,-218,-299,-243,-235},{-201,-172,-294,-157,-255,-277},{-208,-245,-194,-201,-149,-149},{-292,-208,-172,-162,-279,-289},{-186,-272,-211,-176,-299,-164}},{{-311,-301,-294,-174,-216,-189},{-243,-328,-309,-255,-203,-208},{-311,-284,-336,-289,-284,-279},{-270,-186,-154,-225,-176,-274},{-191,-179,-282,-270,-255,-189},{-201,-211,-252,-314,-331,-279},{-321,-167,-238,-181,-311,-201},{-220,-323,-284,-292,-270,-277},{-260,-181,-336,-196,-272,-147},{-301,-328,-233,-203,-194,-198},{-238,-206,-304,-306,-311,-326},{-184,-333,-167,-336,-257,-211},{-223,-341,-255,-245,-260,-294},{-174,-250,-282,-218,-233,-233},{-189,-314,-338,-211,-287,-223},{-208,-328,-343,-282,-296,-157},{-279,-201,-321,-306,-289,-301},{-216,-186,-314,-341,-292,-267},{-341,-284,-191,-338,-154,-157},{-272,-282,-149,-233,-270,-323}}},{{{-141,-236,-141,-169,-273,-159},{-291,-316,-182,-180,-305,-215},{-141,-146,-310,-141,-282,-210},{-305,-256,-155,-252,-226,-164},{-139,-169,-303,-323,-180,-146},{-152,-247,-240,-215,-240,-254},{-146,-162,-275,-300,-316,-196},{-169,-213,-148,-323,-323,-208},{-180,-256,-182,-316,-289,-157},{-323,-159,-316,-236,-185,-150},{-282,-284,-222,-289,-305,-169},{-187,-277,-150,-300,-236,-166},{-164,-208,-169,-229,-189,-173},{-319,-300,-273,-238,-312,-259},{-146,-219,-185,-231,-224,-247},{-155,-312,-275,-277,-268,-268},{-155,-139,-282,-312,-162,-256},{-169,-282,-321,-240,-286,-296},{-155,-189,-185,-284,-293,-185},{-298,-199,-210,-162,-166,-236}},{{-224,-222,-282,-240,-164,-305},{-192,-240,-289,-203,-300,-236},{-263,-229,-300,-310,-263,-201},{-210,-273,-298,-289,-243,-270},{-152,-238,-300,-291,-224,-254},{-139,-243,-277,-229,-268,-277},{-270,-296,-289,-247,-236,-275},{-291,-187,-307,-310,-243,-293},{-296,-203,-148,-263,-224,-312},{-298,-300,-316,-280,-213,-280},{-247,-268,-270,-291,-139,-219},{-266,-206,-215,-231,-314,-164},{-307,-192,-266,-259,-146,-201},{-171,-155,-268,-219,-303,-263},{-316,-178,-182,-229,-256,-243},{-213,-203,-219,-229,-155,-259},{-305,-259,-219,-213,-146,-187},{-277,-141,-307,-254,-252,-280},{-256,-259,-310,-192,-215,-203},{-171,-289,-194,-229,-178,-215}},{{-291,-155,-314,-176,-189,-206},{-282,-256,-224,-300,-219,-169},{-159,-155,-194,-323,-240,-314},{-178,-199,-152,-208,-194,-238},{-164,-298,-203,-268,-208,-303},{-298,-206,-270,-203,-219,-182},{-164,-275,-182,-273,-249,-201},{-303,-206,-298,-268,-312,-178},{-217,-243,-141,-206,-319,-252},{-300,-296,-273,-187,-213,-240},{-169,-303,-291,-150,-268,-215},{-187,-307,-286,-169,-305,-229},{-275,-152,-268,-201,-226,-206},{-169,-263,-289,-282,-203,-213},{-286,-270,-263,-289,-261,-203},{-312,-143,-312,-289,-226,-268},{-180,-275,-176,-284,-238,-213},{-176,-162,-286,-268,-268,-224},{-178,-289,-268,-298,-319,-210},{-171,-261,-219,-213,-307,-286}}},{{{-362,-282,-356,-262,-220,-382},{-312,-294,-229,-297,-391,-303},{-379,-315,-306,-388,-368,-332},{-306,-256,-191,-282,-250,-335},{-344,-273,-323,-200,-291,-332},{-385,-341,-335,-276,-338,-397},{-273,-276,-388,-232,-350,-315},{-256,-250,-232,-400,-285,-376},{-276,-409,-212,-265,-373,-247},{-356,-288,-229,-194,-191,-353},{-312,-300,-179,-332,-215,-250},{-373,-370,-400,-188,-238,-282},{-215,-185,-244,-312,-335,-300},{-176,-218,-247,-391,-215,-373},{-365,-350,-397,-385,-226,-356},{-226,-329,-370,-282,-394,-176},{-268,-259,-212,-320,-235,-291},{-338,-197,-323,-220,-220,-200},{-262,-379,-332,-291,-359,-206},{-356,-253,-379,-385,-388,-394}},{{-179,-226,-253,-285,-329,-288},{-350,-244,-370,-270,-315,-391},{-341,-303,-368,-238,-279,-303},{-273,-194,-197,-376,-388,-359},{-326,-376,-294,-318,-373,-403},{-185,-318,-373,-385,-329,-350},{-270,-335,-185,-368,-203,-412},{-229,-288,-279,-229,-256,-282},{-285,-282,-312,-400,-312,-332},{-332,-335,-303,-285,-288,-265},{-259,-382,-365,-276,-244,-406},{-215,-188,-385,-406,-279,-235},{-300,-353,-365,-203,-323,-288},{-344,-394,-279,-356,-412,-315},{-262,-291,-344,-203,-309,-347},{-309,-362,-223,-356,-223,-409},{-350,-335,-182,-385,-285,-262},{-344,-265,-226,-403,-318,-194},{-320,-188,-329,-206,-191,-235},{-203,-194,-276,-218,-303,-323}},{{-253,-194,-244,-229,-247,-394},{-291,-409,-403,-270,-359,-335},{-312,-291,-215,-176,-400,-244},{-209,-365,-232,-309,-203,-332},{-185,-391,-312,-247,-326,-188},{-232,-229,-273,-385,-373,-273},{-338,-223,-347,-370,-362,-256},{-347,-356,-394,-312,-188,-391},{-226,-235,-365,-215,-194,-229},{-385,-365,-382,-226,-315,-185},{-403,-223,-185,-215,-318,-188},{-350,-332,-320,-394,-223,-412},{-400,-244,-235,-223,-238,-226},{-185,-179,-391,-394,-270,-391},{-315,-185,-347,-197,-206,-282},{-188,-241,-368,-382,-223,-403},{-412,-182,-329,-197,-368,-382},{-376,-323,-318,-406,-294,-247},{-368,-256,-288,-185,-226,-238},{-332,-376,-215,-385,-312,-215}}}}; // 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,7,3,2,6,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,5,3,8,4,3,9,5,3,8,4,3,8,4,3,7,4,3,8,4,3,7,4,3,7,4,3,7,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,2,8,0,2,4,6,8,10,12,2,6,10,2,8,2,4,6,8,10,12,0,4,8,12,0,6,12,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,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,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,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,16,0,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,2,4,6,8,10,12,14,1,5,9,13,2,8,14,1,3,5,7,9,11,13,2,6,10,14,0,6,12,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,2,6,10,14,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,5,9,13,17,7,13,5,7,9,11,13,15,17,7,11,15,7,13,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,5,11,17,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,4,6,8,10,12,14,16,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,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,4,10,16,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,4,6,8,10,12,14,16,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,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,1,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,4,6,8,10,12,14,16,4,8,12,16,3,9,15,2,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,4,6,8,10,12,14,16,5,9,13,17,3,9,15,5,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,5,9,13,17,4,10,16}; // set of end times of each shipment 
