int Dev = 10;// Deviation
extern const int CNN = 3;// Case Index
extern const int P = 6;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 36;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 745;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 18;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6,6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17},{18,19,20,21,22,23},{24,25,26,27,28,29},{30,31,32,33,34,35}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{12401,0,0,0,0,0},{12463,0,0,0,0,0},{12286,0,0,0,0,0},{12321,0,0,0,0,0},{12412,0,0,0,0,0},{12442,0,0,0,0,0},{12351,0,0,0,0,0},{12527,0,0,0,0,0},{12411,0,0,0,0,0},{12357,0,0,0,0,0}},{{12372,0,0,0,0,0},{12367,0,0,0,0,0},{12620,0,0,0,0,0},{12417,0,0,0,0,0},{12540,0,0,0,0,0},{12339,0,0,0,0,0},{12560,0,0,0,0,0},{12387,0,0,0,0,0},{12364,0,0,0,0,0},{12438,0,0,0,0,0}},{{11611,0,0,0,0,0},{11658,0,0,0,0,0},{11529,0,0,0,0,0},{11676,0,0,0,0,0},{11511,0,0,0,0,0},{11463,0,0,0,0,0},{11555,0,0,0,0,0},{11625,0,0,0,0,0},{11659,0,0,0,0,0},{11397,0,0,0,0,0}},{{10435,0,0,0,0,0},{10402,0,0,0,0,0},{10438,0,0,0,0,0},{10363,0,0,0,0,0},{10292,0,0,0,0,0},{10561,0,0,0,0,0},{10192,0,0,0,0,0},{10443,0,0,0,0,0},{10394,0,0,0,0,0},{10267,0,0,0,0,0}},{{9591,0,0,0,0,0},{9575,0,0,0,0,0},{9296,0,0,0,0,0},{9498,0,0,0,0,0},{9543,0,0,0,0,0},{9507,0,0,0,0,0},{9422,0,0,0,0,0},{9441,0,0,0,0,0},{9336,0,0,0,0,0},{9512,0,0,0,0,0}},{{9151,0,0,0,0,0},{9188,0,0,0,0,0},{9190,0,0,0,0,0},{9272,0,0,0,0,0},{9272,0,0,0,0,0},{9411,0,0,0,0,0},{9353,0,0,0,0,0},{9186,0,0,0,0,0},{9252,0,0,0,0,0},{9290,0,0,0,0,0}}},{{{-300,-297,-320,-294,-288,-268},{-297,-285,-291,-270,-297,-306},{-273,-297,-306,-323,-279,-297},{-291,-306,-291,-320,-323,-279},{-318,-300,-294,-303,-323,-320},{-300,-270,-306,-288,-282,-265},{-265,-273,-303,-288,-294,-268},{-265,-288,-268,-318,-291,-309},{-265,-282,-323,-288,-318,-303},{-265,-285,-294,-270,-320,-291}},{{-313,-269,-255,-290,-275,-246},{-276,-289,-269,-299,-259,-264},{-319,-272,-252,-288,-259,-246},{-276,-312,-305,-260,-262,-246},{-302,-312,-305,-279,-251,-272},{-264,-269,-255,-299,-248,-264},{-267,-257,-305,-277,-283,-259},{-319,-315,-255,-249,-259,-251},{-293,-283,-291,-274,-256,-275},{-264,-303,-258,-266,-280,-259}},{{-238,-252,-238,-240,-216,-225},{-245,-261,-217,-202,-218,-202},{-232,-223,-240,-242,-208,-192},{-232,-266,-249,-213,-212,-220},{-240,-244,-238,-240,-205,-208},{-230,-232,-233,-220,-195,-214},{-240,-261,-235,-242,-199,-190},{-238,-240,-221,-233,-201,-206},{-268,-244,-219,-202,-223,-204},{-225,-244,-212,-233,-203,-187}},{{-197,-194,-179,-157,-177,-150},{-187,-180,-175,-189,-173,-149},{-213,-187,-193,-181,-170,-168},{-213,-187,-183,-182,-153,-160},{-207,-174,-177,-172,-175,-147},{-185,-206,-166,-165,-168,-149},{-183,-180,-166,-175,-180,-174},{-201,-185,-181,-174,-180,-154},{-193,-174,-183,-172,-178,-158},{-177,-189,-165,-187,-148,-152}},{{-149,-161,-132,-134,-162,-162},{-140,-155,-144,-150,-143,-147},{-159,-145,-147,-137,-137,-148},{-163,-162,-135,-135,-146,-137},{-140,-162,-147,-137,-135,-156},{-168,-134,-143,-134,-151,-157},{-159,-155,-147,-140,-135,-135},{-143,-140,-159,-132,-159,-159},{-151,-145,-144,-140,-144,-148},{-165,-159,-147,-150,-144,-159}},{{-141,-162,-159,-142,-175,-164},{-144,-148,-146,-149,-150,-177},{-157,-151,-136,-146,-147,-152},{-147,-159,-166,-165,-167,-172},{-151,-162,-151,-160,-171,-177},{-154,-150,-146,-160,-171,-159},{-147,-162,-139,-148,-174,-184},{-143,-151,-154,-143,-158,-155},{-157,-148,-157,-149,-164,-184},{-159,-157,-146,-156,-167,-157}}},{{{-163,-179,-158,-197,-199,-191},{-158,-179,-193,-168,-201,-193},{-160,-152,-177,-197,-180,-193},{-171,-177,-193,-163,-197,-199},{-158,-159,-170,-172,-202,-206},{-170,-181,-161,-181,-182,-181},{-180,-169,-163,-179,-173,-199},{-185,-179,-178,-197,-166,-181},{-151,-169,-182,-197,-166,-183},{-175,-172,-189,-190,-173,-201}},{{-194,-191,-234,-239,-220,-250},{-214,-195,-232,-223,-224,-221},{-204,-226,-234,-241,-218,-245},{-210,-189,-200,-234,-240,-250},{-186,-215,-204,-217,-250,-248},{-218,-201,-213,-239,-206,-219},{-188,-217,-202,-201,-206,-243},{-192,-199,-228,-236,-231,-226},{-218,-217,-207,-239,-250,-262},{-206,-199,-219,-219,-220,-228}},{{-245,-260,-272,-281,-274,-311},{-237,-260,-262,-297,-249,-289},{-259,-252,-238,-275,-260,-260},{-252,-258,-278,-281,-285,-294},{-227,-255,-236,-289,-269,-303},{-232,-258,-262,-246,-277,-269},{-264,-263,-275,-273,-263,-255},{-245,-255,-252,-294,-283,-294},{-252,-280,-278,-294,-305,-280},{-222,-250,-249,-265,-294,-255}},{{-280,-270,-325,-325,-319,-283},{-298,-323,-325,-283,-328,-277},{-266,-294,-301,-298,-277,-319},{-312,-300,-292,-325,-319,-328},{-280,-306,-295,-325,-313,-322},{-303,-315,-289,-319,-298,-322},{-269,-265,-277,-274,-271,-298},{-295,-315,-304,-301,-304,-322},{-298,-291,-283,-331,-316,-271},{-269,-285,-274,-283,-289,-271}},{{-298,-304,-328,-315,-288,-310},{-286,-316,-322,-285,-297,-313},{-310,-283,-289,-297,-279,-302},{-292,-280,-310,-285,-291,-296},{-271,-277,-313,-285,-303,-287},{-310,-304,-295,-309,-297,-278},{-289,-298,-325,-300,-294,-310},{-325,-283,-310,-315,-309,-304},{-286,-286,-319,-276,-265,-267},{-298,-307,-298,-282,-306,-290}},{{-265,-293,-290,-261,-238,-248},{-265,-273,-274,-285,-241,-233},{-268,-276,-271,-248,-253,-228},{-302,-290,-252,-280,-274,-243},{-299,-290,-295,-240,-259,-265},{-285,-301,-285,-280,-261,-258},{-291,-304,-255,-238,-261,-238},{-262,-257,-279,-256,-264,-258},{-271,-259,-287,-240,-261,-258},{-308,-301,-247,-282,-256,-233}}},{{{-309,-296,-349,-299,-316,-316},{-355,-336,-303,-299,-355,-359},{-329,-299,-362,-306,-332,-322},{-313,-299,-306,-309,-319,-322},{-332,-316,-339,-345,-306,-306},{-322,-296,-309,-322,-326,-342},{-309,-349,-313,-329,-342,-349},{-319,-359,-319,-296,-339,-362},{-332,-355,-342,-309,-316,-326},{-332,-352,-352,-349,-306,-309}},{{-361,-351,-290,-342,-323,-289},{-338,-348,-325,-292,-296,-310},{-354,-306,-316,-295,-311,-292},{-348,-338,-287,-345,-308,-328},{-315,-328,-338,-317,-302,-331},{-331,-332,-290,-323,-330,-307},{-298,-293,-345,-345,-326,-316},{-348,-325,-335,-305,-277,-301},{-328,-335,-290,-342,-277,-292},{-354,-354,-348,-342,-302,-274}},{{-271,-297,-277,-294,-249,-257},{-313,-259,-260,-253,-241,-260},{-280,-311,-258,-264,-246,-275},{-304,-288,-305,-299,-246,-249},{-274,-317,-286,-261,-268,-278},{-298,-259,-260,-288,-273,-249},{-280,-311,-263,-250,-270,-262},{-301,-297,-280,-280,-273,-239},{-298,-311,-286,-261,-246,-239},{-271,-317,-297,-267,-257,-275}},{{-235,-253,-242,-247,-215,-212},{-230,-226,-251,-208,-208,-239},{-275,-233,-232,-219,-235,-210},{-230,-221,-230,-240,-231,-228},{-258,-245,-258,-219,-231,-221},{-232,-231,-254,-233,-224,-237},{-265,-245,-235,-219,-211,-223},{-225,-236,-239,-249,-202,-204},{-242,-231,-228,-238,-237,-217},{-270,-248,-232,-243,-213,-237}},{{-210,-208,-231,-191,-197,-208},{-239,-216,-193,-218,-225,-229},{-215,-218,-189,-193,-189,-208},{-234,-229,-208,-193,-218,-218},{-219,-220,-214,-197,-220,-202},{-234,-212,-216,-229,-195,-197},{-206,-189,-193,-223,-189,-204},{-215,-197,-216,-214,-208,-191},{-204,-206,-189,-214,-189,-231},{-230,-202,-220,-218,-214,-200}},{{-200,-218,-190,-200,-242,-225},{-191,-220,-196,-226,-209,-230},{-231,-225,-226,-210,-211,-243},{-220,-229,-200,-215,-207,-218},{-218,-202,-219,-221,-233,-216},{-216,-210,-228,-206,-205,-234},{-227,-231,-209,-224,-216,-243},{-227,-189,-209,-234,-238,-243},{-195,-212,-192,-224,-207,-220},{-212,-210,-213,-195,-220,-234}}},{{{-103,-110,-111,-116,-116,-124},{-100,-100,-122,-125,-117,-122},{-103,-95,-105,-110,-134,-132},{-113,-95,-108,-116,-129,-133},{-112,-104,-106,-106,-113,-119},{-116,-108,-113,-109,-110,-134},{-105,-101,-106,-119,-122,-116},{-108,-114,-101,-118,-117,-127},{-112,-105,-108,-110,-127,-119},{-106,-108,-122,-105,-123,-129}},{{-124,-155,-138,-157,-151,-175},{-142,-127,-152,-153,-161,-176},{-144,-155,-155,-170,-167,-165},{-122,-147,-139,-170,-159,-178},{-147,-155,-133,-143,-151,-158},{-132,-137,-141,-166,-172,-170},{-148,-137,-144,-166,-153,-185},{-127,-149,-157,-157,-166,-173},{-143,-149,-144,-143,-175,-178},{-124,-142,-160,-166,-164,-156}},{{-166,-171,-175,-203,-182,-200},{-187,-187,-186,-186,-206,-182},{-180,-187,-195,-182,-214,-194},{-186,-193,-173,-188,-198,-208},{-159,-164,-182,-179,-202,-180},{-168,-164,-201,-190,-190,-206},{-161,-171,-199,-192,-192,-196},{-193,-175,-179,-173,-194,-190},{-187,-180,-173,-180,-214,-212},{-161,-191,-175,-177,-200,-184}},{{-189,-217,-213,-223,-209,-201},{-223,-195,-221,-189,-219,-223},{-219,-195,-213,-201,-183,-203},{-221,-193,-219,-197,-183,-217},{-201,-199,-203,-187,-213,-189},{-197,-199,-223,-197,-221,-193},{-199,-217,-187,-217,-201,-195},{-215,-203,-211,-191,-193,-187},{-217,-221,-223,-207,-213,-197},{-217,-215,-193,-217,-209,-213}},{{-223,-213,-191,-197,-178,-184},{-205,-217,-211,-195,-206,-177},{-205,-211,-195,-209,-187,-190},{-183,-203,-211,-176,-204,-191},{-221,-221,-217,-211,-193,-201},{-223,-219,-207,-197,-202,-167},{-221,-219,-197,-195,-193,-180},{-221,-183,-201,-193,-176,-173},{-195,-195,-191,-203,-183,-182},{-187,-199,-215,-177,-176,-184}},{{-174,-171,-152,-166,-144,-134},{-195,-189,-180,-154,-139,-151},{-197,-170,-184,-147,-153,-146},{-161,-157,-155,-163,-167,-159},{-166,-176,-154,-158,-145,-147},{-188,-178,-167,-154,-151,-153},{-192,-185,-155,-176,-150,-135},{-179,-157,-177,-155,-151,-157},{-197,-176,-172,-170,-155,-132},{-172,-189,-175,-166,-138,-162}}},{{{-231,-250,-214,-233,-259,-236},{-252,-238,-240,-228,-243,-248},{-240,-226,-250,-221,-217,-252},{-224,-224,-257,-233,-252,-243},{-224,-228,-252,-238,-231,-250},{-228,-240,-245,-257,-262,-240},{-231,-240,-228,-252,-214,-250},{-235,-217,-243,-257,-259,-255},{-238,-233,-245,-257,-221,-240},{-240,-240,-221,-233,-217,-217}},{{-219,-217,-226,-238,-212,-201},{-219,-214,-258,-240,-215,-230},{-250,-238,-230,-247,-233,-239},{-243,-262,-230,-208,-217,-232},{-255,-240,-214,-238,-240,-214},{-233,-240,-230,-215,-246,-232},{-236,-226,-249,-252,-215,-203},{-236,-224,-230,-215,-237,-219},{-259,-231,-214,-229,-208,-221},{-233,-236,-256,-240,-203,-228}},{{-194,-213,-202,-213,-198,-184},{-221,-230,-210,-211,-183,-169},{-226,-190,-220,-177,-183,-169},{-204,-192,-210,-195,-168,-167},{-200,-224,-188,-191,-194,-176},{-232,-224,-182,-191,-181,-176},{-237,-217,-206,-183,-198,-193},{-228,-190,-196,-191,-198,-182},{-200,-201,-184,-183,-194,-180},{-226,-192,-202,-205,-204,-189}},{{-170,-165,-173,-150,-140,-134},{-169,-175,-155,-159,-151,-144},{-186,-177,-143,-135,-151,-146},{-163,-167,-152,-159,-153,-124},{-158,-168,-157,-138,-140,-144},{-187,-165,-166,-152,-156,-144},{-175,-163,-148,-164,-132,-124},{-155,-182,-143,-164,-135,-141},{-170,-158,-168,-156,-158,-126},{-155,-155,-165,-144,-145,-128}},{{-140,-135,-128,-129,-118,-125},{-126,-115,-124,-114,-121,-126},{-120,-115,-122,-120,-124,-126},{-124,-115,-120,-109,-129,-126},{-133,-134,-120,-130,-125,-117},{-130,-122,-118,-120,-123,-123},{-125,-120,-123,-126,-121,-127},{-124,-135,-131,-120,-112,-107},{-134,-137,-128,-108,-125,-119},{-124,-136,-120,-121,-120,-107}},{{-109,-121,-109,-112,-123,-126},{-127,-114,-112,-130,-120,-136},{-120,-117,-108,-107,-134,-118},{-113,-107,-131,-118,-122,-125},{-113,-121,-126,-131,-112,-118},{-123,-121,-123,-123,-127,-121},{-131,-121,-115,-120,-128,-132},{-107,-120,-120,-108,-134,-131},{-119,-115,-117,-118,-133,-137},{-113,-117,-126,-107,-118,-113}}},{{{-245,-274,-263,-239,-261,-245},{-285,-279,-261,-253,-242,-282},{-250,-245,-250,-250,-282,-263},{-290,-239,-239,-277,-242,-239},{-250,-250,-282,-277,-269,-247},{-239,-287,-282,-269,-274,-274},{-255,-247,-285,-253,-242,-282},{-293,-242,-290,-253,-271,-263},{-266,-242,-263,-247,-274,-258},{-245,-239,-247,-293,-282,-250}},{{-293,-287,-282,-271,-254,-233},{-271,-239,-250,-242,-238,-269},{-287,-287,-258,-242,-283,-241},{-239,-245,-290,-274,-252,-259},{-271,-263,-293,-250,-265,-238},{-250,-242,-263,-261,-278,-280},{-271,-287,-258,-277,-254,-285},{-290,-285,-242,-258,-286,-243},{-247,-255,-290,-277,-236,-272},{-271,-245,-282,-250,-259,-267}},{{-251,-278,-255,-268,-243,-258},{-262,-250,-277,-268,-243,-263},{-282,-278,-242,-255,-223,-234},{-246,-245,-277,-238,-247,-229},{-262,-243,-262,-260,-250,-248},{-256,-266,-227,-243,-252,-248},{-262,-276,-270,-258,-262,-246},{-259,-250,-232,-263,-252,-265},{-272,-235,-227,-231,-267,-241},{-251,-256,-249,-226,-265,-255}},{{-257,-230,-252,-218,-233,-231},{-228,-216,-217,-246,-202,-233},{-252,-249,-226,-244,-235,-231},{-236,-235,-210,-209,-231,-213},{-245,-226,-231,-214,-217,-202},{-262,-244,-215,-246,-246,-233},{-243,-230,-219,-218,-246,-220},{-257,-249,-226,-253,-246,-208},{-255,-228,-236,-239,-202,-226},{-228,-233,-233,-237,-226,-228}},{{-211,-200,-213,-224,-228,-237},{-211,-208,-215,-213,-202,-239},{-240,-210,-213,-206,-197,-215},{-238,-237,-202,-224,-224,-224},{-220,-213,-197,-239,-204,-217},{-220,-221,-208,-228,-239,-200},{-200,-215,-197,-237,-200,-230},{-211,-204,-226,-204,-232,-234},{-238,-213,-232,-224,-228,-228},{-220,-237,-219,-226,-208,-232}},{{-208,-228,-204,-215,-221,-204},{-219,-213,-232,-200,-210,-230},{-219,-197,-206,-234,-206,-210},{-197,-219,-215,-215,-208,-204},{-215,-215,-197,-195,-204,-232},{-239,-239,-217,-224,-206,-197},{-213,-228,-239,-232,-195,-228},{-206,-234,-200,-208,-221,-200},{-219,-219,-237,-224,-226,-200},{-219,-206,-237,-217,-208,-232}}},{{{-313,-295,-319,-295,-301,-320},{-325,-280,-307,-289,-304,-326},{-310,-283,-307,-310,-319,-311},{-280,-289,-295,-310,-295,-296},{-295,-328,-274,-316,-277,-278},{-313,-307,-322,-304,-328,-272},{-310,-295,-316,-274,-289,-305},{-310,-283,-331,-322,-316,-296},{-286,-313,-313,-274,-322,-275},{-277,-280,-325,-319,-304,-281}},{{-319,-293,-269,-248,-238,-267},{-281,-310,-263,-278,-262,-260},{-267,-304,-297,-246,-292,-265},{-272,-304,-266,-295,-241,-247},{-322,-296,-297,-276,-273,-239},{-308,-276,-258,-284,-276,-231},{-284,-296,-286,-284,-289,-247},{-287,-293,-283,-259,-238,-270},{-272,-287,-266,-259,-254,-231},{-316,-270,-266,-259,-241,-249}},{{-248,-230,-213,-228,-193,-212},{-260,-264,-218,-219,-214,-210},{-258,-257,-238,-210,-227,-220},{-265,-254,-213,-234,-193,-220},{-223,-242,-245,-208,-206,-194},{-253,-238,-243,-199,-210,-192},{-231,-240,-215,-219,-204,-182},{-255,-262,-215,-234,-214,-196},{-258,-257,-247,-212,-216,-218},{-241,-257,-227,-210,-193,-182}},{{-186,-190,-166,-181,-183,-153},{-208,-199,-182,-157,-176,-174},{-213,-188,-182,-157,-166,-150},{-177,-203,-169,-187,-183,-169},{-194,-179,-176,-170,-154,-159},{-200,-184,-185,-175,-168,-177},{-178,-197,-196,-172,-151,-167},{-210,-180,-190,-160,-166,-169},{-198,-175,-166,-172,-159,-172},{-200,-180,-164,-155,-178,-153}},{{-148,-165,-152,-159,-162,-151},{-153,-163,-146,-152,-143,-169},{-158,-154,-140,-151,-152,-143},{-147,-169,-157,-149,-142,-139},{-164,-151,-168,-168,-162,-148},{-158,-152,-149,-157,-140,-162},{-150,-154,-140,-139,-148,-160},{-156,-148,-139,-139,-139,-157},{-145,-165,-140,-166,-142,-168},{-153,-157,-163,-160,-156,-168}},{{-139,-172,-177,-161,-191,-179},{-139,-161,-147,-176,-164,-177},{-139,-157,-165,-163,-189,-170},{-160,-143,-168,-185,-166,-194},{-139,-153,-167,-181,-182,-165},{-160,-165,-177,-181,-173,-170},{-165,-154,-164,-153,-178,-194},{-151,-151,-164,-155,-168,-176},{-146,-145,-162,-170,-184,-190},{-166,-154,-173,-153,-177,-195}}},{{{-382,-385,-354,-371,-340,-357},{-343,-354,-329,-360,-318,-346},{-374,-322,-322,-322,-315,-382},{-329,-385,-354,-346,-329,-382},{-371,-364,-378,-354,-318,-332},{-326,-364,-368,-329,-374,-364},{-360,-385,-378,-329,-374,-343},{-357,-326,-326,-360,-350,-368},{-357,-368,-360,-329,-374,-368},{-382,-368,-350,-368,-315,-346}},{{-362,-316,-312,-304,-328,-351},{-320,-343,-373,-327,-335,-345},{-362,-367,-325,-341,-344,-341},{-317,-312,-356,-367,-308,-328},{-383,-346,-305,-307,-328,-328},{-369,-312,-370,-331,-325,-303},{-362,-319,-370,-354,-344,-351},{-348,-350,-339,-311,-348,-316},{-383,-316,-332,-324,-344,-296},{-334,-333,-370,-331,-341,-351}},{{-309,-296,-309,-264,-305,-253},{-296,-336,-324,-305,-291,-275},{-331,-302,-270,-284,-291,-295},{-340,-336,-300,-308,-268,-250},{-321,-317,-300,-305,-259,-289},{-343,-320,-312,-290,-279,-292},{-299,-326,-270,-302,-299,-253},{-299,-333,-315,-272,-302,-286},{-290,-330,-279,-319,-285,-297},{-293,-283,-312,-272,-296,-300}},{{-286,-268,-252,-238,-245,-222},{-265,-237,-280,-236,-240,-234},{-289,-239,-275,-269,-233,-217},{-259,-250,-234,-261,-235,-220},{-248,-271,-247,-251,-228,-258},{-259,-247,-254,-259,-250,-261},{-243,-263,-257,-256,-243,-261},{-251,-266,-257,-254,-247,-263},{-254,-281,-265,-274,-220,-217},{-294,-274,-272,-243,-230,-251}},{{-216,-233,-238,-254,-238,-213},{-216,-238,-238,-254,-231,-229},{-230,-231,-222,-238,-208,-219},{-228,-222,-252,-222,-247,-252},{-213,-233,-226,-231,-238,-243},{-258,-243,-222,-208,-215,-213},{-261,-240,-210,-245,-215,-243},{-223,-213,-231,-240,-247,-243},{-216,-247,-233,-213,-215,-219},{-223,-243,-243,-224,-210,-215}},{{-252,-222,-224,-252,-227,-221},{-213,-213,-240,-255,-227,-268},{-247,-226,-235,-238,-261,-248},{-210,-236,-249,-214,-266,-239},{-217,-245,-214,-240,-249,-266},{-231,-238,-235,-257,-235,-229},{-233,-215,-214,-243,-218,-256},{-219,-229,-252,-262,-240,-234},{-224,-231,-224,-217,-252,-256},{-243,-219,-228,-226,-230,-258}}}}; // 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]={15,8,5,15,8,6,15,8,6,16,8,6,16,8,6,16,8,6,16,9,6,17,8,6,17,9,6,16,8,6,16,9,6,17,8,6,18,9,6,18,9,6,17,9,6,18,9,6,17,9,6,17,9,6,16,9,6,17,9,6,17,9,6,17,8,6,16,9,6,17,8,6}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14},{15,16,17,18,19,20,21,22},{23,24,25,26,27},{28,29,30,31,32,33,34,35,36,37,38,39,40,41,42},{43,44,45,46,47,48,49,50},{51,52,53,54,55,56},{57,58,59,60,61,62,63,64,65,66,67,68,69,70,71},{72,73,74,75,76,77,78,79},{80,81,82,83,84,85},{86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101},{102,103,104,105,106,107,108,109},{110,111,112,113,114,115},{116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131},{132,133,134,135,136,137,138,139},{140,141,142,143,144,145},{146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161},{162,163,164,165,166,167,168,169},{170,171,172,173,174,175},{176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191},{192,193,194,195,196,197,198,199,200},{201,202,203,204,205,206},{207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223},{224,225,226,227,228,229,230,231},{232,233,234,235,236,237},{238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254},{255,256,257,258,259,260,261,262,263},{264,265,266,267,268,269},{270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285},{286,287,288,289,290,291,292,293},{294,295,296,297,298,299},{300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315},{316,317,318,319,320,321,322,323,324},{325,326,327,328,329,330},{331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347},{348,349,350,351,352,353,354,355},{356,357,358,359,360,361},{362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379},{380,381,382,383,384,385,386,387,388},{389,390,391,392,393,394},{395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412},{413,414,415,416,417,418,419,420,421},{422,423,424,425,426,427},{428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444},{445,446,447,448,449,450,451,452,453},{454,455,456,457,458,459},{460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477},{478,479,480,481,482,483,484,485,486},{487,488,489,490,491,492},{493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509},{510,511,512,513,514,515,516,517,518},{519,520,521,522,523,524},{525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541},{542,543,544,545,546,547,548,549,550},{551,552,553,554,555,556},{557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572},{573,574,575,576,577,578,579,580,581},{582,583,584,585,586,587},{588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604},{605,606,607,608,609,610,611,612,613},{614,615,616,617,618,619},{620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636},{637,638,639,640,641,642,643,644,645},{646,647,648,649,650,651},{652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668},{669,670,671,672,673,674,675,676},{677,678,679,680,681,682},{683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698},{699,700,701,702,703,704,705,706,707},{708,709,710,711,712,713},{714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730},{731,732,733,734,735,736,737,738},{739,740,741,742,743,744}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,1,7,13,19,25,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,2,6,10,14,18,22,26,30,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,6,12,18,24,30,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,5,11,17,23,29,35,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,5,11,17,23,29,35,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,4,10,16,22,28,34,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,4,10,16,22,28,34,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,5,11,17,23,29,35,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34}; // set of end times of each shipment 
