int Dev = 50;// Deviation
extern const int CNN = 3;// Case Index
extern const int P = 3;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 18;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 351;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 9;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{12244,0,0,0,0,0},{12787,0,0,0,0,0},{12510,0,0,0,0,0},{12889,0,0,0,0,0},{12256,0,0,0,0,0},{11893,0,0,0,0,0},{12644,0,0,0,0,0},{12379,0,0,0,0,0},{12564,0,0,0,0,0},{12431,0,0,0,0,0},{10884,0,0,0,0,0},{12392,0,0,0,0,0},{12254,0,0,0,0,0},{12114,0,0,0,0,0},{12065,0,0,0,0,0},{12161,0,0,0,0,0},{12730,0,0,0,0,0},{12235,0,0,0,0,0},{12733,0,0,0,0,0},{12222,0,0,0,0,0}},{{12214,0,0,0,0,0},{12462,0,0,0,0,0},{12722,0,0,0,0,0},{12147,0,0,0,0,0},{12816,0,0,0,0,0},{11392,0,0,0,0,0},{12190,0,0,0,0,0},{12424,0,0,0,0,0},{12131,0,0,0,0,0},{12600,0,0,0,0,0},{13467,0,0,0,0,0},{11982,0,0,0,0,0},{12356,0,0,0,0,0},{11859,0,0,0,0,0},{11891,0,0,0,0,0},{12634,0,0,0,0,0},{13469,0,0,0,0,0},{12415,0,0,0,0,0},{13145,0,0,0,0,0},{12591,0,0,0,0,0}},{{12352,0,0,0,0,0},{11814,0,0,0,0,0},{11233,0,0,0,0,0},{10687,0,0,0,0,0},{11169,0,0,0,0,0},{11865,0,0,0,0,0},{10568,0,0,0,0,0},{12135,0,0,0,0,0},{12022,0,0,0,0,0},{11303,0,0,0,0,0},{11393,0,0,0,0,0},{11338,0,0,0,0,0},{11884,0,0,0,0,0},{11770,0,0,0,0,0},{12388,0,0,0,0,0},{11475,0,0,0,0,0},{11620,0,0,0,0,0},{11713,0,0,0,0,0},{11171,0,0,0,0,0},{11399,0,0,0,0,0}}},{{{-365,-220,-300,-276,-265,-273},{-265,-285,-168,-429,-191,-341},{-382,-362,-241,-153,-362,-247},{-391,-329,-279,-279,-185,-223},{-212,-179,-379,-168,-382,-279},{-285,-400,-147,-341,-365,-282},{-179,-256,-273,-388,-232,-288},{-171,-438,-176,-171,-303,-220},{-350,-259,-244,-326,-429,-332},{-265,-388,-220,-376,-179,-247},{-212,-206,-365,-235,-332,-247},{-173,-373,-429,-365,-400,-168},{-159,-200,-197,-165,-244,-320},{-294,-147,-197,-165,-153,-426},{-238,-370,-270,-297,-432,-385},{-356,-220,-262,-300,-285,-382},{-162,-391,-385,-241,-238,-388},{-412,-265,-232,-259,-320,-376},{-347,-388,-423,-400,-171,-417},{-244,-312,-238,-273,-423,-344}},{{-409,-389,-381,-137,-134,-282},{-284,-166,-260,-329,-400,-189},{-336,-209,-291,-318,-262,-313},{-168,-389,-196,-192,-267,-174},{-177,-369,-182,-301,-211,-313},{-394,-335,-347,-408,-312,-228},{-212,-192,-372,-321,-206,-189},{-197,-335,-417,-408,-200,-197},{-220,-360,-235,-178,-248,-249},{-374,-295,-260,-386,-344,-246},{-174,-180,-241,-225,-227,-171},{-362,-209,-148,-184,-307,-303},{-241,-380,-260,-162,-275,-347},{-368,-395,-224,-362,-179,-295},{-304,-309,-277,-203,-238,-249},{-380,-352,-300,-329,-336,-148},{-331,-403,-409,-378,-312,-370},{-362,-283,-361,-175,-203,-163},{-345,-343,-230,-230,-286,-251},{-218,-418,-333,-370,-275,-290}},{{-135,-293,-331,-325,-218,-229},{-265,-191,-186,-302,-308,-293},{-305,-223,-310,-318,-180,-204},{-248,-136,-119,-148,-146,-142},{-308,-177,-203,-157,-246,-255},{-148,-315,-322,-188,-143,-262},{-238,-363,-168,-222,-160,-231},{-358,-344,-156,-114,-146,-192},{-288,-232,-177,-314,-259,-247},{-342,-211,-170,-242,-231,-227},{-345,-278,-273,-143,-139,-276},{-350,-218,-172,-119,-220,-222},{-180,-348,-135,-231,-193,-253},{-235,-361,-158,-318,-293,-253},{-355,-177,-249,-244,-212,-231},{-315,-242,-144,-155,-274,-165},{-345,-138,-203,-114,-268,-150},{-238,-278,-231,-334,-184,-117},{-330,-240,-231,-332,-319,-266},{-285,-172,-182,-307,-300,-171}}},{{{-198,-179,-184,-175,-116,-159},{-225,-237,-100,-163,-184,-199},{-104,-254,-180,-111,-188,-162},{-228,-88,-96,-192,-219,-172},{-180,-128,-142,-215,-241,-176},{-150,-96,-149,-106,-153,-281},{-188,-215,-236,-141,-206,-216},{-212,-88,-122,-125,-230,-155},{-181,-189,-124,-193,-228,-164},{-190,-230,-110,-184,-99,-178},{-113,-120,-107,-152,-206,-202},{-212,-150,-180,-159,-156,-149},{-192,-105,-107,-252,-162,-199},{-180,-128,-161,-261,-138,-122},{-144,-147,-142,-258,-177,-139},{-119,-176,-94,-165,-109,-283},{-215,-243,-194,-98,-171,-117},{-131,-248,-187,-267,-258,-97},{-171,-130,-122,-193,-112,-199},{-136,-105,-236,-260,-234,-286}},{{-255,-264,-300,-219,-119,-307},{-125,-207,-256,-203,-266,-176},{-194,-125,-228,-316,-321,-167},{-200,-283,-209,-175,-245,-331},{-137,-160,-196,-217,-266,-221},{-105,-121,-126,-126,-215,-183},{-127,-244,-215,-261,-206,-131},{-242,-123,-277,-159,-142,-333},{-147,-160,-209,-126,-300,-324},{-168,-197,-290,-172,-192,-283},{-275,-260,-158,-270,-137,-309},{-115,-193,-317,-301,-289,-236},{-289,-111,-298,-188,-245,-248},{-214,-217,-204,-183,-163,-190},{-166,-105,-288,-283,-341,-352},{-148,-139,-283,-230,-270,-121},{-240,-180,-268,-113,-119,-243},{-242,-187,-288,-323,-165,-188},{-249,-248,-162,-188,-314,-321},{-253,-285,-283,-243,-151,-224}},{{-321,-133,-328,-248,-349,-331},{-173,-204,-238,-254,-349,-195},{-227,-273,-176,-148,-385,-252},{-274,-153,-330,-227,-313,-235},{-146,-375,-131,-327,-177,-303},{-291,-270,-369,-340,-235,-209},{-205,-138,-223,-265,-158,-317},{-249,-130,-215,-400,-194,-382},{-198,-377,-275,-373,-313,-260},{-358,-176,-168,-238,-166,-235},{-343,-212,-272,-248,-302,-342},{-146,-357,-134,-286,-299,-291},{-170,-191,-147,-338,-310,-275},{-351,-217,-259,-243,-235,-303},{-368,-150,-202,-313,-277,-416},{-366,-138,-356,-284,-302,-150},{-291,-150,-359,-305,-343,-283},{-289,-278,-178,-224,-330,-408},{-245,-265,-385,-230,-147,-331},{-331,-296,-231,-300,-335,-153}}},{{{-313,-217,-382,-349,-276,-447},{-411,-431,-188,-431,-411,-349},{-211,-217,-188,-447,-421,-191},{-243,-487,-270,-408,-286,-487},{-329,-306,-392,-280,-280,-296},{-382,-214,-418,-283,-385,-290},{-382,-401,-214,-313,-461,-224},{-273,-438,-230,-266,-237,-214},{-263,-263,-316,-234,-319,-352},{-299,-398,-286,-372,-388,-392},{-220,-197,-342,-207,-273,-171},{-368,-253,-309,-359,-230,-253},{-368,-372,-368,-283,-359,-178},{-309,-164,-293,-329,-168,-457},{-293,-266,-467,-349,-296,-207},{-237,-227,-355,-184,-260,-474},{-329,-467,-234,-181,-336,-293},{-217,-342,-424,-191,-224,-263},{-454,-313,-181,-451,-164,-224},{-243,-243,-270,-487,-349,-220}},{{-364,-444,-230,-314,-277,-370},{-485,-415,-421,-188,-169,-412},{-285,-280,-478,-308,-179,-373},{-239,-287,-191,-471,-200,-385},{-246,-193,-427,-458,-157,-289},{-315,-464,-214,-276,-394,-214},{-420,-341,-373,-421,-293,-196},{-318,-351,-175,-301,-413,-259},{-417,-448,-354,-414,-299,-256},{-331,-454,-396,-414,-456,-304},{-423,-467,-303,-232,-354,-307},{-335,-351,-329,-355,-262,-190},{-233,-374,-399,-264,-176,-376},{-180,-299,-226,-226,-256,-445},{-233,-441,-415,-455,-166,-172},{-190,-229,-239,-179,-450,-223},{-354,-425,-287,-330,-333,-316},{-226,-399,-453,-286,-206,-322},{-403,-467,-367,-402,-413,-229},{-236,-325,-316,-198,-265,-268}},{{-372,-328,-319,-139,-384,-182},{-257,-259,-375,-280,-233,-236},{-245,-150,-322,-147,-132,-290},{-319,-204,-311,-362,-140,-195},{-215,-409,-302,-354,-220,-170},{-398,-377,-344,-141,-193,-226},{-375,-199,-227,-348,-315,-206},{-233,-354,-420,-177,-217,-293},{-342,-225,-221,-337,-360,-213},{-419,-253,-255,-234,-162,-267},{-180,-380,-252,-283,-183,-185},{-360,-288,-417,-218,-286,-180},{-407,-420,-412,-272,-371,-236},{-271,-360,-179,-160,-262,-339},{-254,-276,-361,-343,-167,-283},{-224,-415,-297,-373,-238,-211},{-333,-225,-370,-258,-223,-283},{-212,-314,-370,-144,-199,-159},{-195,-308,-146,-204,-257,-229},{-289,-222,-263,-408,-191,-172}}},{{{-133,-108,-130,-60,-143,-78},{-109,-158,-72,-170,-183,-179},{-89,-98,-123,-109,-166,-101},{-59,-56,-156,-98,-167,-104},{-125,-67,-155,-84,-102,-134},{-103,-155,-122,-165,-101,-118},{-88,-98,-109,-61,-79,-77},{-125,-117,-82,-85,-154,-177},{-84,-77,-87,-157,-182,-115},{-155,-98,-91,-135,-106,-111},{-125,-81,-97,-160,-77,-68},{-123,-82,-125,-98,-61,-91},{-87,-127,-121,-163,-70,-116},{-98,-59,-82,-104,-76,-91},{-109,-54,-78,-95,-109,-128},{-106,-144,-91,-173,-89,-147},{-86,-143,-71,-106,-65,-96},{-152,-119,-99,-62,-181,-191},{-90,-157,-97,-121,-127,-166},{-142,-81,-108,-102,-152,-161}},{{-120,-127,-145,-127,-134,-108},{-81,-161,-81,-208,-116,-160},{-186,-197,-132,-181,-118,-240},{-68,-145,-195,-158,-217,-181},{-193,-90,-213,-90,-167,-131},{-97,-109,-218,-121,-87,-218},{-74,-137,-127,-197,-124,-250},{-159,-140,-176,-79,-164,-190},{-155,-135,-189,-212,-177,-215},{-80,-86,-115,-226,-184,-143},{-192,-137,-108,-209,-216,-215},{-93,-111,-160,-138,-159,-123},{-196,-93,-151,-217,-90,-175},{-192,-73,-81,-200,-213,-109},{-107,-109,-104,-169,-87,-156},{-113,-117,-216,-166,-233,-235},{-143,-183,-135,-135,-195,-124},{-128,-172,-175,-174,-135,-173},{-177,-107,-98,-219,-159,-180},{-68,-85,-149,-90,-143,-106}},{{-135,-185,-147,-243,-200,-184},{-222,-99,-257,-127,-120,-244},{-256,-193,-238,-226,-141,-200},{-259,-238,-164,-101,-149,-214},{-147,-221,-277,-211,-202,-143},{-124,-130,-167,-141,-216,-184},{-208,-191,-112,-245,-176,-148},{-163,-101,-147,-238,-186,-222},{-182,-243,-136,-142,-182,-109},{-231,-212,-193,-127,-247,-204},{-147,-106,-153,-232,-153,-194},{-163,-202,-190,-255,-221,-190},{-144,-266,-145,-182,-261,-216},{-117,-153,-102,-281,-204,-279},{-156,-256,-270,-192,-171,-164},{-98,-218,-212,-148,-218,-198},{-133,-241,-203,-106,-123,-273},{-205,-135,-169,-260,-259,-269},{-168,-130,-121,-184,-204,-160},{-138,-173,-205,-285,-129,-145}}},{{{-245,-240,-336,-248,-212,-243},{-163,-124,-302,-350,-164,-221},{-205,-262,-224,-336,-340,-255},{-207,-276,-267,-317,-276,-190},{-252,-240,-133,-300,-255,-338},{-193,-209,-136,-302,-259,-181},{-161,-300,-350,-295,-236,-236},{-217,-245,-331,-190,-312,-328},{-158,-186,-340,-312,-278,-355},{-198,-302,-133,-302,-200,-324},{-207,-124,-238,-255,-212,-224},{-252,-340,-176,-317,-259,-243},{-303,-198,-138,-281,-143,-126},{-158,-352,-183,-178,-231,-236},{-133,-202,-317,-302,-300,-138},{-240,-259,-238,-207,-298,-164},{-238,-145,-224,-338,-340,-209},{-317,-271,-248,-169,-167,-336},{-282,-129,-276,-167,-262,-233},{-182,-262,-338,-121,-119,-162}},{{-309,-281,-348,-236,-339,-172},{-155,-257,-230,-171,-228,-130},{-343,-186,-164,-270,-118,-219},{-283,-169,-235,-143,-149,-234},{-250,-271,-324,-116,-163,-323},{-288,-136,-249,-143,-190,-135},{-224,-283,-169,-157,-253,-305},{-150,-352,-317,-296,-149,-296},{-231,-347,-343,-296,-167,-192},{-259,-205,-148,-316,-165,-119},{-250,-202,-193,-208,-140,-256},{-119,-221,-129,-134,-264,-307},{-252,-314,-204,-169,-113,-320},{-152,-157,-193,-129,-334,-146},{-183,-181,-306,-337,-312,-234},{-352,-271,-167,-307,-217,-256},{-357,-178,-190,-314,-249,-159},{-347,-140,-223,-316,-199,-135},{-228,-124,-176,-187,-149,-214},{-262,-319,-190,-282,-219,-168}},{{-226,-203,-198,-121,-271,-207},{-202,-150,-242,-273,-198,-245},{-140,-207,-180,-123,-185,-124},{-125,-299,-182,-216,-144,-238},{-144,-113,-234,-195,-178,-180},{-127,-144,-303,-136,-118,-173},{-120,-119,-200,-242,-180,-133},{-159,-207,-301,-234,-239,-193},{-258,-119,-127,-246,-187,-205},{-118,-238,-293,-131,-108,-189},{-307,-184,-299,-119,-243,-218},{-297,-134,-109,-232,-279,-203},{-194,-270,-166,-220,-122,-180},{-114,-282,-180,-201,-159,-218},{-310,-276,-224,-127,-245,-146},{-249,-140,-226,-193,-254,-265},{-241,-291,-111,-150,-267,-103},{-204,-238,-131,-174,-95,-135},{-316,-261,-152,-136,-150,-110},{-131,-169,-232,-195,-153,-212}}},{{{-346,-319,-301,-165,-186,-253},{-181,-152,-269,-221,-146,-372},{-253,-263,-269,-338,-293,-210},{-335,-261,-399,-263,-229,-282},{-343,-343,-146,-309,-277,-293},{-157,-269,-192,-138,-370,-133},{-226,-335,-152,-192,-226,-364},{-173,-394,-237,-319,-170,-340},{-319,-332,-383,-277,-290,-165},{-266,-229,-218,-226,-194,-332},{-394,-181,-154,-221,-330,-141},{-356,-269,-173,-364,-375,-165},{-309,-213,-359,-197,-136,-202},{-391,-380,-394,-146,-234,-258},{-263,-186,-367,-269,-295,-293},{-335,-263,-298,-295,-375,-293},{-351,-388,-221,-279,-375,-290},{-176,-306,-242,-394,-141,-210},{-335,-205,-154,-372,-396,-279},{-332,-242,-178,-311,-380,-340}},{{-258,-226,-383,-330,-157,-238},{-388,-340,-239,-192,-202,-130},{-279,-378,-168,-162,-328,-370},{-271,-295,-255,-194,-236,-155},{-266,-340,-293,-391,-157,-231},{-192,-274,-192,-372,-210,-256},{-255,-229,-258,-346,-383,-249},{-237,-306,-173,-327,-328,-225},{-322,-178,-322,-271,-249,-153},{-269,-271,-149,-295,-346,-236},{-354,-388,-348,-372,-346,-332},{-189,-330,-386,-380,-228,-295},{-375,-192,-157,-274,-338,-373},{-237,-184,-245,-325,-157,-199},{-218,-213,-186,-200,-238,-290},{-146,-287,-144,-356,-301,-373},{-380,-194,-274,-192,-280,-370},{-149,-162,-173,-399,-262,-220},{-186,-303,-394,-370,-280,-199},{-202,-266,-325,-354,-343,-370}},{{-259,-187,-212,-298,-243,-323},{-339,-210,-310,-360,-296,-236},{-373,-283,-242,-154,-336,-176},{-205,-220,-224,-317,-203,-207},{-376,-205,-219,-243,-262,-181},{-355,-253,-141,-320,-191,-277},{-269,-286,-134,-218,-181,-195},{-376,-147,-131,-315,-198,-272},{-287,-190,-227,-303,-321,-229},{-352,-129,-363,-164,-154,-253},{-342,-228,-144,-332,-245,-304},{-176,-299,-277,-174,-255,-243},{-184,-210,-340,-231,-252,-234},{-210,-306,-262,-164,-296,-207},{-339,-316,-323,-312,-265,-280},{-192,-197,-370,-206,-316,-181},{-207,-258,-343,-196,-321,-335},{-223,-202,-141,-355,-196,-195},{-166,-354,-310,-141,-255,-292},{-238,-268,-242,-228,-167,-207}}},{{{-178,-250,-175,-205,-304,-219},{-418,-169,-388,-166,-295,-403},{-199,-307,-379,-400,-241,-397},{-190,-325,-448,-403,-166,-186},{-250,-415,-364,-175,-150,-438},{-397,-262,-433,-322,-232,-314},{-184,-169,-409,-388,-289,-382},{-313,-250,-439,-442,-268,-281},{-208,-307,-430,-160,-295,-260},{-226,-292,-418,-226,-229,-151},{-172,-439,-268,-175,-452,-178},{-331,-289,-214,-313,-322,-326},{-307,-445,-373,-349,-349,-429},{-292,-244,-421,-157,-214,-435},{-355,-163,-394,-442,-166,-364},{-229,-160,-181,-292,-415,-340},{-250,-280,-241,-277,-349,-228},{-286,-452,-205,-232,-355,-326},{-289,-202,-421,-379,-328,-240},{-442,-352,-244,-199,-163,-243}},{{-220,-169,-398,-240,-225,-154},{-404,-402,-249,-349,-143,-352},{-363,-164,-260,-172,-358,-360},{-440,-364,-375,-238,-337,-180},{-363,-422,-218,-374,-262,-244},{-199,-230,-188,-344,-276,-239},{-152,-390,-319,-139,-299,-152},{-226,-284,-185,-202,-395,-265},{-319,-215,-165,-284,-186,-172},{-299,-430,-210,-191,-257,-308},{-360,-255,-286,-374,-390,-329},{-208,-310,-263,-341,-310,-213},{-390,-319,-224,-396,-265,-226},{-410,-241,-202,-336,-368,-362},{-384,-247,-274,-254,-132,-324},{-349,-319,-311,-136,-368,-293},{-299,-362,-330,-227,-310,-195},{-311,-307,-330,-175,-249,-319},{-208,-264,-319,-336,-135,-362},{-246,-359,-370,-232,-292,-260}},{{-342,-238,-169,-133,-269,-214},{-131,-228,-268,-146,-208,-283},{-203,-278,-247,-139,-280,-271},{-198,-178,-238,-197,-204,-139},{-347,-120,-243,-146,-307,-236},{-325,-190,-337,-225,-204,-248},{-325,-269,-133,-201,-223,-267},{-335,-286,-229,-236,-267,-269},{-188,-206,-185,-110,-155,-303},{-201,-264,-261,-316,-301,-216},{-203,-197,-163,-181,-121,-279},{-221,-142,-284,-110,-165,-131},{-352,-204,-128,-137,-297,-107},{-362,-254,-215,-166,-271,-269},{-310,-281,-339,-320,-204,-172},{-280,-233,-266,-217,-148,-232},{-325,-223,-133,-301,-301,-289},{-332,-300,-318,-298,-233,-115},{-288,-247,-144,-217,-195,-200},{-365,-262,-256,-157,-248,-287}}},{{{-262,-427,-430,-522,-402,-430},{-438,-455,-332,-441,-262,-476},{-473,-455,-318,-343,-395,-248},{-466,-511,-452,-364,-224,-350},{-217,-438,-340,-343,-298,-368},{-304,-196,-378,-290,-487,-248},{-322,-378,-434,-483,-476,-332},{-287,-504,-511,-308,-343,-368},{-280,-511,-182,-462,-399,-207},{-371,-389,-525,-273,-385,-525},{-245,-186,-480,-326,-287,-480},{-326,-511,-186,-301,-438,-280},{-413,-438,-441,-452,-329,-410},{-455,-399,-497,-424,-473,-360},{-374,-178,-280,-252,-270,-312},{-364,-504,-224,-483,-256,-210},{-525,-178,-410,-378,-525,-441},{-525,-178,-458,-220,-318,-186},{-346,-497,-336,-354,-220,-413},{-336,-248,-234,-389,-315,-441}},{{-376,-384,-231,-187,-197,-200},{-320,-401,-451,-257,-456,-258},{-195,-316,-390,-498,-318,-306},{-383,-336,-173,-451,-479,-206},{-292,-473,-397,-478,-426,-338},{-191,-302,-346,-367,-246,-200},{-226,-322,-342,-341,-472,-296},{-466,-329,-217,-428,-194,-322},{-393,-175,-190,-324,-259,-351},{-320,-250,-271,-451,-230,-209},{-320,-490,-454,-287,-318,-425},{-393,-209,-241,-327,-325,-290},{-313,-189,-214,-468,-187,-296},{-442,-209,-376,-291,-190,-480},{-205,-285,-176,-271,-367,-345},{-327,-250,-373,-230,-485,-390},{-498,-244,-315,-274,-485,-467},{-351,-418,-359,-441,-187,-454},{-390,-453,-475,-281,-276,-448},{-414,-302,-220,-314,-236,-454}},{{-469,-447,-363,-202,-282,-417},{-343,-394,-174,-398,-274,-239},{-391,-268,-300,-170,-388,-234},{-183,-169,-348,-410,-402,-314},{-236,-262,-336,-325,-160,-245},{-441,-419,-321,-237,-419,-228},{-208,-311,-294,-152,-234,-236},{-403,-274,-420,-179,-425,-409},{-410,-428,-354,-434,-239,-306},{-413,-268,-204,-431,-165,-203},{-195,-330,-237,-205,-362,-334},{-428,-348,-240,-328,-296,-183},{-428,-342,-273,-146,-428,-336},{-280,-342,-396,-176,-262,-245},{-450,-182,-330,-152,-151,-247},{-227,-382,-150,-237,-225,-348},{-365,-376,-210,-182,-225,-147},{-413,-262,-309,-375,-390,-295},{-312,-182,-417,-264,-182,-253},{-381,-299,-213,-185,-396,-225}}}}; // 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]={7,3,3,7,4,2,6,3,2,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,5,3,9,4,3,9,5,3,8,5,3,8,5,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5,6},{7,8,9},{10,11,12},{13,14,15,16,17,18,19},{20,21,22,23},{24,25},{26,27,28,29,30,31},{32,33,34},{35,36},{37,38,39,40,41,42,43,44},{45,46,47,48},{49,50,51},{52,53,54,55,56,57,58,59},{60,61,62,63},{64,65,66},{67,68,69,70,71,72,73},{74,75,76,77},{78,79,80},{81,82,83,84,85,86,87,88},{89,90,91,92},{93,94,95},{96,97,98,99,100,101,102,103},{104,105,106,107},{108,109,110},{111,112,113,114,115,116,117},{118,119,120,121},{122,123,124},{125,126,127,128,129,130,131},{132,133,134,135},{136,137,138},{139,140,141,142,143,144,145,146},{147,148,149,150},{151,152,153},{154,155,156,157,158,159,160},{161,162,163,164},{165,166,167},{168,169,170,171,172,173,174,175},{176,177,178,179},{180,181,182},{183,184,185,186,187,188,189,190},{191,192,193,194,195},{196,197,198},{199,200,201,202,203,204,205,206,207},{208,209,210,211},{212,213,214},{215,216,217,218,219,220,221,222,223},{224,225,226,227,228},{229,230,231},{232,233,234,235,236,237,238,239},{240,241,242,243,244},{245,246,247},{248,249,250,251,252,253,254,255},{256,257,258,259,260},{261,262,263},{264,265,266,267,268,269,270,271},{272,273,274,275},{276,277,278},{279,280,281,282,283,284,285,286},{287,288,289,290},{291,292,293},{294,295,296,297,298,299,300},{301,302,303,304},{305,306,307},{308,309,310,311,312,313,314},{315,316,317,318},{319,320,321},{322,323,324,325,326,327,328,329},{330,331,332,333},{334,335,336},{337,338,339,340,341,342,343},{344,345,346,347},{348,349,350}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,1,5,9,0,6,12,0,2,4,6,8,10,12,0,4,8,12,2,8,1,3,5,7,9,11,1,5,9,1,7,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,0,4,8,12,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,0,6,12,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,16,2,8,14,0,2,4,6,8,10,12,14,16,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,16,0,4,8,12,16,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,16,0,6,12,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,0,4,8,12,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,6,10,14,5,11,17,5,7,9,11,13,15,17,5,9,13,17,7,13,6,8,10,12,14,16,6,10,14,6,12,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15,4,6,8,10,12,14,16,3,7,11,15,5,11,17,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,4,6,8,10,12,14,16,4,8,12,16,2,8,14,4,6,8,10,12,14,16,4,8,12,16,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,4,10,16,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,3,9,15,1,3,5,7,9,11,13,15,17,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,2,4,6,8,10,12,14,16,4,8,12,16,3,9,15,2,4,6,8,10,12,14,16,4,8,12,16,3,9,15,4,6,8,10,12,14,16,3,7,11,15,4,10,16,5,7,9,11,13,15,17,3,7,11,15,5,11,17,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,5,7,9,11,13,15,17,3,7,11,15,5,11,17}; // set of end times of each shipment 
