int Dev = 40;// 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 = 340;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 8;//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]={{{{12237,0,0,0,0,0},{12875,0,0,0,0,0},{12176,0,0,0,0,0},{12351,0,0,0,0,0},{13152,0,0,0,0,0},{12787,0,0,0,0,0},{12897,0,0,0,0,0},{11920,0,0,0,0,0},{12718,0,0,0,0,0},{12182,0,0,0,0,0},{11985,0,0,0,0,0},{12081,0,0,0,0,0},{12723,0,0,0,0,0},{12932,0,0,0,0,0},{12213,0,0,0,0,0},{12892,0,0,0,0,0},{12611,0,0,0,0,0},{12896,0,0,0,0,0},{11743,0,0,0,0,0},{13239,0,0,0,0,0}},{{11564,0,0,0,0,0},{11736,0,0,0,0,0},{12483,0,0,0,0,0},{12769,0,0,0,0,0},{12079,0,0,0,0,0},{12696,0,0,0,0,0},{12908,0,0,0,0,0},{12929,0,0,0,0,0},{12750,0,0,0,0,0},{11956,0,0,0,0,0},{12872,0,0,0,0,0},{12509,0,0,0,0,0},{12163,0,0,0,0,0},{11784,0,0,0,0,0},{12579,0,0,0,0,0},{12654,0,0,0,0,0},{11908,0,0,0,0,0},{12735,0,0,0,0,0},{12774,0,0,0,0,0},{13076,0,0,0,0,0}},{{10924,0,0,0,0,0},{12203,0,0,0,0,0},{12699,0,0,0,0,0},{11249,0,0,0,0,0},{11803,0,0,0,0,0},{11550,0,0,0,0,0},{11457,0,0,0,0,0},{11767,0,0,0,0,0},{11054,0,0,0,0,0},{11901,0,0,0,0,0},{11558,0,0,0,0,0},{12232,0,0,0,0,0},{11266,0,0,0,0,0},{11190,0,0,0,0,0},{11636,0,0,0,0,0},{11137,0,0,0,0,0},{11671,0,0,0,0,0},{11786,0,0,0,0,0},{11322,0,0,0,0,0},{11375,0,0,0,0,0}}},{{{-253,-379,-247,-338,-344,-194},{-400,-188,-203,-362,-382,-318},{-238,-176,-391,-291,-235,-397},{-212,-250,-276,-226,-279,-262},{-356,-338,-376,-403,-200,-397},{-362,-382,-318,-200,-250,-315},{-238,-341,-276,-226,-376,-179},{-382,-268,-329,-212,-335,-312},{-315,-309,-335,-203,-347,-409},{-215,-297,-188,-406,-412,-329},{-356,-197,-315,-182,-344,-212},{-191,-218,-226,-235,-373,-376},{-323,-341,-253,-335,-197,-365},{-312,-220,-362,-326,-229,-241},{-279,-285,-206,-194,-353,-359},{-270,-279,-315,-406,-318,-203},{-350,-373,-270,-229,-185,-244},{-276,-347,-247,-282,-365,-256},{-276,-288,-365,-176,-188,-179},{-326,-176,-253,-379,-406,-276}},{{-220,-217,-260,-271,-280,-313},{-246,-320,-207,-321,-307,-352},{-345,-389,-370,-348,-256,-189},{-258,-386,-311,-230,-294,-355},{-345,-180,-244,-192,-307,-295},{-226,-246,-370,-315,-294,-174},{-403,-217,-274,-186,-299,-326},{-293,-223,-386,-373,-358,-171},{-400,-380,-283,-178,-299,-285},{-229,-226,-196,-178,-195,-166},{-278,-400,-319,-345,-315,-326},{-296,-186,-347,-299,-286,-321},{-191,-269,-375,-271,-182,-231},{-362,-203,-190,-222,-262,-350},{-252,-326,-174,-293,-259,-171},{-276,-197,-311,-323,-328,-251},{-319,-200,-241,-216,-163,-166},{-377,-272,-372,-181,-312,-231},{-218,-378,-381,-219,-198,-321},{-310,-383,-227,-340,-214,-220}},{{-238,-298,-163,-170,-178,-157},{-292,-152,-254,-237,-282,-124},{-158,-259,-266,-309,-141,-212},{-268,-305,-165,-253,-287,-124},{-235,-160,-210,-271,-214,-134},{-258,-223,-217,-269,-272,-192},{-232,-174,-326,-220,-214,-288},{-345,-220,-193,-302,-214,-183},{-242,-194,-226,-141,-300,-255},{-320,-172,-177,-287,-265,-206},{-300,-211,-275,-164,-248,-268},{-170,-194,-326,-211,-186,-245},{-200,-189,-254,-287,-255,-177},{-340,-283,-221,-206,-171,-284},{-167,-254,-224,-204,-188,-198},{-162,-182,-226,-197,-195,-124},{-300,-322,-238,-148,-216,-239},{-288,-281,-217,-307,-146,-239},{-170,-276,-238,-258,-250,-288},{-280,-177,-163,-179,-263,-173}}},{{{-202,-125,-217,-156,-134,-134},{-200,-203,-210,-200,-241,-115},{-141,-235,-119,-150,-228,-197},{-232,-232,-114,-186,-186,-115},{-202,-176,-214,-199,-197,-248},{-227,-157,-110,-202,-226,-191},{-133,-110,-196,-209,-167,-189},{-141,-105,-147,-124,-129,-168},{-126,-186,-136,-118,-247,-202},{-165,-186,-152,-136,-144,-166},{-228,-132,-189,-208,-169,-174},{-163,-142,-107,-233,-173,-212},{-109,-221,-161,-243,-219,-183},{-102,-117,-133,-240,-219,-264},{-106,-174,-128,-195,-182,-195},{-150,-199,-240,-149,-149,-210},{-104,-125,-175,-220,-160,-160},{-131,-193,-212,-159,-221,-128},{-143,-157,-187,-209,-158,-176},{-141,-157,-224,-247,-114,-260}},{{-232,-156,-226,-199,-213,-238},{-162,-133,-145,-276,-176,-276},{-257,-264,-200,-135,-302,-240},{-139,-244,-294,-155,-311,-314},{-267,-146,-200,-236,-197,-159},{-186,-139,-155,-309,-206,-145},{-176,-236,-271,-307,-302,-157},{-275,-158,-198,-164,-190,-252},{-176,-178,-260,-281,-222,-271},{-222,-139,-207,-194,-185,-326},{-236,-180,-262,-232,-321,-290},{-164,-160,-153,-159,-195,-245},{-214,-230,-268,-267,-291,-162},{-186,-176,-243,-197,-183,-209},{-236,-226,-268,-272,-298,-293},{-190,-228,-281,-287,-318,-202},{-263,-283,-239,-203,-215,-252},{-154,-203,-143,-254,-208,-262},{-200,-211,-239,-276,-181,-274},{-234,-238,-294,-157,-185,-300}},{{-153,-219,-259,-224,-280,-249},{-168,-337,-330,-235,-244,-263},{-245,-265,-322,-294,-285,-300},{-151,-171,-165,-278,-343,-243},{-289,-268,-196,-354,-374,-374},{-180,-339,-325,-265,-175,-190},{-222,-224,-212,-224,-249,-306},{-242,-196,-157,-313,-205,-277},{-252,-329,-317,-221,-227,-207},{-151,-288,-351,-267,-288,-291},{-274,-173,-307,-259,-338,-396},{-200,-326,-225,-267,-291,-337},{-279,-173,-320,-162,-371,-258},{-212,-332,-215,-300,-241,-385},{-279,-301,-351,-200,-305,-260},{-151,-352,-296,-300,-360,-221},{-264,-270,-351,-216,-227,-275},{-188,-201,-367,-259,-166,-303},{-212,-186,-270,-270,-208,-215},{-254,-166,-178,-310,-186,-337}}},{{{-438,-342,-408,-329,-326,-398},{-201,-457,-234,-408,-454,-365},{-332,-243,-250,-329,-234,-408},{-342,-345,-411,-237,-359,-342},{-461,-273,-319,-250,-240,-217},{-322,-352,-204,-392,-395,-388},{-234,-257,-444,-434,-309,-421},{-326,-352,-286,-362,-197,-290},{-290,-326,-276,-359,-349,-392},{-276,-224,-418,-270,-359,-457},{-283,-220,-424,-204,-388,-227},{-368,-368,-224,-211,-438,-306},{-382,-290,-296,-359,-454,-457},{-424,-257,-214,-415,-260,-382},{-266,-359,-247,-234,-428,-392},{-217,-247,-204,-368,-375,-418},{-352,-375,-293,-234,-273,-444},{-355,-411,-299,-359,-316,-401},{-296,-316,-280,-303,-299,-408},{-230,-345,-438,-339,-345,-415}},{{-367,-399,-274,-257,-336,-328},{-407,-354,-195,-311,-394,-271},{-328,-203,-258,-367,-237,-184},{-400,-335,-226,-295,-323,-226},{-413,-406,-354,-421,-256,-373},{-390,-380,-195,-430,-360,-418},{-256,-406,-246,-418,-413,-361},{-256,-435,-383,-424,-274,-331},{-321,-374,-437,-192,-379,-349},{-276,-415,-303,-223,-382,-376},{-295,-193,-345,-427,-407,-325},{-236,-341,-443,-248,-330,-271},{-276,-213,-335,-374,-268,-217},{-292,-254,-211,-361,-326,-217},{-213,-361,-408,-242,-299,-319},{-413,-264,-354,-392,-416,-328},{-371,-341,-284,-239,-268,-325},{-292,-386,-351,-408,-216,-274},{-325,-287,-297,-418,-382,-364},{-440,-248,-357,-333,-416,-418}},{{-221,-193,-174,-343,-231,-218},{-245,-386,-347,-226,-339,-247},{-342,-323,-364,-193,-371,-185},{-227,-210,-244,-231,-254,-193},{-319,-265,-336,-316,-236,-334},{-336,-282,-291,-370,-350,-216},{-198,-279,-291,-218,-270,-332},{-327,-389,-168,-373,-368,-350},{-324,-236,-342,-302,-310,-332},{-342,-311,-308,-237,-233,-280},{-330,-207,-252,-166,-244,-167},{-407,-282,-176,-166,-313,-337},{-277,-242,-311,-370,-273,-185},{-215,-285,-339,-324,-167,-154},{-304,-331,-300,-267,-326,-244},{-198,-228,-286,-190,-246,-180},{-206,-202,-330,-381,-294,-159},{-192,-225,-389,-204,-339,-239},{-263,-274,-260,-332,-273,-198},{-218,-236,-384,-180,-337,-332}}},{{{-113,-100,-78,-156,-104,-137},{-80,-91,-112,-158,-146,-124},{-117,-104,-130,-164,-88,-141},{-88,-148,-139,-116,-84,-110},{-76,-137,-136,-160,-115,-169},{-79,-144,-97,-137,-84,-143},{-89,-123,-118,-85,-139,-92},{-119,-71,-116,-164,-99,-118},{-120,-101,-103,-96,-109,-99},{-72,-121,-130,-130,-116,-77},{-119,-136,-103,-164,-159,-166},{-126,-123,-115,-112,-78,-92},{-114,-64,-149,-160,-120,-111},{-112,-145,-116,-102,-127,-104},{-140,-104,-99,-108,-99,-165},{-123,-66,-75,-154,-88,-161},{-147,-74,-68,-80,-162,-113},{-111,-65,-148,-112,-89,-131},{-135,-92,-84,-71,-77,-92},{-118,-147,-82,-128,-129,-132}},{{-126,-131,-112,-93,-124,-155},{-169,-137,-195,-144,-193,-160},{-120,-135,-179,-118,-192,-227},{-97,-166,-135,-143,-203,-136},{-167,-118,-96,-150,-172,-134},{-146,-185,-175,-101,-214,-234},{-117,-110,-198,-132,-206,-138},{-105,-171,-191,-191,-224,-171},{-101,-175,-102,-147,-166,-173},{-135,-158,-206,-135,-214,-106},{-185,-195,-101,-206,-222,-131},{-88,-179,-201,-208,-164,-185},{-115,-176,-126,-215,-153,-168},{-104,-111,-178,-178,-155,-176},{-171,-195,-135,-208,-118,-190},{-182,-89,-155,-118,-148,-133},{-134,-125,-160,-153,-182,-139},{-166,-158,-189,-105,-118,-180},{-100,-89,-112,-110,-171,-232},{-180,-186,-201,-108,-126,-222}},{{-186,-139,-119,-160,-247,-139},{-245,-211,-255,-190,-218,-119},{-220,-115,-184,-217,-165,-249},{-217,-180,-180,-148,-245,-242},{-245,-160,-197,-213,-263,-220},{-170,-191,-113,-217,-118,-222},{-186,-250,-218,-182,-171,-164},{-205,-169,-223,-186,-218,-162},{-159,-160,-229,-160,-220,-234},{-172,-247,-205,-122,-220,-204},{-196,-248,-182,-122,-178,-271},{-208,-236,-115,-224,-241,-192},{-145,-158,-195,-160,-218,-137},{-107,-178,-234,-194,-123,-218},{-175,-220,-212,-148,-231,-176},{-187,-229,-160,-137,-253,-178},{-126,-239,-167,-249,-261,-131},{-161,-182,-143,-162,-272,-277},{-170,-245,-229,-175,-129,-230},{-228,-221,-244,-211,-186,-186}}},{{{-266,-278,-217,-159,-167,-236},{-319,-271,-314,-324,-219,-226},{-245,-202,-209,-167,-314,-190},{-277,-181,-245,-321,-290,-231},{-184,-240,-207,-314,-162,-202},{-163,-293,-224,-317,-159,-319},{-149,-245,-264,-274,-145,-155},{-154,-150,-150,-269,-195,-238},{-303,-319,-300,-281,-171,-167},{-179,-190,-250,-174,-309,-293},{-235,-245,-178,-183,-200,-159},{-252,-255,-181,-190,-167,-300},{-315,-248,-300,-152,-328,-193},{-263,-250,-200,-195,-209,-159},{-224,-257,-205,-226,-328,-198},{-242,-300,-224,-159,-248,-333},{-186,-309,-333,-219,-286,-314},{-175,-240,-324,-178,-155,-271},{-161,-209,-288,-176,-162,-257},{-259,-202,-302,-267,-328,-143}},{{-331,-219,-275,-266,-142,-232},{-321,-205,-160,-173,-163,-177},{-157,-155,-233,-171,-253,-228},{-214,-233,-296,-266,-276,-287},{-236,-267,-141,-143,-221,-168},{-228,-209,-256,-146,-271,-270},{-269,-212,-195,-196,-273,-294},{-238,-198,-277,-316,-273,-243},{-307,-312,-258,-217,-312,-309},{-214,-307,-226,-247,-262,-236},{-240,-233,-167,-263,-165,-137},{-224,-281,-183,-162,-183,-265},{-150,-205,-216,-319,-138,-281},{-217,-176,-174,-171,-165,-254},{-224,-259,-226,-173,-208,-150},{-288,-152,-263,-185,-170,-133},{-278,-274,-230,-187,-240,-135},{-240,-328,-277,-231,-237,-148},{-193,-269,-329,-303,-276,-168},{-257,-219,-204,-146,-267,-217}},{{-176,-270,-273,-252,-142,-209},{-288,-224,-230,-234,-198,-175},{-280,-219,-226,-230,-230,-252},{-264,-213,-257,-238,-129,-146},{-275,-293,-206,-160,-183,-223},{-142,-182,-271,-140,-243,-230},{-247,-173,-143,-127,-219,-243},{-295,-291,-152,-142,-213,-178},{-170,-150,-178,-209,-159,-133},{-135,-180,-135,-187,-209,-232},{-245,-245,-238,-193,-200,-153},{-275,-188,-210,-207,-148,-184},{-187,-194,-273,-255,-161,-121},{-209,-186,-137,-232,-155,-128},{-228,-288,-131,-131,-260,-115},{-234,-163,-267,-230,-161,-176},{-301,-182,-182,-117,-131,-153},{-252,-286,-238,-222,-138,-221},{-295,-153,-232,-197,-118,-207},{-213,-180,-164,-133,-252,-139}}},{{{-364,-293,-311,-261,-229,-325},{-162,-213,-279,-263,-274,-237},{-269,-205,-364,-178,-325,-279},{-327,-343,-184,-293,-330,-200},{-194,-282,-354,-231,-168,-293},{-295,-306,-319,-340,-322,-160},{-340,-367,-372,-282,-359,-332},{-162,-234,-343,-271,-359,-306},{-370,-298,-290,-218,-165,-194},{-314,-285,-263,-247,-277,-162},{-245,-234,-223,-231,-287,-176},{-351,-234,-247,-271,-255,-317},{-356,-338,-263,-322,-215,-298},{-255,-362,-348,-367,-213,-293},{-282,-258,-247,-290,-285,-335},{-348,-370,-348,-261,-343,-165},{-351,-247,-186,-340,-247,-205},{-364,-207,-277,-338,-202,-173},{-287,-314,-340,-234,-162,-277},{-351,-215,-348,-325,-263,-242}},{{-173,-200,-189,-215,-189,-256},{-218,-162,-247,-319,-275,-264},{-285,-367,-279,-213,-333,-311},{-314,-258,-279,-226,-338,-194},{-271,-234,-242,-327,-252,-313},{-351,-258,-359,-170,-307,-300},{-168,-356,-210,-181,-301,-259},{-317,-165,-346,-229,-252,-192},{-367,-173,-346,-290,-317,-259},{-370,-263,-162,-282,-322,-233},{-277,-165,-205,-338,-283,-171},{-298,-327,-356,-165,-176,-293},{-322,-311,-226,-351,-215,-303},{-170,-250,-287,-266,-270,-262},{-354,-367,-186,-330,-259,-316},{-285,-325,-184,-311,-312,-215},{-285,-210,-317,-340,-199,-176},{-364,-218,-229,-319,-267,-363},{-322,-242,-178,-330,-178,-326},{-207,-160,-354,-255,-312,-350}},{{-199,-329,-176,-303,-309,-147},{-168,-354,-343,-221,-196,-188},{-161,-245,-330,-345,-311,-152},{-311,-177,-287,-303,-233,-241},{-184,-213,-340,-188,-216,-157},{-339,-218,-212,-243,-314,-248},{-344,-157,-272,-243,-154,-251},{-236,-187,-151,-270,-262,-296},{-269,-190,-184,-231,-198,-229},{-181,-253,-282,-322,-272,-333},{-194,-304,-189,-184,-331,-289},{-269,-207,-338,-181,-296,-289},{-287,-223,-307,-213,-316,-152},{-176,-261,-189,-322,-152,-316},{-344,-172,-295,-340,-174,-243},{-192,-349,-252,-176,-174,-224},{-269,-180,-338,-300,-211,-270},{-168,-202,-340,-340,-213,-171},{-313,-180,-179,-193,-274,-190},{-308,-202,-277,-298,-228,-251}}},{{{-226,-262,-322,-253,-304,-260},{-421,-274,-217,-379,-370,-234},{-352,-214,-265,-238,-391,-222},{-358,-298,-217,-247,-319,-225},{-394,-340,-253,-331,-394,-243},{-340,-355,-247,-262,-232,-207},{-421,-337,-310,-367,-355,-258},{-343,-307,-199,-277,-385,-252},{-259,-421,-373,-202,-397,-411},{-187,-205,-394,-346,-202,-299},{-415,-190,-355,-301,-361,-178},{-241,-406,-400,-310,-223,-219},{-316,-202,-232,-259,-379,-296},{-370,-226,-412,-253,-334,-403},{-307,-238,-214,-367,-406,-334},{-403,-289,-313,-322,-367,-293},{-292,-283,-271,-298,-379,-334},{-304,-415,-223,-376,-253,-414},{-256,-370,-397,-340,-298,-302},{-211,-394,-241,-397,-346,-249}},{{-185,-324,-168,-164,-260,-267},{-390,-210,-190,-284,-220,-170},{-393,-187,-244,-254,-294,-283},{-188,-187,-227,-333,-278,-175},{-205,-296,-244,-317,-297,-203},{-278,-175,-314,-341,-337,-242},{-375,-264,-277,-360,-281,-167},{-305,-339,-272,-227,-231,-301},{-240,-276,-227,-224,-199,-334},{-196,-281,-364,-314,-204,-216},{-334,-387,-241,-246,-238,-162},{-396,-390,-302,-257,-281,-267},{-185,-293,-342,-314,-178,-175},{-316,-310,-249,-322,-268,-164},{-275,-290,-392,-246,-254,-290},{-410,-387,-202,-167,-199,-164},{-387,-244,-255,-180,-289,-164},{-202,-215,-235,-382,-278,-260},{-334,-270,-202,-205,-305,-339},{-196,-261,-272,-341,-297,-236}},{{-231,-259,-199,-245,-206,-127},{-191,-283,-247,-194,-184,-186},{-253,-298,-291,-303,-250,-200},{-186,-238,-160,-159,-227,-273},{-253,-163,-149,-276,-163,-168},{-156,-158,-266,-186,-265,-277},{-221,-298,-188,-206,-180,-170},{-300,-300,-211,-234,-218,-222},{-308,-223,-192,-197,-178,-208},{-300,-310,-305,-263,-261,-283},{-327,-242,-227,-183,-267,-131},{-193,-324,-316,-298,-184,-178},{-238,-149,-140,-161,-250,-137},{-188,-230,-192,-194,-257,-194},{-243,-266,-263,-137,-127,-267},{-275,-216,-238,-225,-182,-131},{-213,-290,-236,-179,-297,-121},{-174,-257,-240,-298,-276,-200},{-221,-266,-273,-159,-229,-188},{-308,-322,-160,-214,-233,-166}}},{{{-287,-483,-284,-248,-224,-326},{-389,-312,-262,-444,-228,-392},{-315,-413,-455,-385,-354,-287},{-312,-469,-248,-448,-441,-256},{-476,-448,-228,-487,-424,-444},{-326,-399,-402,-420,-360,-343},{-490,-301,-315,-402,-424,-248},{-483,-462,-420,-256,-294,-259},{-220,-360,-402,-336,-228,-480},{-483,-364,-332,-228,-312,-441},{-241,-382,-483,-452,-343,-389},{-354,-452,-276,-374,-228,-368},{-332,-304,-312,-280,-262,-315},{-444,-441,-329,-427,-371,-385},{-214,-357,-301,-438,-248,-357},{-458,-241,-245,-329,-438,-469},{-357,-434,-284,-452,-444,-350},{-476,-385,-448,-262,-420,-402},{-234,-392,-402,-290,-322,-318},{-210,-382,-434,-399,-490,-434}},{{-244,-432,-210,-311,-453,-332},{-400,-223,-247,-220,-380,-267},{-320,-233,-471,-274,-312,-390},{-459,-439,-359,-431,-272,-264},{-425,-247,-275,-217,-446,-264},{-275,-463,-295,-281,-200,-377},{-484,-367,-349,-244,-272,-399},{-313,-463,-373,-334,-325,-203},{-320,-278,-322,-224,-285,-225},{-240,-384,-332,-454,-213,-242},{-470,-470,-227,-271,-279,-367},{-271,-391,-400,-351,-266,-319},{-438,-432,-210,-220,-417,-335},{-254,-432,-376,-411,-420,-254},{-351,-322,-264,-428,-259,-229},{-432,-336,-376,-424,-331,-219},{-216,-415,-210,-451,-394,-351},{-282,-432,-244,-387,-344,-441},{-397,-391,-234,-394,-197,-409},{-310,-463,-349,-237,-407,-422}},{{-224,-431,-384,-316,-356,-203},{-315,-400,-351,-355,-373,-359},{-432,-388,-252,-346,-362,-359},{-381,-422,-282,-375,-228,-195},{-284,-410,-237,-264,-254,-361},{-274,-209,-384,-355,-171,-286},{-372,-311,-342,-261,-385,-300},{-337,-262,-213,-211,-248,-353},{-208,-246,-207,-176,-319,-373},{-350,-191,-279,-275,-191,-228},{-356,-262,-183,-410,-259,-170},{-438,-268,-384,-314,-379,-289},{-365,-354,-396,-357,-231,-203},{-312,-194,-411,-234,-382,-211},{-334,-373,-285,-196,-214,-345},{-435,-373,-216,-384,-256,-370},{-365,-422,-342,-211,-322,-228},{-277,-416,-411,-182,-256,-261},{-435,-326,-336,-290,-282,-167},{-236,-185,-330,-278,-302,-367}}}}; // 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]={6,3,2,6,3,3,6,3,2,8,4,3,7,4,3,7,4,3,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,5,3,8,4,3,7,4,3,7,4,3,8,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,1,5,9,2,8,2,4,6,8,10,12,1,5,9,0,6,12,2,4,6,8,10,12,2,6,10,1,7,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,0,4,8,12,1,7,13,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,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,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,16,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,2,6,10,14,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,6,10,14,7,13,7,9,11,13,15,17,6,10,14,5,11,17,7,9,11,13,15,17,7,11,15,6,12,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,4,6,8,10,12,14,16,3,7,11,15,4,10,16,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,4,8,12,16,2,8,14,4,6,8,10,12,14,16,3,7,11,15,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,4,8,12,16,4,10,16,2,4,6,8,10,12,14,16,4,8,12,16,3,9,15,4,6,8,10,12,14,16,2,6,10,14,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,4,6,8,10,12,14,16,2,6,10,14,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,3,7,11,15,4,10,16,5,7,9,11,13,15,17,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,4,6,8,10,12,14,16,5,9,13,17,4,10,16}; // set of end times of each shipment 
