int Dev = 20;// 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 = 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]={{{{12608,0,0,0,0,0},{12312,0,0,0,0,0},{12266,0,0,0,0,0},{12590,0,0,0,0,0},{11986,0,0,0,0,0},{12108,0,0,0,0,0},{12798,0,0,0,0,0},{12514,0,0,0,0,0},{12174,0,0,0,0,0},{12585,0,0,0,0,0}},{{12748,0,0,0,0,0},{12743,0,0,0,0,0},{12749,0,0,0,0,0},{12624,0,0,0,0,0},{12761,0,0,0,0,0},{12195,0,0,0,0,0},{12594,0,0,0,0,0},{12312,0,0,0,0,0},{12480,0,0,0,0,0},{12480,0,0,0,0,0}},{{11456,0,0,0,0,0},{11238,0,0,0,0,0},{11558,0,0,0,0,0},{11781,0,0,0,0,0},{11648,0,0,0,0,0},{11536,0,0,0,0,0},{11012,0,0,0,0,0},{11513,0,0,0,0,0},{11394,0,0,0,0,0},{11230,0,0,0,0,0}},{{10495,0,0,0,0,0},{10394,0,0,0,0,0},{10219,0,0,0,0,0},{10675,0,0,0,0,0},{10144,0,0,0,0,0},{10755,0,0,0,0,0},{10253,0,0,0,0,0},{9853,0,0,0,0,0},{10399,0,0,0,0,0},{10609,0,0,0,0,0}},{{9461,0,0,0,0,0},{9700,0,0,0,0,0},{9663,0,0,0,0,0},{9330,0,0,0,0,0},{9411,0,0,0,0,0},{9400,0,0,0,0,0},{9283,0,0,0,0,0},{9248,0,0,0,0,0},{9477,0,0,0,0,0},{9494,0,0,0,0,0}},{{9309,0,0,0,0,0},{8908,0,0,0,0,0},{9335,0,0,0,0,0},{9419,0,0,0,0,0},{9123,0,0,0,0,0},{9140,0,0,0,0,0},{9321,0,0,0,0,0},{9307,0,0,0,0,0},{9440,0,0,0,0,0},{9216,0,0,0,0,0}}},{{{-244,-300,-244,-323,-291,-303},{-279,-294,-288,-353,-312,-268},{-303,-323,-247,-256,-303,-276},{-285,-270,-270,-341,-276,-323},{-306,-241,-238,-244,-353,-273},{-241,-279,-300,-282,-282,-294},{-270,-323,-335,-247,-270,-347},{-276,-312,-306,-353,-315,-291},{-247,-268,-256,-247,-276,-253},{-323,-262,-350,-335,-309,-341}},{{-322,-275,-266,-282,-264,-264},{-281,-335,-269,-233,-302,-262},{-284,-332,-302,-321,-307,-220},{-299,-266,-294,-255,-240,-300},{-238,-237,-319,-255,-275,-225},{-241,-260,-328,-244,-248,-295},{-313,-315,-252,-290,-286,-238},{-293,-303,-297,-271,-256,-207},{-334,-340,-249,-269,-251,-228},{-319,-232,-263,-323,-318,-308}},{{-262,-211,-256,-208,-220,-202},{-218,-211,-186,-208,-227,-165},{-242,-283,-214,-197,-186,-247},{-205,-203,-254,-244,-255,-192},{-200,-286,-189,-264,-248,-241},{-200,-235,-233,-206,-225,-187},{-205,-281,-228,-260,-210,-198},{-272,-206,-256,-204,-178,-183},{-245,-196,-207,-206,-250,-171},{-205,-254,-270,-208,-195,-181}},{{-185,-200,-208,-177,-190,-182},{-167,-153,-215,-201,-134,-133},{-191,-172,-190,-157,-195,-146},{-229,-209,-175,-151,-162,-186},{-209,-221,-215,-191,-195,-152},{-221,-159,-184,-189,-139,-162},{-215,-180,-161,-184,-150,-149},{-195,-176,-213,-151,-195,-146},{-197,-215,-209,-193,-160,-134},{-227,-181,-208,-151,-177,-142}},{{-182,-168,-176,-135,-157,-173},{-125,-159,-141,-176,-119,-172},{-143,-159,-157,-163,-123,-125},{-134,-119,-159,-176,-146,-140},{-136,-119,-122,-160,-126,-171},{-183,-137,-140,-146,-175,-132},{-129,-164,-160,-172,-148,-160},{-126,-168,-118,-140,-172,-135},{-152,-128,-147,-172,-172,-141},{-145,-148,-118,-144,-168,-129}},{{-157,-131,-178,-176,-182,-190},{-137,-128,-151,-126,-138,-192},{-150,-157,-168,-134,-137,-157},{-162,-138,-142,-137,-169,-182},{-141,-144,-174,-140,-171,-139},{-144,-165,-142,-160,-171,-150},{-137,-159,-122,-136,-185,-182},{-144,-153,-165,-152,-138,-167},{-176,-168,-156,-143,-135,-159},{-128,-168,-148,-137,-132,-190}}},{{{-185,-203,-178,-215,-213,-180},{-150,-154,-198,-188,-158,-155},{-173,-171,-170,-145,-162,-201},{-153,-167,-186,-190,-180,-201},{-146,-167,-173,-163,-156,-191},{-144,-145,-178,-165,-162,-199},{-175,-149,-173,-177,-206,-180},{-193,-140,-156,-190,-169,-162},{-165,-139,-186,-174,-147,-191},{-175,-191,-172,-152,-156,-185}},{{-210,-242,-241,-201,-238,-228},{-232,-215,-224,-203,-218,-209},{-190,-211,-251,-225,-268,-255},{-206,-232,-241,-203,-206,-248},{-186,-219,-241,-261,-268,-283},{-234,-226,-222,-183,-238,-207},{-190,-221,-245,-199,-208,-271},{-234,-230,-181,-228,-185,-219},{-190,-240,-200,-265,-222,-198},{-182,-172,-196,-256,-275,-219}},{{-279,-263,-299,-224,-302,-272},{-274,-270,-286,-248,-235,-334},{-269,-301,-278,-321,-330,-283},{-277,-240,-228,-238,-307,-286},{-262,-230,-304,-321,-266,-331},{-245,-293,-283,-313,-252,-246},{-198,-255,-265,-227,-288,-308},{-269,-265,-307,-232,-299,-317},{-220,-212,-210,-224,-330,-269},{-222,-270,-314,-289,-241,-283}},{{-321,-338,-301,-331,-265,-355},{-315,-297,-337,-277,-253,-271},{-292,-332,-277,-253,-349,-322},{-327,-297,-349,-334,-298,-286},{-240,-288,-238,-271,-355,-241},{-246,-297,-340,-355,-343,-349},{-329,-291,-301,-244,-358,-286},{-237,-344,-358,-286,-265,-250},{-303,-323,-358,-274,-313,-280},{-329,-318,-271,-358,-319,-262}},{{-361,-244,-310,-348,-300,-328},{-361,-277,-307,-303,-347,-319},{-301,-337,-325,-315,-338,-328},{-271,-322,-349,-282,-241,-246},{-241,-337,-283,-327,-353,-299},{-361,-244,-268,-300,-353,-299},{-322,-316,-313,-318,-241,-261},{-292,-334,-298,-255,-270,-310},{-298,-253,-310,-348,-282,-334},{-331,-328,-331,-285,-265,-304}},{{-285,-273,-257,-227,-266,-268},{-262,-251,-220,-232,-294,-233},{-311,-287,-217,-296,-225,-268},{-314,-282,-249,-275,-269,-246},{-294,-262,-304,-288,-287,-233},{-325,-246,-238,-243,-215,-253},{-331,-251,-255,-235,-218,-228},{-299,-335,-285,-277,-225,-213},{-336,-299,-295,-211,-297,-290},{-268,-271,-268,-214,-305,-213}}},{{{-362,-392,-296,-286,-359,-303},{-273,-395,-336,-299,-392,-378},{-362,-339,-339,-388,-280,-388},{-276,-342,-322,-342,-303,-382},{-283,-345,-359,-349,-290,-352},{-378,-276,-270,-306,-336,-263},{-326,-375,-322,-392,-290,-395},{-316,-392,-342,-303,-296,-339},{-359,-375,-382,-329,-332,-332},{-368,-273,-290,-385,-382,-270}},{{-387,-283,-370,-377,-363,-289},{-364,-361,-341,-305,-256,-361},{-380,-316,-348,-355,-280,-316},{-394,-341,-348,-305,-265,-361},{-321,-377,-309,-292,-274,-352},{-358,-361,-278,-251,-339,-325},{-384,-370,-329,-371,-320,-268},{-305,-354,-313,-352,-342,-256},{-295,-380,-367,-327,-299,-277},{-338,-264,-325,-349,-302,-289}},{{-245,-285,-252,-321,-241,-278},{-348,-331,-291,-253,-257,-208},{-242,-239,-336,-234,-223,-244},{-263,-320,-272,-283,-281,-296},{-292,-314,-255,-256,-297,-303},{-266,-251,-269,-226,-215,-262},{-324,-323,-269,-267,-231,-229},{-257,-337,-263,-239,-262,-293},{-245,-276,-258,-318,-294,-293},{-301,-334,-260,-313,-278,-254}},{{-205,-216,-251,-247,-264,-215},{-280,-231,-209,-236,-246,-254},{-220,-233,-249,-210,-240,-234},{-270,-262,-275,-247,-240,-182},{-275,-202,-258,-243,-213,-191},{-295,-282,-284,-213,-235,-226},{-235,-258,-223,-189,-188,-254},{-218,-216,-232,-268,-251,-210},{-268,-238,-244,-270,-211,-226},{-210,-241,-282,-245,-269,-177}},{{-195,-220,-202,-176,-189,-187},{-182,-248,-227,-227,-174,-189},{-230,-241,-204,-168,-197,-189},{-200,-193,-193,-212,-170,-225},{-206,-214,-204,-220,-223,-250},{-247,-200,-191,-174,-223,-185},{-202,-229,-170,-204,-172,-176},{-221,-193,-225,-210,-220,-206},{-232,-170,-248,-225,-181,-189},{-178,-214,-246,-206,-216,-225}},{{-229,-252,-228,-217,-176,-209},{-170,-185,-238,-178,-222,-220},{-227,-187,-200,-193,-211,-230},{-231,-176,-173,-197,-246,-205},{-189,-214,-171,-197,-180,-268},{-229,-227,-217,-237,-218,-191},{-252,-187,-173,-217,-262,-236},{-191,-218,-230,-213,-264,-243},{-250,-191,-249,-245,-213,-236},{-176,-235,-181,-256,-196,-263}}},{{{-119,-110,-123,-140,-134,-118},{-86,-86,-114,-122,-100,-151},{-120,-107,-115,-118,-127,-118},{-112,-112,-114,-126,-132,-133},{-100,-98,-91,-99,-145,-148},{-97,-94,-125,-109,-126,-154},{-123,-106,-109,-115,-143,-115},{-96,-103,-91,-126,-111,-111},{-118,-101,-103,-112,-111,-115},{-92,-124,-96,-101,-140,-124}},{{-120,-134,-130,-149,-164,-136},{-135,-158,-152,-157,-135,-143},{-112,-117,-152,-141,-138,-175},{-132,-123,-135,-157,-138,-192},{-122,-155,-155,-172,-138,-143},{-120,-168,-129,-163,-129,-141},{-151,-135,-169,-164,-148,-161},{-131,-145,-172,-140,-175,-193},{-150,-114,-172,-153,-137,-153},{-157,-149,-118,-144,-177,-188}},{{-173,-164,-195,-198,-178,-212},{-200,-157,-179,-226,-198,-178},{-150,-160,-175,-207,-225,-228},{-147,-209,-192,-173,-220,-202},{-159,-155,-214,-163,-223,-166},{-156,-193,-184,-179,-216,-168},{-144,-207,-158,-188,-190,-218},{-184,-178,-160,-173,-174,-176},{-168,-202,-221,-217,-178,-214},{-159,-157,-177,-184,-174,-198}},{{-229,-171,-197,-187,-199,-199},{-164,-177,-173,-227,-168,-195},{-203,-199,-197,-177,-205,-233},{-207,-227,-183,-233,-213,-199},{-162,-162,-181,-244,-177,-175},{-231,-195,-231,-187,-205,-238},{-199,-187,-164,-209,-203,-205},{-164,-219,-229,-179,-187,-244},{-171,-217,-166,-205,-185,-179},{-225,-231,-179,-215,-183,-193}},{{-177,-233,-164,-193,-225,-149},{-238,-177,-215,-199,-223,-166},{-162,-221,-199,-197,-197,-169},{-240,-173,-229,-160,-161,-177},{-229,-162,-171,-232,-193,-151},{-181,-185,-211,-209,-208,-153},{-166,-235,-189,-230,-185,-188},{-175,-191,-234,-158,-178,-182},{-193,-179,-195,-177,-159,-162},{-193,-191,-187,-215,-163,-199}},{{-168,-149,-199,-149,-129,-125},{-215,-151,-154,-133,-132,-157},{-199,-156,-200,-150,-162,-168},{-213,-166,-172,-187,-148,-171},{-186,-140,-155,-179,-179,-172},{-202,-180,-192,-178,-176,-118},{-199,-147,-182,-178,-161,-126},{-143,-197,-140,-170,-139,-156},{-213,-190,-197,-158,-125,-132},{-161,-144,-195,-186,-179,-157}}},{{{-273,-202,-283,-236,-212,-259},{-210,-231,-205,-217,-200,-286},{-196,-267,-217,-271,-269,-267},{-240,-243,-217,-228,-217,-205},{-205,-231,-202,-224,-224,-193},{-247,-274,-262,-207,-236,-214},{-256,-238,-276,-248,-271,-243},{-210,-240,-257,-281,-240,-198},{-207,-205,-283,-231,-259,-271},{-254,-226,-286,-286,-276,-281}},{{-252,-228,-266,-226,-235,-254},{-231,-205,-216,-231,-244,-243},{-274,-267,-221,-240,-264,-206},{-255,-202,-263,-213,-221,-252},{-207,-278,-235,-259,-269,-208},{-281,-193,-251,-243,-244,-245},{-219,-283,-219,-254,-217,-265},{-214,-278,-188,-185,-212,-212},{-255,-224,-249,-224,-192,-256},{-262,-202,-251,-268,-228,-265}},{{-183,-247,-210,-162,-196,-194},{-189,-169,-238,-213,-155,-151},{-196,-213,-240,-183,-189,-176},{-185,-222,-240,-160,-165,-203},{-254,-247,-218,-168,-176,-167},{-258,-215,-222,-185,-202,-149},{-172,-186,-170,-160,-165,-191},{-237,-192,-234,-220,-180,-167},{-178,-238,-186,-168,-150,-155},{-211,-203,-192,-187,-176,-202}},{{-182,-165,-138,-169,-147,-153},{-193,-177,-174,-154,-131,-161},{-205,-180,-138,-144,-156,-112},{-141,-193,-160,-126,-150,-166},{-182,-144,-159,-130,-171,-142},{-139,-183,-187,-154,-128,-145},{-150,-150,-166,-142,-144,-160},{-170,-150,-133,-162,-124,-127},{-141,-198,-185,-178,-137,-131},{-169,-185,-155,-126,-122,-119}},{{-149,-107,-112,-119,-132,-120},{-133,-135,-143,-134,-127,-134},{-120,-115,-140,-114,-138,-140},{-129,-147,-115,-124,-115,-100},{-106,-127,-113,-108,-107,-105},{-130,-107,-128,-121,-117,-131},{-160,-115,-114,-113,-98,-114},{-124,-134,-143,-134,-101,-134},{-157,-117,-104,-109,-136,-138},{-141,-117,-148,-125,-102,-136}},{{-121,-112,-139,-131,-112,-131},{-120,-104,-140,-115,-128,-144},{-124,-138,-119,-126,-118,-132},{-105,-112,-106,-102,-133,-108},{-138,-139,-104,-124,-105,-137},{-114,-124,-105,-99,-117,-107},{-131,-126,-113,-127,-124,-142},{-108,-113,-96,-115,-113,-145},{-96,-98,-102,-115,-133,-121},{-118,-104,-95,-101,-145,-126}}},{{{-314,-301,-301,-295,-253,-306},{-290,-255,-231,-229,-301,-282},{-218,-237,-317,-221,-269,-287},{-287,-311,-295,-245,-234,-285},{-226,-253,-247,-311,-306,-293},{-274,-258,-221,-223,-271,-311},{-242,-261,-223,-298,-269,-303},{-269,-285,-226,-231,-314,-263},{-258,-234,-215,-247,-314,-319},{-301,-213,-274,-218,-218,-263}},{{-253,-314,-255,-319,-314,-262},{-317,-301,-282,-287,-270,-300},{-317,-303,-255,-271,-265,-290},{-266,-261,-255,-247,-293,-295},{-317,-309,-287,-223,-212,-259},{-221,-253,-309,-226,-265,-215},{-213,-247,-290,-221,-236,-210},{-290,-221,-271,-258,-241,-272},{-295,-231,-279,-285,-231,-246},{-277,-255,-295,-263,-236,-256}},{{-295,-205,-249,-236,-245,-198},{-231,-220,-209,-293,-252,-234},{-212,-248,-262,-250,-228,-236},{-311,-213,-300,-243,-201,-263},{-277,-243,-214,-246,-289,-224},{-269,-205,-237,-248,-282,-265},{-215,-205,-249,-203,-216,-200},{-225,-268,-219,-218,-247,-231},{-231,-213,-260,-295,-257,-280},{-207,-205,-237,-250,-225,-222}},{{-200,-200,-201,-258,-193,-267},{-271,-235,-192,-216,-264,-228},{-243,-200,-245,-260,-231,-179},{-286,-273,-199,-196,-260,-199},{-243,-242,-203,-209,-233,-258},{-243,-282,-215,-214,-220,-186},{-250,-200,-229,-260,-255,-186},{-200,-207,-194,-191,-231,-220},{-274,-202,-194,-196,-253,-242},{-264,-228,-256,-212,-188,-211}},{{-196,-258,-237,-189,-195,-174},{-251,-215,-228,-215,-224,-254},{-211,-210,-206,-247,-200,-245},{-198,-195,-230,-258,-184,-252},{-211,-230,-174,-217,-237,-176},{-191,-202,-182,-202,-247,-256},{-209,-260,-239,-195,-232,-200},{-218,-178,-178,-237,-221,-226},{-207,-258,-256,-237,-230,-243},{-200,-208,-256,-195,-254,-226}},{{-256,-224,-213,-176,-219,-176},{-197,-250,-178,-200,-213,-232},{-258,-237,-250,-182,-250,-202},{-210,-193,-219,-258,-243,-232},{-252,-213,-200,-224,-182,-247},{-215,-245,-189,-260,-219,-204},{-217,-226,-221,-191,-254,-195},{-197,-241,-180,-208,-250,-215},{-254,-221,-230,-210,-182,-219},{-237,-221,-260,-237,-228,-239}}},{{{-253,-289,-268,-274,-322,-352},{-244,-352,-283,-322,-274,-266},{-346,-253,-241,-292,-355,-263},{-352,-280,-340,-334,-280,-355},{-244,-304,-286,-247,-265,-263},{-349,-262,-247,-358,-352,-255},{-262,-325,-346,-358,-307,-281},{-352,-337,-334,-289,-268,-260},{-268,-250,-271,-286,-301,-302},{-262,-331,-340,-334,-268,-311}},{{-346,-342,-322,-232,-281,-239},{-331,-284,-269,-300,-299,-270},{-293,-298,-249,-268,-215,-283},{-252,-284,-336,-284,-292,-275},{-305,-336,-241,-281,-318,-285},{-328,-255,-235,-311,-215,-301},{-337,-324,-297,-248,-252,-285},{-258,-278,-322,-322,-270,-283},{-311,-284,-277,-328,-294,-254},{-237,-250,-249,-238,-294,-267}},{{-275,-247,-190,-188,-242,-162},{-243,-247,-256,-225,-176,-168},{-275,-197,-263,-194,-193,-216},{-258,-278,-236,-234,-244,-220},{-248,-252,-266,-219,-218,-172},{-293,-288,-229,-217,-220,-172},{-246,-250,-231,-250,-227,-170},{-285,-202,-270,-179,-246,-200},{-293,-262,-261,-254,-212,-226},{-293,-245,-236,-181,-244,-182}},{{-204,-158,-151,-148,-198,-171},{-198,-199,-183,-200,-171,-155},{-186,-182,-196,-163,-183,-138},{-198,-160,-166,-165,-148,-134},{-221,-153,-203,-163,-169,-156},{-206,-167,-187,-179,-196,-130},{-188,-158,-178,-172,-198,-177},{-157,-210,-155,-181,-133,-134},{-225,-166,-176,-201,-138,-145},{-217,-218,-208,-187,-164,-169}},{{-147,-137,-134,-172,-182,-132},{-183,-156,-137,-139,-156,-131},{-162,-143,-129,-123,-185,-128},{-125,-168,-157,-169,-177,-142},{-153,-185,-168,-129,-162,-146},{-154,-134,-165,-162,-157,-166},{-125,-125,-185,-125,-183,-165},{-136,-140,-125,-149,-156,-140},{-154,-139,-180,-159,-123,-169},{-136,-154,-152,-171,-134,-152}},{{-142,-172,-178,-198,-166,-152},{-160,-175,-190,-141,-149,-159},{-152,-172,-162,-134,-144,-215},{-152,-143,-194,-202,-203,-170},{-140,-137,-136,-168,-164,-192},{-136,-162,-136,-173,-198,-203},{-171,-169,-181,-161,-164,-217},{-151,-189,-136,-163,-189,-190},{-171,-173,-177,-185,-149,-154},{-131,-159,-139,-148,-187,-206}}},{{{-346,-350,-399,-287,-308,-304},{-312,-340,-346,-340,-410,-357},{-378,-308,-290,-322,-308,-343},{-364,-284,-382,-329,-360,-385},{-413,-336,-395,-294,-413,-301},{-392,-332,-284,-354,-360,-360},{-332,-354,-420,-340,-346,-336},{-382,-329,-354,-360,-368,-378},{-301,-385,-399,-392,-287,-371},{-315,-346,-294,-406,-371,-315}},{{-376,-292,-376,-267,-266,-296},{-313,-295,-366,-337,-315,-386},{-285,-374,-285,-361,-289,-380},{-411,-401,-292,-271,-358,-264},{-393,-388,-325,-311,-318,-380},{-320,-357,-312,-267,-367,-293},{-369,-302,-380,-271,-312,-345},{-282,-316,-312,-391,-351,-303},{-365,-384,-281,-337,-282,-306},{-303,-381,-332,-361,-341,-306}},{{-343,-293,-333,-319,-259,-245},{-372,-277,-240,-237,-294,-261},{-331,-336,-327,-270,-234,-275},{-268,-317,-339,-264,-316,-314},{-252,-274,-306,-267,-256,-256},{-372,-363,-342,-261,-314,-225},{-290,-265,-312,-267,-259,-242},{-324,-336,-357,-305,-231,-256},{-296,-256,-300,-349,-228,-222},{-312,-259,-243,-237,-254,-306}},{{-267,-279,-252,-231,-262,-268},{-267,-310,-280,-246,-270,-206},{-232,-224,-275,-206,-240,-225},{-305,-245,-285,-223,-279,-277},{-235,-252,-236,-271,-243,-227},{-259,-297,-308,-254,-250,-220},{-248,-250,-262,-299,-220,-249},{-232,-216,-270,-216,-206,-201},{-251,-226,-244,-291,-272,-194},{-251,-266,-272,-294,-289,-246}},{{-194,-231,-222,-238,-243,-249},{-211,-243,-215,-203,-194,-268},{-270,-224,-249,-263,-236,-277},{-284,-236,-219,-238,-233,-217},{-244,-219,-219,-268,-254,-224},{-209,-206,-275,-268,-196,-189},{-211,-192,-194,-224,-240,-215},{-249,-215,-208,-199,-240,-252},{-192,-217,-203,-194,-254,-254},{-258,-210,-206,-229,-226,-229}},{{-203,-275,-280,-193,-244,-276},{-203,-224,-221,-252,-201,-293},{-226,-187,-238,-276,-242,-261},{-247,-206,-217,-231,-288,-295},{-199,-189,-191,-243,-266,-226},{-187,-259,-235,-228,-201,-207},{-249,-256,-268,-198,-259,-202},{-256,-194,-207,-267,-266,-261},{-187,-259,-280,-243,-220,-197},{-238,-210,-226,-248,-218,-224}}}}; // 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,6,15,8,5,15,8,6,16,8,6,17,9,6,16,9,6,17,9,6,17,9,6,16,8,6,16,9,6,17,8,6,17,9,6,17,9,6,18,9,6,17,9,6,18,9,6,17,9,6,18,9,6,16,8,6,16,9,6,17,9,6,16,9,6,17,9,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,746,747,748,749}}; // 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,2,6,10,14,18,22,26,30,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,2,6,10,14,18,22,26,30,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,2,6,10,14,18,22,26,30,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,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,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,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,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,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,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,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,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,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,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,34,2,6,10,14,18,22,26,30,34,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,1,7,13,19,25,31,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,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,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,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,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,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30}; // 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,7,11,15,19,23,27,31,35,5,11,17,23,29,35,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,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,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,3,7,11,15,19,23,27,31,35,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,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,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,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,4,10,16,22,28,34,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,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,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,35,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,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,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,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,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,5,11,17,23,29,35,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}; // set of end times of each shipment 
