int Dev = 50;// Deviation
extern const int CNN = 5;// 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 = 750;//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]={{{{11914,0,0,0,0,0},{12637,0,0,0,0,0},{12255,0,0,0,0,0},{11202,0,0,0,0,0},{12264,0,0,0,0,0},{12434,0,0,0,0,0},{11934,0,0,0,0,0},{12999,0,0,0,0,0},{13115,0,0,0,0,0},{12266,0,0,0,0,0}},{{12179,0,0,0,0,0},{12458,0,0,0,0,0},{12761,0,0,0,0,0},{12428,0,0,0,0,0},{11884,0,0,0,0,0},{13046,0,0,0,0,0},{11979,0,0,0,0,0},{12846,0,0,0,0,0},{12698,0,0,0,0,0},{12669,0,0,0,0,0}},{{11941,0,0,0,0,0},{11285,0,0,0,0,0},{11314,0,0,0,0,0},{11760,0,0,0,0,0},{11724,0,0,0,0,0},{11242,0,0,0,0,0},{11584,0,0,0,0,0},{12030,0,0,0,0,0},{12444,0,0,0,0,0},{10016,0,0,0,0,0}},{{10925,0,0,0,0,0},{9874,0,0,0,0,0},{9861,0,0,0,0,0},{10276,0,0,0,0,0},{9917,0,0,0,0,0},{10421,0,0,0,0,0},{11221,0,0,0,0,0},{9339,0,0,0,0,0},{10726,0,0,0,0,0},{10251,0,0,0,0,0}},{{9531,0,0,0,0,0},{9942,0,0,0,0,0},{9297,0,0,0,0,0},{9054,0,0,0,0,0},{9565,0,0,0,0,0},{9057,0,0,0,0,0},{8865,0,0,0,0,0},{9852,0,0,0,0,0},{8864,0,0,0,0,0},{8803,0,0,0,0,0}},{{10252,0,0,0,0,0},{9294,0,0,0,0,0},{9003,0,0,0,0,0},{9054,0,0,0,0,0},{8632,0,0,0,0,0},{8830,0,0,0,0,0},{8989,0,0,0,0,0},{9559,0,0,0,0,0},{9485,0,0,0,0,0},{9545,0,0,0,0,0}}},{{{-291,-412,-165,-253,-338,-209},{-218,-176,-182,-282,-262,-329},{-332,-303,-270,-256,-165,-162},{-356,-273,-179,-441,-365,-412},{-320,-265,-341,-215,-191,-226},{-173,-382,-303,-300,-262,-432},{-279,-312,-168,-426,-350,-191},{-415,-209,-315,-365,-341,-385},{-397,-282,-415,-388,-420,-279},{-426,-409,-368,-259,-171,-265}},{{-319,-372,-218,-367,-246,-231},{-365,-149,-185,-321,-366,-215},{-215,-203,-227,-140,-326,-350},{-162,-189,-143,-184,-395,-249},{-342,-266,-232,-145,-144,-228},{-284,-146,-356,-315,-398,-370},{-191,-323,-143,-318,-398,-228},{-191,-277,-207,-148,-203,-251},{-310,-192,-283,-148,-240,-158},{-206,-169,-361,-288,-390,-350}},{{-188,-348,-210,-141,-208,-198},{-272,-189,-179,-143,-268,-119},{-258,-278,-333,-244,-107,-113},{-160,-211,-175,-269,-184,-196},{-352,-249,-289,-284,-178,-218},{-200,-353,-212,-242,-188,-278},{-298,-278,-324,-258,-139,-130},{-195,-198,-336,-130,-208,-165},{-348,-363,-312,-168,-233,-258},{-328,-165,-116,-242,-171,-134}},{{-232,-137,-141,-169,-112,-93},{-108,-120,-211,-119,-168,-165},{-187,-140,-116,-112,-142,-98},{-169,-271,-158,-212,-97,-115},{-126,-239,-127,-93,-185,-202},{-104,-191,-192,-177,-236,-203},{-189,-277,-186,-210,-132,-125},{-268,-94,-107,-112,-129,-235},{-140,-151,-252,-119,-153,-240},{-183,-239,-134,-162,-124,-154}},{{-199,-185,-154,-97,-100,-175},{-203,-89,-104,-157,-204,-121},{-231,-170,-75,-79,-122,-171},{-209,-152,-215,-206,-212,-168},{-189,-121,-207,-201,-75,-162},{-160,-100,-168,-198,-78,-179},{-177,-118,-201,-128,-187,-172},{-179,-180,-209,-198,-143,-159},{-192,-110,-85,-135,-203,-160},{-162,-121,-87,-132,-104,-160}},{{-212,-91,-94,-226,-238,-155},{-212,-178,-98,-131,-113,-172},{-82,-176,-80,-214,-227,-119},{-101,-126,-83,-209,-134,-145},{-200,-203,-124,-120,-87,-242},{-93,-193,-125,-88,-108,-122},{-153,-135,-166,-205,-203,-217},{-107,-191,-204,-191,-211,-114},{-165,-96,-154,-192,-232,-244},{-210,-154,-139,-125,-238,-120}}},{{{-176,-90,-124,-229,-160,-149},{-181,-84,-210,-254,-208,-222},{-193,-215,-170,-195,-177,-126},{-250,-132,-212,-249,-98,-107},{-185,-248,-257,-260,-149,-195},{-131,-250,-187,-222,-256,-122},{-252,-237,-164,-208,-259,-275},{-230,-198,-119,-129,-245,-243},{-185,-169,-130,-222,-248,-248},{-225,-177,-107,-161,-171,-126}},{{-166,-164,-279,-206,-302,-119},{-244,-291,-264,-290,-250,-217},{-164,-291,-290,-117,-266,-307},{-125,-187,-277,-164,-311,-174},{-182,-195,-119,-168,-153,-298},{-208,-199,-296,-201,-341,-181},{-174,-180,-207,-314,-128,-209},{-206,-178,-151,-265,-231,-343},{-202,-205,-241,-283,-172,-243},{-164,-305,-296,-283,-254,-224}},{{-351,-309,-375,-176,-252,-158},{-370,-191,-388,-211,-244,-181},{-240,-250,-270,-370,-391,-255},{-341,-301,-202,-189,-280,-144},{-348,-194,-335,-230,-294,-368},{-306,-217,-304,-246,-222,-232},{-264,-370,-254,-248,-216,-249},{-198,-158,-367,-157,-327,-258},{-225,-263,-139,-254,-388,-354},{-128,-227,-155,-329,-288,-379}},{{-419,-391,-286,-418,-445,-427},{-246,-391,-405,-370,-403,-452},{-197,-312,-381,-292,-301,-181},{-185,-370,-381,-298,-382,-274},{-413,-403,-325,-319,-244,-169},{-353,-147,-182,-400,-439,-307},{-208,-318,-429,-337,-421,-376},{-153,-197,-358,-247,-211,-277},{-419,-244,-402,-445,-163,-175},{-376,-220,-322,-376,-436,-442}},{{-452,-442,-364,-180,-326,-304},{-211,-262,-397,-369,-212,-365},{-427,-199,-358,-354,-262,-174},{-364,-220,-367,-384,-350,-145},{-325,-217,-385,-354,-359,-235},{-154,-178,-418,-348,-406,-264},{-184,-160,-355,-225,-359,-290},{-150,-322,-298,-252,-215,-325},{-202,-421,-436,-363,-171,-241},{-361,-316,-193,-357,-176,-281}},{{-410,-391,-382,-385,-146,-188},{-319,-243,-393,-174,-356,-188},{-234,-204,-176,-362,-128,-250},{-239,-301,-179,-367,-233,-124},{-171,-265,-149,-301,-202,-310},{-180,-259,-301,-261,-315,-169},{-185,-418,-206,-195,-138,-159},{-288,-181,-341,-227,-271,-360},{-339,-179,-214,-341,-343,-223},{-259,-329,-220,-370,-212,-149}}},{{{-201,-257,-214,-306,-329,-480},{-441,-362,-184,-494,-339,-237},{-332,-250,-260,-352,-237,-401},{-194,-168,-197,-250,-194,-257},{-250,-164,-457,-217,-240,-253},{-454,-408,-227,-408,-339,-382},{-286,-230,-164,-230,-352,-217},{-368,-293,-309,-415,-408,-378},{-421,-461,-365,-270,-408,-494},{-257,-332,-214,-411,-329,-444}},{{-200,-332,-217,-449,-299,-445},{-433,-193,-185,-182,-314,-289},{-466,-483,-281,-377,-360,-430},{-417,-341,-281,-254,-330,-310},{-190,-174,-290,-449,-277,-364},{-482,-348,-447,-273,-197,-181},{-276,-193,-169,-248,-440,-184},{-453,-258,-383,-342,-234,-307},{-436,-357,-325,-371,-299,-190},{-433,-328,-322,-204,-197,-256}},{{-342,-147,-263,-294,-310,-355},{-266,-245,-294,-182,-318,-193},{-192,-282,-272,-237,-281,-159},{-363,-196,-140,-326,-302,-218},{-251,-239,-386,-408,-286,-136},{-280,-300,-154,-337,-273,-146},{-327,-415,-171,-373,-148,-180},{-384,-199,-389,-171,-299,-234},{-245,-357,-302,-226,-223,-195},{-254,-176,-258,-378,-135,-254}},{{-228,-173,-166,-129,-206,-199},{-320,-134,-135,-143,-246,-136},{-252,-296,-154,-314,-300,-153},{-352,-143,-142,-187,-267,-258},{-215,-277,-156,-236,-139,-298},{-128,-131,-235,-233,-325,-296},{-190,-258,-168,-319,-305,-131},{-143,-158,-273,-240,-195,-245},{-308,-262,-348,-203,-334,-293},{-150,-275,-175,-307,-258,-147}},{{-230,-284,-281,-227,-145,-237},{-202,-191,-210,-195,-267,-239},{-184,-187,-220,-233,-162,-120},{-119,-109,-187,-225,-118,-130},{-200,-265,-254,-170,-170,-304},{-152,-208,-136,-134,-246,-172},{-126,-241,-288,-107,-300,-145},{-263,-164,-141,-275,-252,-178},{-278,-105,-313,-204,-288,-208},{-273,-231,-244,-168,-181,-122}},{{-124,-300,-287,-115,-273,-216},{-286,-223,-266,-143,-273,-292},{-288,-153,-304,-193,-187,-202},{-162,-183,-146,-234,-187,-117},{-246,-200,-165,-213,-233,-176},{-288,-218,-270,-239,-185,-112},{-193,-300,-270,-258,-187,-248},{-267,-200,-194,-230,-328,-158},{-202,-189,-200,-193,-319,-270},{-141,-231,-213,-182,-169,-225}}},{{{-60,-93,-77,-88,-160,-102},{-66,-132,-83,-99,-162,-137},{-122,-131,-148,-88,-140,-169},{-101,-59,-136,-106,-77,-70},{-111,-107,-109,-102,-81,-125},{-158,-73,-168,-125,-134,-74},{-120,-100,-109,-170,-149,-178},{-64,-127,-156,-76,-168,-191},{-99,-130,-153,-67,-95,-154},{-153,-126,-167,-92,-181,-120}},{{-181,-203,-136,-127,-93,-111},{-122,-141,-195,-166,-198,-173},{-154,-135,-130,-140,-80,-113},{-193,-86,-178,-186,-187,-195},{-185,-193,-81,-99,-184,-91},{-151,-212,-87,-147,-222,-134},{-202,-178,-198,-215,-126,-153},{-135,-206,-184,-192,-142,-249},{-134,-96,-155,-184,-193,-234},{-197,-123,-157,-232,-196,-197}},{{-243,-207,-138,-148,-218,-297},{-130,-247,-177,-283,-131,-121},{-115,-171,-179,-207,-263,-184},{-254,-265,-140,-215,-239,-206},{-156,-149,-188,-253,-235,-275},{-152,-119,-279,-125,-123,-295},{-170,-144,-249,-213,-116,-198},{-228,-124,-264,-243,-245,-295},{-96,-124,-260,-224,-290,-162},{-107,-238,-102,-207,-172,-226}},{{-183,-114,-274,-227,-240,-274},{-126,-166,-187,-162,-197,-298},{-240,-142,-262,-195,-130,-231},{-302,-106,-272,-189,-235,-258},{-160,-221,-152,-146,-238,-280},{-278,-134,-211,-136,-148,-211},{-270,-138,-140,-132,-274,-223},{-150,-175,-292,-248,-185,-282},{-304,-132,-250,-252,-288,-112},{-110,-262,-156,-205,-256,-118}},{{-168,-177,-240,-158,-227,-178},{-292,-201,-169,-246,-234,-144},{-179,-152,-185,-246,-130,-116},{-118,-191,-234,-283,-98,-155},{-254,-235,-98,-109,-102,-101},{-152,-219,-264,-103,-163,-121},{-223,-223,-264,-224,-134,-125},{-209,-179,-232,-285,-155,-190},{-146,-136,-191,-129,-212,-173},{-106,-274,-236,-292,-98,-206}},{{-204,-173,-159,-122,-132,-206},{-95,-152,-220,-90,-219,-173},{-222,-232,-135,-189,-159,-147},{-188,-157,-117,-195,-203,-200},{-150,-180,-210,-128,-84,-220},{-106,-223,-219,-194,-113,-191},{-156,-104,-122,-211,-136,-85},{-115,-180,-244,-232,-158,-193},{-208,-107,-135,-178,-174,-107},{-261,-190,-182,-195,-78,-85}}},{{{-254,-340,-271,-198,-148,-252},{-170,-212,-321,-212,-345,-317},{-221,-259,-212,-129,-140,-286},{-294,-176,-319,-155,-193,-140},{-289,-307,-159,-264,-174,-255},{-224,-252,-243,-145,-159,-338},{-340,-190,-150,-188,-257,-217},{-324,-228,-248,-307,-133,-219},{-200,-129,-221,-293,-255,-150},{-345,-193,-221,-336,-124,-164}},{{-200,-309,-209,-155,-240,-157},{-121,-345,-122,-263,-113,-146},{-288,-143,-306,-335,-170,-135},{-205,-340,-306,-231,-183,-115},{-357,-331,-280,-215,-124,-139},{-347,-186,-172,-162,-208,-287},{-131,-321,-338,-222,-231,-228},{-248,-226,-268,-333,-165,-312},{-350,-267,-294,-210,-339,-259},{-226,-269,-188,-148,-273,-323}},{{-209,-219,-269,-292,-279,-117},{-322,-121,-244,-211,-107,-248},{-247,-113,-295,-267,-116,-131},{-157,-226,-283,-170,-94,-261},{-166,-253,-121,-263,-223,-108},{-264,-263,-184,-220,-232,-173},{-243,-132,-261,-174,-172,-216},{-135,-226,-283,-119,-279,-115},{-138,-184,-212,-238,-138,-268},{-142,-142,-244,-244,-138,-148}},{{-200,-170,-165,-210,-158,-105},{-158,-109,-143,-177,-82,-170},{-241,-221,-86,-160,-180,-101},{-218,-117,-133,-76,-105,-131},{-177,-241,-94,-168,-204,-189},{-107,-89,-89,-130,-157,-110},{-249,-145,-141,-183,-81,-199},{-120,-243,-159,-141,-88,-77},{-89,-120,-129,-108,-78,-146},{-230,-124,-104,-86,-118,-190}},{{-137,-164,-167,-60,-67,-92},{-200,-64,-181,-176,-104,-113},{-178,-125,-95,-150,-68,-81},{-148,-87,-97,-67,-130,-69},{-173,-83,-134,-117,-82,-95},{-150,-98,-159,-121,-117,-131},{-129,-108,-93,-111,-64,-154},{-153,-69,-179,-178,-154,-87},{-89,-84,-87,-139,-151,-154},{-146,-101,-71,-125,-81,-77}},{{-107,-129,-99,-68,-143,-189},{-124,-60,-164,-175,-82,-166},{-92,-151,-106,-113,-84,-118},{-92,-126,-115,-138,-160,-130},{-65,-92,-149,-94,-82,-178},{-142,-133,-65,-148,-70,-166},{-136,-138,-134,-129,-79,-179},{-115,-63,-77,-75,-149,-150},{-130,-176,-77,-150,-87,-100},{-113,-80,-175,-64,-110,-130}}},{{{-359,-290,-396,-157,-362,-394},{-165,-258,-348,-364,-141,-332},{-351,-351,-255,-271,-319,-154},{-178,-176,-237,-394,-293,-293},{-237,-356,-207,-173,-213,-359},{-157,-176,-229,-178,-303,-218},{-327,-215,-144,-149,-197,-189},{-247,-375,-311,-226,-231,-354},{-386,-146,-221,-388,-367,-274},{-311,-261,-192,-354,-269,-367}},{{-290,-218,-154,-394,-380,-192},{-348,-173,-247,-271,-236,-295},{-364,-170,-290,-231,-390,-324},{-229,-282,-213,-207,-160,-280},{-274,-245,-293,-210,-325,-148},{-319,-245,-301,-348,-291,-184},{-346,-364,-367,-178,-385,-223},{-160,-282,-325,-354,-388,-319},{-378,-229,-271,-157,-157,-163},{-287,-242,-157,-287,-186,-148}},{{-145,-228,-323,-191,-218,-333},{-295,-276,-174,-146,-164,-272},{-316,-200,-302,-248,-368,-137},{-339,-218,-156,-164,-336,-239},{-161,-157,-348,-196,-306,-258},{-360,-220,-146,-184,-218,-133},{-337,-228,-189,-340,-233,-202},{-145,-180,-330,-340,-348,-268},{-243,-316,-343,-174,-360,-227},{-262,-149,-239,-131,-159,-306}},{{-269,-143,-215,-283,-258,-170},{-138,-329,-173,-258,-255,-224},{-309,-306,-129,-184,-246,-197},{-302,-270,-226,-156,-186,-166},{-205,-348,-134,-214,-159,-199},{-302,-164,-196,-177,-264,-137},{-355,-244,-293,-290,-242,-320},{-219,-216,-169,-232,-146,-157},{-317,-200,-219,-322,-220,-262},{-131,-193,-298,-186,-161,-186}},{{-141,-219,-202,-221,-267,-295},{-295,-187,-299,-165,-210,-241},{-273,-202,-156,-219,-193,-310},{-207,-228,-282,-284,-210,-228},{-284,-111,-250,-323,-200,-156},{-216,-187,-254,-215,-323,-210},{-191,-130,-310,-267,-122,-191},{-227,-306,-174,-299,-180,-204},{-255,-321,-174,-113,-167,-139},{-218,-174,-167,-158,-195,-202}},{{-176,-308,-326,-321,-237,-165},{-224,-152,-226,-204,-180,-276},{-247,-326,-150,-245,-187,-200},{-276,-243,-263,-228,-165,-323},{-206,-202,-184,-219,-206,-126},{-113,-239,-243,-304,-297,-165},{-284,-169,-252,-139,-137,-221},{-165,-141,-269,-204,-184,-135},{-280,-130,-154,-234,-200,-245},{-208,-163,-161,-117,-319,-163}}},{{{-184,-313,-184,-229,-211,-160},{-322,-310,-421,-241,-202,-382},{-376,-160,-265,-304,-406,-438},{-268,-150,-175,-202,-184,-426},{-436,-154,-160,-301,-190,-281},{-154,-253,-367,-448,-364,-222},{-412,-175,-367,-307,-220,-308},{-379,-259,-223,-184,-271,-299},{-226,-289,-256,-244,-337,-192},{-427,-193,-412,-310,-244,-148}},{{-305,-298,-151,-270,-374,-311},{-243,-284,-378,-284,-321,-370},{-258,-210,-308,-177,-262,-373},{-419,-402,-302,-227,-278,-272},{-243,-422,-160,-216,-382,-386},{-293,-376,-305,-188,-172,-216},{-223,-253,-216,-161,-201,-193},{-413,-399,-344,-259,-191,-326},{-290,-356,-232,-292,-358,-262},{-331,-258,-140,-385,-289,-352}},{{-355,-271,-158,-312,-301,-156},{-295,-161,-282,-117,-257,-103},{-288,-281,-158,-254,-276,-186},{-350,-259,-211,-179,-310,-200},{-345,-194,-316,-130,-206,-152},{-211,-353,-195,-139,-178,-265},{-273,-223,-206,-287,-259,-113},{-298,-293,-126,-307,-225,-216},{-355,-130,-245,-276,-273,-234},{-270,-139,-211,-296,-197,-107}},{{-270,-244,-96,-129,-247,-126},{-144,-141,-183,-239,-86,-82},{-287,-247,-146,-194,-105,-93},{-223,-134,-247,-153,-121,-204},{-111,-153,-112,-98,-163,-219},{-248,-236,-260,-163,-184,-242},{-171,-231,-182,-236,-211,-175},{-157,-154,-94,-153,-111,-222},{-105,-132,-219,-141,-217,-221},{-178,-143,-222,-108,-193,-169}},{{-142,-129,-111,-111,-139,-148},{-109,-162,-143,-99,-211,-119},{-195,-89,-177,-165,-157,-216},{-98,-216,-225,-186,-108,-102},{-86,-148,-229,-213,-171,-211},{-162,-132,-151,-131,-100,-134},{-228,-163,-143,-112,-95,-103},{-228,-137,-100,-225,-223,-154},{-168,-186,-91,-154,-108,-203},{-92,-146,-120,-219,-108,-157}},{{-157,-135,-193,-240,-191,-255},{-176,-153,-84,-124,-140,-116},{-91,-130,-104,-165,-233,-221},{-206,-196,-81,-232,-131,-192},{-196,-81,-177,-178,-203,-143},{-140,-169,-154,-144,-130,-176},{-85,-196,-149,-109,-102,-143},{-129,-210,-224,-134,-210,-221},{-222,-199,-177,-153,-219,-215},{-136,-210,-141,-141,-259,-214}}},{{{-178,-395,-241,-427,-490,-518},{-343,-522,-329,-175,-427,-434},{-508,-186,-455,-203,-476,-336},{-326,-483,-357,-224,-483,-193},{-420,-318,-497,-480,-455,-511},{-389,-217,-399,-357,-382,-290},{-448,-262,-476,-294,-392,-284},{-346,-186,-508,-290,-518,-186},{-322,-476,-231,-371,-371,-270},{-175,-238,-248,-511,-270,-262}},{{-264,-298,-170,-207,-387,-464},{-313,-213,-400,-494,-440,-290},{-432,-271,-295,-377,-420,-187},{-365,-353,-332,-448,-394,-367},{-351,-357,-353,-237,-397,-390},{-498,-473,-180,-264,-433,-422},{-379,-494,-203,-494,-269,-164},{-177,-326,-339,-428,-364,-164},{-184,-384,-505,-351,-318,-441},{-498,-436,-264,-271,-344,-235}},{{-280,-425,-150,-229,-191,-414},{-432,-370,-228,-440,-425,-253},{-173,-179,-246,-398,-234,-250},{-454,-444,-381,-167,-268,-378},{-416,-197,-225,-158,-268,-256},{-365,-179,-387,-211,-376,-203},{-324,-419,-333,-319,-180,-189},{-287,-456,-366,-267,-379,-270},{-432,-351,-330,-381,-345,-242},{-236,-262,-153,-146,-265,-261}},{{-189,-368,-306,-354,-240,-327},{-135,-242,-170,-269,-368,-191},{-259,-289,-254,-206,-169,-124},{-216,-394,-159,-296,-157,-263},{-197,-171,-164,-236,-287,-311},{-386,-210,-203,-366,-277,-327},{-256,-268,-270,-256,-345,-122},{-370,-205,-244,-131,-265,-292},{-267,-302,-154,-296,-196,-277},{-286,-268,-355,-286,-184,-265}},{{-273,-127,-125,-268,-116,-280},{-268,-326,-236,-268,-226,-256},{-344,-233,-254,-298,-166,-217},{-246,-134,-219,-129,-189,-206},{-346,-319,-148,-192,-208,-194},{-277,-282,-176,-182,-259,-169},{-275,-162,-185,-194,-176,-203},{-145,-296,-263,-182,-330,-206},{-140,-171,-134,-176,-178,-180},{-161,-243,-155,-254,-222,-330}},{{-182,-296,-350,-159,-339,-258},{-194,-268,-308,-207,-143,-339},{-321,-185,-301,-250,-148,-172},{-284,-300,-259,-143,-133,-308},{-192,-182,-123,-157,-271,-347},{-222,-203,-231,-119,-273,-212},{-187,-314,-275,-324,-315,-143},{-344,-208,-308,-195,-252,-212},{-157,-180,-270,-198,-240,-288},{-330,-261,-340,-352,-361,-320}}}}; // 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]={15,8,5,15,8,5,16,8,6,17,8,6,17,9,6,16,9,6,16,9,6,17,8,6,17,9,6,16,9,6,16,9,6,17,9,6,17,9,6,18,9,6,17,9,6,17,9,6,18,9,6,17,9,6,16,9,6,17,9,6,17,8,6,17,9,6,16,9,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,747,748,749}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,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,1,5,9,13,17,21,25,29,2,8,14,20,26,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,0,6,12,18,24,30,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,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,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,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,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,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,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,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,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,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,0,4,8,12,16,20,24,28,32,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,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,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,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,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,33,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,2,6,10,14,18,22,26,30,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,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,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,0,6,12,18,24,30}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,6,10,14,18,22,26,30,34,7,13,19,25,31,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,5,11,17,23,29,35,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,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,5,11,17,23,29,35,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,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,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,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,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,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,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,1,5,9,13,17,21,25,29,33,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,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,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,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,5,11,17,23,29,35,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,5,9,13,17,21,25,29,33,3,9,15,21,27,33}; // set of end times of each shipment 
