int Dev = 40;// 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 = 738;//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]={{{{10813,0,0,0,0,0},{11561,0,0,0,0,0},{12161,0,0,0,0,0},{11934,0,0,0,0,0},{11543,0,0,0,0,0},{11539,0,0,0,0,0},{12202,0,0,0,0,0},{11487,0,0,0,0,0},{11840,0,0,0,0,0},{11458,0,0,0,0,0}},{{10985,0,0,0,0,0},{11229,0,0,0,0,0},{12167,0,0,0,0,0},{11045,0,0,0,0,0},{11432,0,0,0,0,0},{11613,0,0,0,0,0},{11602,0,0,0,0,0},{11483,0,0,0,0,0},{11319,0,0,0,0,0},{11101,0,0,0,0,0}},{{10399,0,0,0,0,0},{11032,0,0,0,0,0},{11958,0,0,0,0,0},{11642,0,0,0,0,0},{11343,0,0,0,0,0},{11657,0,0,0,0,0},{11238,0,0,0,0,0},{11834,0,0,0,0,0},{11288,0,0,0,0,0},{11180,0,0,0,0,0}},{{11547,0,0,0,0,0},{11047,0,0,0,0,0},{11965,0,0,0,0,0},{11764,0,0,0,0,0},{11329,0,0,0,0,0},{11930,0,0,0,0,0},{12044,0,0,0,0,0},{11134,0,0,0,0,0},{10932,0,0,0,0,0},{11255,0,0,0,0,0}},{{11521,0,0,0,0,0},{11187,0,0,0,0,0},{10945,0,0,0,0,0},{11414,0,0,0,0,0},{11934,0,0,0,0,0},{11629,0,0,0,0,0},{11430,0,0,0,0,0},{11983,0,0,0,0,0},{11192,0,0,0,0,0},{11076,0,0,0,0,0}},{{11336,0,0,0,0,0},{12519,0,0,0,0,0},{10882,0,0,0,0,0},{11859,0,0,0,0,0},{11431,0,0,0,0,0},{11722,0,0,0,0,0},{11330,0,0,0,0,0},{11627,0,0,0,0,0},{11474,0,0,0,0,0},{11554,0,0,0,0,0}}},{{{-274,-140,-219,-187,-252,-266},{-164,-185,-191,-211,-130,-158},{-258,-181,-193,-274,-264,-280},{-278,-262,-227,-264,-197,-223},{-187,-284,-150,-260,-227,-254},{-278,-217,-134,-276,-177,-148},{-144,-278,-150,-191,-270,-213},{-215,-122,-171,-238,-227,-158},{-264,-266,-179,-203,-197,-132},{-229,-215,-162,-284,-233,-162}},{{-173,-193,-244,-144,-223,-223},{-217,-185,-177,-150,-240,-280},{-223,-164,-250,-132,-282,-164},{-219,-199,-168,-250,-225,-270},{-140,-191,-183,-209,-223,-201},{-195,-175,-284,-205,-266,-278},{-250,-122,-126,-209,-246,-173},{-246,-238,-189,-256,-219,-185},{-122,-177,-240,-136,-268,-183},{-227,-233,-124,-231,-144,-284}},{{-195,-124,-168,-166,-252,-124},{-148,-209,-217,-175,-254,-244},{-215,-262,-173,-134,-138,-256},{-268,-193,-203,-246,-282,-268},{-215,-168,-128,-262,-229,-217},{-134,-132,-126,-134,-132,-280},{-181,-171,-274,-211,-235,-158},{-179,-130,-227,-227,-272,-122},{-199,-262,-156,-128,-240,-215},{-152,-244,-238,-272,-276,-238}},{{-173,-209,-150,-274,-272,-252},{-278,-136,-152,-124,-256,-168},{-240,-122,-254,-246,-197,-203},{-246,-213,-152,-150,-140,-189},{-256,-168,-122,-266,-181,-175},{-150,-150,-164,-235,-158,-189},{-274,-223,-266,-256,-175,-138},{-252,-235,-209,-154,-150,-215},{-130,-168,-260,-201,-158,-258},{-132,-134,-205,-132,-256,-235}},{{-205,-262,-278,-282,-171,-124},{-185,-144,-199,-280,-160,-242},{-246,-278,-187,-258,-187,-124},{-162,-246,-260,-268,-156,-209},{-177,-242,-238,-150,-156,-282},{-284,-246,-122,-140,-221,-124},{-160,-124,-199,-171,-282,-235},{-270,-250,-181,-276,-280,-179},{-201,-173,-181,-207,-156,-122},{-278,-146,-278,-215,-274,-166}},{{-150,-242,-177,-185,-175,-244},{-126,-268,-195,-164,-211,-221},{-132,-154,-140,-240,-138,-207},{-225,-266,-189,-282,-126,-158},{-193,-268,-238,-181,-250,-156},{-158,-276,-274,-156,-282,-146},{-272,-258,-276,-148,-193,-187},{-272,-262,-215,-274,-160,-189},{-276,-258,-193,-128,-268,-242},{-221,-250,-132,-246,-260,-191}}},{{{-217,-148,-158,-127,-127,-124},{-203,-108,-153,-172,-213,-135},{-145,-190,-219,-225,-177,-135},{-206,-222,-127,-143,-203,-101},{-222,-172,-209,-211,-100,-209},{-213,-172,-101,-132,-122,-150},{-224,-113,-151,-208,-135,-196},{-134,-143,-161,-103,-171,-101},{-106,-166,-130,-132,-174,-97},{-129,-98,-140,-101,-198,-192}},{{-105,-172,-126,-156,-138,-156},{-113,-209,-142,-192,-140,-219},{-221,-151,-151,-209,-208,-224},{-159,-101,-179,-142,-143,-167},{-211,-190,-151,-155,-114,-175},{-147,-171,-161,-209,-100,-106},{-145,-113,-127,-163,-148,-113},{-121,-203,-156,-159,-113,-158},{-198,-179,-198,-222,-119,-127},{-188,-175,-130,-97,-140,-172}},{{-114,-127,-148,-137,-103,-195},{-175,-177,-97,-137,-203,-182},{-203,-130,-159,-134,-118,-200},{-143,-143,-213,-169,-130,-206},{-209,-224,-140,-174,-150,-172},{-222,-219,-180,-101,-190,-126},{-219,-155,-98,-204,-216,-192},{-216,-145,-214,-137,-134,-198},{-208,-129,-213,-116,-108,-129},{-196,-209,-171,-132,-192,-179}},{{-201,-214,-190,-135,-213,-166},{-187,-158,-114,-119,-137,-126},{-138,-167,-211,-179,-200,-119},{-206,-222,-196,-111,-111,-219},{-148,-158,-159,-213,-147,-213},{-198,-106,-159,-151,-177,-198},{-155,-185,-200,-97,-148,-209},{-179,-213,-150,-209,-182,-140},{-111,-179,-172,-121,-103,-188},{-134,-203,-105,-184,-121,-172}},{{-122,-216,-206,-153,-101,-174},{-216,-138,-159,-206,-119,-213},{-209,-122,-177,-196,-129,-106},{-143,-116,-153,-192,-138,-142},{-201,-171,-143,-179,-184,-172},{-195,-114,-167,-126,-206,-156},{-203,-193,-156,-201,-159,-201},{-224,-111,-164,-140,-121,-172},{-211,-198,-216,-179,-177,-164},{-113,-192,-167,-113,-142,-111}},{{-142,-217,-161,-111,-158,-143},{-190,-100,-147,-155,-155,-179},{-169,-195,-138,-155,-132,-180},{-98,-201,-100,-159,-137,-137},{-97,-158,-219,-208,-134,-169},{-219,-137,-147,-109,-177,-204},{-106,-147,-187,-171,-225,-184},{-130,-171,-198,-122,-182,-224},{-124,-132,-214,-190,-211,-158},{-195,-140,-127,-219,-190,-130}}},{{{-222,-146,-213,-185,-159,-238},{-143,-180,-245,-157,-291,-217},{-240,-215,-259,-303,-171,-275},{-213,-319,-166,-226,-291,-185},{-208,-231,-192,-152,-224,-155},{-321,-192,-222,-208,-243,-312},{-155,-146,-303,-316,-314,-182},{-310,-245,-314,-208,-162,-219},{-208,-284,-321,-321,-166,-194},{-307,-146,-284,-192,-236,-182}},{{-303,-307,-316,-219,-171,-245},{-270,-150,-289,-280,-182,-162},{-176,-194,-275,-249,-166,-189},{-284,-303,-215,-312,-180,-298},{-259,-215,-157,-157,-319,-236},{-206,-210,-273,-263,-180,-226},{-259,-182,-282,-143,-229,-215},{-307,-282,-282,-249,-247,-208},{-312,-219,-219,-141,-293,-247},{-254,-194,-206,-259,-199,-261}},{{-146,-182,-236,-319,-300,-185},{-217,-199,-307,-252,-196,-323},{-277,-157,-224,-316,-303,-166},{-222,-293,-286,-180,-192,-159},{-226,-199,-194,-206,-280,-291},{-152,-319,-300,-150,-314,-148},{-268,-270,-139,-143,-201,-321},{-236,-152,-201,-323,-215,-273},{-226,-213,-314,-270,-300,-203},{-157,-268,-224,-171,-286,-189}},{{-321,-256,-213,-187,-196,-148},{-268,-143,-226,-229,-245,-185},{-219,-210,-319,-314,-312,-189},{-159,-259,-219,-312,-305,-233},{-298,-243,-293,-143,-231,-305},{-162,-259,-296,-286,-164,-162},{-307,-261,-284,-289,-226,-305},{-259,-155,-159,-270,-233,-240},{-169,-166,-178,-194,-178,-286},{-143,-319,-192,-148,-282,-224}},{{-203,-152,-199,-321,-169,-185},{-201,-321,-243,-243,-208,-224},{-319,-224,-164,-171,-280,-203},{-263,-319,-268,-219,-243,-226},{-231,-277,-307,-310,-231,-226},{-210,-166,-162,-152,-178,-236},{-319,-238,-284,-180,-182,-196},{-282,-231,-196,-273,-180,-171},{-187,-152,-182,-178,-222,-282},{-245,-166,-275,-178,-150,-208}},{{-164,-187,-176,-280,-312,-252},{-171,-166,-261,-245,-273,-316},{-152,-296,-286,-152,-296,-199},{-210,-256,-173,-229,-286,-268},{-150,-316,-316,-240,-247,-300},{-185,-254,-321,-321,-226,-316},{-176,-176,-152,-164,-169,-143},{-155,-305,-150,-319,-187,-249},{-203,-203,-321,-266,-159,-238},{-224,-176,-210,-146,-152,-208}}},{{{-176,-278,-200,-276,-156,-206},{-260,-297,-260,-267,-286,-208},{-252,-180,-215,-206,-156,-289},{-263,-158,-250,-245,-141,-293},{-291,-154,-293,-167,-167,-191},{-250,-200,-247,-258,-269,-237},{-167,-208,-250,-184,-245,-271},{-167,-250,-206,-260,-139,-189},{-254,-232,-184,-152,-304,-167},{-299,-291,-171,-180,-141,-152}},{{-167,-197,-280,-226,-143,-250},{-130,-243,-171,-230,-148,-204},{-158,-278,-282,-171,-221,-189},{-271,-152,-256,-154,-206,-163},{-256,-302,-178,-221,-143,-182},{-224,-165,-241,-180,-299,-206},{-263,-206,-202,-273,-278,-293},{-143,-187,-286,-243,-299,-302},{-239,-245,-221,-143,-284,-143},{-137,-197,-158,-145,-137,-145}},{{-267,-217,-169,-232,-273,-165},{-158,-135,-289,-130,-130,-284},{-195,-289,-239,-252,-213,-263},{-163,-176,-304,-243,-260,-174},{-289,-165,-276,-139,-258,-180},{-252,-247,-204,-252,-171,-302},{-297,-260,-234,-154,-217,-204},{-154,-139,-263,-195,-284,-210},{-148,-130,-210,-263,-202,-258},{-245,-152,-135,-250,-150,-217}},{{-165,-243,-135,-200,-158,-187},{-247,-169,-269,-260,-150,-258},{-165,-256,-169,-167,-247,-289},{-217,-239,-169,-241,-267,-154},{-141,-137,-260,-265,-224,-176},{-286,-176,-254,-271,-245,-208},{-187,-252,-191,-221,-156,-184},{-165,-163,-252,-280,-217,-289},{-169,-143,-178,-154,-267,-202},{-245,-299,-256,-215,-180,-237}},{{-258,-130,-137,-215,-247,-250},{-152,-165,-219,-280,-247,-302},{-158,-152,-295,-167,-150,-152},{-293,-161,-202,-284,-234,-163},{-180,-156,-243,-295,-206,-221},{-278,-282,-284,-278,-271,-208},{-304,-143,-217,-237,-263,-289},{-304,-187,-224,-243,-217,-130},{-299,-130,-263,-195,-152,-143},{-176,-228,-137,-169,-135,-245}},{{-154,-184,-204,-193,-148,-232},{-143,-271,-282,-295,-195,-263},{-291,-182,-258,-217,-278,-163},{-241,-150,-204,-180,-299,-148},{-282,-269,-176,-304,-184,-178},{-234,-295,-193,-187,-263,-217},{-143,-150,-154,-263,-247,-176},{-174,-148,-252,-282,-291,-197},{-269,-276,-256,-176,-161,-291},{-163,-137,-267,-289,-195,-291}}},{{{-343,-181,-290,-215,-165,-367},{-303,-338,-322,-271,-170,-168},{-178,-210,-178,-285,-250,-364},{-170,-200,-348,-173,-338,-295},{-309,-372,-253,-356,-197,-239},{-348,-322,-168,-213,-370,-287},{-340,-285,-325,-231,-298,-234},{-327,-234,-253,-303,-332,-293},{-327,-351,-200,-226,-261,-282},{-269,-287,-325,-205,-298,-218}},{{-239,-271,-160,-213,-311,-301},{-218,-287,-303,-271,-351,-306},{-332,-295,-261,-165,-200,-261},{-258,-271,-221,-229,-184,-186},{-197,-181,-223,-271,-298,-207},{-170,-325,-372,-362,-200,-309},{-178,-213,-263,-207,-290,-287},{-317,-356,-370,-160,-165,-165},{-250,-335,-277,-303,-165,-332},{-202,-325,-263,-346,-356,-306}},{{-266,-160,-319,-317,-271,-293},{-359,-215,-229,-348,-239,-173},{-221,-370,-250,-197,-364,-226},{-223,-215,-237,-311,-261,-261},{-218,-160,-287,-242,-205,-229},{-237,-338,-319,-263,-207,-160},{-173,-245,-242,-192,-290,-298},{-178,-237,-317,-338,-348,-301},{-330,-279,-229,-332,-237,-221},{-287,-226,-239,-170,-200,-271}},{{-178,-229,-282,-173,-293,-231},{-237,-348,-335,-285,-255,-370},{-184,-340,-354,-210,-258,-356},{-258,-237,-194,-311,-293,-301},{-181,-192,-301,-293,-319,-290},{-372,-290,-309,-271,-253,-335},{-168,-192,-303,-263,-330,-367},{-197,-285,-250,-335,-215,-213},{-202,-210,-242,-282,-266,-237},{-229,-255,-197,-194,-202,-287}},{{-290,-306,-239,-274,-261,-261},{-346,-290,-207,-258,-210,-247},{-332,-186,-176,-277,-176,-282},{-162,-250,-322,-271,-213,-295},{-213,-237,-298,-330,-261,-277},{-370,-298,-309,-266,-319,-250},{-314,-311,-271,-239,-226,-237},{-266,-367,-338,-184,-218,-250},{-325,-295,-170,-348,-261,-239},{-309,-319,-306,-271,-186,-285}},{{-170,-303,-277,-229,-266,-351},{-274,-231,-327,-298,-372,-362},{-301,-295,-314,-277,-356,-173},{-319,-325,-282,-234,-330,-330},{-165,-348,-370,-160,-319,-247},{-221,-338,-207,-207,-231,-356},{-186,-362,-250,-303,-348,-194},{-303,-176,-303,-253,-322,-338},{-258,-319,-205,-367,-239,-200},{-348,-338,-343,-165,-186,-229}}},{{{-207,-356,-260,-277,-244,-213},{-255,-244,-361,-300,-381,-358},{-358,-322,-361,-288,-202,-308},{-328,-235,-246,-353,-375,-213},{-280,-339,-286,-216,-238,-216},{-230,-266,-336,-286,-241,-277},{-188,-353,-286,-314,-364,-353},{-288,-370,-297,-182,-288,-319},{-347,-266,-277,-302,-241,-364},{-244,-286,-325,-244,-202,-249}},{{-302,-358,-283,-294,-305,-274},{-370,-258,-283,-210,-381,-297},{-232,-389,-361,-308,-322,-370},{-386,-255,-297,-179,-342,-291},{-260,-305,-190,-328,-224,-342},{-344,-171,-204,-227,-336,-232},{-227,-325,-384,-260,-333,-339},{-246,-202,-224,-213,-238,-358},{-367,-193,-277,-258,-193,-356},{-246,-188,-350,-316,-291,-213}},{{-190,-269,-196,-241,-218,-168},{-179,-269,-176,-300,-308,-266},{-336,-370,-244,-302,-333,-280},{-322,-218,-353,-319,-364,-244},{-224,-258,-294,-286,-375,-294},{-199,-356,-272,-364,-218,-230},{-274,-356,-190,-367,-238,-330},{-235,-319,-266,-196,-322,-384},{-272,-224,-375,-230,-210,-235},{-171,-176,-322,-224,-188,-384}},{{-375,-378,-255,-328,-358,-372},{-336,-358,-252,-216,-174,-224},{-221,-288,-300,-384,-255,-311},{-364,-207,-269,-339,-291,-316},{-350,-241,-204,-179,-336,-230},{-353,-389,-384,-241,-199,-274},{-302,-196,-356,-210,-224,-308},{-392,-333,-314,-182,-185,-263},{-356,-344,-199,-389,-190,-364},{-361,-221,-378,-269,-283,-392}},{{-244,-204,-342,-218,-350,-314},{-210,-328,-235,-238,-241,-283},{-269,-367,-249,-258,-286,-185},{-291,-218,-330,-238,-384,-244},{-204,-330,-308,-328,-358,-336},{-244,-210,-230,-297,-202,-280},{-182,-252,-263,-288,-302,-300},{-330,-255,-336,-286,-255,-255},{-392,-381,-342,-179,-358,-216},{-372,-221,-367,-358,-190,-277}},{{-288,-367,-272,-199,-314,-176},{-339,-336,-372,-322,-168,-358},{-179,-384,-190,-384,-210,-174},{-179,-185,-381,-297,-258,-316},{-238,-319,-207,-249,-302,-372},{-188,-277,-347,-232,-322,-263},{-350,-210,-288,-283,-286,-364},{-283,-227,-255,-258,-174,-274},{-336,-224,-230,-185,-333,-246},{-386,-344,-288,-330,-378,-252}}},{{{-182,-280,-204,-291,-227,-378},{-356,-288,-260,-182,-386,-252},{-291,-305,-344,-176,-280,-190},{-361,-190,-305,-347,-328,-356},{-353,-168,-291,-241,-305,-274},{-204,-333,-227,-372,-227,-190},{-277,-297,-316,-347,-370,-210},{-179,-339,-283,-283,-249,-350},{-252,-339,-269,-344,-241,-300},{-277,-297,-294,-291,-316,-260}},{{-182,-252,-255,-294,-280,-193},{-196,-347,-196,-196,-339,-244},{-168,-389,-272,-342,-232,-325},{-171,-218,-316,-182,-190,-361},{-367,-280,-375,-286,-381,-235},{-176,-246,-375,-227,-314,-174},{-235,-350,-392,-302,-241,-358},{-277,-314,-266,-263,-210,-305},{-336,-196,-224,-168,-316,-302},{-319,-216,-386,-255,-330,-182}},{{-328,-174,-297,-204,-255,-255},{-246,-207,-199,-350,-350,-196},{-255,-356,-286,-361,-260,-381},{-168,-358,-319,-216,-193,-294},{-218,-314,-199,-342,-207,-353},{-188,-311,-246,-283,-347,-358},{-196,-188,-224,-199,-384,-235},{-269,-224,-316,-381,-322,-207},{-224,-171,-168,-269,-386,-258},{-274,-372,-176,-356,-291,-255}},{{-297,-202,-232,-311,-260,-218},{-358,-188,-272,-171,-252,-297},{-389,-370,-322,-263,-168,-227},{-372,-241,-258,-188,-171,-291},{-286,-269,-308,-210,-216,-288},{-291,-235,-319,-378,-218,-302},{-333,-249,-314,-199,-218,-311},{-258,-266,-316,-333,-263,-179},{-297,-255,-367,-305,-358,-246},{-294,-174,-263,-244,-381,-319}},{{-174,-241,-260,-224,-353,-367},{-252,-330,-249,-361,-179,-328},{-174,-375,-179,-328,-272,-207},{-182,-344,-190,-260,-263,-202},{-302,-288,-244,-288,-185,-193},{-300,-302,-353,-330,-174,-358},{-190,-347,-286,-230,-328,-207},{-316,-213,-207,-316,-319,-294},{-190,-196,-342,-389,-199,-232},{-176,-333,-188,-182,-216,-224}},{{-244,-344,-260,-375,-375,-274},{-333,-319,-294,-249,-392,-311},{-190,-210,-277,-204,-196,-224},{-300,-389,-384,-291,-342,-216},{-213,-325,-269,-210,-204,-328},{-241,-221,-216,-218,-330,-367},{-232,-258,-297,-333,-300,-384},{-193,-328,-381,-238,-260,-216},{-336,-168,-193,-188,-364,-367},{-286,-193,-322,-375,-199,-386}}},{{{-300,-244,-238,-193,-274,-190},{-277,-277,-188,-272,-258,-260},{-353,-384,-241,-339,-302,-350},{-185,-176,-274,-361,-274,-300},{-179,-249,-328,-221,-367,-356},{-291,-188,-339,-230,-294,-221},{-322,-375,-272,-232,-311,-288},{-330,-308,-319,-182,-367,-199},{-246,-392,-353,-174,-300,-353},{-325,-207,-372,-274,-305,-364}},{{-193,-174,-221,-330,-227,-196},{-171,-246,-344,-322,-185,-185},{-280,-356,-384,-372,-274,-350},{-193,-372,-255,-196,-224,-252},{-381,-255,-182,-302,-258,-336},{-364,-244,-322,-367,-266,-316},{-179,-269,-322,-305,-328,-255},{-319,-372,-171,-235,-196,-263},{-204,-370,-190,-356,-244,-232},{-344,-255,-176,-300,-227,-272}},{{-193,-305,-244,-185,-277,-230},{-238,-361,-193,-272,-266,-255},{-213,-280,-344,-246,-232,-235},{-333,-188,-190,-202,-381,-356},{-302,-353,-244,-230,-344,-174},{-330,-378,-291,-342,-255,-378},{-176,-246,-375,-196,-255,-347},{-302,-381,-344,-188,-238,-375},{-300,-218,-367,-235,-342,-336},{-339,-308,-182,-308,-213,-305}},{{-269,-308,-316,-378,-230,-216},{-266,-308,-193,-202,-378,-168},{-221,-286,-339,-238,-378,-171},{-372,-386,-372,-297,-322,-185},{-266,-269,-249,-272,-311,-347},{-193,-330,-319,-255,-333,-283},{-375,-316,-344,-319,-305,-353},{-185,-204,-196,-224,-274,-302},{-283,-308,-196,-202,-274,-227},{-372,-283,-196,-252,-238,-218}},{{-330,-353,-280,-221,-311,-344},{-207,-196,-235,-246,-182,-263},{-204,-330,-190,-347,-384,-258},{-277,-370,-375,-227,-258,-188},{-361,-314,-255,-263,-311,-272},{-300,-286,-336,-322,-218,-269},{-182,-230,-356,-350,-185,-218},{-367,-342,-350,-297,-381,-235},{-171,-386,-255,-333,-188,-235},{-372,-280,-300,-204,-325,-308}},{{-283,-230,-375,-286,-221,-266},{-227,-375,-375,-330,-227,-336},{-336,-221,-227,-272,-342,-196},{-353,-196,-336,-378,-286,-230},{-291,-288,-213,-202,-171,-188},{-339,-302,-249,-269,-210,-274},{-171,-193,-258,-361,-372,-280},{-174,-342,-311,-389,-210,-311},{-207,-193,-384,-255,-232,-232},{-269,-199,-302,-235,-193,-249}}}}; // 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,9,6,16,9,6,16,8,6,14,8,5,15,8,5,14,7,5,16,9,6,17,9,6,17,8,6,17,9,6,17,9,6,17,9,6,16,8,6,16,8,6,16,8,6,17,9,6,16,8,6,16,8,6,17,9,6,17,9,6,17,9,6,17,9,6,18,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},{732,733,734,735,736,737}}; // set of shipments in each bid 
int SHsts[SPN]={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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,1,5,9,13,17,21,25,29,0,6,12,18,24,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,1,5,9,13,17,21,25,29,1,7,13,19,25,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,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,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,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,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,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,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,1,5,9,13,17,21,25,29,0,6,12,18,24,30,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,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,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,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,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,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,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,34,2,8,14,20,26,32,0,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,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,2,8,14,20,26,32}; // set of start times of each shipment 
int SHets[SPN]={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,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,4,8,12,16,20,24,28,32,3,9,15,21,27,33,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,7,13,19,25,31,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,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,3,9,15,21,27,33,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,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,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,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,4,10,16,22,28,34,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,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,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,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,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,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,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,4,10,16,22,28,34,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,3,9,15,21,27,33,1,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,3,9,15,21,27,33,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}; // set of end times of each shipment 
