int Dev = 50;// 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 = 747;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 17;//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]={{{{10925,0,0,0,0,0},{10531,0,0,0,0,0},{11586,0,0,0,0,0},{10767,0,0,0,0,0},{10235,0,0,0,0,0},{10575,0,0,0,0,0},{11185,0,0,0,0,0},{10993,0,0,0,0,0},{10808,0,0,0,0,0},{11080,0,0,0,0,0}},{{10876,0,0,0,0,0},{11741,0,0,0,0,0},{12085,0,0,0,0,0},{10704,0,0,0,0,0},{11016,0,0,0,0,0},{11018,0,0,0,0,0},{10972,0,0,0,0,0},{10612,0,0,0,0,0},{10780,0,0,0,0,0},{10602,0,0,0,0,0}},{{10506,0,0,0,0,0},{10945,0,0,0,0,0},{11361,0,0,0,0,0},{10552,0,0,0,0,0},{11076,0,0,0,0,0},{9673,0,0,0,0,0},{10668,0,0,0,0,0},{10621,0,0,0,0,0},{12332,0,0,0,0,0},{11287,0,0,0,0,0}},{{11731,0,0,0,0,0},{11012,0,0,0,0,0},{11133,0,0,0,0,0},{10855,0,0,0,0,0},{11271,0,0,0,0,0},{11310,0,0,0,0,0},{10650,0,0,0,0,0},{11428,0,0,0,0,0},{10350,0,0,0,0,0},{11083,0,0,0,0,0}},{{10770,0,0,0,0,0},{11534,0,0,0,0,0},{11124,0,0,0,0,0},{11442,0,0,0,0,0},{10551,0,0,0,0,0},{11249,0,0,0,0,0},{11242,0,0,0,0,0},{10579,0,0,0,0,0},{11416,0,0,0,0,0},{11476,0,0,0,0,0}},{{11023,0,0,0,0,0},{11588,0,0,0,0,0},{10378,0,0,0,0,0},{10934,0,0,0,0,0},{10523,0,0,0,0,0},{11223,0,0,0,0,0},{11242,0,0,0,0,0},{11566,0,0,0,0,0},{10999,0,0,0,0,0},{11725,0,0,0,0,0}}},{{{-195,-186,-327,-267,-137,-309},{-121,-141,-177,-175,-267,-159},{-249,-159,-302,-298,-213,-293},{-323,-141,-170,-204,-273,-195},{-152,-170,-289,-166,-116,-112},{-264,-242,-242,-311,-179,-190},{-251,-273,-116,-177,-224,-336},{-323,-161,-112,-128,-311,-269},{-318,-181,-130,-137,-249,-146},{-316,-271,-166,-155,-320,-273}},{{-134,-146,-130,-128,-146,-177},{-208,-318,-211,-269,-204,-298},{-168,-332,-262,-237,-276,-287},{-296,-164,-273,-226,-134,-309},{-242,-121,-161,-128,-224,-116},{-231,-327,-130,-296,-116,-146},{-168,-314,-309,-305,-267,-119},{-134,-125,-155,-267,-276,-291},{-146,-119,-132,-155,-271,-193},{-128,-215,-179,-296,-157,-262}},{{-276,-112,-125,-276,-334,-130},{-175,-282,-213,-186,-316,-132},{-112,-289,-309,-244,-204,-155},{-251,-282,-119,-125,-289,-280},{-302,-237,-258,-119,-244,-114},{-195,-246,-155,-141,-137,-152},{-177,-249,-255,-262,-204,-213},{-280,-132,-314,-220,-258,-134},{-307,-284,-137,-233,-316,-325},{-199,-318,-289,-311,-202,-137}},{{-323,-132,-258,-188,-300,-175},{-170,-143,-195,-155,-215,-269},{-278,-112,-271,-264,-123,-233},{-220,-146,-197,-166,-222,-220},{-291,-262,-211,-159,-128,-121},{-128,-255,-264,-305,-287,-276},{-228,-296,-211,-159,-215,-242},{-264,-161,-226,-291,-264,-172},{-121,-278,-267,-188,-116,-170},{-222,-128,-220,-325,-311,-291}},{{-155,-327,-334,-253,-181,-320},{-269,-172,-190,-148,-269,-177},{-255,-190,-271,-267,-264,-242},{-323,-181,-305,-278,-293,-271},{-262,-332,-132,-170,-325,-121},{-112,-164,-233,-287,-311,-233},{-334,-269,-206,-116,-215,-314},{-166,-215,-148,-132,-186,-116},{-195,-112,-309,-172,-186,-327},{-121,-195,-251,-302,-184,-309}},{{-255,-282,-161,-224,-287,-226},{-311,-228,-323,-298,-215,-264},{-246,-202,-137,-170,-224,-123},{-222,-188,-197,-271,-260,-125},{-332,-237,-206,-217,-114,-170},{-112,-220,-336,-235,-253,-300},{-130,-181,-143,-112,-244,-195},{-166,-332,-116,-291,-287,-327},{-307,-314,-213,-273,-309,-184},{-237,-327,-282,-155,-276,-287}}},{{{-278,-152,-145,-164,-131,-226},{-214,-159,-321,-124,-148,-159},{-290,-286,-219,-262,-274,-169},{-357,-138,-271,-302,-126,-152},{-143,-238,-124,-236,-152,-157},{-309,-350,-278,-209,-157,-321},{-214,-214,-300,-136,-257,-129},{-228,-281,-138,-200,-271,-198},{-259,-143,-338,-286,-302,-152},{-357,-259,-290,-328,-138,-302}},{{-352,-307,-295,-219,-124,-224},{-252,-181,-283,-193,-164,-198},{-131,-333,-321,-347,-319,-259},{-302,-345,-305,-121,-183,-181},{-340,-350,-155,-269,-198,-143},{-155,-198,-340,-176,-312,-288},{-233,-221,-217,-193,-190,-131},{-228,-281,-355,-269,-138,-274},{-171,-212,-295,-226,-238,-155},{-138,-324,-357,-212,-205,-340}},{{-205,-219,-176,-186,-133,-159},{-271,-207,-126,-224,-293,-355},{-302,-236,-319,-188,-252,-183},{-312,-171,-176,-143,-331,-248},{-217,-317,-176,-202,-164,-252},{-305,-236,-255,-186,-219,-290},{-257,-205,-152,-298,-250,-195},{-240,-205,-224,-129,-164,-224},{-176,-326,-176,-345,-328,-328},{-324,-286,-200,-257,-205,-202}},{{-231,-138,-298,-236,-224,-181},{-305,-245,-221,-195,-195,-347},{-269,-298,-347,-267,-290,-267},{-138,-221,-295,-312,-214,-295},{-262,-324,-307,-195,-171,-193},{-271,-259,-336,-209,-307,-183},{-169,-233,-245,-226,-293,-286},{-250,-209,-350,-288,-209,-188},{-148,-219,-295,-245,-238,-198},{-150,-133,-174,-150,-207,-129}},{{-345,-243,-131,-202,-243,-314},{-181,-352,-140,-314,-200,-269},{-176,-188,-307,-305,-248,-305},{-321,-133,-150,-248,-119,-155},{-200,-269,-228,-288,-178,-164},{-309,-198,-276,-209,-286,-183},{-278,-240,-183,-276,-205,-157},{-224,-202,-155,-186,-243,-145},{-257,-290,-140,-355,-138,-217},{-214,-278,-286,-248,-312,-155}},{{-228,-243,-255,-269,-157,-121},{-262,-162,-352,-207,-245,-228},{-200,-133,-307,-345,-159,-355},{-188,-240,-267,-319,-255,-178},{-298,-240,-271,-281,-262,-240},{-314,-250,-281,-283,-138,-202},{-338,-221,-214,-286,-307,-305},{-293,-278,-340,-214,-205,-257},{-131,-129,-140,-221,-357,-226},{-212,-209,-355,-119,-333,-333}}},{{{-374,-257,-227,-396,-243,-344},{-145,-388,-349,-199,-240,-314},{-377,-382,-407,-284,-257,-319},{-366,-390,-259,-360,-147,-145},{-169,-311,-276,-216,-183,-150},{-175,-197,-344,-344,-232,-227},{-161,-371,-194,-300,-410,-248},{-235,-284,-246,-284,-273,-317},{-371,-303,-147,-142,-287,-281},{-145,-344,-213,-366,-164,-284}},{{-240,-325,-352,-303,-284,-202},{-393,-278,-259,-360,-202,-347},{-396,-186,-369,-317,-333,-156},{-407,-352,-393,-235,-358,-175},{-396,-147,-194,-235,-188,-213},{-227,-224,-161,-161,-175,-319},{-374,-180,-169,-167,-314,-295},{-358,-369,-278,-330,-194,-287},{-205,-268,-360,-404,-199,-396},{-270,-355,-175,-254,-232,-186}},{{-330,-183,-246,-164,-330,-352},{-158,-306,-300,-153,-388,-199},{-259,-347,-281,-191,-224,-259},{-183,-153,-330,-281,-328,-136},{-175,-404,-180,-205,-358,-355},{-238,-308,-221,-158,-199,-259},{-167,-278,-325,-167,-224,-352},{-396,-289,-259,-248,-382,-246},{-374,-169,-229,-314,-360,-167},{-216,-224,-262,-164,-306,-292}},{{-328,-229,-328,-410,-410,-243},{-303,-289,-202,-224,-379,-303},{-136,-257,-344,-333,-177,-306},{-153,-358,-139,-281,-306,-240},{-404,-355,-306,-273,-347,-311},{-390,-347,-240,-156,-330,-199},{-292,-199,-194,-246,-355,-278},{-308,-221,-218,-352,-292,-407},{-232,-221,-287,-161,-161,-382},{-358,-281,-295,-333,-145,-410}},{{-180,-243,-221,-161,-224,-177},{-248,-379,-210,-284,-344,-298},{-270,-153,-352,-319,-153,-167},{-303,-347,-262,-358,-197,-281},{-388,-317,-136,-197,-205,-268},{-339,-235,-248,-377,-145,-139},{-273,-227,-317,-300,-349,-298},{-156,-325,-188,-238,-311,-300},{-303,-396,-243,-251,-311,-341},{-248,-336,-188,-328,-232,-278}},{{-224,-295,-136,-393,-295,-180},{-322,-136,-336,-281,-147,-265},{-199,-199,-147,-401,-303,-210},{-177,-385,-248,-396,-243,-404},{-158,-325,-183,-210,-150,-197},{-410,-404,-188,-333,-199,-336},{-404,-390,-379,-246,-330,-188},{-374,-251,-360,-218,-388,-158},{-333,-254,-371,-186,-191,-186},{-191,-344,-410,-202,-401,-188}}},{{{-205,-199,-114,-94,-225,-154},{-169,-213,-199,-92,-186,-159},{-219,-166,-119,-199,-156,-109},{-196,-145,-136,-140,-183,-148},{-86,-134,-79,-172,-226,-182},{-97,-111,-88,-200,-219,-128},{-200,-183,-223,-188,-200,-211},{-88,-205,-185,-208,-142,-180},{-137,-194,-134,-116,-111,-92},{-116,-191,-116,-186,-131,-231}},{{-125,-92,-203,-94,-188,-91},{-148,-225,-217,-152,-176,-174},{-171,-89,-102,-206,-188,-117},{-163,-122,-91,-89,-126,-152},{-188,-129,-213,-203,-89,-123},{-199,-208,-196,-114,-95,-159},{-122,-182,-156,-176,-80,-154},{-131,-220,-174,-106,-156,-162},{-196,-229,-174,-88,-202,-179},{-180,-149,-199,-94,-186,-136}},{{-114,-103,-174,-129,-89,-146},{-211,-200,-142,-140,-128,-103},{-180,-202,-159,-162,-213,-145},{-100,-162,-91,-219,-186,-149},{-209,-145,-108,-177,-109,-152},{-129,-154,-216,-111,-109,-213},{-134,-169,-151,-222,-231,-145},{-202,-188,-157,-226,-185,-108},{-176,-194,-152,-192,-100,-211},{-165,-199,-183,-82,-132,-191}},{{-214,-217,-231,-200,-196,-172},{-183,-97,-112,-132,-213,-134},{-83,-83,-88,-166,-231,-192},{-116,-174,-225,-123,-188,-223},{-122,-228,-192,-79,-132,-223},{-134,-120,-111,-222,-159,-80},{-126,-109,-176,-100,-145,-186},{-145,-152,-137,-146,-108,-225},{-139,-142,-134,-165,-91,-231},{-185,-228,-126,-231,-202,-189}},{{-171,-206,-142,-91,-188,-109},{-205,-149,-103,-213,-186,-202},{-223,-136,-140,-86,-83,-226},{-137,-228,-154,-117,-231,-172},{-203,-112,-95,-136,-213,-109},{-140,-99,-132,-77,-211,-88},{-105,-220,-149,-157,-139,-151},{-219,-92,-226,-191,-185,-132},{-159,-225,-99,-219,-214,-85},{-95,-85,-152,-166,-199,-145}},{{-223,-91,-183,-223,-208,-103},{-197,-197,-225,-128,-174,-149},{-152,-99,-143,-196,-205,-131},{-205,-88,-208,-137,-137,-85},{-188,-103,-157,-220,-117,-125},{-125,-83,-139,-219,-169,-197},{-82,-126,-220,-109,-136,-185},{-166,-125,-199,-209,-148,-180},{-200,-206,-136,-226,-126,-217},{-202,-211,-91,-213,-194,-77}}},{{{-124,-91,-124,-182,-226,-111},{-135,-273,-98,-162,-269,-147},{-200,-169,-135,-144,-224,-126},{-120,-162,-166,-258,-175,-224},{-220,-182,-157,-198,-229,-136},{-140,-175,-231,-217,-136,-171},{-231,-111,-146,-206,-266,-218},{-209,-104,-146,-115,-146,-257},{-91,-235,-255,-135,-104,-186},{-98,-222,-126,-244,-206,-100}},{{-98,-269,-248,-269,-115,-178},{-235,-238,-135,-273,-240,-228},{-238,-226,-231,-155,-260,-209},{-226,-95,-246,-142,-142,-242},{-177,-124,-218,-266,-197,-242},{-118,-167,-242,-171,-217,-96},{-184,-228,-202,-255,-162,-197},{-109,-129,-242,-100,-158,-233},{-255,-91,-118,-224,-238,-211},{-231,-228,-189,-186,-135,-129}},{{-111,-171,-202,-246,-262,-244},{-113,-218,-246,-257,-215,-93},{-155,-238,-229,-158,-102,-209},{-200,-273,-231,-109,-109,-122},{-268,-268,-202,-118,-118,-233},{-135,-207,-220,-122,-151,-113},{-235,-262,-218,-268,-127,-107},{-244,-237,-262,-107,-106,-177},{-240,-204,-269,-126,-217,-178},{-262,-195,-213,-91,-222,-258}},{{-191,-207,-195,-184,-131,-187},{-200,-229,-98,-191,-222,-140},{-127,-96,-253,-100,-215,-180},{-135,-115,-264,-202,-118,-118},{-228,-93,-106,-171,-187,-151},{-231,-197,-164,-184,-255,-204},{-118,-107,-213,-106,-237,-273},{-100,-209,-136,-131,-198,-218},{-268,-209,-195,-222,-237,-198},{-235,-115,-169,-144,-273,-166}},{{-251,-204,-207,-255,-257,-198},{-268,-126,-240,-244,-153,-169},{-200,-102,-258,-93,-113,-187},{-189,-224,-118,-244,-211,-180},{-273,-106,-182,-202,-96,-189},{-166,-100,-169,-258,-206,-147},{-187,-222,-151,-187,-169,-244},{-260,-257,-233,-222,-173,-229},{-127,-162,-129,-271,-169,-142},{-220,-138,-118,-249,-260,-242}},{{-268,-273,-224,-273,-218,-177},{-228,-206,-258,-147,-197,-162},{-226,-107,-229,-169,-220,-149},{-215,-187,-211,-224,-107,-269},{-169,-98,-206,-116,-257,-222},{-251,-264,-182,-107,-157,-162},{-157,-113,-127,-167,-244,-187},{-122,-98,-258,-207,-169,-126},{-124,-209,-122,-127,-146,-140},{-264,-209,-173,-204,-124,-273}}},{{{-157,-306,-130,-311,-336,-336},{-355,-318,-145,-216,-181,-245},{-154,-299,-223,-323,-270,-365},{-318,-311,-203,-353,-287,-247},{-360,-314,-306,-341,-365,-223},{-328,-321,-152,-235,-277,-272},{-162,-338,-333,-247,-240,-198},{-230,-296,-162,-147,-257,-309},{-348,-299,-265,-328,-296,-274},{-206,-304,-338,-132,-267,-252}},{{-235,-135,-201,-365,-157,-328},{-145,-140,-149,-127,-198,-243},{-345,-250,-262,-198,-277,-318},{-172,-211,-321,-159,-179,-203},{-284,-289,-270,-213,-223,-250},{-208,-323,-211,-228,-265,-230},{-179,-282,-277,-326,-262,-252},{-240,-189,-338,-174,-174,-135},{-277,-341,-201,-164,-181,-198},{-149,-260,-225,-235,-294,-316}},{{-230,-159,-316,-225,-345,-257},{-296,-304,-309,-172,-125,-316},{-306,-341,-333,-316,-201,-314},{-301,-174,-213,-196,-265,-353},{-174,-186,-240,-230,-363,-355},{-127,-216,-255,-218,-176,-309},{-154,-267,-233,-122,-132,-164},{-228,-194,-213,-287,-208,-137},{-301,-255,-358,-252,-262,-316},{-159,-233,-353,-321,-142,-228}},{{-122,-348,-201,-235,-294,-132},{-159,-164,-336,-196,-279,-350},{-145,-240,-338,-220,-341,-284},{-309,-314,-321,-257,-314,-250},{-233,-157,-149,-294,-289,-314},{-201,-132,-321,-125,-270,-274},{-277,-230,-179,-238,-363,-142},{-189,-289,-191,-368,-198,-194},{-274,-172,-230,-135,-135,-265},{-260,-289,-167,-365,-296,-130}},{{-203,-336,-287,-343,-203,-265},{-235,-142,-230,-287,-355,-333},{-172,-314,-230,-194,-270,-355},{-309,-301,-255,-211,-262,-181},{-296,-132,-223,-338,-140,-208},{-316,-348,-343,-243,-260,-172},{-174,-245,-277,-245,-309,-206},{-289,-314,-220,-149,-304,-154},{-238,-314,-336,-228,-162,-289},{-336,-252,-130,-358,-292,-316}},{{-289,-238,-323,-162,-311,-152},{-341,-181,-284,-186,-296,-140},{-277,-299,-243,-265,-240,-360},{-228,-211,-122,-179,-274,-289},{-270,-260,-174,-174,-228,-262},{-218,-311,-333,-255,-363,-365},{-326,-294,-306,-363,-189,-225},{-211,-208,-365,-270,-318,-179},{-289,-255,-172,-238,-355,-137},{-323,-345,-294,-272,-169,-323}}},{{{-273,-236,-261,-159,-146,-268},{-245,-208,-194,-286,-300,-118},{-180,-196,-169,-236,-333,-164},{-298,-323,-150,-141,-134,-166},{-125,-231,-178,-141,-298,-233},{-335,-139,-316,-155,-166,-159},{-312,-268,-196,-173,-226,-148},{-178,-134,-273,-296,-240,-231},{-328,-159,-192,-143,-189,-270},{-136,-282,-217,-344,-286,-159}},{{-259,-263,-346,-125,-176,-340},{-275,-277,-259,-326,-307,-293},{-127,-173,-337,-118,-342,-307},{-176,-249,-171,-316,-296,-231},{-120,-291,-136,-344,-155,-256},{-192,-314,-164,-243,-312,-268},{-252,-213,-319,-266,-286,-171},{-180,-314,-141,-166,-300,-127},{-194,-129,-194,-296,-286,-323},{-120,-150,-252,-125,-178,-296}},{{-273,-270,-249,-291,-199,-236},{-185,-125,-337,-178,-261,-328},{-208,-293,-152,-219,-122,-277},{-120,-291,-344,-152,-132,-194},{-335,-122,-194,-226,-298,-249},{-233,-210,-116,-162,-296,-116},{-316,-335,-194,-210,-173,-169},{-122,-217,-185,-210,-254,-120},{-141,-254,-330,-280,-307,-300},{-291,-289,-146,-215,-199,-159}},{{-256,-312,-233,-222,-222,-178},{-261,-333,-199,-226,-143,-178},{-300,-176,-277,-178,-169,-127},{-141,-118,-132,-249,-178,-152},{-328,-173,-194,-300,-310,-305},{-326,-169,-256,-249,-219,-300},{-162,-116,-330,-213,-122,-259},{-305,-213,-118,-171,-330,-344},{-199,-240,-252,-164,-289,-116},{-224,-219,-340,-243,-208,-182}},{{-298,-206,-182,-171,-243,-143},{-173,-323,-171,-346,-208,-284},{-346,-303,-240,-219,-282,-249},{-208,-268,-203,-132,-150,-342},{-326,-139,-219,-240,-293,-125},{-201,-247,-275,-303,-215,-238},{-330,-337,-263,-196,-139,-125},{-162,-245,-224,-273,-217,-266},{-155,-337,-307,-238,-268,-213},{-328,-201,-185,-233,-300,-259}},{{-203,-217,-245,-310,-176,-333},{-143,-326,-296,-196,-173,-300},{-129,-152,-162,-286,-213,-231},{-229,-155,-171,-134,-143,-187},{-245,-249,-132,-245,-132,-284},{-196,-284,-139,-136,-222,-176},{-148,-319,-120,-312,-330,-129},{-280,-189,-296,-182,-342,-233},{-321,-275,-254,-252,-208,-129},{-215,-129,-155,-217,-316,-157}}},{{{-270,-365,-153,-376,-373,-262},{-403,-285,-285,-218,-265,-362},{-247,-391,-259,-218,-397,-156},{-212,-300,-206,-273,-179,-294},{-209,-162,-165,-365,-432,-426},{-356,-162,-197,-156,-206,-159},{-226,-306,-165,-409,-294,-250},{-438,-294,-268,-388,-282,-326},{-223,-171,-376,-382,-265,-338},{-153,-338,-279,-179,-212,-338}},{{-356,-329,-362,-306,-291,-244},{-341,-356,-185,-394,-226,-441},{-250,-420,-291,-226,-273,-350},{-156,-329,-188,-176,-253,-323},{-417,-394,-323,-388,-412,-262},{-206,-435,-394,-420,-379,-262},{-394,-218,-156,-335,-276,-244},{-320,-235,-435,-147,-171,-297},{-329,-297,-194,-285,-394,-147},{-179,-323,-353,-203,-176,-441}},{{-303,-282,-365,-173,-200,-206},{-238,-438,-203,-162,-409,-209},{-388,-320,-215,-379,-306,-165},{-156,-320,-329,-365,-276,-282},{-412,-220,-306,-362,-215,-203},{-270,-226,-185,-329,-173,-276},{-315,-223,-253,-306,-368,-235},{-341,-209,-412,-315,-200,-226},{-265,-344,-276,-318,-229,-391},{-262,-244,-368,-441,-435,-215}},{{-162,-182,-382,-420,-441,-432},{-315,-156,-385,-335,-294,-397},{-441,-409,-162,-235,-385,-320},{-206,-365,-238,-382,-385,-420},{-197,-309,-332,-162,-417,-276},{-406,-391,-229,-162,-165,-312},{-226,-215,-150,-441,-365,-359},{-223,-359,-370,-212,-391,-388},{-315,-229,-212,-218,-412,-335},{-194,-209,-359,-391,-209,-273}},{{-332,-191,-241,-179,-238,-176},{-315,-309,-409,-265,-297,-150},{-168,-265,-370,-200,-262,-406},{-297,-194,-385,-241,-338,-435},{-391,-162,-385,-309,-338,-191},{-370,-388,-312,-288,-241,-412},{-347,-332,-288,-206,-247,-338},{-285,-297,-197,-373,-326,-229},{-288,-247,-391,-226,-379,-256},{-241,-356,-356,-235,-279,-285}},{{-326,-173,-226,-153,-256,-235},{-297,-194,-341,-259,-417,-368},{-344,-285,-150,-303,-194,-159},{-359,-200,-423,-288,-315,-391},{-394,-247,-394,-218,-223,-323},{-212,-226,-226,-297,-215,-200},{-247,-353,-318,-350,-250,-197},{-223,-150,-344,-365,-326,-223},{-291,-323,-347,-244,-385,-220},{-356,-147,-406,-209,-417,-179}}}}; // 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]={15,8,5,15,8,5,15,8,6,17,8,6,16,8,6,17,9,6,16,8,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,8,6,16,9,6,16,8,6,17,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,2,8,14,20,26,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,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,32,1,5,9,13,17,21,25,29,2,8,14,20,26,32,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,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,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,32,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,1,5,9,13,17,21,25,29,33,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,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,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,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,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,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,2,8,14,20,26,32,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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,34,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,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,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,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,0,6,12,18,24,30,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}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,7,13,19,25,31,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,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,3,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,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,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,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,2,8,14,20,26,32,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,2,8,14,20,26,32,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,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,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,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,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,2,8,14,20,26,32,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,3,9,15,21,27,33,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,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,1,7,13,19,25,31,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,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,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,2,8,14,20,26,32,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,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,3,9,15,21,27,33,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,5,11,17,23,29,35}; // set of end times of each shipment 
