int Dev = 30;// Deviation
extern const int CNN = 1;// 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 = 732;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 17;//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]={{{{10916,0,0,0,0,0},{11284,0,0,0,0,0},{11903,0,0,0,0,0},{11561,0,0,0,0,0},{11772,0,0,0,0,0},{11423,0,0,0,0,0},{11647,0,0,0,0,0},{10983,0,0,0,0,0},{11615,0,0,0,0,0},{11456,0,0,0,0,0}},{{11687,0,0,0,0,0},{11289,0,0,0,0,0},{11389,0,0,0,0,0},{11409,0,0,0,0,0},{11530,0,0,0,0,0},{11776,0,0,0,0,0},{11267,0,0,0,0,0},{11822,0,0,0,0,0},{11550,0,0,0,0,0},{11728,0,0,0,0,0}},{{12027,0,0,0,0,0},{11291,0,0,0,0,0},{11750,0,0,0,0,0},{11313,0,0,0,0,0},{11335,0,0,0,0,0},{11631,0,0,0,0,0},{11683,0,0,0,0,0},{11665,0,0,0,0,0},{11475,0,0,0,0,0},{11387,0,0,0,0,0}},{{11694,0,0,0,0,0},{11408,0,0,0,0,0},{11700,0,0,0,0,0},{10807,0,0,0,0,0},{11750,0,0,0,0,0},{11691,0,0,0,0,0},{11768,0,0,0,0,0},{11266,0,0,0,0,0},{11626,0,0,0,0,0},{11389,0,0,0,0,0}},{{11545,0,0,0,0,0},{11160,0,0,0,0,0},{11128,0,0,0,0,0},{11266,0,0,0,0,0},{11233,0,0,0,0,0},{11546,0,0,0,0,0},{11394,0,0,0,0,0},{11774,0,0,0,0,0},{11893,0,0,0,0,0},{12074,0,0,0,0,0}},{{12287,0,0,0,0,0},{11118,0,0,0,0,0},{10934,0,0,0,0,0},{11706,0,0,0,0,0},{12099,0,0,0,0,0},{11667,0,0,0,0,0},{11281,0,0,0,0,0},{11830,0,0,0,0,0},{11288,0,0,0,0,0},{11010,0,0,0,0,0}}},{{{-162,-215,-191,-240,-213,-229},{-199,-223,-221,-195,-248,-240},{-177,-160,-233,-252,-225,-146},{-258,-193,-156,-193,-262,-199},{-187,-187,-175,-227,-144,-211},{-256,-181,-209,-162,-246,-187},{-244,-207,-235,-213,-231,-213},{-233,-154,-189,-171,-250,-187},{-203,-168,-152,-171,-195,-148},{-262,-217,-225,-175,-221,-175}},{{-171,-166,-205,-142,-264,-227},{-166,-248,-254,-244,-158,-144},{-240,-203,-264,-158,-238,-221},{-246,-252,-248,-195,-177,-254},{-264,-221,-260,-166,-154,-171},{-254,-254,-168,-235,-205,-197},{-240,-235,-199,-142,-197,-240},{-217,-209,-231,-177,-248,-254},{-244,-142,-262,-254,-173,-213},{-175,-207,-235,-229,-264,-258}},{{-181,-150,-205,-181,-219,-189},{-193,-144,-223,-250,-215,-197},{-177,-191,-254,-223,-152,-199},{-240,-209,-168,-213,-256,-166},{-158,-195,-223,-231,-258,-233},{-171,-233,-179,-258,-235,-156},{-171,-254,-262,-185,-197,-246},{-217,-231,-219,-181,-217,-168},{-152,-181,-168,-158,-158,-173},{-162,-164,-217,-175,-193,-246}},{{-160,-213,-185,-260,-162,-199},{-229,-227,-242,-156,-191,-221},{-262,-144,-171,-248,-233,-177},{-201,-175,-229,-225,-191,-233},{-146,-189,-168,-173,-191,-238},{-231,-146,-240,-164,-168,-252},{-142,-152,-193,-215,-246,-242},{-221,-246,-156,-197,-162,-240},{-219,-233,-246,-240,-154,-256},{-217,-199,-264,-185,-144,-162}},{{-164,-144,-227,-191,-217,-187},{-238,-219,-197,-187,-225,-217},{-171,-164,-193,-250,-185,-162},{-262,-213,-219,-175,-146,-211},{-150,-177,-175,-168,-175,-231},{-148,-187,-183,-229,-262,-258},{-185,-248,-223,-166,-189,-219},{-195,-242,-227,-256,-248,-164},{-252,-168,-189,-219,-221,-254},{-260,-189,-225,-235,-201,-162}},{{-203,-158,-256,-217,-258,-211},{-233,-187,-233,-160,-223,-199},{-209,-225,-209,-181,-205,-211},{-179,-219,-209,-213,-177,-221},{-193,-256,-240,-246,-197,-164},{-227,-217,-185,-256,-158,-199},{-240,-250,-221,-254,-235,-185},{-233,-223,-244,-250,-185,-154},{-221,-254,-185,-142,-205,-252},{-205,-160,-227,-187,-187,-246}}},{{{-119,-190,-209,-166,-132,-190},{-169,-209,-172,-132,-124,-153},{-172,-185,-187,-196,-148,-114},{-167,-187,-172,-118,-174,-116},{-208,-114,-138,-182,-203,-190},{-174,-177,-179,-140,-161,-166},{-148,-121,-119,-161,-166,-163},{-172,-140,-193,-119,-166,-192},{-158,-113,-145,-130,-188,-200},{-143,-175,-129,-193,-198,-126}},{{-116,-137,-118,-164,-132,-171},{-179,-153,-129,-184,-114,-129},{-159,-116,-122,-203,-132,-185},{-171,-130,-167,-145,-204,-130},{-163,-171,-116,-148,-137,-208},{-113,-114,-179,-166,-129,-130},{-138,-134,-113,-134,-159,-203},{-206,-134,-129,-180,-130,-206},{-140,-187,-209,-153,-171,-196},{-148,-145,-124,-190,-175,-174}},{{-201,-118,-172,-201,-132,-190},{-129,-113,-118,-209,-209,-164},{-143,-167,-196,-121,-145,-143},{-114,-127,-137,-151,-127,-138},{-172,-163,-137,-184,-135,-175},{-208,-209,-116,-142,-148,-196},{-179,-161,-175,-151,-135,-137},{-190,-126,-155,-167,-118,-201},{-180,-121,-119,-195,-158,-153},{-193,-150,-175,-148,-118,-129}},{{-113,-206,-150,-129,-148,-155},{-201,-185,-209,-206,-158,-143},{-161,-196,-114,-198,-135,-169},{-151,-150,-188,-113,-121,-175},{-188,-143,-145,-116,-208,-134},{-158,-172,-179,-204,-122,-113},{-114,-177,-130,-164,-158,-187},{-156,-188,-143,-166,-126,-140},{-118,-150,-143,-129,-169,-138},{-156,-167,-155,-147,-203,-119}},{{-208,-119,-198,-179,-171,-159},{-147,-147,-201,-182,-145,-113},{-143,-196,-188,-180,-132,-179},{-161,-161,-208,-164,-182,-200},{-121,-201,-124,-163,-134,-156},{-209,-151,-121,-156,-164,-127},{-148,-145,-156,-169,-184,-155},{-187,-177,-138,-209,-206,-161},{-150,-206,-204,-208,-127,-142},{-182,-206,-121,-180,-203,-196}},{{-192,-198,-187,-184,-166,-184},{-180,-140,-132,-206,-147,-190},{-130,-179,-148,-145,-129,-127},{-196,-126,-114,-126,-196,-147},{-198,-116,-187,-135,-206,-185},{-192,-134,-159,-113,-184,-177},{-156,-192,-130,-204,-130,-196},{-113,-148,-159,-167,-137,-114},{-203,-151,-164,-134,-143,-140},{-151,-130,-196,-122,-119,-185}}},{{{-171,-217,-268,-259,-206,-208},{-203,-206,-247,-182,-236,-208},{-300,-247,-215,-298,-284,-247},{-233,-275,-240,-169,-282,-284},{-164,-286,-219,-293,-233,-176},{-282,-173,-252,-176,-261,-192},{-300,-210,-280,-189,-263,-178},{-210,-233,-233,-169,-291,-245},{-268,-286,-252,-215,-247,-298},{-270,-213,-173,-247,-263,-259}},{{-277,-282,-273,-219,-233,-286},{-291,-263,-194,-277,-249,-240},{-261,-284,-178,-178,-247,-252},{-266,-252,-238,-208,-173,-208},{-217,-194,-236,-243,-166,-261},{-229,-219,-196,-162,-270,-210},{-256,-189,-166,-284,-196,-182},{-162,-162,-236,-196,-256,-176},{-199,-206,-226,-256,-286,-199},{-273,-229,-273,-245,-226,-176}},{{-256,-289,-275,-189,-219,-199},{-247,-166,-291,-233,-222,-176},{-187,-289,-268,-252,-298,-224},{-203,-229,-229,-238,-196,-194},{-210,-196,-222,-240,-194,-275},{-233,-219,-189,-266,-268,-208},{-210,-298,-261,-215,-282,-217},{-196,-238,-293,-273,-245,-286},{-273,-268,-208,-173,-291,-166},{-233,-300,-213,-176,-180,-252}},{{-226,-233,-298,-273,-219,-173},{-231,-187,-296,-201,-180,-219},{-266,-280,-289,-296,-173,-266},{-222,-164,-201,-236,-249,-229},{-215,-277,-291,-215,-236,-245},{-284,-199,-275,-180,-199,-217},{-247,-277,-169,-247,-249,-266},{-282,-261,-229,-166,-231,-282},{-270,-275,-164,-231,-201,-215},{-203,-233,-194,-252,-210,-282}},{{-178,-259,-296,-280,-206,-236},{-240,-219,-280,-208,-226,-222},{-252,-236,-222,-226,-252,-252},{-275,-199,-240,-166,-243,-208},{-291,-210,-166,-182,-203,-180},{-296,-240,-178,-206,-275,-162},{-189,-182,-222,-182,-282,-208},{-196,-282,-259,-187,-206,-273},{-219,-210,-245,-215,-293,-291},{-261,-268,-259,-247,-176,-263}},{{-245,-215,-300,-298,-268,-270},{-213,-222,-282,-282,-196,-171},{-194,-256,-182,-182,-206,-284},{-286,-240,-233,-208,-240,-203},{-192,-187,-298,-199,-164,-291},{-268,-196,-219,-293,-282,-192},{-180,-178,-222,-217,-203,-192},{-226,-284,-249,-266,-238,-173},{-300,-203,-268,-243,-284,-284},{-282,-236,-180,-166,-180,-173}}},{{{-165,-182,-154,-232,-280,-210},{-241,-163,-256,-210,-219,-213},{-226,-202,-217,-230,-263,-156},{-176,-182,-165,-200,-260,-204},{-215,-202,-234,-154,-276,-200},{-206,-206,-210,-200,-197,-200},{-241,-167,-217,-263,-269,-206},{-180,-161,-171,-230,-158,-215},{-226,-282,-245,-156,-232,-226},{-182,-267,-193,-232,-267,-176}},{{-243,-189,-260,-215,-171,-269},{-193,-191,-208,-191,-252,-195},{-224,-182,-193,-200,-202,-241},{-224,-230,-250,-239,-187,-282},{-250,-219,-258,-230,-161,-219},{-208,-163,-210,-154,-250,-241},{-154,-208,-243,-184,-208,-217},{-267,-254,-224,-282,-239,-174},{-254,-276,-258,-228,-204,-152},{-178,-265,-258,-158,-254,-163}},{{-256,-234,-208,-215,-182,-210},{-280,-193,-169,-156,-174,-219},{-171,-237,-247,-278,-265,-267},{-234,-282,-239,-278,-260,-221},{-193,-191,-208,-224,-252,-171},{-267,-200,-237,-202,-208,-273},{-239,-226,-250,-169,-174,-174},{-204,-250,-195,-161,-247,-237},{-282,-219,-278,-263,-273,-178},{-276,-169,-191,-247,-269,-165}},{{-273,-260,-237,-169,-278,-167},{-221,-161,-245,-267,-260,-154},{-252,-200,-276,-247,-169,-178},{-165,-193,-280,-154,-165,-182},{-239,-258,-252,-245,-215,-243},{-165,-280,-217,-152,-169,-176},{-217,-254,-239,-271,-197,-263},{-152,-189,-280,-189,-230,-243},{-206,-206,-263,-265,-276,-174},{-237,-278,-182,-158,-165,-267}},{{-256,-206,-154,-224,-243,-278},{-278,-258,-228,-197,-161,-169},{-156,-195,-182,-273,-187,-165},{-180,-182,-228,-273,-278,-204},{-269,-197,-260,-204,-154,-193},{-254,-221,-191,-263,-273,-200},{-267,-206,-237,-213,-156,-169},{-282,-265,-163,-152,-228,-237},{-243,-278,-200,-243,-191,-226},{-228,-282,-193,-228,-208,-271}},{{-228,-278,-260,-263,-174,-156},{-182,-221,-202,-195,-193,-263},{-213,-174,-265,-165,-202,-221},{-234,-280,-182,-158,-180,-174},{-239,-191,-226,-280,-187,-184},{-219,-161,-189,-182,-217,-213},{-176,-197,-243,-232,-165,-252},{-269,-230,-237,-187,-210,-165},{-254,-221,-204,-154,-252,-230},{-224,-239,-178,-171,-163,-187}}},{{{-226,-277,-330,-247,-189,-218},{-202,-250,-330,-197,-327,-213},{-303,-335,-325,-332,-229,-200},{-237,-279,-229,-298,-202,-309},{-314,-311,-258,-301,-266,-303},{-253,-322,-306,-269,-229,-303},{-298,-343,-306,-255,-269,-261},{-192,-274,-293,-261,-221,-245},{-274,-322,-229,-226,-255,-317},{-269,-218,-218,-226,-213,-266}},{{-332,-226,-223,-303,-346,-285},{-322,-226,-253,-189,-255,-330},{-293,-322,-279,-269,-258,-301},{-346,-271,-200,-231,-192,-332},{-332,-309,-218,-205,-298,-205},{-319,-279,-301,-317,-306,-282},{-247,-330,-298,-266,-332,-340},{-277,-215,-343,-192,-250,-194},{-301,-186,-290,-301,-301,-186},{-218,-335,-231,-274,-200,-231}},{{-261,-346,-261,-298,-269,-242},{-189,-269,-285,-215,-242,-223},{-205,-261,-218,-279,-229,-221},{-271,-205,-322,-247,-192,-239},{-285,-332,-311,-237,-282,-239},{-290,-319,-231,-210,-250,-237},{-194,-245,-207,-255,-250,-271},{-279,-322,-255,-258,-309,-250},{-287,-274,-309,-197,-338,-215},{-343,-197,-202,-314,-325,-340}},{{-271,-202,-346,-258,-335,-229},{-332,-223,-207,-295,-290,-221},{-317,-298,-189,-309,-317,-301},{-202,-239,-261,-226,-189,-330},{-322,-327,-231,-205,-192,-319},{-207,-338,-250,-309,-258,-282},{-290,-242,-231,-335,-202,-279},{-221,-229,-282,-261,-221,-237},{-258,-287,-317,-335,-210,-218},{-301,-186,-189,-295,-295,-309}},{{-234,-266,-231,-218,-325,-293},{-210,-207,-261,-261,-194,-253},{-255,-258,-207,-218,-226,-215},{-207,-255,-210,-189,-202,-194},{-317,-234,-207,-327,-314,-245},{-226,-293,-301,-253,-197,-274},{-205,-277,-290,-189,-277,-247},{-239,-271,-325,-202,-234,-266},{-325,-330,-245,-247,-255,-309},{-287,-261,-295,-221,-335,-189}},{{-242,-239,-197,-290,-271,-327},{-271,-218,-255,-186,-192,-301},{-237,-306,-266,-269,-231,-213},{-343,-282,-335,-266,-247,-255},{-186,-303,-332,-340,-290,-325},{-325,-346,-274,-335,-306,-263},{-247,-253,-205,-343,-274,-258},{-325,-269,-269,-317,-322,-290},{-293,-202,-325,-258,-266,-245},{-319,-340,-234,-319,-215,-200}}},{{{-232,-202,-272,-232,-218,-202},{-339,-314,-249,-288,-288,-238},{-305,-246,-235,-330,-316,-333},{-266,-204,-294,-344,-274,-202},{-308,-325,-286,-244,-330,-336},{-356,-283,-224,-280,-260,-358},{-216,-277,-280,-260,-300,-199},{-263,-235,-300,-241,-210,-232},{-277,-291,-249,-221,-221,-339},{-333,-246,-302,-322,-311,-258}},{{-280,-249,-249,-199,-300,-294},{-361,-204,-263,-199,-199,-358},{-232,-241,-263,-204,-361,-221},{-207,-350,-213,-311,-328,-280},{-328,-283,-322,-266,-361,-269},{-210,-224,-291,-216,-344,-280},{-280,-342,-283,-246,-330,-238},{-288,-364,-353,-311,-199,-364},{-319,-199,-333,-224,-294,-305},{-300,-221,-235,-272,-255,-300}},{{-311,-339,-361,-305,-274,-364},{-286,-361,-238,-238,-344,-196},{-339,-322,-330,-269,-297,-305},{-311,-361,-364,-218,-260,-336},{-204,-230,-241,-283,-227,-342},{-314,-322,-319,-204,-288,-336},{-356,-358,-246,-260,-224,-255},{-283,-224,-319,-291,-249,-339},{-207,-297,-316,-350,-344,-272},{-252,-244,-302,-241,-277,-314}},{{-356,-325,-244,-291,-244,-350},{-199,-322,-221,-305,-328,-325},{-227,-213,-314,-216,-314,-308},{-218,-277,-224,-269,-305,-249},{-221,-322,-232,-291,-344,-314},{-277,-342,-356,-297,-353,-255},{-277,-241,-314,-286,-333,-196},{-207,-336,-199,-227,-210,-314},{-297,-361,-202,-246,-235,-311},{-300,-230,-238,-238,-227,-241}},{{-244,-294,-221,-297,-255,-232},{-244,-199,-246,-230,-260,-238},{-218,-356,-297,-300,-274,-283},{-356,-218,-244,-300,-199,-266},{-246,-339,-291,-196,-353,-277},{-322,-294,-322,-336,-221,-286},{-328,-227,-218,-308,-280,-213},{-339,-336,-297,-244,-252,-339},{-280,-241,-238,-266,-339,-235},{-358,-246,-325,-300,-258,-361}},{{-364,-286,-308,-361,-361,-272},{-196,-199,-277,-252,-333,-230},{-246,-255,-336,-297,-274,-302},{-314,-255,-364,-325,-266,-216},{-238,-286,-311,-333,-302,-364},{-336,-319,-347,-244,-249,-244},{-207,-221,-361,-207,-199,-218},{-252,-330,-302,-336,-314,-218},{-227,-286,-328,-260,-196,-218},{-288,-216,-336,-235,-300,-342}}},{{{-252,-356,-244,-255,-227,-269},{-361,-207,-297,-218,-238,-249},{-308,-210,-260,-333,-235,-266},{-241,-297,-235,-339,-308,-358},{-305,-269,-258,-241,-319,-286},{-258,-196,-260,-216,-333,-314},{-207,-291,-238,-230,-316,-308},{-291,-269,-350,-344,-238,-319},{-319,-361,-336,-260,-269,-308},{-361,-230,-291,-258,-260,-232}},{{-308,-274,-227,-269,-305,-241},{-249,-216,-232,-364,-330,-302},{-207,-361,-255,-269,-358,-213},{-202,-213,-196,-204,-199,-353},{-300,-249,-260,-199,-207,-325},{-311,-344,-294,-353,-364,-274},{-199,-230,-232,-272,-353,-277},{-216,-283,-314,-213,-302,-336},{-246,-288,-274,-288,-218,-227},{-252,-294,-344,-333,-314,-269}},{{-255,-300,-308,-308,-316,-227},{-232,-294,-207,-319,-347,-358},{-224,-347,-358,-280,-358,-218},{-216,-249,-244,-291,-221,-361},{-269,-364,-210,-277,-330,-319},{-350,-196,-274,-316,-350,-221},{-330,-255,-364,-305,-263,-227},{-277,-294,-283,-246,-311,-344},{-221,-235,-364,-339,-260,-350},{-246,-241,-266,-319,-339,-269}},{{-280,-232,-339,-330,-308,-333},{-210,-316,-280,-204,-316,-207},{-213,-333,-244,-277,-283,-274},{-260,-238,-216,-322,-196,-336},{-314,-232,-344,-322,-280,-308},{-291,-255,-311,-330,-258,-249},{-297,-221,-227,-325,-333,-358},{-297,-336,-227,-308,-302,-241},{-319,-300,-213,-221,-325,-216},{-342,-361,-305,-244,-356,-238}},{{-319,-207,-358,-294,-221,-258},{-258,-316,-232,-308,-330,-336},{-356,-286,-280,-221,-319,-221},{-235,-333,-263,-322,-336,-316},{-302,-316,-311,-330,-227,-291},{-246,-291,-213,-353,-316,-302},{-314,-330,-235,-325,-350,-286},{-358,-280,-227,-196,-269,-291},{-274,-347,-246,-294,-316,-246},{-302,-316,-244,-325,-314,-347}},{{-283,-328,-286,-342,-232,-213},{-291,-325,-344,-238,-260,-325},{-272,-347,-330,-199,-246,-230},{-333,-336,-319,-235,-339,-294},{-300,-286,-218,-336,-269,-291},{-350,-241,-328,-300,-255,-325},{-235,-356,-255,-263,-316,-325},{-361,-227,-246,-277,-266,-272},{-210,-249,-258,-330,-207,-344},{-249,-235,-202,-305,-263,-196}}},{{{-302,-356,-266,-232,-283,-221},{-308,-255,-308,-277,-216,-246},{-260,-266,-224,-297,-336,-339},{-347,-322,-232,-230,-291,-358},{-207,-305,-333,-294,-244,-311},{-263,-269,-249,-238,-280,-311},{-288,-353,-294,-255,-252,-347},{-286,-249,-224,-255,-302,-227},{-350,-221,-207,-263,-291,-305},{-227,-255,-297,-272,-350,-260}},{{-330,-347,-361,-291,-210,-308},{-213,-364,-210,-210,-314,-280},{-258,-272,-232,-336,-199,-302},{-356,-196,-277,-364,-266,-246},{-277,-255,-336,-305,-255,-333},{-344,-266,-364,-277,-260,-300},{-319,-230,-235,-364,-207,-196},{-235,-358,-291,-342,-308,-325},{-333,-356,-302,-232,-196,-263},{-347,-277,-263,-274,-342,-325}},{{-328,-316,-311,-333,-291,-232},{-221,-216,-305,-322,-358,-336},{-258,-221,-224,-344,-221,-328},{-204,-350,-288,-204,-266,-244},{-300,-210,-210,-336,-255,-202},{-221,-339,-230,-216,-311,-266},{-246,-302,-344,-356,-291,-311},{-246,-244,-218,-269,-344,-196},{-322,-269,-232,-207,-252,-230},{-328,-330,-246,-263,-207,-241}},{{-202,-238,-308,-353,-235,-199},{-272,-302,-244,-300,-244,-255},{-339,-246,-322,-300,-216,-230},{-316,-213,-199,-221,-353,-356},{-283,-358,-199,-336,-232,-252},{-333,-330,-300,-288,-258,-302},{-258,-244,-361,-361,-311,-230},{-319,-283,-213,-224,-353,-344},{-356,-218,-322,-336,-260,-322},{-316,-241,-260,-330,-277,-291}},{{-330,-221,-339,-356,-286,-266},{-291,-305,-255,-204,-302,-316},{-260,-204,-333,-210,-274,-316},{-305,-297,-330,-274,-221,-216},{-224,-207,-246,-361,-277,-311},{-204,-221,-230,-300,-347,-244},{-283,-246,-291,-283,-339,-353},{-300,-235,-280,-280,-216,-358},{-241,-322,-361,-196,-199,-347},{-294,-207,-230,-308,-255,-252}},{{-294,-302,-339,-218,-336,-227},{-302,-202,-238,-210,-333,-288},{-291,-202,-274,-207,-221,-241},{-241,-227,-339,-277,-277,-280},{-255,-339,-336,-291,-330,-277},{-274,-199,-199,-246,-202,-328},{-300,-274,-358,-218,-202,-336},{-350,-230,-316,-300,-336,-244},{-221,-213,-280,-210,-347,-224},{-297,-255,-280,-364,-263,-263}}}}; // 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]={16,8,6,17,8,6,17,8,6,14,7,5,15,8,5,14,8,5,16,9,6,17,9,6,17,9,6,16,9,6,16,9,6,17,9,6,16,8,6,16,8,6,16,8,6,16,8,6,16,8,6,16,8,6,16,9,6,17,9,6,17,8,6,17,9,6,17,9,6,17,9,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}}; // set of shipments in each bid 
int SHsts[SPN]={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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,2,6,10,14,18,22,26,0,6,12,18,24,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,0,4,8,12,16,20,24,28,0,6,12,18,24,2,4,6,8,10,12,14,16,18,20,22,24,26,28,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,32,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,0,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,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,0,4,8,12,16,20,24,28,32,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,33,0,6,12,18,24,30,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,33,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,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,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,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,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,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,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,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,1,7,13,19,25,31}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,5,11,17,23,29,35,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,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,5,11,17,23,29,35,8,10,12,14,16,18,20,22,24,26,28,30,32,34,8,12,16,20,24,28,32,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,6,12,18,24,30,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,7,13,19,25,31,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,2,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,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,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,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,2,8,14,20,26,32,2,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,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,3,9,15,21,27,33,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,5,9,13,17,21,25,29,33,3,9,15,21,27,33,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,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,5,9,13,17,21,25,29,33,4,10,16,22,28,34,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,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,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,4,10,16,22,28,34,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,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,2,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,2,8,14,20,26,32}; // set of end times of each shipment 
