int Dev = 20;// Deviation
extern const int CNN = 5;// 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 = 349;//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]={{{{12132,0,0,0,0,0},{12737,0,0,0,0,0},{12319,0,0,0,0,0},{12303,0,0,0,0,0},{12054,0,0,0,0,0},{12842,0,0,0,0,0},{12453,0,0,0,0,0},{11952,0,0,0,0,0},{12367,0,0,0,0,0},{12392,0,0,0,0,0},{12667,0,0,0,0,0},{12140,0,0,0,0,0},{12658,0,0,0,0,0},{11992,0,0,0,0,0},{12324,0,0,0,0,0},{12514,0,0,0,0,0},{12218,0,0,0,0,0},{12878,0,0,0,0,0},{12243,0,0,0,0,0},{12275,0,0,0,0,0}},{{12665,0,0,0,0,0},{12301,0,0,0,0,0},{12119,0,0,0,0,0},{12457,0,0,0,0,0},{12339,0,0,0,0,0},{12402,0,0,0,0,0},{12115,0,0,0,0,0},{12515,0,0,0,0,0},{12455,0,0,0,0,0},{12290,0,0,0,0,0},{12415,0,0,0,0,0},{12241,0,0,0,0,0},{12076,0,0,0,0,0},{12492,0,0,0,0,0},{12292,0,0,0,0,0},{12363,0,0,0,0,0},{12439,0,0,0,0,0},{12032,0,0,0,0,0},{12583,0,0,0,0,0},{12514,0,0,0,0,0}},{{11519,0,0,0,0,0},{11767,0,0,0,0,0},{11961,0,0,0,0,0},{11761,0,0,0,0,0},{11351,0,0,0,0,0},{11166,0,0,0,0,0},{11465,0,0,0,0,0},{11083,0,0,0,0,0},{11354,0,0,0,0,0},{11747,0,0,0,0,0},{11515,0,0,0,0,0},{11675,0,0,0,0,0},{11340,0,0,0,0,0},{11489,0,0,0,0,0},{11305,0,0,0,0,0},{11648,0,0,0,0,0},{11767,0,0,0,0,0},{11631,0,0,0,0,0},{11864,0,0,0,0,0},{11153,0,0,0,0,0}}},{{{-303,-291,-347,-344,-285,-341},{-320,-335,-320,-279,-344,-270},{-288,-244,-332,-273,-244,-241},{-318,-332,-329,-285,-303,-262},{-291,-273,-268,-241,-268,-238},{-306,-347,-320,-270,-279,-350},{-262,-347,-268,-285,-294,-273},{-238,-250,-256,-285,-253,-291},{-306,-315,-244,-294,-268,-273},{-332,-338,-250,-320,-259,-259},{-309,-297,-297,-244,-353,-282},{-332,-303,-259,-297,-253,-241},{-268,-350,-353,-247,-306,-306},{-326,-235,-268,-350,-247,-297},{-247,-320,-344,-276,-320,-265},{-270,-344,-315,-291,-288,-309},{-300,-300,-309,-273,-276,-276},{-282,-323,-332,-297,-320,-353},{-323,-265,-235,-312,-265,-282},{-265,-320,-273,-250,-279,-323}},{{-348,-295,-258,-274,-235,-272},{-261,-246,-277,-326,-230,-251},{-255,-272,-232,-288,-267,-243},{-276,-237,-274,-244,-315,-256},{-342,-329,-258,-274,-315,-249},{-273,-232,-235,-312,-254,-280},{-261,-297,-260,-260,-283,-225},{-334,-229,-311,-236,-214,-308},{-325,-340,-316,-269,-224,-300},{-319,-232,-269,-225,-214,-259},{-255,-329,-227,-318,-310,-238},{-328,-237,-286,-279,-291,-215},{-261,-246,-297,-282,-248,-223},{-310,-289,-300,-244,-318,-215},{-261,-306,-314,-255,-312,-249},{-249,-269,-224,-247,-296,-251},{-278,-255,-288,-293,-238,-238},{-258,-237,-258,-236,-286,-282},{-258,-337,-244,-304,-294,-251},{-325,-343,-314,-233,-320,-243}},{{-212,-276,-249,-260,-255,-200},{-240,-220,-277,-217,-214,-165},{-255,-240,-273,-193,-197,-179},{-285,-249,-233,-226,-240,-233},{-208,-206,-198,-184,-227,-177},{-240,-240,-233,-204,-195,-214},{-248,-235,-200,-224,-257,-220},{-232,-247,-252,-184,-182,-187},{-280,-208,-186,-253,-173,-245},{-255,-247,-231,-249,-173,-192},{-225,-261,-189,-181,-182,-231},{-288,-194,-263,-186,-218,-235},{-288,-196,-266,-184,-171,-179},{-288,-225,-203,-231,-186,-187},{-202,-281,-270,-231,-223,-220},{-235,-288,-261,-211,-193,-235},{-232,-249,-259,-204,-180,-245},{-258,-283,-196,-242,-184,-220},{-295,-252,-273,-255,-212,-192},{-262,-269,-193,-253,-180,-198}}},{{{-158,-145,-145,-165,-219,-227},{-186,-154,-196,-183,-204,-185},{-183,-155,-205,-199,-199,-155},{-181,-147,-152,-152,-175,-159},{-180,-171,-173,-195,-171,-223},{-136,-196,-208,-181,-193,-227},{-151,-150,-168,-209,-180,-201},{-197,-183,-184,-147,-173,-176},{-173,-169,-161,-145,-169,-157},{-151,-140,-208,-170,-213,-160},{-136,-167,-156,-184,-204,-212},{-195,-189,-191,-150,-151,-153},{-188,-191,-178,-152,-221,-222},{-144,-142,-170,-165,-206,-199},{-156,-137,-172,-152,-175,-227},{-136,-176,-182,-166,-184,-185},{-141,-139,-142,-186,-215,-193},{-202,-186,-163,-215,-178,-160},{-188,-144,-140,-163,-191,-159},{-139,-179,-175,-193,-160,-197}},{{-232,-236,-224,-248,-245,-198},{-220,-168,-213,-192,-240,-286},{-190,-172,-219,-183,-197,-228},{-182,-197,-200,-197,-188,-281},{-210,-180,-236,-234,-250,-190},{-178,-168,-200,-177,-206,-267},{-188,-187,-187,-261,-197,-267},{-220,-176,-177,-192,-220,-271},{-214,-226,-243,-228,-238,-259},{-216,-217,-177,-201,-206,-209},{-214,-207,-253,-243,-227,-200},{-212,-178,-170,-245,-240,-205},{-190,-180,-234,-199,-238,-195},{-196,-226,-224,-228,-208,-236},{-220,-189,-207,-265,-252,-209},{-210,-197,-230,-228,-224,-200},{-224,-242,-175,-263,-268,-271},{-164,-195,-173,-177,-215,-257},{-166,-205,-232,-201,-208,-219},{-206,-182,-200,-236,-222,-283}},{{-282,-303,-225,-284,-224,-243},{-232,-212,-291,-297,-252,-337},{-274,-286,-252,-267,-299,-289},{-289,-273,-241,-273,-269,-303},{-237,-278,-278,-316,-321,-226},{-198,-217,-249,-251,-235,-331},{-220,-237,-267,-238,-230,-275},{-203,-252,-291,-230,-249,-241},{-205,-219,-278,-289,-263,-226},{-264,-273,-286,-324,-224,-260},{-230,-217,-262,-219,-330,-232},{-247,-240,-217,-324,-247,-286},{-287,-270,-231,-286,-235,-246},{-272,-270,-215,-256,-244,-258},{-217,-224,-244,-267,-302,-277},{-272,-207,-210,-227,-230,-269},{-242,-230,-299,-324,-252,-275},{-203,-224,-252,-265,-319,-241},{-207,-217,-288,-292,-274,-311},{-207,-283,-252,-308,-269,-311}}},{{{-313,-313,-303,-276,-368,-286},{-263,-388,-349,-388,-332,-339},{-263,-365,-345,-296,-280,-319},{-313,-283,-283,-362,-316,-293},{-290,-283,-319,-322,-352,-378},{-342,-362,-352,-316,-322,-273},{-365,-332,-332,-355,-378,-339},{-303,-375,-365,-332,-270,-362},{-276,-316,-372,-299,-329,-395},{-283,-326,-286,-329,-303,-355},{-270,-329,-392,-342,-359,-332},{-273,-263,-342,-270,-263,-345},{-372,-270,-280,-362,-329,-313},{-395,-290,-276,-306,-313,-309},{-280,-355,-336,-355,-266,-359},{-283,-395,-273,-309,-355,-313},{-266,-336,-286,-378,-329,-388},{-382,-392,-273,-283,-349,-359},{-313,-359,-299,-375,-385,-303},{-313,-266,-276,-378,-263,-290}},{{-318,-374,-341,-301,-305,-265},{-351,-322,-373,-333,-271,-340},{-361,-338,-370,-254,-271,-331},{-358,-325,-367,-349,-367,-298},{-295,-306,-351,-251,-357,-304},{-367,-293,-332,-371,-348,-337},{-289,-270,-303,-270,-286,-268},{-374,-312,-354,-270,-363,-322},{-285,-357,-268,-355,-305,-331},{-390,-287,-293,-320,-348,-307},{-371,-377,-290,-367,-249,-250},{-321,-274,-360,-276,-360,-271},{-318,-316,-322,-355,-299,-256},{-302,-270,-271,-355,-363,-289},{-351,-351,-373,-339,-280,-340},{-341,-261,-341,-308,-326,-358},{-315,-332,-265,-292,-249,-244},{-358,-270,-258,-305,-293,-349},{-371,-383,-300,-349,-363,-247},{-358,-270,-367,-352,-308,-325}},{{-242,-288,-238,-242,-236,-216},{-351,-317,-258,-245,-257,-306},{-339,-343,-252,-288,-273,-234},{-327,-328,-328,-237,-268,-231},{-260,-239,-294,-248,-260,-285},{-242,-256,-280,-299,-307,-206},{-268,-334,-333,-280,-268,-280},{-322,-251,-235,-245,-254,-254},{-333,-245,-280,-299,-228,-229},{-336,-340,-238,-321,-252,-283},{-245,-259,-328,-242,-276,-224},{-324,-279,-330,-253,-254,-234},{-327,-259,-322,-223,-217,-221},{-251,-259,-244,-307,-223,-290},{-251,-334,-241,-305,-249,-272},{-327,-268,-263,-269,-220,-257},{-345,-294,-244,-277,-252,-234},{-304,-282,-272,-307,-294,-285},{-348,-317,-249,-299,-217,-285},{-307,-323,-286,-256,-220,-249}}},{{{-123,-120,-93,-95,-98,-137},{-116,-112,-131,-137,-102,-102},{-94,-105,-105,-106,-144,-133},{-113,-108,-133,-124,-107,-119},{-126,-85,-103,-113,-145,-108},{-110,-120,-114,-136,-145,-129},{-117,-93,-99,-126,-101,-134},{-101,-107,-121,-96,-115,-104},{-94,-125,-93,-109,-133,-115},{-86,-120,-132,-132,-132,-125},{-126,-122,-113,-112,-137,-124},{-116,-122,-129,-125,-124,-116},{-87,-114,-90,-128,-146,-116},{-100,-87,-115,-137,-101,-108},{-103,-102,-94,-119,-99,-140},{-94,-87,-128,-115,-128,-108},{-87,-123,-120,-106,-122,-125},{-103,-88,-94,-95,-117,-136},{-112,-102,-121,-123,-109,-138},{-92,-114,-120,-136,-124,-133}},{{-128,-169,-121,-152,-159,-170},{-130,-127,-151,-133,-156,-181},{-146,-149,-149,-164,-193,-155},{-115,-135,-129,-164,-184,-197},{-136,-125,-151,-161,-193,-165},{-122,-130,-175,-141,-175,-143},{-131,-131,-130,-178,-163,-141},{-112,-118,-126,-144,-156,-161},{-112,-161,-141,-149,-140,-141},{-144,-169,-141,-149,-180,-150},{-142,-154,-142,-164,-184,-151},{-146,-144,-155,-178,-147,-160},{-120,-117,-148,-138,-161,-155},{-128,-152,-175,-169,-172,-188},{-146,-157,-129,-146,-143,-168},{-108,-135,-172,-177,-167,-151},{-148,-152,-172,-146,-150,-151},{-111,-161,-163,-152,-180,-144},{-153,-125,-142,-153,-158,-186},{-135,-161,-127,-153,-142,-198}},{{-164,-212,-154,-207,-159,-218},{-168,-203,-167,-180,-165,-208},{-193,-148,-219,-182,-233,-214},{-203,-166,-158,-203,-161,-194},{-203,-153,-186,-182,-204,-202},{-196,-189,-192,-175,-227,-220},{-208,-194,-171,-218,-218,-168},{-163,-164,-199,-209,-196,-172},{-140,-148,-201,-173,-184,-202},{-161,-158,-182,-200,-180,-220},{-182,-180,-186,-200,-196,-208},{-210,-211,-208,-162,-218,-238},{-156,-155,-166,-162,-182,-166},{-161,-212,-193,-188,-171,-226},{-149,-167,-184,-217,-182,-164},{-180,-189,-210,-213,-184,-218},{-166,-196,-201,-188,-190,-186},{-175,-212,-205,-203,-190,-232},{-150,-176,-158,-158,-229,-214},{-189,-193,-156,-182,-174,-222}}},{{{-200,-250,-193,-209,-238,-248},{-226,-214,-226,-278,-250,-224},{-268,-238,-240,-233,-274,-278},{-240,-250,-200,-202,-245,-226},{-210,-262,-238,-236,-281,-240},{-266,-262,-276,-267,-262,-286},{-273,-193,-269,-240,-224,-255},{-219,-202,-228,-240,-221,-250},{-249,-276,-195,-252,-238,-224},{-252,-259,-264,-252,-264,-264},{-189,-214,-219,-224,-274,-238},{-249,-252,-231,-233,-245,-259},{-270,-228,-214,-255,-252,-219},{-186,-207,-252,-278,-255,-219},{-212,-198,-236,-262,-240,-248},{-256,-255,-245,-224,-205,-252},{-256,-207,-233,-214,-224,-276},{-200,-248,-259,-257,-269,-286},{-228,-283,-200,-198,-214,-264},{-261,-195,-231,-276,-269,-248}},{{-195,-255,-266,-275,-240,-219},{-219,-190,-207,-240,-208,-181},{-267,-267,-268,-233,-197,-214},{-262,-264,-209,-249,-221,-197},{-224,-190,-277,-213,-215,-228},{-198,-278,-221,-229,-249,-201},{-233,-202,-258,-222,-192,-265},{-236,-259,-202,-254,-269,-210},{-283,-207,-226,-203,-201,-206},{-212,-226,-251,-243,-228,-228},{-233,-226,-251,-229,-271,-199},{-274,-198,-190,-217,-221,-225},{-248,-221,-209,-270,-262,-212},{-269,-262,-226,-259,-255,-228},{-193,-198,-204,-226,-203,-201},{-207,-221,-268,-275,-260,-186},{-231,-278,-261,-208,-267,-219},{-264,-226,-204,-268,-194,-208},{-286,-214,-240,-245,-246,-179},{-195,-207,-240,-203,-226,-256}},{{-196,-205,-214,-160,-161,-173},{-206,-188,-176,-228,-215,-216},{-232,-203,-238,-211,-191,-196},{-209,-238,-236,-179,-176,-151},{-219,-205,-234,-176,-183,-178},{-185,-192,-194,-187,-150,-158},{-176,-240,-180,-224,-219,-214},{-198,-207,-174,-222,-176,-158},{-213,-213,-232,-201,-215,-193},{-213,-201,-208,-166,-172,-173},{-215,-247,-190,-170,-211,-185},{-209,-226,-220,-181,-196,-180},{-191,-203,-196,-195,-221,-169},{-217,-224,-228,-203,-189,-178},{-174,-169,-200,-187,-206,-166},{-219,-238,-230,-158,-208,-180},{-256,-217,-214,-207,-198,-157},{-172,-234,-208,-222,-155,-202},{-249,-247,-184,-179,-217,-157},{-204,-238,-188,-156,-196,-216}}},{{{-247,-250,-255,-234,-229,-290},{-319,-253,-319,-279,-261,-263},{-242,-247,-303,-279,-266,-293},{-311,-295,-218,-298,-314,-266},{-295,-266,-229,-218,-271,-213},{-242,-293,-301,-301,-295,-237},{-231,-263,-247,-274,-314,-250},{-266,-229,-282,-221,-242,-213},{-271,-274,-309,-223,-231,-263},{-223,-239,-295,-298,-237,-298},{-253,-293,-274,-309,-245,-258},{-239,-317,-269,-242,-221,-271},{-218,-314,-269,-309,-215,-293},{-303,-261,-271,-250,-317,-295},{-301,-269,-295,-306,-226,-290},{-314,-237,-239,-239,-237,-245},{-223,-231,-266,-266,-234,-237},{-255,-282,-234,-303,-295,-271},{-279,-282,-311,-314,-242,-221},{-218,-287,-226,-311,-319,-274}},{{-311,-250,-253,-255,-225,-272},{-247,-213,-247,-226,-312,-282},{-319,-218,-226,-247,-265,-254},{-221,-282,-215,-261,-299,-259},{-218,-247,-306,-261,-215,-300},{-303,-229,-306,-247,-220,-308},{-258,-231,-303,-298,-252,-277},{-311,-242,-274,-242,-254,-298},{-239,-274,-255,-215,-296,-300},{-298,-306,-229,-263,-236,-290},{-258,-301,-311,-226,-286,-218},{-263,-229,-231,-282,-246,-225},{-295,-295,-290,-242,-278,-215},{-218,-293,-311,-269,-283,-228},{-293,-266,-314,-293,-249,-277},{-309,-279,-279,-277,-241,-246},{-274,-306,-250,-261,-252,-311},{-255,-271,-229,-298,-296,-231},{-218,-309,-271,-311,-241,-256},{-269,-271,-263,-306,-280,-287}},{{-311,-304,-302,-241,-240,-251},{-215,-256,-277,-285,-292,-289},{-210,-283,-290,-223,-247,-277},{-241,-261,-257,-285,-262,-200},{-267,-261,-300,-231,-262,-251},{-275,-256,-265,-201,-196,-265},{-233,-261,-202,-248,-216,-227},{-251,-291,-244,-280,-277,-236},{-259,-228,-282,-201,-238,-263},{-210,-281,-244,-280,-255,-246},{-272,-245,-267,-206,-262,-270},{-254,-299,-282,-263,-292,-229},{-311,-235,-242,-258,-274,-227},{-293,-266,-204,-253,-223,-260},{-236,-238,-229,-233,-294,-265},{-249,-288,-285,-206,-287,-241},{-303,-248,-209,-236,-201,-207},{-306,-304,-239,-288,-277,-229},{-223,-304,-237,-295,-270,-239},{-231,-205,-202,-203,-201,-277}}},{{{-268,-328,-247,-334,-259,-287},{-313,-340,-268,-301,-298,-252},{-253,-253,-340,-244,-325,-326},{-316,-337,-319,-358,-262,-299},{-244,-253,-361,-331,-256,-272},{-331,-334,-343,-277,-253,-287},{-295,-283,-322,-244,-349,-323},{-298,-295,-268,-352,-268,-320},{-283,-310,-265,-301,-304,-355},{-316,-244,-298,-322,-247,-308},{-310,-262,-268,-277,-286,-349},{-301,-328,-331,-268,-292,-352},{-271,-337,-307,-340,-319,-255},{-295,-259,-319,-295,-268,-269},{-268,-349,-304,-283,-286,-326},{-289,-241,-361,-307,-361,-352},{-337,-358,-289,-244,-301,-337},{-301,-343,-346,-244,-316,-352},{-322,-301,-265,-271,-268,-275},{-325,-295,-304,-283,-274,-343}},{{-340,-298,-325,-262,-257,-308},{-302,-304,-255,-238,-310,-254},{-284,-230,-249,-238,-268,-224},{-293,-307,-232,-303,-228,-290},{-267,-324,-280,-254,-292,-213},{-272,-307,-297,-268,-249,-303},{-246,-313,-244,-306,-318,-298},{-343,-304,-325,-268,-278,-257},{-252,-307,-269,-240,-313,-213},{-299,-232,-260,-287,-252,-262},{-316,-298,-288,-251,-244,-254},{-331,-324,-272,-276,-276,-293},{-302,-230,-272,-273,-270,-298},{-243,-313,-328,-227,-292,-234},{-258,-296,-235,-243,-223,-262},{-234,-244,-241,-287,-307,-262},{-319,-230,-260,-246,-265,-285},{-246,-273,-244,-270,-233,-303},{-264,-278,-238,-265,-276,-296},{-284,-244,-274,-251,-257,-229}},{{-231,-245,-222,-212,-223,-196},{-208,-199,-240,-179,-214,-198},{-238,-240,-256,-214,-246,-178},{-243,-252,-208,-230,-252,-198},{-285,-226,-222,-221,-180,-164},{-263,-199,-202,-212,-246,-202},{-280,-204,-236,-225,-195,-180},{-258,-228,-250,-194,-223,-190},{-236,-242,-250,-192,-229,-202},{-263,-286,-238,-183,-184,-176},{-285,-202,-213,-219,-227,-242},{-238,-250,-208,-221,-187,-170},{-201,-194,-263,-236,-231,-176},{-288,-199,-195,-241,-244,-208},{-211,-286,-199,-243,-180,-206},{-248,-278,-268,-254,-193,-212},{-280,-218,-192,-212,-204,-234},{-213,-228,-199,-256,-244,-192},{-208,-281,-215,-254,-210,-186},{-226,-197,-270,-214,-184,-182}}},{{{-332,-346,-304,-389,-332,-368},{-301,-304,-406,-399,-298,-410},{-315,-389,-332,-332,-416,-360},{-329,-402,-308,-336,-301,-322},{-360,-343,-315,-298,-389,-357},{-315,-395,-284,-368,-343,-290},{-354,-312,-364,-357,-301,-357},{-371,-350,-318,-371,-318,-326},{-329,-385,-312,-410,-410,-368},{-374,-413,-326,-350,-350,-290},{-416,-399,-395,-364,-357,-395},{-308,-371,-368,-343,-354,-294},{-371,-312,-318,-368,-413,-402},{-368,-332,-298,-304,-304,-301},{-395,-336,-360,-350,-287,-298},{-340,-354,-329,-420,-368,-410},{-318,-315,-318,-368,-340,-410},{-392,-371,-368,-332,-298,-374},{-332,-350,-280,-420,-304,-413},{-364,-360,-368,-332,-374,-280}},{{-320,-388,-315,-351,-272,-345},{-355,-388,-319,-311,-380,-335},{-331,-377,-400,-267,-321,-328},{-404,-364,-305,-297,-315,-345},{-310,-292,-319,-307,-390,-335},{-404,-367,-281,-377,-282,-290},{-355,-322,-383,-274,-358,-274},{-393,-405,-302,-287,-341,-261},{-414,-292,-386,-271,-321,-345},{-334,-360,-319,-367,-387,-299},{-358,-298,-407,-281,-282,-267},{-331,-288,-305,-361,-341,-364},{-331,-326,-305,-394,-266,-274},{-303,-350,-376,-324,-312,-261},{-282,-316,-305,-317,-312,-364},{-331,-319,-366,-397,-348,-309},{-348,-312,-400,-344,-367,-296},{-390,-333,-400,-274,-266,-374},{-313,-360,-373,-287,-394,-374},{-341,-333,-278,-361,-282,-374}},{{-372,-348,-324,-234,-265,-300},{-353,-363,-357,-243,-316,-275},{-302,-308,-354,-325,-282,-295},{-312,-336,-336,-255,-237,-289},{-296,-280,-324,-284,-271,-259},{-302,-299,-252,-325,-299,-245},{-340,-290,-348,-243,-248,-245},{-277,-274,-282,-287,-256,-236},{-309,-271,-273,-284,-316,-325},{-312,-326,-360,-296,-325,-300},{-378,-354,-333,-272,-259,-306},{-255,-342,-288,-267,-274,-278},{-350,-326,-261,-349,-302,-334},{-287,-323,-333,-322,-234,-317},{-261,-314,-297,-334,-279,-225},{-299,-305,-279,-352,-285,-250},{-359,-363,-297,-346,-314,-331},{-258,-277,-261,-258,-336,-225},{-343,-370,-357,-270,-234,-267},{-280,-265,-324,-290,-237,-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,2,6,3,2,7,3,2,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,9,4,3,9,5,3,9,4,3,8,4,3,8,5,3,8,5,3,8,4,3,7,4,3,8,4,3,7,4,3,7,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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,2,6,10,2,8,1,3,5,7,9,11,2,6,10,2,8,0,2,4,6,8,10,12,1,5,9,2,8,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,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,0,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,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,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,0,2,4,6,8,10,12,14,16,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,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,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,1,3,5,7,9,11,13,0,4,8,12,1,7,13,1,3,5,7,9,11,13,2,6,10,14,2,8,14,1,3,5,7,9,11,13,2,6,10,14,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,7,11,15,7,13,6,8,10,12,14,16,7,11,15,7,13,5,7,9,11,13,15,17,6,10,14,7,13,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,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,2,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,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,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,1,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,1,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,1,7,13,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,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,4,6,8,10,12,14,16,4,8,12,16,4,10,16,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,3,7,11,15,4,10,16,4,6,8,10,12,14,16,5,9,13,17,5,11,17,4,6,8,10,12,14,16,5,9,13,17,4,10,16}; // set of end times of each shipment 
