int Dev = 50;// Deviation
extern const int CNN = 3;// 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 = 746;//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]={{{{13223,0,0,0,0,0},{12942,0,0,0,0,0},{13716,0,0,0,0,0},{12973,0,0,0,0,0},{12055,0,0,0,0,0},{11813,0,0,0,0,0},{12936,0,0,0,0,0},{10812,0,0,0,0,0},{12696,0,0,0,0,0},{12341,0,0,0,0,0}},{{12029,0,0,0,0,0},{11863,0,0,0,0,0},{11710,0,0,0,0,0},{12940,0,0,0,0,0},{11935,0,0,0,0,0},{11795,0,0,0,0,0},{12739,0,0,0,0,0},{12727,0,0,0,0,0},{12642,0,0,0,0,0},{12689,0,0,0,0,0}},{{11586,0,0,0,0,0},{11410,0,0,0,0,0},{11199,0,0,0,0,0},{11234,0,0,0,0,0},{11395,0,0,0,0,0},{11808,0,0,0,0,0},{12094,0,0,0,0,0},{11429,0,0,0,0,0},{12004,0,0,0,0,0},{11275,0,0,0,0,0}},{{9674,0,0,0,0,0},{9760,0,0,0,0,0},{9476,0,0,0,0,0},{10480,0,0,0,0,0},{9580,0,0,0,0,0},{10868,0,0,0,0,0},{10760,0,0,0,0,0},{9781,0,0,0,0,0},{10421,0,0,0,0,0},{10284,0,0,0,0,0}},{{9467,0,0,0,0,0},{9061,0,0,0,0,0},{9993,0,0,0,0,0},{9659,0,0,0,0,0},{9799,0,0,0,0,0},{9677,0,0,0,0,0},{8738,0,0,0,0,0},{9879,0,0,0,0,0},{8971,0,0,0,0,0},{10467,0,0,0,0,0}},{{9557,0,0,0,0,0},{9298,0,0,0,0,0},{8679,0,0,0,0,0},{9492,0,0,0,0,0},{9326,0,0,0,0,0},{9427,0,0,0,0,0},{9124,0,0,0,0,0},{9519,0,0,0,0,0},{8576,0,0,0,0,0},{9125,0,0,0,0,0}}},{{{-356,-353,-191,-294,-147,-288},{-335,-417,-291,-220,-276,-341},{-309,-291,-297,-294,-400,-429},{-294,-318,-303,-368,-185,-382},{-417,-244,-238,-212,-156,-391},{-347,-323,-412,-232,-300,-412},{-226,-335,-220,-176,-350,-268},{-276,-150,-218,-365,-212,-215},{-332,-294,-359,-194,-303,-423},{-420,-379,-415,-335,-412,-397}},{{-226,-420,-185,-408,-224,-215},{-252,-197,-171,-395,-224,-174},{-368,-235,-392,-140,-136,-155},{-197,-429,-322,-181,-184,-275},{-188,-169,-339,-227,-190,-293},{-177,-275,-249,-244,-224,-197},{-165,-352,-244,-159,-147,-220},{-345,-203,-162,-255,-352,-337},{-246,-360,-213,-400,-371,-166},{-218,-337,-288,-378,-227,-332}},{{-300,-227,-282,-190,-233,-239},{-128,-348,-133,-119,-203,-272},{-143,-128,-123,-134,-205,-177},{-228,-123,-130,-179,-124,-185},{-285,-247,-317,-119,-131,-260},{-252,-307,-207,-175,-152,-183},{-135,-169,-287,-143,-210,-138},{-295,-208,-137,-181,-302,-210},{-332,-356,-254,-325,-107,-119},{-185,-157,-210,-280,-190,-194}},{{-219,-118,-127,-146,-226,-109},{-290,-234,-90,-181,-82,-115},{-154,-224,-152,-110,-104,-224},{-284,-193,-202,-115,-124,-168},{-203,-172,-125,-150,-148,-166},{-219,-107,-206,-122,-119,-211},{-217,-144,-263,-225,-106,-168},{-205,-183,-206,-181,-114,-234},{-191,-161,-268,-114,-152,-146},{-234,-245,-140,-98,-200,-160}},{{-114,-127,-204,-220,-203,-173},{-117,-140,-110,-94,-84,-141},{-166,-156,-187,-126,-207,-219},{-169,-118,-138,-160,-206,-165},{-200,-91,-81,-115,-210,-159},{-129,-142,-197,-209,-154,-81},{-202,-106,-81,-146,-84,-148},{-165,-82,-206,-213,-162,-178},{-86,-118,-107,-143,-204,-135},{-159,-143,-100,-218,-194,-123}},{{-122,-138,-128,-142,-111,-142},{-126,-197,-88,-214,-105,-245},{-123,-125,-83,-102,-192,-139},{-213,-125,-214,-109,-90,-229},{-107,-129,-220,-177,-184,-184},{-182,-91,-210,-94,-172,-177},{-97,-94,-184,-216,-225,-184},{-203,-112,-94,-182,-195,-114},{-106,-87,-199,-91,-164,-117},{-96,-110,-186,-102,-95,-107}}},{{{-235,-242,-196,-233,-261,-214},{-217,-130,-186,-131,-252,-254},{-198,-218,-217,-242,-151,-223},{-247,-157,-91,-231,-223,-172},{-198,-149,-208,-199,-228,-105},{-146,-103,-254,-213,-118,-244},{-92,-155,-248,-217,-116,-197},{-136,-172,-121,-116,-243,-223},{-170,-199,-180,-213,-116,-262},{-252,-183,-187,-177,-140,-265}},{{-174,-135,-307,-303,-147,-343},{-222,-236,-245,-228,-169,-169},{-242,-164,-211,-197,-250,-286},{-164,-287,-132,-270,-220,-188},{-99,-228,-141,-146,-128,-119},{-103,-193,-121,-161,-126,-324},{-121,-205,-239,-285,-160,-340},{-291,-295,-183,-287,-149,-193},{-190,-234,-153,-159,-165,-264},{-150,-172,-173,-305,-151,-195}},{{-151,-326,-280,-362,-283,-153},{-247,-178,-333,-135,-205,-345},{-136,-309,-168,-397,-310,-410},{-343,-324,-165,-184,-355,-402},{-200,-191,-367,-213,-163,-323},{-254,-357,-291,-246,-410,-376},{-304,-354,-267,-392,-230,-396},{-148,-245,-330,-348,-227,-405},{-141,-375,-348,-200,-355,-348},{-161,-237,-335,-310,-285,-178}},{{-309,-232,-218,-343,-247,-199},{-364,-229,-313,-190,-352,-277},{-347,-150,-316,-232,-271,-280},{-318,-212,-286,-442,-262,-232},{-211,-368,-235,-226,-415,-199},{-217,-279,-262,-436,-283,-452},{-410,-244,-218,-382,-238,-409},{-327,-270,-155,-298,-442,-265},{-332,-159,-289,-241,-277,-439},{-147,-332,-221,-229,-427,-259}},{{-253,-331,-172,-258,-432,-334},{-250,-313,-304,-420,-162,-215},{-391,-178,-448,-201,-323,-345},{-391,-241,-310,-252,-226,-220},{-421,-256,-403,-216,-212,-406},{-196,-343,-244,-384,-432,-403},{-295,-277,-250,-399,-423,-162},{-376,-424,-385,-267,-420,-148},{-298,-433,-199,-438,-150,-188},{-427,-430,-382,-255,-429,-365}},{{-185,-385,-295,-172,-369,-360},{-211,-307,-138,-214,-136,-191},{-294,-145,-382,-219,-264,-126},{-291,-181,-173,-143,-315,-352},{-419,-335,-146,-312,-276,-246},{-425,-338,-374,-180,-384,-221},{-390,-371,-336,-354,-143,-164},{-254,-190,-344,-301,-271,-198},{-285,-220,-322,-248,-179,-303},{-188,-151,-350,-372,-266,-342}}},{{{-342,-349,-454,-382,-326,-401},{-345,-322,-309,-418,-290,-306},{-260,-477,-283,-454,-461,-253},{-494,-470,-207,-240,-487,-280},{-368,-214,-290,-283,-276,-306},{-345,-375,-290,-237,-243,-188},{-424,-378,-270,-457,-388,-194},{-197,-217,-230,-359,-191,-382},{-415,-352,-484,-171,-342,-388},{-227,-237,-319,-378,-316,-470}},{{-403,-206,-325,-204,-234,-157},{-321,-229,-233,-333,-336,-361},{-308,-460,-182,-308,-403,-412},{-266,-354,-316,-339,-154,-187},{-341,-386,-211,-349,-357,-208},{-433,-164,-198,-192,-228,-184},{-348,-428,-348,-273,-394,-277},{-417,-399,-431,-364,-317,-452},{-479,-332,-223,-195,-431,-394},{-318,-161,-160,-289,-333,-292}},{{-351,-207,-190,-207,-302,-334},{-239,-308,-171,-185,-355,-172},{-162,-271,-300,-370,-257,-195},{-183,-351,-263,-313,-207,-244},{-327,-314,-171,-389,-180,-198},{-180,-262,-185,-163,-376,-288},{-404,-213,-409,-316,-358,-134},{-386,-279,-151,-389,-390,-218},{-401,-383,-241,-329,-260,-139},{-301,-323,-154,-302,-339,-208}},{{-372,-214,-152,-122,-291,-153},{-212,-129,-353,-169,-143,-186},{-220,-151,-301,-316,-146,-149},{-282,-245,-220,-136,-244,-322},{-328,-250,-346,-185,-220,-256},{-232,-192,-344,-116,-284,-160},{-312,-146,-301,-314,-217,-293},{-220,-299,-182,-340,-206,-116},{-312,-134,-318,-120,-197,-169},{-285,-292,-353,-143,-258,-112}},{{-323,-204,-246,-174,-311,-141},{-130,-109,-260,-239,-281,-311},{-312,-288,-162,-149,-128,-116},{-284,-195,-185,-153,-271,-118},{-187,-181,-307,-176,-206,-267},{-215,-109,-214,-174,-220,-124},{-132,-141,-132,-176,-132,-134},{-282,-206,-174,-237,-258,-187},{-182,-262,-141,-309,-290,-193},{-156,-252,-262,-126,-225,-260}},{{-128,-281,-302,-312,-249,-169},{-288,-105,-287,-269,-264,-306},{-185,-145,-122,-317,-255,-308},{-168,-210,-266,-217,-224,-194},{-168,-246,-238,-174,-271,-146},{-109,-220,-143,-217,-328,-335},{-116,-256,-251,-304,-143,-187},{-311,-109,-228,-161,-317,-308},{-235,-239,-129,-117,-213,-281},{-153,-162,-200,-299,-213,-122}}},{{{-139,-59,-148,-138,-151,-180},{-91,-101,-151,-145,-89,-191},{-139,-87,-90,-118,-181,-72},{-145,-81,-111,-153,-85,-147},{-155,-148,-151,-161,-94,-106},{-104,-74,-159,-94,-66,-128},{-78,-83,-66,-66,-76,-92},{-113,-112,-63,-60,-127,-123},{-135,-80,-137,-115,-71,-173},{-152,-80,-101,-98,-140,-110}},{{-180,-138,-123,-98,-140,-175},{-153,-118,-123,-161,-180,-138},{-136,-166,-210,-158,-182,-94},{-167,-117,-204,-232,-203,-210},{-105,-92,-216,-191,-126,-181},{-127,-210,-200,-138,-180,-222},{-131,-89,-121,-178,-233,-220},{-147,-158,-83,-82,-140,-141},{-158,-103,-166,-178,-166,-220},{-78,-104,-178,-211,-132,-92}},{{-89,-108,-238,-224,-280,-267},{-163,-153,-180,-217,-257,-295},{-158,-97,-184,-239,-114,-172},{-145,-229,-236,-272,-280,-127},{-126,-122,-206,-112,-108,-202},{-201,-119,-95,-285,-206,-295},{-241,-187,-149,-281,-214,-200},{-117,-196,-205,-241,-116,-246},{-126,-203,-210,-165,-294,-289},{-88,-173,-113,-114,-257,-127}},{{-211,-150,-219,-140,-270,-302},{-260,-114,-102,-130,-264,-173},{-106,-258,-166,-197,-130,-110},{-229,-168,-231,-166,-130,-302},{-233,-102,-162,-223,-126,-124},{-270,-223,-185,-158,-181,-262},{-160,-110,-211,-296,-136,-235},{-171,-114,-120,-282,-302,-266},{-181,-266,-227,-252,-205,-256},{-298,-264,-187,-266,-278,-148}},{{-209,-207,-276,-148,-280,-269},{-160,-266,-150,-193,-195,-265},{-148,-286,-209,-129,-147,-261},{-254,-195,-270,-170,-274,-98},{-215,-112,-242,-277,-261,-269},{-278,-160,-148,-279,-155,-245},{-132,-280,-150,-127,-151,-261},{-233,-160,-207,-244,-153,-199},{-140,-207,-130,-113,-278,-147},{-205,-132,-242,-263,-121,-193}},{{-252,-135,-249,-226,-203,-88},{-231,-218,-172,-155,-142,-141},{-125,-100,-92,-176,-89,-129},{-231,-204,-190,-205,-106,-88},{-268,-232,-180,-146,-139,-204},{-258,-149,-175,-200,-181,-138},{-215,-86,-227,-123,-121,-129},{-165,-173,-224,-120,-214,-216},{-172,-166,-140,-155,-182,-204},{-136,-216,-220,-194,-165,-188}}},{{{-317,-207,-326,-178,-281,-150},{-144,-226,-295,-186,-228,-250},{-336,-283,-271,-328,-293,-221},{-217,-217,-126,-321,-152,-281},{-130,-276,-140,-133,-164,-290},{-233,-283,-174,-267,-276,-119},{-252,-293,-269,-347,-324,-224},{-217,-169,-345,-281,-145,-119},{-200,-121,-250,-314,-278,-126},{-252,-145,-302,-164,-162,-157}},{{-245,-307,-256,-252,-314,-234},{-155,-305,-129,-291,-269,-192},{-343,-121,-294,-120,-240,-175},{-231,-352,-327,-122,-332,-186},{-212,-133,-317,-277,-224,-115},{-314,-164,-331,-284,-154,-325},{-300,-226,-254,-236,-197,-281},{-169,-262,-348,-316,-301,-325},{-124,-309,-183,-122,-278,-290},{-126,-250,-240,-316,-242,-263}},{{-230,-130,-192,-205,-252,-257},{-163,-297,-269,-103,-107,-139},{-301,-127,-301,-144,-275,-265},{-172,-251,-147,-226,-226,-247},{-226,-209,-299,-156,-219,-149},{-194,-136,-214,-111,-251,-142},{-275,-282,-133,-103,-208,-166},{-131,-167,-204,-176,-135,-191},{-213,-211,-170,-117,-258,-162},{-322,-194,-299,-144,-224,-196}},{{-237,-236,-176,-195,-187,-171},{-100,-201,-234,-128,-148,-131},{-175,-165,-168,-213,-157,-153},{-181,-208,-152,-169,-72,-184},{-187,-96,-149,-177,-94,-168},{-132,-224,-166,-158,-138,-99},{-146,-191,-165,-116,-112,-159},{-193,-115,-184,-87,-153,-91},{-138,-229,-104,-167,-130,-207},{-93,-99,-118,-144,-91,-195}},{{-88,-89,-87,-142,-151,-105},{-174,-115,-179,-145,-177,-134},{-198,-185,-159,-140,-163,-134},{-97,-180,-110,-149,-114,-115},{-120,-101,-184,-136,-109,-127},{-66,-129,-179,-80,-109,-99},{-92,-170,-145,-178,-74,-104},{-116,-107,-81,-80,-69,-144},{-94,-137,-172,-129,-89,-74},{-146,-132,-151,-169,-90,-105}},{{-170,-61,-126,-154,-129,-178},{-132,-118,-83,-104,-99,-121},{-83,-151,-151,-148,-124,-132},{-104,-125,-81,-113,-70,-185},{-70,-95,-64,-149,-67,-165},{-104,-111,-143,-125,-146,-150},{-131,-143,-84,-107,-149,-64},{-62,-76,-117,-176,-155,-125},{-81,-79,-125,-83,-66,-132},{-95,-165,-68,-67,-116,-129}}},{{{-242,-309,-173,-290,-202,-335},{-168,-285,-317,-192,-359,-213},{-396,-351,-247,-309,-271,-178},{-279,-279,-229,-181,-356,-226},{-231,-250,-160,-388,-396,-399},{-277,-317,-303,-285,-370,-319},{-309,-290,-207,-340,-162,-359},{-271,-290,-274,-189,-215,-250},{-192,-168,-218,-370,-200,-396},{-269,-229,-319,-194,-346,-325}},{{-229,-274,-290,-340,-385,-171},{-245,-207,-370,-263,-236,-246},{-215,-229,-165,-239,-165,-350},{-189,-258,-394,-152,-351,-344},{-356,-210,-168,-231,-228,-262},{-354,-261,-213,-218,-275,-311},{-359,-386,-215,-253,-275,-231},{-372,-226,-394,-380,-173,-205},{-325,-152,-340,-287,-186,-319},{-160,-354,-330,-298,-320,-370}},{{-218,-170,-290,-315,-274,-340},{-192,-306,-277,-300,-274,-354},{-272,-197,-247,-260,-179,-231},{-202,-250,-270,-231,-147,-321},{-332,-137,-363,-223,-328,-222},{-264,-154,-318,-221,-331,-321},{-171,-319,-156,-335,-233,-345},{-148,-200,-262,-355,-353,-212},{-254,-326,-307,-345,-213,-304},{-249,-306,-358,-228,-299,-325}},{{-355,-329,-139,-184,-244,-148},{-252,-275,-256,-202,-233,-329},{-145,-164,-314,-154,-253,-195},{-278,-261,-259,-315,-307,-130},{-136,-212,-328,-172,-137,-202},{-174,-287,-323,-138,-287,-251},{-148,-188,-210,-267,-193,-146},{-124,-172,-125,-212,-166,-193},{-169,-141,-280,-308,-314,-193},{-345,-136,-132,-294,-215,-327}},{{-249,-132,-321,-237,-271,-130},{-161,-228,-165,-191,-143,-161},{-202,-239,-111,-321,-224,-154},{-242,-278,-208,-141,-323,-154},{-301,-184,-167,-122,-224,-276},{-264,-158,-323,-161,-180,-256},{-231,-176,-228,-237,-163,-189},{-299,-208,-195,-250,-206,-239},{-284,-312,-165,-315,-124,-273},{-301,-291,-304,-245,-156,-247}},{{-180,-137,-143,-117,-326,-326},{-282,-310,-165,-117,-282,-182},{-213,-174,-304,-193,-221,-243},{-284,-137,-293,-256,-158,-154},{-256,-111,-204,-169,-197,-145},{-117,-135,-150,-276,-122,-269},{-286,-197,-128,-143,-317,-187},{-180,-282,-154,-130,-189,-152},{-271,-141,-176,-206,-197,-171},{-126,-284,-148,-213,-215,-208}}},{{{-391,-310,-382,-193,-319,-148},{-271,-403,-229,-292,-268,-441},{-388,-289,-415,-452,-319,-275},{-283,-301,-358,-364,-436,-435},{-448,-388,-277,-382,-403,-281},{-184,-169,-202,-265,-232,-213},{-373,-445,-214,-442,-379,-228},{-316,-190,-280,-247,-376,-423},{-403,-319,-442,-289,-250,-293},{-400,-157,-150,-280,-400,-157}},{{-208,-181,-311,-164,-326,-185},{-311,-298,-370,-224,-289,-159},{-398,-264,-182,-156,-183,-128},{-416,-164,-255,-300,-334,-265},{-272,-304,-367,-229,-366,-167},{-387,-201,-207,-344,-162,-213},{-328,-385,-238,-355,-180,-301},{-161,-393,-146,-202,-225,-131},{-398,-195,-238,-251,-387,-224},{-322,-359,-235,-169,-207,-365}},{{-164,-259,-259,-186,-151,-180},{-124,-307,-220,-150,-263,-186},{-181,-240,-314,-122,-280,-279},{-159,-175,-344,-287,-318,-214},{-218,-298,-199,-281,-282,-250},{-243,-178,-245,-245,-254,-259},{-278,-238,-188,-148,-110,-289},{-198,-264,-128,-283,-259,-145},{-198,-310,-222,-141,-231,-109},{-136,-156,-256,-234,-155,-252}},{{-103,-117,-137,-184,-111,-121},{-151,-115,-155,-160,-106,-187},{-186,-95,-114,-225,-199,-233},{-204,-175,-246,-120,-236,-89},{-194,-112,-255,-91,-129,-106},{-233,-255,-114,-206,-88,-150},{-279,-253,-244,-229,-234,-193},{-213,-244,-198,-160,-196,-190},{-285,-244,-176,-148,-111,-219},{-147,-195,-242,-98,-101,-219}},{{-111,-114,-134,-151,-109,-128},{-97,-100,-196,-214,-108,-126},{-186,-171,-131,-219,-114,-182},{-123,-194,-142,-226,-182,-146},{-206,-152,-114,-185,-219,-126},{-144,-109,-99,-219,-216,-146},{-136,-94,-131,-228,-112,-126},{-229,-77,-162,-126,-172,-83},{-167,-109,-125,-99,-114,-168},{-176,-176,-122,-156,-197,-214}},{{-165,-143,-170,-141,-156,-161},{-132,-124,-92,-247,-180,-138},{-114,-210,-151,-185,-233,-192},{-108,-202,-117,-195,-259,-109},{-179,-140,-206,-148,-187,-139},{-146,-111,-146,-134,-248,-159},{-136,-153,-185,-104,-252,-100},{-171,-210,-175,-202,-128,-219},{-82,-154,-212,-222,-177,-145},{-152,-122,-230,-220,-107,-181}}},{{{-294,-315,-385,-525,-382,-490},{-203,-438,-329,-497,-448,-452},{-214,-231,-231,-441,-399,-434},{-203,-340,-385,-416,-441,-276},{-210,-410,-252,-256,-287,-207},{-189,-357,-178,-322,-490,-382},{-273,-357,-424,-294,-469,-490},{-234,-402,-273,-178,-318,-189},{-248,-434,-200,-500,-399,-178},{-430,-392,-224,-200,-301,-196}},{{-292,-175,-247,-484,-216,-473},{-289,-415,-485,-264,-187,-296},{-188,-305,-268,-471,-426,-290},{-432,-196,-370,-478,-466,-428},{-487,-326,-393,-464,-485,-312},{-195,-487,-302,-261,-492,-470},{-230,-312,-471,-424,-358,-267},{-386,-442,-281,-371,-174,-161},{-278,-418,-461,-387,-295,-229},{-473,-514,-264,-374,-400,-464}},{{-287,-419,-279,-176,-302,-228},{-321,-336,-423,-355,-314,-289},{-324,-191,-351,-425,-328,-206},{-312,-271,-228,-311,-177,-156},{-359,-179,-285,-378,-157,-375},{-422,-246,-372,-170,-388,-264},{-274,-394,-360,-167,-393,-398},{-425,-296,-231,-267,-265,-164},{-173,-216,-234,-381,-370,-239},{-290,-400,-231,-302,-259,-239}},{{-135,-302,-195,-274,-164,-141},{-273,-189,-244,-218,-294,-227},{-213,-247,-247,-173,-228,-246},{-202,-321,-262,-151,-304,-141},{-256,-284,-206,-183,-218,-315},{-340,-363,-247,-359,-260,-356},{-310,-279,-352,-181,-255,-155},{-270,-218,-283,-186,-167,-143},{-267,-160,-200,-306,-304,-215},{-256,-221,-283,-171,-230,-356}},{{-145,-157,-127,-298,-116,-266},{-232,-187,-164,-254,-173,-328},{-268,-275,-323,-129,-340,-143},{-310,-139,-328,-300,-201,-194},{-256,-326,-127,-116,-296,-155},{-353,-344,-323,-199,-159,-127},{-230,-118,-293,-316,-291,-155},{-244,-284,-173,-189,-245,-335},{-130,-187,-136,-340,-127,-210},{-164,-344,-263,-321,-120,-215}},{{-166,-152,-315,-150,-348,-300},{-249,-171,-315,-267,-271,-367},{-148,-282,-221,-240,-201,-128},{-310,-333,-312,-336,-240,-273},{-263,-316,-186,-183,-218,-322},{-162,-219,-242,-195,-189,-327},{-249,-222,-238,-155,-227,-251},{-330,-238,-149,-338,-220,-337},{-259,-217,-261,-219,-218,-128},{-330,-296,-184,-298,-341,-197}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1052,192,238,253,176,234,280,264,252}; // initial inventory 
int ubiv[I]={2104,384,476,507,352,468,350,495,504}; // 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.35,8.59,5.57,4.52,2.83,1.94,4.81,7.57}; // 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.14,7.81,5.06,4.11,2.57,1.76,4.37,6.88}}; // 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.71,9.71,9.71,8.5,8.5,8.5,7.28,7.28,7.28,6.25,6.25,6.25,5.47,5.47,5.47,4.69,4.69,4.69,4.05,4.05,4.05,3.54,3.54,3.54,3.04,3.04,3.04,3.29,3.29,3.29,2.88,2.88,2.88,2.47,2.47,2.47,2.06,2.06,2.06,1.8,1.8,1.8,1.54,1.54,1.54,1.41,1.41,1.41,1.23,1.23,1.23,1.06,1.06,1.06,3.5,3.5,3.5,3.06,3.06,3.06,2.62,2.62,2.62,5.5,5.5,5.5,4.82,4.82,4.82,4.13,4.13,4.13}; // 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,5,16,8,6,16,8,6,16,8,6,16,9,6,16,8,6,16,8,6,16,8,6,16,9,6,17,9,6,17,9,6,17,8,6,17,9,6,18,9,6,17,9,6,18,9,6,17,9,6,18,9,6,17,9,6,16,9,6,16,8,6,16,9,6,16,8,6,16,9,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}}; // 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,0,4,8,12,16,20,24,28,2,8,14,20,26,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,0,6,12,18,24,30,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,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,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,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,0,6,12,18,24,30,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,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,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,0,6,12,18,24,30,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,0,6,12,18,24,30,0,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,2,8,14,20,26,32,0,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,1,7,13,19,25,31,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,0,6,12,18,24,30,0,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,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,0,6,12,18,24,30,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,2,6,10,14,18,22,26,30,2,8,14,20,26,32,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32}; // 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,5,9,13,17,21,25,29,33,7,13,19,25,31,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,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,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,3,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,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,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,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,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,3,9,15,21,27,33,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,2,8,14,20,26,32,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,1,7,13,19,25,31,1,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,3,9,15,21,27,33,1,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,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,35,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,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,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,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,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,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,3,9,15,21,27,33,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}; // set of end times of each shipment 
