int Dev = 10;// 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 = 345;//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]={{{{12529,0,0,0,0,0},{12359,0,0,0,0,0},{12402,0,0,0,0,0},{12210,0,0,0,0,0},{12518,0,0,0,0,0},{12235,0,0,0,0,0},{12371,0,0,0,0,0},{12324,0,0,0,0,0},{12362,0,0,0,0,0},{12414,0,0,0,0,0},{12486,0,0,0,0,0},{12503,0,0,0,0,0},{12382,0,0,0,0,0},{12261,0,0,0,0,0},{12353,0,0,0,0,0},{12378,0,0,0,0,0},{12277,0,0,0,0,0},{12329,0,0,0,0,0},{12279,0,0,0,0,0},{12289,0,0,0,0,0}},{{12390,0,0,0,0,0},{12519,0,0,0,0,0},{12661,0,0,0,0,0},{12489,0,0,0,0,0},{12375,0,0,0,0,0},{12354,0,0,0,0,0},{12291,0,0,0,0,0},{12281,0,0,0,0,0},{12217,0,0,0,0,0},{12428,0,0,0,0,0},{12256,0,0,0,0,0},{12316,0,0,0,0,0},{12394,0,0,0,0,0},{12371,0,0,0,0,0},{12439,0,0,0,0,0},{12456,0,0,0,0,0},{12351,0,0,0,0,0},{12716,0,0,0,0,0},{12420,0,0,0,0,0},{12588,0,0,0,0,0}},{{11390,0,0,0,0,0},{11457,0,0,0,0,0},{11647,0,0,0,0,0},{11498,0,0,0,0,0},{11491,0,0,0,0,0},{11868,0,0,0,0,0},{11617,0,0,0,0,0},{11462,0,0,0,0,0},{11593,0,0,0,0,0},{11632,0,0,0,0,0},{11557,0,0,0,0,0},{11492,0,0,0,0,0},{11702,0,0,0,0,0},{11642,0,0,0,0,0},{11489,0,0,0,0,0},{11422,0,0,0,0,0},{11459,0,0,0,0,0},{11667,0,0,0,0,0},{11388,0,0,0,0,0},{11617,0,0,0,0,0}}},{{{-276,-318,-291,-323,-276,-276},{-285,-288,-279,-265,-288,-294},{-315,-276,-273,-288,-297,-265},{-312,-282,-318,-268,-282,-318},{-303,-315,-279,-320,-312,-312},{-303,-291,-270,-294,-306,-279},{-323,-303,-306,-300,-291,-309},{-300,-318,-320,-279,-276,-268},{-306,-265,-291,-309,-279,-300},{-273,-323,-288,-288,-306,-323},{-306,-285,-315,-288,-320,-306},{-303,-268,-285,-291,-320,-300},{-270,-309,-268,-323,-320,-288},{-315,-270,-294,-276,-303,-268},{-282,-315,-279,-285,-265,-306},{-309,-273,-320,-276,-318,-268},{-270,-312,-288,-288,-276,-300},{-312,-309,-265,-268,-273,-323},{-285,-279,-291,-315,-282,-273},{-276,-300,-279,-323,-291,-306}},{{-276,-263,-283,-285,-272,-275},{-299,-280,-269,-299,-270,-267},{-304,-306,-308,-293,-259,-262},{-261,-260,-274,-285,-286,-249},{-264,-280,-288,-269,-254,-256},{-264,-260,-260,-274,-262,-249},{-302,-266,-286,-285,-264,-238},{-270,-263,-277,-274,-262,-233},{-284,-269,-294,-263,-256,-233},{-293,-277,-308,-277,-272,-280},{-278,-260,-272,-282,-248,-269},{-270,-286,-294,-285,-256,-275},{-284,-303,-286,-282,-272,-249},{-302,-266,-283,-255,-291,-259},{-304,-315,-252,-247,-251,-282},{-299,-263,-258,-258,-259,-241},{-287,-309,-280,-288,-264,-251},{-290,-315,-272,-285,-275,-282},{-296,-306,-258,-249,-272,-280},{-299,-280,-297,-282,-272,-277}},{{-232,-254,-252,-217,-231,-212},{-250,-257,-242,-246,-210,-220},{-228,-259,-256,-237,-229,-212},{-250,-252,-245,-213,-220,-190},{-260,-232,-256,-208,-193,-210},{-275,-261,-245,-237,-218,-212},{-238,-223,-219,-206,-214,-190},{-238,-225,-247,-237,-203,-208},{-250,-252,-247,-228,-225,-216},{-225,-247,-247,-240,-231,-196},{-232,-266,-249,-242,-229,-196},{-258,-218,-226,-204,-220,-185},{-255,-240,-256,-224,-214,-208},{-260,-225,-228,-220,-216,-202},{-275,-218,-254,-204,-225,-212},{-248,-235,-238,-228,-223,-208},{-235,-225,-254,-220,-208,-198},{-275,-237,-217,-220,-214,-196},{-235,-266,-247,-244,-197,-198},{-232,-242,-221,-244,-193,-185}}},{{{-155,-161,-182,-197,-167,-204},{-183,-155,-175,-190,-186,-193},{-185,-177,-191,-197,-167,-180},{-156,-167,-175,-188,-177,-178},{-163,-186,-177,-175,-186,-181},{-165,-179,-164,-181,-175,-210},{-171,-169,-178,-174,-166,-202},{-161,-167,-170,-172,-199,-197},{-156,-176,-184,-192,-173,-201},{-166,-177,-173,-161,-186,-178},{-160,-171,-170,-184,-178,-204},{-163,-177,-186,-172,-178,-187},{-160,-166,-168,-186,-199,-183},{-166,-166,-164,-174,-173,-204},{-168,-164,-177,-163,-191,-176},{-166,-181,-180,-175,-190,-189},{-171,-183,-164,-184,-166,-172},{-151,-181,-187,-193,-173,-187},{-165,-179,-178,-172,-202,-187},{-175,-166,-191,-163,-175,-191}},{{-214,-223,-234,-210,-240,-259},{-202,-223,-211,-203,-213,-248},{-202,-215,-230,-210,-236,-252},{-190,-189,-228,-230,-220,-252},{-178,-215,-213,-217,-220,-243},{-180,-193,-209,-223,-234,-243},{-216,-195,-204,-214,-222,-219},{-198,-221,-215,-219,-215,-245},{-208,-193,-222,-221,-243,-221},{-200,-211,-230,-201,-236,-245},{-204,-221,-215,-225,-211,-233},{-214,-215,-213,-214,-247,-252},{-192,-207,-204,-234,-224,-231},{-186,-195,-204,-217,-243,-236},{-188,-195,-194,-203,-252,-214},{-214,-219,-202,-210,-206,-262},{-192,-195,-198,-230,-220,-233},{-180,-213,-232,-239,-238,-252},{-178,-217,-196,-201,-208,-248},{-218,-201,-196,-234,-211,-224}},{{-264,-263,-254,-243,-252,-277},{-262,-235,-278,-243,-249,-280},{-240,-247,-283,-284,-252,-297},{-222,-232,-246,-275,-280,-255},{-269,-232,-244,-278,-283,-266},{-230,-260,-244,-286,-283,-294},{-242,-255,-241,-270,-305,-308},{-230,-245,-267,-278,-294,-266},{-272,-252,-265,-246,-266,-260},{-252,-232,-252,-251,-252,-303},{-247,-263,-262,-278,-260,-269},{-222,-275,-267,-259,-299,-269},{-247,-258,-280,-248,-285,-311},{-227,-230,-280,-270,-266,-286},{-232,-255,-254,-256,-252,-263},{-254,-240,-283,-270,-258,-311},{-245,-245,-288,-267,-288,-260},{-269,-280,-241,-281,-291,-303},{-225,-270,-254,-275,-294,-297},{-272,-260,-275,-262,-294,-283}}},{{{-306,-362,-329,-352,-326,-299},{-329,-352,-316,-339,-355,-349},{-362,-303,-319,-336,-329,-322},{-313,-332,-326,-326,-306,-316},{-332,-296,-352,-322,-332,-329},{-303,-349,-336,-303,-296,-339},{-336,-303,-329,-299,-299,-352},{-345,-322,-309,-303,-296,-319},{-322,-313,-332,-336,-332,-303},{-352,-349,-313,-339,-362,-342},{-349,-306,-332,-313,-332,-299},{-299,-332,-336,-332,-352,-355},{-355,-309,-339,-339,-345,-296},{-332,-326,-306,-313,-339,-303},{-296,-352,-326,-303,-342,-322},{-322,-339,-349,-332,-303,-332},{-339,-345,-352,-322,-316,-299},{-342,-332,-319,-359,-319,-306},{-322,-299,-326,-303,-322,-336},{-296,-319,-303,-345,-306,-319}},{{-321,-296,-290,-305,-305,-289},{-312,-325,-338,-317,-302,-271},{-351,-325,-297,-292,-330,-328},{-358,-338,-329,-339,-326,-331},{-302,-306,-319,-301,-323,-274},{-298,-351,-316,-339,-330,-310},{-325,-345,-300,-311,-277,-319},{-328,-341,-313,-298,-320,-277},{-305,-312,-297,-305,-339,-292},{-321,-316,-316,-298,-320,-292},{-295,-303,-332,-323,-293,-310},{-325,-309,-309,-283,-308,-271},{-341,-299,-348,-323,-333,-304},{-354,-328,-329,-298,-317,-328},{-318,-290,-335,-320,-323,-292},{-354,-345,-345,-308,-330,-280},{-335,-316,-345,-295,-302,-289},{-341,-293,-338,-345,-283,-322},{-361,-348,-313,-308,-308,-316},{-331,-319,-345,-336,-311,-295}},{{-274,-274,-308,-272,-238,-262},{-301,-294,-255,-267,-268,-249},{-319,-285,-305,-250,-260,-272},{-304,-274,-274,-286,-284,-275},{-286,-305,-255,-291,-284,-254},{-313,-311,-277,-253,-284,-265},{-283,-297,-288,-296,-268,-275},{-304,-300,-260,-280,-268,-239},{-271,-265,-305,-280,-249,-262},{-277,-282,-300,-294,-252,-257},{-286,-302,-263,-277,-284,-252},{-295,-274,-297,-272,-284,-275},{-313,-300,-274,-253,-262,-272},{-316,-294,-300,-264,-238,-278},{-324,-311,-302,-286,-289,-252},{-266,-276,-280,-256,-244,-275},{-322,-279,-291,-256,-289,-249},{-274,-305,-263,-258,-260,-283},{-307,-271,-252,-275,-254,-239},{-310,-311,-252,-269,-270,-239}}},{{{-108,-98,-114,-121,-115,-116},{-103,-102,-115,-121,-121,-115},{-96,-110,-123,-113,-120,-128},{-105,-112,-114,-106,-112,-127},{-112,-109,-105,-115,-128,-118},{-112,-99,-104,-115,-113,-137},{-104,-112,-115,-122,-133,-122},{-96,-109,-112,-121,-120,-124},{-107,-117,-104,-129,-134,-138},{-113,-102,-113,-126,-111,-115},{-116,-96,-112,-119,-128,-140},{-108,-111,-122,-110,-117,-133},{-109,-100,-113,-124,-127,-115},{-114,-109,-113,-117,-116,-122},{-107,-102,-115,-116,-115,-123},{-105,-104,-112,-116,-122,-123},{-97,-103,-104,-128,-124,-119},{-96,-107,-106,-121,-134,-123},{-111,-103,-108,-126,-112,-137},{-99,-110,-103,-121,-115,-119}},{{-142,-135,-136,-155,-159,-158},{-138,-133,-138,-169,-164,-178},{-130,-148,-147,-144,-177,-155},{-131,-133,-157,-160,-174,-153},{-135,-142,-148,-169,-159,-183},{-131,-154,-154,-146,-153,-158},{-130,-144,-141,-152,-169,-173},{-144,-130,-139,-158,-177,-178},{-131,-155,-136,-167,-163,-173},{-123,-131,-154,-160,-145,-160},{-126,-152,-154,-161,-172,-153},{-142,-151,-160,-161,-145,-158},{-139,-133,-138,-147,-167,-178},{-134,-151,-142,-153,-155,-183},{-124,-131,-152,-169,-177,-161},{-148,-137,-138,-164,-147,-160},{-144,-155,-136,-152,-155,-185},{-140,-130,-163,-164,-167,-168},{-131,-147,-147,-146,-175,-165},{-127,-147,-148,-167,-175,-181}},{{-187,-171,-171,-194,-186,-194},{-191,-166,-199,-182,-198,-180},{-163,-194,-199,-194,-200,-200},{-182,-162,-179,-182,-212,-202},{-177,-185,-190,-205,-190,-196},{-175,-167,-171,-203,-198,-210},{-180,-185,-180,-209,-210,-178},{-172,-191,-197,-173,-178,-184},{-182,-185,-201,-173,-196,-186},{-173,-182,-195,-182,-208,-184},{-170,-184,-180,-190,-190,-182},{-170,-166,-190,-190,-206,-186},{-182,-180,-175,-203,-208,-212},{-193,-196,-205,-194,-184,-204},{-163,-169,-169,-205,-196,-194},{-163,-167,-188,-194,-186,-208},{-180,-167,-184,-194,-190,-200},{-177,-182,-192,-171,-202,-186},{-164,-169,-188,-171,-186,-210},{-158,-187,-197,-205,-210,-190}}},{{{-240,-259,-236,-226,-233,-238},{-249,-262,-248,-240,-228,-214},{-235,-262,-233,-236,-236,-214},{-254,-217,-240,-236,-221,-231},{-219,-228,-259,-236,-262,-219},{-219,-236,-231,-228,-214,-217},{-221,-255,-214,-240,-233,-257},{-245,-238,-259,-238,-226,-243},{-219,-255,-262,-248,-219,-245},{-242,-224,-257,-238,-217,-224},{-254,-217,-248,-231,-224,-240},{-249,-236,-257,-228,-257,-255},{-217,-262,-231,-238,-236,-214},{-240,-217,-236,-250,-219,-248},{-221,-228,-226,-262,-259,-228},{-245,-224,-248,-248,-233,-221},{-231,-221,-236,-231,-238,-238},{-247,-262,-233,-255,-217,-217},{-231,-252,-219,-243,-240,-248},{-238,-255,-236,-217,-243,-259}},{{-219,-219,-228,-229,-231,-203},{-262,-233,-233,-231,-226,-241},{-228,-248,-226,-252,-249,-225},{-231,-243,-242,-247,-240,-214},{-228,-248,-219,-226,-235,-236},{-233,-217,-251,-249,-240,-241},{-217,-240,-233,-233,-228,-210},{-252,-262,-251,-224,-208,-217},{-221,-221,-219,-224,-235,-221},{-245,-231,-230,-219,-221,-232},{-233,-221,-235,-240,-206,-241},{-233,-219,-254,-224,-206,-203},{-255,-217,-223,-208,-212,-223},{-238,-231,-237,-213,-224,-228},{-255,-252,-223,-229,-249,-243},{-231,-224,-230,-254,-212,-223},{-252,-240,-228,-208,-208,-214},{-231,-217,-244,-249,-228,-243},{-219,-231,-230,-240,-226,-203},{-226,-257,-219,-247,-228,-236}},{{-228,-188,-210,-191,-189,-176},{-202,-192,-188,-205,-181,-184},{-200,-226,-186,-179,-189,-180},{-211,-219,-214,-213,-180,-196},{-211,-224,-216,-183,-185,-194},{-234,-192,-200,-183,-193,-196},{-194,-199,-208,-215,-172,-182},{-234,-224,-190,-201,-174,-166},{-224,-192,-220,-203,-202,-194},{-202,-215,-182,-177,-183,-166},{-209,-215,-188,-199,-193,-167},{-215,-194,-202,-201,-168,-193},{-234,-219,-196,-191,-200,-194},{-230,-190,-186,-209,-202,-196},{-219,-228,-188,-211,-187,-173},{-221,-199,-186,-215,-202,-171},{-217,-205,-182,-199,-180,-193},{-209,-207,-212,-201,-183,-191},{-198,-215,-194,-187,-198,-164},{-217,-201,-204,-205,-202,-164}}},{{{-263,-266,-279,-253,-266,-242},{-261,-242,-255,-261,-290,-245},{-277,-271,-245,-253,-245,-290},{-263,-263,-247,-266,-277,-287},{-293,-287,-255,-258,-255,-242},{-247,-293,-285,-266,-263,-255},{-242,-255,-245,-282,-245,-247},{-261,-250,-261,-277,-258,-287},{-290,-253,-269,-266,-250,-263},{-239,-285,-253,-274,-271,-287},{-293,-285,-258,-250,-277,-277},{-293,-255,-239,-239,-255,-274},{-261,-247,-263,-285,-271,-258},{-287,-245,-266,-253,-293,-253},{-255,-263,-242,-274,-261,-269},{-269,-253,-242,-242,-239,-245},{-255,-285,-282,-261,-290,-266},{-266,-247,-266,-242,-242,-247},{-290,-261,-261,-277,-258,-239},{-258,-242,-282,-277,-245,-242}},{{-290,-287,-247,-293,-246,-238},{-271,-253,-279,-279,-288,-264},{-293,-255,-285,-253,-280,-254},{-269,-250,-274,-247,-244,-282},{-261,-271,-250,-287,-259,-251},{-271,-279,-285,-285,-244,-254},{-250,-271,-282,-287,-244,-236},{-287,-293,-245,-274,-278,-282},{-266,-258,-274,-282,-249,-238},{-247,-269,-287,-277,-288,-251},{-255,-255,-258,-279,-286,-249},{-290,-277,-247,-293,-270,-251},{-255,-239,-282,-253,-259,-238},{-245,-255,-258,-261,-265,-241},{-263,-277,-290,-242,-236,-233},{-263,-287,-269,-255,-286,-280},{-258,-274,-245,-253,-244,-241},{-285,-290,-285,-258,-272,-275},{-287,-250,-282,-247,-283,-233},{-247,-277,-269,-263,-270,-256}},{{-262,-263,-242,-260,-267,-246},{-277,-230,-270,-268,-247,-231},{-238,-250,-242,-265,-265,-248},{-241,-245,-237,-253,-230,-248},{-249,-230,-244,-250,-250,-224},{-243,-253,-255,-246,-225,-260},{-256,-256,-242,-228,-247,-265},{-249,-266,-244,-248,-240,-258},{-256,-228,-265,-241,-247,-234},{-246,-235,-239,-253,-270,-229},{-267,-278,-257,-236,-223,-251},{-249,-271,-267,-248,-233,-241},{-249,-276,-277,-233,-230,-231},{-236,-261,-277,-268,-247,-258},{-277,-266,-227,-231,-260,-243},{-241,-233,-252,-246,-220,-255},{-272,-248,-234,-246,-255,-229},{-272,-268,-275,-236,-228,-241},{-269,-273,-239,-243,-230,-239},{-233,-263,-270,-238,-265,-255}}},{{{-304,-298,-325,-331,-310,-320},{-307,-316,-277,-274,-280,-323},{-328,-286,-310,-328,-274,-290},{-271,-301,-274,-283,-301,-296},{-283,-304,-274,-328,-325,-272},{-280,-286,-313,-283,-304,-326},{-274,-307,-304,-289,-313,-302},{-307,-307,-307,-307,-289,-266},{-280,-274,-301,-280,-289,-296},{-301,-289,-307,-298,-289,-281},{-283,-295,-313,-328,-280,-272},{-295,-319,-274,-271,-316,-314},{-331,-283,-274,-301,-301,-275},{-271,-325,-307,-331,-313,-287},{-322,-283,-310,-304,-295,-323},{-298,-307,-286,-298,-319,-311},{-304,-331,-280,-280,-331,-266},{-319,-313,-310,-307,-304,-293},{-307,-280,-280,-298,-289,-293},{-292,-298,-298,-316,-277,-302}},{{-293,-290,-300,-268,-246,-265},{-284,-316,-280,-270,-292,-278},{-322,-267,-308,-246,-273,-270},{-275,-301,-252,-265,-265,-244},{-311,-316,-252,-248,-241,-278},{-302,-284,-272,-276,-254,-262},{-319,-293,-308,-251,-238,-283},{-284,-281,-252,-246,-241,-234},{-322,-258,-291,-284,-270,-242},{-302,-301,-294,-278,-276,-249},{-284,-281,-252,-248,-254,-275},{-275,-261,-286,-246,-254,-254},{-322,-273,-269,-276,-278,-283},{-314,-313,-252,-284,-276,-265},{-267,-284,-305,-298,-244,-278},{-264,-264,-272,-281,-238,-283},{-314,-296,-297,-298,-241,-254},{-299,-313,-288,-257,-241,-257},{-311,-284,-269,-300,-257,-272},{-275,-293,-291,-278,-257,-254}},{{-223,-221,-208,-201,-206,-196},{-255,-238,-236,-206,-216,-210},{-265,-257,-206,-239,-212,-194},{-260,-247,-227,-214,-197,-208},{-223,-228,-243,-236,-214,-186},{-260,-264,-252,-225,-227,-186},{-273,-240,-236,-243,-206,-210},{-241,-252,-213,-214,-233,-200},{-228,-228,-224,-243,-231,-198},{-268,-245,-245,-243,-214,-210},{-226,-226,-250,-232,-199,-208},{-263,-238,-252,-228,-212,-206},{-233,-245,-222,-232,-197,-200},{-260,-242,-252,-199,-227,-198},{-228,-254,-213,-212,-199,-190},{-246,-262,-224,-236,-223,-192},{-226,-216,-234,-203,-191,-214},{-241,-221,-218,-234,-216,-218},{-223,-242,-252,-203,-206,-212},{-250,-254,-234,-239,-204,-186}}},{{{-354,-360,-368,-382,-322,-382},{-350,-360,-322,-315,-382,-360},{-357,-371,-322,-343,-364,-360},{-364,-322,-364,-322,-340,-354},{-360,-371,-371,-326,-368,-364},{-340,-336,-340,-350,-346,-354},{-322,-357,-378,-350,-371,-350},{-350,-357,-374,-318,-364,-332},{-322,-360,-368,-326,-343,-385},{-357,-326,-350,-318,-368,-340},{-354,-329,-382,-371,-374,-322},{-385,-382,-354,-329,-336,-354},{-371,-332,-350,-346,-364,-360},{-368,-322,-315,-336,-318,-378},{-368,-360,-329,-374,-385,-322},{-340,-385,-371,-354,-374,-322},{-318,-326,-318,-350,-371,-346},{-329,-332,-332,-371,-360,-332},{-364,-354,-374,-332,-354,-322},{-343,-371,-343,-368,-364,-332}},{{-372,-350,-308,-351,-344,-348},{-324,-374,-325,-337,-298,-312},{-313,-336,-359,-354,-361,-303},{-372,-357,-370,-334,-315,-303},{-379,-312,-363,-331,-361,-354},{-331,-312,-325,-311,-331,-354},{-376,-374,-312,-317,-302,-290},{-383,-322,-359,-301,-298,-312},{-313,-336,-346,-361,-305,-299},{-334,-309,-370,-311,-351,-290},{-345,-377,-312,-367,-308,-303},{-338,-333,-339,-361,-331,-328},{-338,-367,-308,-357,-325,-316},{-341,-357,-359,-304,-302,-299},{-379,-350,-359,-344,-344,-306},{-379,-329,-336,-347,-351,-351},{-345,-350,-370,-361,-305,-299},{-355,-350,-353,-307,-341,-351},{-348,-319,-305,-361,-341,-348},{-372,-370,-336,-341,-312,-341}},{{-287,-299,-300,-314,-256,-275},{-306,-293,-279,-287,-256,-278},{-287,-283,-297,-322,-299,-253},{-309,-336,-288,-275,-268,-286},{-312,-277,-291,-290,-282,-300},{-331,-339,-309,-314,-314,-295},{-343,-311,-270,-275,-308,-278},{-324,-283,-297,-272,-271,-284},{-328,-305,-315,-272,-314,-267},{-346,-336,-330,-316,-268,-300},{-315,-293,-312,-305,-288,-267},{-296,-286,-306,-281,-285,-250},{-324,-339,-318,-284,-259,-259},{-328,-311,-273,-264,-291,-261},{-312,-286,-270,-314,-288,-253},{-284,-280,-282,-275,-314,-264},{-324,-280,-324,-299,-262,-292},{-284,-339,-318,-316,-265,-297},{-324,-286,-330,-264,-256,-253},{-287,-333,-330,-284,-288,-250}}}}; // 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,7,3,2,6,3,2,7,4,3,7,4,3,7,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,5,3,9,4,3,8,4,3,8,5,3,8,5,3,8,4,3,7,4,3,8,4,3,8,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,2,6,10,1,7,0,2,4,6,8,10,12,1,5,9,1,7,2,4,6,8,10,12,2,6,10,1,7,1,3,5,7,9,11,13,1,5,9,13,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,2,8,14,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,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,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,0,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,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,16,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,2,4,6,8,10,12,14,16,0,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,0,4,8,12,16,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,2,6,10,14,0,6,12,0,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,1,7,13,1,3,5,7,9,11,13,2,6,10,14,1,7,13,1,3,5,7,9,11,13,0,4,8,12,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,7,11,15,6,12,5,7,9,11,13,15,17,6,10,14,6,12,7,9,11,13,15,17,7,11,15,6,12,4,6,8,10,12,14,16,4,8,12,16,3,9,15,5,7,9,11,13,15,17,5,9,13,17,3,9,15,5,7,9,11,13,15,17,5,9,13,17,5,11,17,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,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,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,2,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,1,7,13,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,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,4,10,16,4,6,8,10,12,14,16,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,4,6,8,10,12,14,16,5,9,13,17,4,10,16,4,6,8,10,12,14,16,3,7,11,15,3,9,15}; // set of end times of each shipment 
