int Dev = 50;// Deviation
extern const int CNN = 1;// 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 = 341;//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]={{{{11403,0,0,0,0,0},{11841,0,0,0,0,0},{11954,0,0,0,0,0},{11060,0,0,0,0,0},{12507,0,0,0,0,0},{11412,0,0,0,0,0},{11493,0,0,0,0,0},{10985,0,0,0,0,0},{11896,0,0,0,0,0},{12123,0,0,0,0,0},{11579,0,0,0,0,0},{11099,0,0,0,0,0},{10810,0,0,0,0,0},{11457,0,0,0,0,0},{10647,0,0,0,0,0},{11799,0,0,0,0,0},{11440,0,0,0,0,0},{11035,0,0,0,0,0},{11758,0,0,0,0,0},{12173,0,0,0,0,0}},{{12473,0,0,0,0,0},{11314,0,0,0,0,0},{11124,0,0,0,0,0},{10753,0,0,0,0,0},{10625,0,0,0,0,0},{11500,0,0,0,0,0},{11678,0,0,0,0,0},{11417,0,0,0,0,0},{11404,0,0,0,0,0},{11462,0,0,0,0,0},{12147,0,0,0,0,0},{12354,0,0,0,0,0},{10949,0,0,0,0,0},{11340,0,0,0,0,0},{11164,0,0,0,0,0},{11628,0,0,0,0,0},{11780,0,0,0,0,0},{11444,0,0,0,0,0},{10903,0,0,0,0,0},{11350,0,0,0,0,0}},{{11034,0,0,0,0,0},{11558,0,0,0,0,0},{11876,0,0,0,0,0},{11917,0,0,0,0,0},{10951,0,0,0,0,0},{11006,0,0,0,0,0},{10342,0,0,0,0,0},{12361,0,0,0,0,0},{11839,0,0,0,0,0},{11742,0,0,0,0,0},{11455,0,0,0,0,0},{10953,0,0,0,0,0},{12214,0,0,0,0,0},{11697,0,0,0,0,0},{11946,0,0,0,0,0},{11478,0,0,0,0,0},{10858,0,0,0,0,0},{11764,0,0,0,0,0},{11446,0,0,0,0,0},{11960,0,0,0,0,0}}},{{{-193,-213,-110,-242,-292,-138},{-254,-278,-238,-195,-219,-193},{-126,-173,-187,-154,-250,-266},{-280,-284,-254,-164,-197,-223},{-290,-134,-246,-274,-250,-268},{-235,-282,-158,-254,-166,-302},{-229,-177,-138,-211,-244,-254},{-233,-219,-128,-294,-193,-215},{-144,-292,-185,-268,-302,-221},{-219,-238,-286,-231,-187,-240},{-181,-262,-144,-304,-136,-130},{-104,-120,-284,-292,-108,-189},{-217,-207,-134,-124,-173,-146},{-146,-235,-288,-136,-181,-126},{-152,-126,-173,-183,-150,-221},{-254,-294,-246,-183,-112,-276},{-266,-242,-124,-235,-112,-276},{-179,-106,-134,-191,-268,-158},{-197,-112,-268,-274,-177,-240},{-240,-231,-148,-217,-120,-154}},{{-199,-304,-189,-166,-217,-300},{-126,-266,-260,-132,-302,-140},{-304,-282,-280,-223,-292,-140},{-187,-122,-246,-274,-201,-233},{-268,-290,-219,-252,-126,-112},{-284,-264,-219,-134,-158,-248},{-215,-114,-219,-209,-177,-268},{-294,-122,-250,-134,-286,-168},{-248,-173,-120,-235,-193,-156},{-128,-156,-128,-227,-106,-242},{-244,-246,-258,-162,-294,-246},{-166,-300,-152,-233,-240,-238},{-272,-294,-276,-128,-215,-229},{-268,-231,-209,-112,-292,-250},{-215,-256,-114,-152,-189,-231},{-173,-179,-166,-246,-201,-168},{-177,-288,-217,-246,-207,-136},{-223,-173,-264,-177,-280,-128},{-270,-264,-292,-177,-116,-156},{-290,-290,-240,-270,-250,-146}},{{-302,-215,-300,-254,-203,-110},{-179,-207,-128,-205,-150,-302},{-116,-244,-120,-179,-252,-158},{-205,-256,-217,-146,-201,-284},{-264,-197,-138,-266,-270,-201},{-120,-215,-280,-136,-197,-246},{-132,-104,-152,-187,-207,-136},{-223,-132,-244,-150,-262,-244},{-152,-173,-298,-207,-286,-280},{-168,-217,-288,-148,-300,-274},{-134,-199,-284,-193,-181,-282},{-215,-286,-122,-183,-278,-211},{-173,-168,-246,-171,-116,-235},{-154,-183,-160,-252,-110,-191},{-292,-124,-140,-221,-304,-142},{-160,-112,-197,-164,-156,-195},{-187,-195,-175,-158,-156,-278},{-140,-201,-171,-256,-209,-106},{-211,-233,-272,-270,-280,-260},{-118,-240,-288,-296,-116,-274}}},{{{-113,-193,-148,-137,-177,-203},{-222,-164,-182,-95,-150,-113},{-171,-198,-95,-113,-232,-182},{-198,-129,-113,-109,-90,-119},{-126,-221,-116,-204,-232,-227},{-175,-148,-240,-130,-80,-126},{-135,-224,-193,-100,-211,-129},{-134,-213,-227,-127,-163,-213},{-130,-211,-140,-118,-119,-237},{-105,-155,-225,-171,-135,-182},{-98,-151,-184,-100,-130,-200},{-116,-121,-156,-130,-101,-211},{-182,-148,-209,-100,-158,-111},{-85,-224,-90,-84,-134,-198},{-98,-119,-195,-221,-116,-92},{-169,-195,-213,-169,-127,-187},{-198,-233,-109,-113,-142,-213},{-242,-109,-172,-193,-187,-182},{-166,-126,-143,-82,-174,-188},{-150,-188,-225,-227,-122,-188}},{{-142,-101,-116,-230,-93,-193},{-204,-145,-190,-240,-101,-145},{-143,-90,-151,-109,-240,-148},{-92,-118,-213,-82,-238,-122},{-101,-185,-101,-89,-242,-92},{-190,-93,-105,-108,-161,-127},{-130,-188,-195,-203,-132,-238},{-242,-187,-119,-174,-93,-90},{-105,-114,-145,-156,-240,-147},{-124,-216,-225,-97,-103,-179},{-159,-180,-213,-92,-213,-148},{-134,-219,-214,-163,-103,-203},{-89,-166,-151,-122,-237,-92},{-127,-113,-132,-172,-97,-237},{-95,-103,-111,-124,-217,-224},{-145,-225,-164,-90,-153,-113},{-148,-80,-179,-184,-225,-177},{-219,-108,-192,-84,-172,-109},{-167,-185,-159,-111,-184,-106},{-113,-95,-108,-150,-95,-108}},{{-200,-230,-87,-90,-89,-106},{-108,-229,-135,-179,-184,-84},{-190,-175,-119,-101,-85,-221},{-113,-206,-227,-90,-164,-108},{-208,-97,-200,-177,-85,-90},{-122,-200,-87,-153,-89,-232},{-89,-118,-90,-87,-187,-171},{-134,-82,-201,-171,-164,-195},{-158,-219,-204,-153,-204,-229},{-227,-97,-159,-209,-219,-93},{-188,-200,-175,-153,-219,-171},{-200,-130,-225,-100,-192,-124},{-118,-235,-230,-164,-89,-238},{-222,-192,-193,-132,-142,-113},{-237,-106,-227,-164,-184,-106},{-113,-93,-142,-143,-98,-214},{-206,-93,-140,-103,-240,-179},{-109,-229,-163,-230,-214,-103},{-217,-87,-113,-140,-127,-188},{-240,-233,-166,-100,-190,-198}}},{{{-291,-176,-171,-305,-173,-233},{-284,-136,-273,-319,-231,-150},{-247,-125,-268,-127,-252,-337},{-173,-176,-189,-219,-215,-134},{-321,-143,-231,-256,-187,-296},{-118,-169,-219,-344,-129,-169},{-222,-150,-310,-335,-321,-134},{-203,-129,-120,-229,-293,-231},{-346,-344,-196,-321,-249,-282},{-293,-307,-196,-127,-215,-326},{-231,-122,-136,-298,-129,-321},{-305,-296,-291,-243,-136,-335},{-273,-217,-330,-187,-169,-342},{-196,-314,-116,-346,-169,-162},{-298,-178,-229,-173,-231,-238},{-340,-328,-148,-162,-132,-150},{-185,-143,-162,-169,-118,-203},{-127,-319,-346,-254,-296,-118},{-132,-166,-201,-182,-337,-256},{-321,-314,-344,-171,-333,-249}},{{-201,-155,-342,-162,-344,-236},{-240,-340,-185,-139,-122,-328},{-116,-148,-182,-319,-196,-319},{-213,-217,-261,-300,-284,-238},{-136,-118,-201,-196,-291,-245},{-323,-155,-122,-125,-312,-217},{-217,-141,-303,-277,-215,-254},{-217,-310,-303,-342,-236,-152},{-185,-316,-222,-215,-157,-263},{-208,-261,-312,-275,-268,-233},{-196,-157,-273,-273,-238,-176},{-219,-162,-328,-206,-201,-340},{-187,-240,-316,-337,-280,-217},{-321,-159,-194,-155,-203,-291},{-136,-206,-256,-333,-280,-125},{-337,-132,-236,-284,-132,-164},{-261,-293,-203,-171,-122,-342},{-219,-229,-342,-187,-284,-206},{-192,-122,-282,-323,-136,-201},{-337,-316,-335,-180,-316,-132}},{{-125,-129,-337,-122,-316,-148},{-277,-316,-152,-303,-247,-277},{-296,-243,-340,-249,-134,-166},{-280,-321,-342,-118,-284,-243},{-344,-134,-148,-192,-226,-233},{-226,-139,-293,-203,-261,-291},{-245,-129,-217,-129,-321,-129},{-323,-289,-310,-182,-139,-178},{-176,-305,-152,-118,-277,-125},{-323,-139,-261,-180,-263,-277},{-173,-247,-249,-226,-340,-182},{-270,-155,-222,-233,-254,-187},{-192,-229,-296,-155,-273,-335},{-150,-307,-268,-268,-152,-282},{-185,-335,-252,-321,-247,-152},{-157,-296,-280,-316,-226,-266},{-326,-249,-194,-300,-129,-210},{-249,-162,-293,-298,-116,-116},{-256,-289,-136,-321,-173,-273},{-150,-176,-189,-259,-203,-233}}},{{{-165,-315,-295,-206,-126,-148},{-213,-317,-319,-239,-206,-304},{-310,-260,-226,-163,-208,-293},{-291,-182,-189,-124,-282,-130},{-163,-323,-315,-286,-326,-161},{-256,-156,-119,-278,-111,-206},{-321,-115,-291,-193,-167,-234},{-239,-124,-208,-206,-263,-239},{-200,-119,-124,-208,-278,-224},{-280,-241,-269,-171,-174,-321},{-282,-208,-176,-174,-119,-312},{-152,-230,-141,-263,-113,-113},{-178,-208,-291,-115,-126,-152},{-139,-273,-139,-263,-126,-319},{-302,-254,-265,-119,-228,-152},{-234,-213,-117,-189,-156,-145},{-284,-254,-150,-295,-161,-306},{-219,-217,-152,-184,-169,-126},{-271,-258,-210,-312,-193,-174},{-169,-122,-154,-200,-208,-167}},{{-284,-265,-180,-286,-278,-210},{-111,-226,-265,-139,-197,-306},{-319,-141,-135,-193,-230,-258},{-182,-217,-122,-137,-237,-152},{-226,-326,-284,-152,-234,-150},{-122,-278,-124,-284,-128,-226},{-293,-260,-269,-187,-299,-143},{-145,-202,-319,-245,-315,-217},{-215,-184,-141,-189,-182,-126},{-130,-241,-113,-128,-226,-178},{-128,-202,-326,-247,-182,-243},{-210,-184,-163,-263,-265,-289},{-200,-245,-224,-232,-163,-219},{-143,-217,-286,-113,-278,-195},{-234,-297,-135,-119,-299,-258},{-221,-226,-124,-143,-317,-247},{-182,-213,-319,-302,-176,-158},{-156,-241,-163,-124,-258,-202},{-202,-245,-115,-165,-321,-115},{-111,-226,-169,-182,-145,-263}},{{-263,-230,-271,-210,-276,-191},{-321,-230,-280,-193,-312,-145},{-326,-126,-254,-241,-230,-152},{-122,-156,-297,-197,-228,-208},{-267,-167,-161,-213,-254,-143},{-217,-306,-148,-297,-108,-126},{-128,-304,-263,-284,-254,-302},{-191,-284,-117,-150,-167,-282},{-326,-321,-267,-284,-302,-308},{-243,-184,-312,-271,-158,-226},{-141,-182,-289,-182,-135,-269},{-174,-210,-167,-289,-113,-217},{-297,-161,-202,-245,-189,-187},{-321,-132,-252,-161,-226,-326},{-286,-191,-267,-111,-293,-304},{-217,-111,-315,-241,-122,-280},{-232,-310,-145,-135,-299,-176},{-191,-315,-137,-213,-286,-306},{-161,-234,-273,-226,-282,-148},{-163,-284,-282,-165,-250,-174}}},{{{-370,-250,-399,-311,-184,-388},{-144,-245,-290,-223,-391,-157},{-375,-168,-383,-192,-346,-202},{-293,-170,-133,-386,-165,-184},{-327,-210,-396,-234,-242,-194},{-314,-298,-133,-391,-364,-311},{-388,-309,-194,-314,-325,-239},{-322,-266,-335,-306,-223,-165},{-279,-205,-335,-234,-138,-223},{-396,-279,-391,-160,-301,-152},{-340,-340,-154,-380,-152,-380},{-351,-261,-221,-258,-207,-146},{-165,-399,-338,-290,-332,-399},{-231,-332,-378,-269,-306,-332},{-221,-306,-229,-218,-178,-176},{-202,-245,-138,-327,-303,-356},{-306,-231,-372,-215,-380,-141},{-325,-258,-242,-202,-229,-330},{-362,-391,-237,-303,-205,-319},{-229,-354,-242,-370,-343,-287}},{{-317,-364,-226,-335,-301,-375},{-354,-319,-245,-343,-141,-317},{-144,-306,-144,-239,-394,-314},{-173,-261,-189,-173,-141,-136},{-221,-250,-277,-285,-372,-146},{-301,-325,-279,-383,-386,-295},{-149,-343,-271,-314,-282,-178},{-237,-168,-261,-136,-176,-192},{-215,-301,-213,-340,-176,-378},{-138,-383,-311,-250,-210,-311},{-136,-242,-391,-218,-375,-181},{-311,-274,-348,-388,-375,-157},{-136,-160,-332,-141,-370,-197},{-277,-325,-221,-303,-370,-210},{-266,-364,-237,-287,-157,-311},{-287,-245,-314,-378,-269,-348},{-293,-229,-173,-194,-207,-194},{-306,-261,-266,-205,-247,-330},{-223,-274,-223,-380,-237,-242},{-170,-287,-359,-261,-380,-314}},{{-152,-263,-348,-314,-215,-194},{-359,-255,-194,-247,-242,-162},{-399,-332,-290,-375,-263,-197},{-388,-202,-285,-176,-229,-200},{-269,-237,-279,-245,-170,-247},{-362,-311,-178,-170,-327,-157},{-141,-274,-340,-162,-160,-162},{-221,-378,-306,-271,-399,-165},{-250,-362,-356,-160,-226,-335},{-149,-202,-386,-346,-359,-269},{-285,-261,-285,-287,-146,-332},{-197,-255,-154,-146,-218,-367},{-173,-340,-314,-364,-149,-247},{-301,-247,-319,-290,-202,-293},{-346,-213,-231,-221,-370,-354},{-194,-290,-165,-386,-245,-285},{-306,-207,-332,-309,-146,-221},{-388,-146,-160,-295,-346,-335},{-205,-391,-136,-221,-327,-362},{-213,-253,-215,-375,-319,-258}}},{{{-414,-154,-398,-151,-269,-406},{-372,-372,-176,-372,-302,-297},{-230,-266,-314,-308,-199,-266},{-238,-196,-297,-196,-302,-395},{-154,-356,-269,-412,-339,-272},{-162,-224,-269,-154,-342,-213},{-398,-330,-255,-218,-356,-202},{-294,-300,-224,-244,-154,-235},{-316,-260,-314,-367,-333,-311},{-291,-258,-154,-370,-266,-185},{-336,-280,-353,-400,-316,-241},{-274,-322,-378,-269,-412,-185},{-165,-154,-232,-151,-314,-353},{-316,-263,-246,-305,-210,-389},{-241,-305,-216,-260,-277,-302},{-235,-249,-409,-420,-392,-356},{-325,-157,-266,-412,-157,-196},{-146,-398,-157,-384,-395,-328},{-406,-151,-288,-274,-311,-316},{-157,-249,-339,-235,-364,-258}},{{-378,-342,-207,-171,-384,-182},{-325,-213,-392,-300,-199,-347},{-224,-300,-157,-325,-342,-157},{-414,-224,-199,-288,-409,-294},{-255,-210,-171,-146,-190,-272},{-344,-336,-392,-162,-165,-291},{-258,-333,-395,-202,-386,-227},{-344,-330,-162,-328,-409,-224},{-176,-230,-314,-232,-260,-330},{-210,-325,-347,-406,-350,-314},{-353,-302,-336,-260,-227,-230},{-157,-328,-375,-386,-350,-316},{-171,-154,-151,-386,-263,-280},{-176,-188,-347,-182,-157,-182},{-202,-420,-260,-263,-190,-367},{-258,-325,-414,-168,-266,-319},{-412,-266,-151,-174,-344,-414},{-347,-235,-216,-151,-255,-319},{-227,-347,-347,-350,-403,-300},{-218,-364,-286,-193,-249,-204}},{{-384,-171,-202,-224,-333,-199},{-412,-193,-235,-308,-174,-165},{-378,-154,-263,-364,-417,-154},{-328,-412,-202,-302,-344,-160},{-294,-339,-151,-328,-322,-196},{-398,-269,-342,-398,-210,-328},{-218,-333,-210,-322,-157,-302},{-280,-392,-381,-367,-193,-375},{-182,-230,-409,-193,-224,-196},{-353,-375,-165,-364,-389,-140},{-414,-165,-409,-235,-336,-162},{-356,-213,-322,-322,-216,-283},{-291,-339,-361,-249,-347,-322},{-353,-311,-336,-356,-356,-302},{-258,-162,-300,-395,-224,-246},{-333,-325,-389,-339,-185,-398},{-157,-386,-350,-244,-367,-232},{-216,-389,-274,-221,-221,-420},{-190,-238,-174,-375,-232,-308},{-342,-216,-294,-406,-230,-353}}},{{{-263,-375,-269,-174,-333,-389},{-196,-258,-339,-157,-333,-344},{-328,-305,-398,-249,-414,-300},{-160,-392,-372,-350,-230,-420},{-224,-403,-294,-165,-403,-392},{-216,-210,-358,-417,-322,-381},{-286,-370,-140,-179,-151,-378},{-364,-263,-146,-235,-224,-232},{-409,-227,-260,-266,-157,-414},{-314,-300,-412,-330,-412,-263},{-202,-336,-389,-165,-414,-392},{-305,-151,-384,-350,-174,-319},{-196,-246,-378,-196,-241,-241},{-269,-199,-185,-386,-392,-151},{-344,-179,-311,-350,-274,-168},{-196,-241,-375,-361,-280,-224},{-375,-358,-308,-319,-358,-389},{-151,-328,-230,-246,-260,-199},{-216,-185,-269,-370,-297,-370},{-336,-213,-272,-381,-322,-384}},{{-372,-389,-196,-370,-412,-162},{-162,-179,-249,-174,-283,-328},{-143,-168,-171,-302,-249,-417},{-151,-154,-216,-392,-207,-325},{-277,-140,-238,-367,-193,-190},{-300,-182,-300,-160,-316,-286},{-232,-151,-188,-165,-319,-325},{-148,-207,-249,-218,-255,-406},{-291,-378,-398,-389,-333,-384},{-171,-412,-185,-375,-260,-286},{-202,-325,-420,-316,-325,-361},{-319,-322,-406,-146,-308,-420},{-330,-274,-157,-221,-283,-333},{-305,-255,-260,-353,-193,-409},{-174,-395,-266,-176,-241,-204},{-190,-302,-319,-255,-358,-386},{-179,-176,-370,-367,-417,-378},{-232,-288,-216,-274,-260,-417},{-160,-230,-190,-210,-302,-392},{-216,-266,-162,-283,-185,-409}},{{-361,-151,-218,-218,-403,-308},{-364,-182,-283,-314,-406,-252},{-255,-342,-392,-260,-403,-358},{-395,-412,-146,-420,-252,-395},{-269,-263,-230,-283,-294,-398},{-274,-165,-143,-162,-322,-316},{-246,-151,-235,-238,-263,-398},{-361,-204,-174,-398,-347,-213},{-400,-199,-227,-263,-146,-297},{-157,-146,-344,-302,-367,-260},{-258,-325,-179,-174,-238,-398},{-162,-266,-210,-367,-190,-224},{-370,-232,-392,-403,-283,-420},{-297,-255,-269,-143,-140,-342},{-188,-400,-389,-361,-188,-258},{-235,-140,-160,-414,-420,-227},{-230,-311,-294,-188,-176,-280},{-188,-356,-232,-241,-375,-342},{-412,-286,-302,-269,-157,-286},{-330,-330,-157,-179,-263,-316}}},{{{-218,-216,-165,-213,-185,-146},{-252,-210,-274,-227,-333,-283},{-179,-370,-325,-356,-165,-353},{-370,-339,-160,-154,-291,-403},{-328,-406,-188,-174,-305,-224},{-414,-249,-367,-218,-277,-238},{-269,-246,-174,-241,-339,-154},{-280,-277,-171,-263,-314,-305},{-274,-252,-333,-230,-316,-185},{-263,-218,-308,-414,-188,-204},{-358,-204,-235,-244,-168,-272},{-308,-330,-322,-255,-182,-185},{-188,-266,-336,-358,-190,-185},{-308,-316,-339,-143,-409,-294},{-246,-325,-151,-336,-171,-350},{-353,-395,-168,-272,-258,-305},{-305,-196,-227,-286,-238,-230},{-255,-199,-294,-232,-417,-182},{-361,-238,-291,-325,-188,-246},{-272,-274,-260,-339,-403,-328}},{{-274,-414,-252,-160,-291,-406},{-162,-280,-344,-330,-213,-266},{-384,-168,-227,-238,-328,-325},{-361,-381,-193,-241,-367,-176},{-372,-342,-174,-386,-280,-235},{-339,-280,-395,-188,-314,-274},{-330,-364,-202,-370,-302,-246},{-263,-260,-291,-319,-316,-356},{-400,-199,-272,-283,-146,-339},{-358,-185,-300,-188,-375,-308},{-420,-168,-210,-384,-297,-372},{-311,-314,-210,-218,-190,-230},{-221,-182,-406,-258,-140,-272},{-367,-140,-392,-300,-395,-238},{-224,-389,-328,-255,-294,-185},{-218,-207,-216,-395,-241,-364},{-302,-255,-218,-328,-330,-403},{-308,-274,-266,-412,-210,-409},{-291,-148,-140,-311,-143,-227},{-417,-361,-146,-255,-280,-218}},{{-154,-370,-190,-300,-412,-146},{-392,-403,-193,-266,-266,-148},{-392,-174,-157,-238,-185,-417},{-342,-398,-311,-294,-151,-160},{-314,-165,-412,-165,-179,-227},{-283,-160,-151,-291,-244,-353},{-339,-249,-302,-308,-316,-151},{-347,-333,-336,-389,-409,-308},{-162,-157,-412,-344,-400,-185},{-358,-140,-235,-196,-305,-199},{-311,-241,-319,-409,-146,-146},{-325,-244,-286,-358,-375,-140},{-218,-176,-325,-300,-395,-260},{-300,-328,-188,-412,-300,-168},{-344,-140,-232,-266,-409,-260},{-409,-378,-165,-336,-202,-244},{-344,-319,-143,-182,-154,-165},{-381,-358,-255,-420,-216,-176},{-344,-291,-210,-143,-218,-199},{-280,-311,-325,-353,-280,-375}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={2070,261,23,150,170,304,400,300,160}; // initial inventory 
int ubiv[I]={2740,522,414,300,341,608,800,600,320}; // the upper bounds of inventory 
int len[I1][I2]={{3,6,2,2,3,3,2,1}}; // 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,7.19,13.32,4.32,2.64,5.16,6.85,4.63,1.82}; // 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]={{6.54,12.11,3.93,2.4,4.69,6.23,4.21,1.65}}; // 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]={5.23,5.23,5.23,4.58,4.58,4.58,3.92,3.92,3.92,9.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,3.14,3.14,3.14,2.75,2.75,2.75,2.36,2.36,2.36,1.92,1.92,1.92,1.68,1.68,1.68,1.44,1.44,1.44,3.75,3.75,3.75,3.28,3.28,3.28,2.81,2.81,2.81,4.98,4.98,4.98,4.36,4.36,4.36,3.74,3.74,3.74,3.37,3.37,3.37,2.95,2.95,2.95,2.53,2.53,2.53,1.32,1.32,1.32,1.16,1.16,1.16,0.99,0.99,0.99}; // 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,4,3,7,4,3,8,4,3,6,3,2,6,3,2,6,3,2,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,7,4,3,7,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,9,5,3,8,5,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,0,4,8,12,2,8,14,1,3,5,7,9,11,13,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,1,3,5,7,9,11,1,5,9,0,6,1,3,5,7,9,11,1,5,9,2,8,1,3,5,7,9,11,1,5,9,0,6,0,2,4,6,8,10,12,14,1,5,9,13,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,0,4,8,12,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,0,4,8,12,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,1,3,5,7,9,11,13,1,5,9,13,1,7,13,1,3,5,7,9,11,13,2,6,10,14,0,6,12,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,1,3,5,7,9,11,13,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,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,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,16,0,4,8,12,16,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,16,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,3,7,11,15,5,11,17,4,6,8,10,12,14,16,5,9,13,17,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,5,11,17,7,9,11,13,15,17,7,11,15,6,12,7,9,11,13,15,17,7,11,15,8,14,7,9,11,13,15,17,7,11,15,6,12,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,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,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,5,9,13,17,3,9,15,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,5,9,13,17,5,11,17,4,6,8,10,12,14,16,5,9,13,17,3,9,15,5,7,9,11,13,15,17,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,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,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,1,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,3,9,15}; // set of end times of each shipment 
