int Dev = 40;// 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 = 340;//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]={{{{11783,0,0,0,0,0},{11232,0,0,0,0,0},{11867,0,0,0,0,0},{10581,0,0,0,0,0},{11886,0,0,0,0,0},{10747,0,0,0,0,0},{11895,0,0,0,0,0},{10851,0,0,0,0,0},{10736,0,0,0,0,0},{11565,0,0,0,0,0},{11402,0,0,0,0,0},{10758,0,0,0,0,0},{11495,0,0,0,0,0},{11341,0,0,0,0,0},{11643,0,0,0,0,0},{11856,0,0,0,0,0},{11036,0,0,0,0,0},{11362,0,0,0,0,0},{11166,0,0,0,0,0},{11646,0,0,0,0,0}},{{11408,0,0,0,0,0},{10904,0,0,0,0,0},{11770,0,0,0,0,0},{11241,0,0,0,0,0},{11020,0,0,0,0,0},{11118,0,0,0,0,0},{11981,0,0,0,0,0},{11077,0,0,0,0,0},{11202,0,0,0,0,0},{11521,0,0,0,0,0},{11216,0,0,0,0,0},{11014,0,0,0,0,0},{11775,0,0,0,0,0},{12117,0,0,0,0,0},{10895,0,0,0,0,0},{11686,0,0,0,0,0},{11573,0,0,0,0,0},{11660,0,0,0,0,0},{10836,0,0,0,0,0},{11599,0,0,0,0,0}},{{11592,0,0,0,0,0},{11089,0,0,0,0,0},{11386,0,0,0,0,0},{11822,0,0,0,0,0},{11300,0,0,0,0,0},{11865,0,0,0,0,0},{11767,0,0,0,0,0},{12073,0,0,0,0,0},{10930,0,0,0,0,0},{11700,0,0,0,0,0},{12132,0,0,0,0,0},{11578,0,0,0,0,0},{11454,0,0,0,0,0},{11605,0,0,0,0,0},{12503,0,0,0,0,0},{11708,0,0,0,0,0},{11654,0,0,0,0,0},{11453,0,0,0,0,0},{10613,0,0,0,0,0},{11409,0,0,0,0,0}}},{{{-219,-148,-260,-164,-235,-173},{-213,-177,-215,-136,-185,-240},{-223,-211,-262,-136,-225,-238},{-227,-203,-203,-244,-173,-146},{-280,-193,-191,-189,-276,-256},{-197,-140,-124,-164,-242,-252},{-189,-158,-154,-223,-207,-156},{-217,-171,-229,-248,-207,-189},{-146,-177,-173,-205,-250,-124},{-254,-193,-134,-175,-258,-168},{-217,-235,-252,-154,-164,-229},{-211,-162,-152,-197,-207,-175},{-197,-240,-199,-221,-262,-179},{-187,-272,-268,-231,-175,-211},{-278,-272,-148,-146,-140,-223},{-205,-235,-148,-162,-213,-276},{-181,-250,-282,-164,-225,-183},{-142,-154,-221,-240,-280,-189},{-146,-148,-130,-272,-254,-209},{-282,-162,-140,-150,-144,-231}},{{-211,-242,-134,-166,-126,-274},{-146,-136,-132,-144,-278,-272},{-238,-160,-191,-140,-248,-256},{-124,-266,-203,-268,-158,-215},{-189,-138,-264,-221,-173,-276},{-162,-187,-181,-262,-191,-223},{-262,-146,-278,-260,-136,-282},{-211,-164,-146,-233,-166,-156},{-195,-250,-140,-193,-168,-156},{-240,-242,-130,-242,-150,-268},{-193,-191,-126,-152,-177,-238},{-130,-258,-164,-185,-130,-136},{-179,-181,-280,-274,-248,-227},{-268,-189,-197,-256,-187,-136},{-221,-164,-156,-146,-223,-282},{-270,-199,-209,-128,-219,-173},{-185,-211,-185,-195,-189,-223},{-187,-183,-213,-250,-160,-144},{-181,-124,-197,-130,-258,-270},{-207,-242,-282,-173,-203,-276}},{{-154,-268,-260,-148,-154,-217},{-152,-242,-142,-138,-136,-160},{-201,-262,-150,-209,-146,-199},{-181,-252,-126,-189,-156,-270},{-221,-260,-189,-205,-252,-244},{-217,-207,-209,-246,-235,-144},{-154,-154,-195,-235,-140,-134},{-240,-203,-276,-250,-193,-187},{-134,-248,-138,-166,-154,-217},{-166,-207,-142,-162,-252,-164},{-229,-146,-154,-175,-134,-260},{-173,-134,-195,-164,-225,-132},{-248,-136,-132,-205,-171,-284},{-244,-168,-138,-225,-160,-189},{-280,-181,-166,-215,-160,-233},{-217,-150,-278,-213,-211,-284},{-187,-252,-185,-189,-223,-160},{-144,-168,-138,-254,-278,-238},{-148,-244,-168,-197,-284,-136},{-217,-134,-227,-134,-203,-164}}},{{{-135,-126,-198,-153,-187,-214},{-185,-214,-151,-213,-177,-169},{-217,-177,-103,-137,-161,-103},{-216,-190,-137,-98,-196,-124},{-164,-135,-211,-174,-111,-217},{-124,-156,-190,-100,-103,-145},{-156,-159,-209,-140,-140,-209},{-114,-116,-129,-201,-116,-113},{-203,-190,-225,-192,-130,-122},{-200,-219,-187,-216,-158,-221},{-116,-216,-185,-132,-147,-217},{-163,-138,-204,-150,-208,-130},{-192,-193,-101,-161,-159,-134},{-208,-118,-114,-159,-150,-140},{-111,-224,-203,-166,-127,-180},{-150,-196,-129,-193,-225,-167},{-105,-169,-109,-135,-156,-135},{-100,-137,-103,-127,-116,-101},{-156,-164,-177,-121,-171,-192},{-195,-119,-142,-150,-219,-171}},{{-185,-116,-222,-206,-142,-217},{-126,-164,-140,-143,-105,-209},{-211,-116,-182,-172,-109,-116},{-106,-151,-108,-135,-159,-182},{-113,-119,-134,-155,-106,-143},{-143,-206,-126,-221,-172,-105},{-224,-171,-147,-217,-193,-153},{-129,-135,-116,-109,-150,-109},{-161,-185,-134,-118,-169,-105},{-224,-224,-148,-132,-100,-114},{-169,-217,-190,-106,-143,-156},{-153,-214,-97,-184,-116,-140},{-172,-156,-148,-174,-179,-109},{-124,-105,-138,-167,-127,-213},{-167,-134,-114,-163,-155,-188},{-201,-166,-158,-132,-147,-109},{-221,-158,-135,-126,-108,-145},{-195,-101,-150,-126,-108,-113},{-142,-169,-150,-140,-164,-163},{-138,-100,-225,-201,-217,-196}},{{-130,-132,-224,-216,-222,-222},{-156,-161,-116,-134,-185,-126},{-129,-213,-147,-193,-200,-156},{-124,-135,-200,-203,-134,-200},{-155,-109,-153,-151,-221,-169},{-172,-219,-132,-203,-169,-196},{-155,-174,-222,-171,-180,-111},{-164,-130,-121,-222,-138,-190},{-106,-219,-188,-147,-174,-145},{-103,-132,-97,-100,-190,-103},{-122,-129,-185,-219,-221,-185},{-119,-161,-159,-190,-124,-171},{-219,-150,-155,-209,-182,-124},{-221,-140,-114,-98,-214,-167},{-111,-190,-155,-192,-187,-163},{-198,-151,-180,-214,-158,-114},{-180,-135,-118,-187,-138,-188},{-132,-198,-206,-97,-111,-208},{-97,-221,-98,-108,-225,-106},{-177,-211,-113,-225,-153,-209}}},{{{-263,-259,-178,-286,-224,-173},{-319,-240,-210,-319,-300,-150},{-275,-323,-182,-189,-141,-169},{-173,-240,-148,-155,-152,-141},{-139,-314,-256,-139,-141,-185},{-176,-150,-231,-303,-176,-236},{-150,-224,-201,-229,-199,-224},{-169,-152,-141,-203,-185,-213},{-282,-159,-316,-222,-196,-194},{-229,-152,-243,-282,-229,-222},{-243,-284,-305,-263,-159,-196},{-180,-176,-139,-217,-159,-171},{-226,-247,-139,-224,-273,-226},{-139,-240,-155,-305,-229,-233},{-159,-155,-159,-280,-159,-229},{-280,-270,-247,-298,-296,-141},{-192,-157,-201,-217,-323,-164},{-238,-157,-180,-226,-169,-270},{-203,-275,-280,-171,-277,-245},{-243,-298,-293,-159,-316,-180}},{{-189,-189,-270,-296,-150,-185},{-323,-247,-277,-155,-300,-169},{-277,-293,-233,-187,-282,-203},{-162,-261,-199,-233,-155,-268},{-323,-291,-178,-143,-321,-296},{-146,-143,-231,-293,-249,-263},{-307,-169,-280,-238,-307,-217},{-148,-141,-196,-224,-224,-150},{-321,-282,-296,-141,-178,-316},{-173,-280,-282,-159,-166,-231},{-245,-323,-303,-270,-210,-226},{-293,-240,-206,-238,-139,-162},{-245,-286,-201,-323,-206,-321},{-194,-194,-252,-157,-316,-291},{-159,-289,-229,-155,-171,-208},{-314,-307,-284,-296,-282,-259},{-280,-166,-157,-178,-182,-296},{-148,-303,-199,-314,-141,-224},{-150,-252,-139,-300,-282,-305},{-182,-159,-240,-233,-319,-201}},{{-180,-254,-282,-238,-206,-238},{-256,-321,-238,-240,-150,-233},{-303,-300,-187,-143,-201,-196},{-319,-150,-280,-229,-307,-314},{-231,-139,-206,-284,-219,-139},{-240,-194,-159,-173,-152,-284},{-182,-222,-284,-249,-182,-298},{-245,-217,-270,-229,-256,-298},{-270,-245,-208,-305,-289,-275},{-148,-178,-224,-249,-316,-261},{-316,-284,-201,-187,-208,-268},{-240,-217,-219,-166,-176,-289},{-286,-229,-169,-210,-233,-210},{-303,-312,-143,-233,-280,-233},{-240,-293,-293,-263,-182,-286},{-259,-312,-249,-159,-213,-289},{-152,-256,-192,-231,-238,-162},{-293,-206,-270,-224,-213,-171},{-173,-148,-229,-245,-296,-201},{-231,-185,-305,-150,-150,-236}}},{{{-215,-232,-230,-158,-269,-197},{-282,-193,-191,-150,-228,-184},{-291,-204,-180,-174,-217,-265},{-271,-141,-148,-243,-135,-200},{-254,-247,-254,-213,-197,-267},{-148,-169,-295,-184,-286,-180},{-182,-247,-152,-241,-161,-169},{-193,-139,-189,-132,-254,-243},{-178,-278,-145,-260,-295,-176},{-165,-260,-247,-135,-271,-280},{-178,-156,-221,-167,-289,-217},{-304,-291,-208,-245,-141,-163},{-304,-150,-193,-247,-256,-230},{-163,-171,-135,-256,-178,-152},{-161,-297,-165,-132,-245,-174},{-191,-265,-154,-202,-276,-295},{-273,-206,-208,-224,-180,-239},{-237,-163,-237,-230,-141,-291},{-152,-169,-213,-137,-234,-245},{-237,-135,-182,-237,-289,-250}},{{-191,-180,-130,-299,-252,-187},{-154,-284,-267,-139,-284,-200},{-228,-250,-169,-258,-167,-195},{-167,-263,-193,-219,-263,-202},{-130,-191,-200,-130,-230,-197},{-195,-141,-269,-145,-174,-180},{-230,-250,-267,-297,-145,-154},{-265,-254,-265,-239,-210,-265},{-302,-197,-158,-150,-163,-204},{-148,-195,-280,-210,-182,-174},{-224,-180,-232,-145,-263,-278},{-141,-228,-297,-224,-213,-304},{-224,-269,-286,-234,-297,-234},{-237,-158,-167,-197,-252,-278},{-171,-247,-191,-241,-176,-152},{-260,-135,-208,-284,-247,-200},{-204,-280,-304,-280,-256,-234},{-293,-210,-200,-297,-250,-273},{-154,-167,-154,-282,-141,-202},{-245,-237,-237,-195,-176,-252}},{{-178,-171,-210,-271,-204,-252},{-226,-282,-254,-165,-254,-269},{-260,-219,-245,-171,-265,-224},{-184,-174,-263,-180,-158,-184},{-180,-280,-297,-163,-247,-237},{-156,-291,-250,-213,-215,-180},{-135,-141,-193,-295,-191,-265},{-273,-230,-165,-297,-195,-132},{-130,-293,-161,-234,-230,-234},{-293,-200,-271,-273,-256,-150},{-189,-273,-237,-171,-241,-286},{-254,-228,-189,-243,-221,-158},{-269,-137,-237,-204,-208,-273},{-232,-241,-130,-250,-265,-202},{-208,-263,-263,-206,-243,-258},{-226,-273,-161,-232,-241,-271},{-265,-197,-156,-282,-297,-215},{-273,-174,-273,-278,-230,-273},{-180,-230,-178,-289,-180,-197},{-156,-245,-250,-148,-282,-178}}},{{{-285,-223,-356,-367,-322,-370},{-338,-253,-298,-231,-189,-237},{-340,-343,-319,-348,-277,-202},{-271,-160,-319,-247,-186,-319},{-173,-207,-372,-325,-266,-359},{-165,-330,-285,-306,-354,-274},{-372,-362,-332,-370,-253,-290},{-215,-314,-178,-319,-364,-306},{-237,-237,-261,-160,-200,-327},{-266,-261,-367,-186,-343,-223},{-173,-181,-356,-184,-343,-234},{-309,-274,-370,-186,-165,-215},{-165,-160,-271,-364,-303,-356},{-178,-295,-348,-301,-176,-242},{-354,-258,-210,-330,-319,-354},{-181,-181,-205,-335,-301,-332},{-215,-330,-229,-303,-327,-168},{-245,-184,-319,-189,-221,-306},{-242,-184,-317,-234,-255,-223},{-279,-255,-340,-213,-223,-184}},{{-370,-176,-176,-356,-372,-229},{-356,-309,-160,-258,-285,-168},{-356,-293,-234,-279,-279,-160},{-351,-176,-218,-319,-319,-348},{-293,-218,-372,-367,-184,-301},{-340,-269,-290,-176,-362,-184},{-189,-285,-184,-173,-354,-255},{-354,-309,-237,-255,-207,-287},{-340,-210,-223,-362,-168,-170},{-359,-271,-314,-343,-293,-170},{-202,-194,-311,-210,-314,-277},{-192,-271,-247,-231,-346,-186},{-210,-362,-309,-168,-170,-250},{-335,-354,-231,-364,-186,-277},{-178,-253,-301,-338,-194,-335},{-237,-370,-279,-200,-314,-221},{-160,-189,-215,-194,-263,-194},{-247,-372,-306,-170,-301,-298},{-372,-301,-372,-194,-282,-274},{-269,-229,-234,-160,-189,-258}},{{-271,-348,-226,-168,-301,-200},{-290,-229,-162,-223,-189,-210},{-189,-258,-255,-176,-351,-215},{-322,-317,-293,-239,-332,-287},{-173,-237,-274,-330,-181,-293},{-237,-215,-340,-250,-263,-274},{-351,-330,-298,-348,-359,-173},{-340,-314,-314,-207,-356,-290},{-372,-362,-226,-189,-269,-189},{-354,-239,-245,-322,-338,-356},{-239,-285,-197,-237,-282,-359},{-186,-303,-213,-290,-229,-184},{-176,-215,-189,-239,-234,-356},{-290,-215,-370,-309,-255,-239},{-295,-335,-229,-311,-239,-314},{-205,-367,-189,-221,-215,-186},{-221,-356,-197,-271,-319,-340},{-239,-338,-173,-237,-170,-234},{-234,-200,-293,-258,-210,-293},{-367,-205,-165,-221,-327,-330}}},{{{-258,-196,-319,-274,-277,-258},{-202,-176,-347,-347,-221,-230},{-227,-266,-392,-328,-384,-330},{-232,-221,-381,-311,-308,-297},{-294,-241,-305,-300,-269,-235},{-288,-202,-274,-269,-224,-297},{-190,-319,-297,-378,-213,-185},{-364,-305,-392,-190,-272,-227},{-260,-330,-384,-249,-185,-314},{-213,-378,-356,-204,-283,-381},{-258,-353,-252,-311,-168,-174},{-207,-202,-277,-294,-204,-210},{-269,-185,-372,-210,-291,-224},{-381,-305,-333,-258,-392,-319},{-188,-367,-384,-305,-269,-204},{-196,-384,-370,-213,-308,-227},{-370,-325,-230,-196,-176,-241},{-255,-384,-308,-305,-241,-266},{-246,-176,-358,-280,-286,-336},{-361,-174,-216,-260,-297,-249}},{{-386,-344,-356,-171,-168,-364},{-277,-266,-274,-190,-182,-193},{-213,-274,-381,-274,-210,-314},{-375,-238,-232,-339,-319,-207},{-339,-230,-190,-238,-174,-252},{-274,-232,-392,-350,-168,-238},{-185,-252,-174,-272,-297,-238},{-361,-384,-347,-232,-176,-297},{-272,-266,-316,-288,-227,-302},{-224,-280,-230,-297,-350,-294},{-389,-266,-171,-280,-319,-258},{-274,-342,-314,-319,-227,-347},{-190,-319,-375,-336,-308,-370},{-188,-230,-311,-308,-272,-319},{-269,-344,-196,-305,-190,-188},{-230,-336,-389,-375,-185,-238},{-314,-386,-288,-375,-288,-367},{-372,-244,-319,-277,-280,-171},{-216,-174,-230,-168,-342,-311},{-274,-378,-280,-375,-221,-238}},{{-389,-367,-389,-294,-328,-263},{-294,-356,-241,-356,-367,-328},{-325,-274,-375,-361,-330,-188},{-255,-375,-218,-336,-202,-244},{-361,-230,-319,-216,-199,-221},{-384,-249,-263,-202,-246,-356},{-188,-227,-356,-316,-325,-182},{-386,-241,-185,-375,-255,-333},{-311,-249,-277,-353,-361,-272},{-241,-258,-168,-384,-386,-322},{-314,-308,-319,-328,-381,-280},{-328,-364,-286,-269,-283,-328},{-283,-207,-244,-168,-342,-328},{-356,-367,-389,-168,-353,-216},{-182,-258,-358,-361,-370,-297},{-384,-269,-356,-319,-353,-311},{-330,-353,-378,-224,-216,-330},{-350,-246,-260,-258,-300,-322},{-269,-280,-199,-288,-182,-328},{-384,-342,-241,-347,-291,-190}}},{{{-246,-221,-227,-221,-272,-361},{-246,-188,-342,-249,-272,-235},{-221,-258,-202,-255,-350,-210},{-300,-249,-311,-266,-174,-185},{-297,-370,-260,-294,-274,-255},{-230,-353,-188,-185,-277,-190},{-297,-288,-361,-347,-389,-297},{-179,-202,-308,-286,-291,-252},{-174,-174,-207,-213,-336,-182},{-190,-311,-372,-252,-347,-216},{-325,-392,-168,-356,-319,-246},{-210,-174,-316,-294,-344,-269},{-314,-381,-230,-297,-179,-258},{-174,-272,-269,-249,-316,-375},{-288,-316,-325,-174,-364,-384},{-182,-344,-389,-283,-266,-179},{-263,-364,-216,-182,-272,-322},{-350,-188,-344,-190,-322,-258},{-322,-286,-213,-196,-255,-216},{-179,-333,-367,-353,-202,-311}},{{-272,-185,-269,-168,-347,-300},{-342,-302,-286,-342,-302,-238},{-190,-316,-269,-255,-336,-361},{-378,-188,-174,-367,-344,-188},{-235,-252,-263,-255,-381,-300},{-204,-244,-384,-230,-258,-344},{-241,-291,-297,-389,-288,-381},{-174,-246,-300,-213,-176,-314},{-171,-235,-196,-218,-283,-300},{-322,-199,-283,-297,-305,-294},{-302,-258,-277,-207,-316,-300},{-182,-319,-171,-260,-370,-188},{-188,-232,-171,-255,-328,-188},{-258,-358,-389,-249,-361,-325},{-314,-171,-358,-322,-252,-347},{-252,-185,-218,-347,-356,-283},{-392,-272,-342,-311,-361,-246},{-283,-294,-353,-291,-339,-210},{-283,-308,-182,-297,-244,-297},{-333,-238,-384,-314,-188,-314}},{{-269,-381,-339,-171,-277,-171},{-302,-258,-241,-358,-300,-272},{-288,-176,-204,-336,-370,-272},{-325,-314,-210,-238,-252,-297},{-185,-171,-230,-325,-171,-280},{-294,-381,-314,-344,-252,-235},{-260,-300,-328,-350,-361,-319},{-252,-277,-260,-305,-386,-168},{-188,-216,-193,-246,-227,-224},{-218,-322,-375,-288,-238,-314},{-210,-230,-384,-218,-302,-342},{-364,-389,-294,-381,-249,-389},{-333,-246,-283,-330,-314,-336},{-216,-342,-269,-185,-291,-269},{-325,-342,-224,-386,-322,-392},{-218,-378,-311,-316,-204,-356},{-188,-386,-344,-272,-216,-274},{-361,-258,-179,-193,-193,-370},{-302,-308,-204,-171,-207,-272},{-207,-297,-356,-319,-260,-252}}},{{{-255,-392,-288,-216,-361,-322},{-207,-300,-350,-210,-207,-316},{-336,-384,-207,-314,-235,-336},{-277,-202,-277,-263,-353,-168},{-367,-370,-204,-277,-367,-202},{-249,-300,-179,-188,-325,-344},{-291,-302,-384,-344,-300,-255},{-319,-328,-199,-244,-358,-176},{-238,-238,-168,-210,-384,-230},{-347,-224,-179,-174,-218,-176},{-227,-244,-314,-367,-294,-221},{-322,-216,-330,-305,-339,-235},{-246,-319,-274,-319,-286,-269},{-244,-224,-378,-174,-350,-199},{-319,-196,-297,-258,-269,-378},{-179,-274,-392,-213,-319,-389},{-199,-277,-389,-202,-176,-386},{-294,-339,-364,-291,-361,-389},{-336,-386,-244,-193,-364,-277},{-333,-367,-235,-381,-291,-319}},{{-179,-260,-238,-311,-372,-280},{-246,-188,-168,-188,-218,-372},{-266,-370,-319,-260,-336,-344},{-255,-291,-199,-367,-196,-193},{-218,-252,-216,-193,-252,-384},{-367,-224,-202,-168,-246,-364},{-308,-358,-288,-350,-244,-358},{-266,-297,-168,-372,-319,-381},{-288,-272,-386,-372,-378,-277},{-199,-316,-210,-381,-361,-235},{-263,-344,-171,-235,-196,-199},{-286,-249,-386,-174,-227,-314},{-283,-277,-291,-367,-193,-182},{-378,-347,-339,-389,-255,-294},{-263,-266,-300,-174,-367,-168},{-190,-202,-286,-347,-277,-182},{-232,-280,-185,-188,-350,-283},{-272,-300,-389,-330,-174,-286},{-319,-188,-216,-210,-266,-174},{-386,-202,-232,-221,-202,-344}},{{-227,-199,-204,-286,-249,-244},{-199,-227,-263,-204,-280,-204},{-384,-218,-210,-342,-188,-182},{-350,-336,-283,-207,-381,-297},{-202,-322,-384,-272,-389,-384},{-353,-367,-375,-255,-342,-218},{-238,-241,-272,-258,-336,-389},{-358,-207,-322,-384,-188,-249},{-199,-204,-193,-274,-227,-199},{-202,-255,-328,-294,-274,-342},{-356,-241,-168,-370,-381,-381},{-232,-230,-392,-258,-274,-316},{-297,-213,-255,-342,-336,-308},{-244,-179,-378,-218,-255,-330},{-328,-314,-174,-389,-227,-300},{-322,-168,-291,-174,-171,-171},{-392,-218,-190,-330,-342,-182},{-370,-176,-367,-260,-328,-221},{-291,-291,-246,-322,-188,-199},{-339,-216,-210,-342,-339,-179}}}}; // 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]={8,4,3,7,4,3,8,4,3,5,3,2,6,3,2,5,3,2,7,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,2,4,6,8,10,0,4,8,0,6,0,2,4,6,8,10,1,5,9,0,6,2,4,6,8,10,0,4,8,0,6,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,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,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,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,2,6,10,14,2,8,14,1,3,5,7,9,11,13,0,4,8,12,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,16,0,4,8,12,16,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,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,3,9,15,8,10,12,14,16,6,10,14,6,12,6,8,10,12,14,16,7,11,15,6,12,8,10,12,14,16,6,10,14,6,12,4,6,8,10,12,14,16,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,4,10,16,4,6,8,10,12,14,16,2,6,10,14,4,10,16,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,4,6,8,10,12,14,16,2,6,10,14,4,10,16,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,5,7,9,11,13,15,17,5,9,13,17,5,11,17,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,5,7,9,11,13,15,17,5,9,13,17,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,5,11,17,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,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,2,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,1,7,13,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,1,3,5,7,9,11,13,15,17,1,5,9,13,17,2,8,14}; // set of end times of each shipment 
