int Dev = 50;// 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 = 739;//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]={{{{12542,0,0,0,0,0},{10772,0,0,0,0,0},{11449,0,0,0,0,0},{11681,0,0,0,0,0},{11612,0,0,0,0,0},{11813,0,0,0,0,0},{10500,0,0,0,0,0},{12373,0,0,0,0,0},{12141,0,0,0,0,0},{10676,0,0,0,0,0}},{{11547,0,0,0,0,0},{11422,0,0,0,0,0},{10998,0,0,0,0,0},{11627,0,0,0,0,0},{11559,0,0,0,0,0},{12011,0,0,0,0,0},{11722,0,0,0,0,0},{11546,0,0,0,0,0},{11069,0,0,0,0,0},{11689,0,0,0,0,0}},{{10642,0,0,0,0,0},{10999,0,0,0,0,0},{11413,0,0,0,0,0},{11912,0,0,0,0,0},{11344,0,0,0,0,0},{11190,0,0,0,0,0},{11264,0,0,0,0,0},{11265,0,0,0,0,0},{11158,0,0,0,0,0},{11102,0,0,0,0,0}},{{10434,0,0,0,0,0},{11359,0,0,0,0,0},{12127,0,0,0,0,0},{11635,0,0,0,0,0},{11637,0,0,0,0,0},{11535,0,0,0,0,0},{11435,0,0,0,0,0},{12562,0,0,0,0,0},{11242,0,0,0,0,0},{11384,0,0,0,0,0}},{{11375,0,0,0,0,0},{11066,0,0,0,0,0},{11310,0,0,0,0,0},{11857,0,0,0,0,0},{11389,0,0,0,0,0},{12204,0,0,0,0,0},{11581,0,0,0,0,0},{11928,0,0,0,0,0},{11434,0,0,0,0,0},{11077,0,0,0,0,0}},{{11718,0,0,0,0,0},{10798,0,0,0,0,0},{11804,0,0,0,0,0},{11509,0,0,0,0,0},{11794,0,0,0,0,0},{11152,0,0,0,0,0},{11221,0,0,0,0,0},{11449,0,0,0,0,0},{11479,0,0,0,0,0},{11248,0,0,0,0,0}}},{{{-122,-284,-110,-185,-268,-142},{-124,-304,-296,-130,-134,-225},{-120,-140,-173,-146,-158,-197},{-268,-288,-140,-158,-166,-274},{-270,-179,-132,-138,-296,-268},{-189,-233,-168,-274,-156,-175},{-154,-156,-138,-168,-154,-199},{-262,-152,-254,-213,-278,-246},{-166,-264,-140,-248,-213,-144},{-110,-114,-150,-286,-118,-195}},{{-223,-270,-199,-300,-102,-197},{-120,-187,-177,-288,-246,-268},{-134,-187,-282,-209,-118,-258},{-162,-227,-256,-284,-183,-254},{-282,-144,-286,-250,-181,-175},{-260,-278,-156,-177,-128,-235},{-106,-227,-120,-207,-221,-189},{-106,-256,-209,-292,-258,-229},{-250,-140,-233,-229,-246,-201},{-300,-193,-274,-288,-233,-225}},{{-108,-140,-292,-114,-229,-162},{-156,-290,-110,-183,-302,-118},{-110,-156,-144,-199,-156,-215},{-138,-195,-276,-213,-262,-217},{-114,-282,-292,-130,-126,-304},{-302,-112,-191,-156,-140,-288},{-179,-238,-227,-132,-292,-244},{-124,-173,-108,-106,-207,-199},{-231,-246,-268,-128,-187,-138},{-298,-152,-195,-106,-140,-189}},{{-223,-266,-302,-211,-181,-272},{-235,-274,-156,-132,-114,-219},{-173,-158,-134,-126,-146,-288},{-280,-187,-262,-250,-262,-142},{-250,-298,-122,-191,-187,-248},{-217,-217,-294,-132,-244,-262},{-150,-260,-193,-201,-102,-270},{-138,-197,-286,-140,-130,-201},{-292,-266,-162,-213,-209,-294},{-272,-304,-106,-181,-284,-185}},{{-292,-134,-223,-219,-242,-199},{-110,-207,-146,-207,-152,-292},{-217,-134,-130,-286,-260,-256},{-266,-294,-244,-136,-195,-171},{-211,-260,-126,-268,-142,-146},{-294,-300,-264,-217,-262,-246},{-136,-284,-160,-217,-256,-209},{-166,-207,-221,-272,-201,-229},{-177,-118,-173,-292,-199,-244},{-286,-120,-195,-175,-238,-132}},{{-280,-264,-231,-280,-136,-189},{-118,-120,-134,-164,-162,-168},{-268,-162,-110,-231,-193,-288},{-304,-104,-126,-211,-205,-189},{-205,-225,-207,-229,-148,-238},{-179,-120,-124,-112,-106,-225},{-286,-282,-197,-278,-203,-124},{-238,-104,-205,-242,-235,-187},{-270,-171,-215,-262,-187,-203},{-213,-274,-189,-244,-238,-138}}},{{{-222,-161,-114,-118,-92,-148},{-198,-209,-126,-80,-82,-95},{-82,-147,-227,-219,-151,-148},{-237,-224,-130,-130,-187,-150},{-188,-177,-151,-156,-221,-195},{-227,-237,-175,-166,-95,-169},{-105,-106,-208,-201,-150,-116},{-193,-204,-217,-177,-140,-121},{-93,-156,-237,-203,-221,-196},{-126,-108,-192,-151,-87,-85}},{{-103,-129,-227,-135,-195,-233},{-129,-159,-134,-156,-237,-89},{-111,-208,-101,-103,-143,-242},{-201,-85,-230,-137,-140,-114},{-105,-82,-209,-97,-167,-87},{-198,-100,-237,-137,-158,-105},{-185,-155,-147,-227,-196,-166},{-230,-97,-174,-209,-101,-90},{-196,-229,-108,-93,-242,-90},{-177,-192,-240,-145,-143,-164}},{{-101,-161,-114,-90,-179,-118},{-87,-101,-156,-122,-213,-169},{-242,-80,-217,-179,-101,-116},{-198,-156,-204,-148,-113,-200},{-109,-129,-172,-224,-101,-100},{-126,-151,-182,-180,-240,-80},{-237,-156,-232,-103,-155,-109},{-122,-179,-155,-224,-164,-155},{-92,-179,-240,-109,-233,-98},{-225,-179,-206,-182,-111,-180}},{{-233,-151,-201,-169,-174,-82},{-127,-124,-222,-164,-132,-177},{-89,-98,-151,-163,-145,-222},{-171,-175,-188,-103,-130,-126},{-198,-98,-164,-103,-145,-140},{-84,-126,-92,-121,-161,-222},{-169,-124,-148,-225,-188,-108},{-89,-155,-159,-216,-209,-240},{-129,-113,-153,-219,-113,-153},{-118,-214,-229,-171,-159,-229}},{{-219,-85,-101,-164,-214,-119},{-158,-184,-185,-150,-200,-106},{-193,-108,-206,-138,-101,-142},{-127,-98,-121,-216,-150,-180},{-87,-95,-209,-82,-174,-161},{-126,-89,-166,-216,-196,-180},{-127,-219,-192,-172,-150,-103},{-145,-132,-164,-159,-119,-240},{-180,-192,-190,-127,-167,-147},{-137,-130,-224,-156,-84,-111}},{{-188,-100,-127,-172,-196,-174},{-100,-95,-158,-163,-161,-158},{-166,-213,-153,-180,-106,-209},{-111,-118,-169,-179,-101,-184},{-150,-179,-211,-105,-124,-145},{-103,-233,-163,-87,-163,-82},{-140,-122,-155,-95,-232,-163},{-111,-137,-89,-195,-175,-105},{-155,-188,-222,-118,-138,-201},{-101,-167,-114,-106,-225,-89}}},{{{-326,-238,-245,-247,-150,-229},{-143,-139,-219,-326,-303,-245},{-118,-192,-252,-176,-182,-319},{-152,-189,-303,-185,-333,-275},{-266,-236,-321,-231,-346,-159},{-222,-233,-342,-270,-169,-132},{-231,-226,-275,-286,-143,-224},{-224,-185,-203,-316,-286,-268},{-266,-266,-127,-243,-296,-141},{-219,-159,-286,-268,-240,-280}},{{-120,-217,-236,-261,-166,-217},{-208,-148,-330,-150,-231,-305},{-210,-206,-226,-210,-298,-203},{-217,-118,-180,-305,-266,-303},{-187,-155,-196,-298,-157,-136},{-219,-330,-143,-240,-305,-215},{-256,-326,-185,-189,-337,-162},{-245,-139,-150,-291,-305,-224},{-199,-192,-199,-231,-224,-261},{-217,-210,-337,-180,-178,-346}},{{-127,-296,-141,-263,-219,-231},{-273,-236,-261,-171,-148,-194},{-284,-208,-326,-143,-307,-240},{-291,-118,-280,-293,-282,-213},{-157,-150,-118,-118,-213,-118},{-152,-340,-259,-249,-312,-159},{-284,-307,-129,-171,-300,-312},{-316,-152,-162,-120,-194,-116},{-136,-146,-240,-238,-337,-233},{-127,-238,-314,-326,-293,-127}},{{-139,-249,-139,-201,-210,-148},{-277,-261,-217,-210,-226,-201},{-296,-210,-261,-256,-199,-337},{-256,-240,-155,-312,-245,-284},{-224,-310,-280,-280,-280,-143},{-206,-206,-344,-256,-196,-307},{-243,-256,-217,-171,-120,-229},{-169,-335,-316,-307,-312,-342},{-125,-344,-150,-125,-300,-342},{-229,-321,-164,-118,-173,-122}},{{-243,-150,-243,-249,-303,-296},{-337,-182,-305,-245,-282,-307},{-180,-259,-270,-328,-256,-273},{-136,-189,-333,-141,-273,-261},{-159,-206,-340,-116,-289,-169},{-229,-342,-196,-277,-270,-256},{-176,-342,-222,-169,-275,-243},{-189,-335,-196,-342,-134,-229},{-166,-291,-293,-206,-321,-180},{-129,-298,-169,-275,-238,-286}},{{-266,-180,-270,-176,-187,-289},{-176,-319,-284,-180,-296,-323},{-319,-256,-146,-314,-340,-129},{-233,-245,-206,-203,-129,-289},{-122,-314,-166,-238,-210,-261},{-323,-217,-270,-217,-143,-289},{-284,-300,-157,-208,-303,-159},{-247,-226,-310,-245,-305,-155},{-182,-316,-187,-236,-280,-236},{-342,-217,-182,-116,-305,-296}}},{{{-243,-252,-132,-119,-278,-291},{-126,-278,-202,-310,-280,-293},{-317,-206,-126,-195,-302,-202},{-317,-297,-154,-271,-243,-128},{-156,-293,-150,-256,-135,-243},{-108,-271,-165,-191,-247,-150},{-154,-206,-258,-308,-202,-184},{-213,-243,-293,-230,-126,-210},{-260,-295,-230,-286,-156,-217},{-228,-117,-148,-310,-137,-224}},{{-206,-150,-171,-189,-278,-191},{-178,-111,-306,-286,-284,-224},{-254,-171,-221,-315,-152,-297},{-315,-221,-278,-241,-115,-306},{-252,-254,-312,-250,-161,-195},{-271,-278,-219,-254,-200,-224},{-245,-182,-193,-208,-230,-150},{-141,-141,-267,-254,-323,-228},{-267,-260,-174,-167,-135,-299},{-245,-241,-284,-139,-210,-167}},{{-217,-150,-150,-135,-141,-243},{-243,-108,-221,-306,-180,-210},{-310,-304,-247,-178,-269,-252},{-184,-326,-291,-150,-113,-158},{-128,-191,-239,-239,-202,-228},{-321,-258,-111,-130,-319,-252},{-286,-210,-295,-128,-206,-124},{-152,-323,-291,-280,-323,-200},{-126,-317,-280,-126,-171,-169},{-295,-163,-276,-326,-204,-141}},{{-271,-228,-273,-135,-280,-137},{-297,-202,-245,-152,-273,-191},{-189,-210,-304,-282,-280,-306},{-237,-126,-204,-323,-221,-312},{-239,-252,-119,-130,-221,-278},{-169,-113,-154,-310,-213,-239},{-263,-230,-265,-184,-197,-113},{-139,-289,-312,-154,-206,-167},{-291,-317,-239,-171,-308,-197},{-171,-117,-295,-210,-221,-239}},{{-308,-215,-148,-321,-228,-139},{-191,-165,-171,-310,-293,-217},{-143,-258,-200,-269,-141,-215},{-152,-135,-276,-226,-224,-180},{-141,-119,-258,-250,-237,-302},{-178,-206,-126,-221,-189,-297},{-167,-113,-269,-319,-247,-213},{-273,-241,-152,-202,-204,-299},{-154,-254,-326,-122,-278,-135},{-178,-165,-115,-215,-137,-158}},{{-323,-169,-126,-306,-189,-239},{-310,-317,-165,-215,-269,-111},{-200,-284,-232,-206,-184,-150},{-111,-219,-271,-304,-239,-219},{-182,-228,-247,-226,-260,-187},{-295,-161,-169,-291,-310,-224},{-148,-193,-143,-124,-163,-145},{-295,-228,-176,-254,-169,-161},{-221,-122,-130,-291,-219,-115},{-180,-291,-143,-200,-234,-139}}},{{{-391,-221,-176,-178,-245,-245},{-176,-223,-176,-343,-138,-239},{-141,-351,-218,-303,-215,-317},{-157,-168,-234,-184,-189,-348},{-293,-330,-231,-396,-290,-218},{-245,-303,-247,-367,-370,-399},{-215,-263,-170,-367,-287,-213},{-261,-370,-271,-335,-378,-303},{-346,-325,-176,-269,-327,-380},{-375,-279,-375,-181,-133,-343}},{{-197,-253,-200,-375,-170,-362},{-194,-202,-399,-184,-277,-221},{-298,-290,-277,-378,-317,-290},{-372,-340,-322,-165,-277,-141},{-253,-386,-277,-293,-380,-269},{-277,-271,-309,-343,-210,-245},{-194,-388,-335,-290,-290,-237},{-176,-221,-231,-375,-348,-250},{-234,-279,-205,-146,-133,-226},{-311,-234,-205,-226,-317,-181}},{{-218,-295,-184,-160,-213,-367},{-322,-162,-279,-317,-146,-399},{-152,-165,-178,-218,-200,-293},{-192,-396,-226,-399,-322,-335},{-247,-231,-322,-255,-170,-391},{-314,-253,-173,-162,-271,-165},{-391,-160,-189,-168,-221,-229},{-332,-306,-269,-258,-375,-152},{-285,-303,-330,-277,-287,-338},{-253,-332,-261,-383,-314,-213}},{{-136,-184,-383,-295,-343,-388},{-338,-202,-258,-133,-136,-298},{-391,-285,-242,-322,-138,-255},{-218,-367,-133,-327,-154,-322},{-197,-362,-138,-348,-325,-375},{-258,-261,-157,-266,-197,-168},{-317,-370,-247,-346,-255,-340},{-239,-309,-207,-309,-388,-343},{-229,-178,-372,-386,-194,-295},{-348,-359,-261,-282,-226,-391}},{{-165,-160,-176,-391,-189,-340},{-168,-298,-160,-160,-168,-133},{-263,-311,-197,-149,-332,-226},{-356,-295,-351,-290,-399,-394},{-340,-242,-170,-319,-237,-309},{-245,-388,-250,-277,-362,-378},{-168,-162,-354,-340,-306,-207},{-298,-388,-322,-277,-157,-391},{-351,-287,-154,-306,-133,-346},{-348,-231,-388,-144,-370,-396}},{{-261,-160,-234,-157,-234,-354},{-311,-346,-192,-194,-189,-205},{-380,-367,-245,-269,-258,-335},{-367,-247,-311,-309,-391,-343},{-170,-335,-271,-138,-364,-192},{-306,-319,-133,-152,-317,-173},{-282,-226,-197,-383,-388,-189},{-247,-181,-162,-266,-354,-221},{-242,-215,-380,-138,-162,-239},{-205,-271,-170,-383,-250,-226}}},{{{-381,-358,-375,-400,-384,-328},{-196,-395,-258,-162,-258,-188},{-412,-356,-367,-333,-143,-384},{-207,-232,-381,-409,-361,-232},{-202,-269,-350,-151,-196,-140},{-199,-291,-260,-305,-286,-280},{-342,-154,-389,-336,-199,-238},{-249,-258,-420,-146,-406,-297},{-291,-272,-241,-347,-395,-342},{-255,-333,-302,-188,-179,-210}},{{-370,-260,-409,-333,-286,-386},{-361,-221,-146,-350,-182,-297},{-193,-146,-263,-336,-196,-294},{-207,-157,-297,-344,-210,-392},{-179,-322,-218,-224,-375,-232},{-204,-258,-210,-406,-283,-344},{-249,-344,-280,-381,-386,-272},{-188,-406,-339,-148,-244,-176},{-274,-288,-202,-294,-403,-232},{-280,-168,-316,-294,-305,-361}},{{-398,-232,-199,-417,-255,-308},{-199,-344,-353,-255,-311,-300},{-176,-302,-375,-286,-409,-154},{-202,-213,-364,-204,-266,-316},{-288,-395,-176,-381,-322,-417},{-255,-190,-336,-392,-232,-258},{-375,-325,-297,-328,-179,-168},{-370,-227,-204,-297,-386,-398},{-227,-286,-154,-392,-174,-386},{-286,-210,-188,-386,-218,-381}},{{-199,-165,-143,-168,-143,-224},{-311,-406,-210,-389,-174,-235},{-288,-160,-392,-356,-291,-356},{-274,-232,-140,-232,-370,-207},{-367,-174,-386,-283,-230,-389},{-230,-266,-375,-235,-154,-333},{-322,-246,-157,-266,-336,-392},{-412,-232,-291,-350,-311,-297},{-171,-148,-361,-179,-162,-154},{-174,-364,-311,-238,-165,-258}},{{-403,-230,-305,-140,-218,-146},{-255,-143,-389,-218,-384,-246},{-140,-392,-154,-294,-252,-319},{-302,-255,-179,-288,-316,-213},{-221,-414,-280,-364,-260,-384},{-302,-199,-216,-246,-412,-176},{-400,-364,-288,-266,-372,-300},{-263,-280,-361,-154,-291,-146},{-224,-381,-291,-160,-252,-302},{-344,-162,-241,-190,-367,-227}},{{-252,-213,-244,-260,-409,-255},{-246,-213,-232,-384,-216,-412},{-176,-185,-171,-308,-294,-395},{-381,-213,-297,-168,-395,-330},{-367,-339,-372,-325,-202,-297},{-143,-302,-364,-199,-218,-364},{-207,-260,-375,-414,-255,-224},{-255,-146,-412,-154,-398,-322},{-319,-283,-210,-176,-255,-316},{-297,-314,-146,-364,-210,-395}}},{{{-249,-314,-381,-356,-417,-367},{-263,-336,-218,-361,-199,-171},{-168,-291,-311,-420,-202,-330},{-372,-196,-249,-221,-336,-420},{-238,-266,-258,-140,-207,-319},{-406,-258,-151,-286,-202,-288},{-384,-260,-199,-151,-227,-202},{-196,-216,-412,-328,-400,-207},{-274,-235,-227,-384,-381,-336},{-218,-412,-235,-252,-174,-358}},{{-218,-277,-414,-210,-263,-300},{-333,-227,-171,-171,-300,-361},{-319,-305,-274,-140,-392,-168},{-316,-400,-202,-297,-196,-328},{-344,-263,-162,-288,-258,-314},{-188,-364,-414,-288,-319,-403},{-356,-154,-218,-336,-255,-288},{-193,-269,-174,-328,-207,-392},{-350,-342,-193,-294,-364,-146},{-328,-221,-148,-322,-305,-213}},{{-316,-272,-246,-358,-216,-182},{-417,-165,-305,-176,-202,-202},{-157,-308,-414,-412,-148,-347},{-294,-182,-238,-353,-241,-417},{-325,-188,-319,-182,-302,-367},{-420,-204,-252,-224,-246,-269},{-395,-395,-165,-342,-157,-221},{-157,-174,-176,-146,-342,-367},{-188,-216,-241,-272,-143,-171},{-148,-325,-148,-277,-182,-302}},{{-196,-213,-246,-311,-157,-406},{-403,-196,-255,-412,-179,-230},{-400,-330,-204,-148,-319,-244},{-174,-420,-269,-190,-412,-406},{-347,-230,-151,-260,-162,-417},{-370,-196,-336,-277,-347,-384},{-311,-148,-249,-176,-328,-258},{-412,-412,-224,-414,-269,-255},{-414,-193,-288,-319,-140,-210},{-252,-232,-227,-207,-244,-193}},{{-182,-412,-196,-218,-182,-395},{-353,-207,-224,-392,-319,-420},{-235,-266,-305,-199,-143,-420},{-339,-263,-188,-381,-272,-305},{-398,-333,-400,-356,-140,-241},{-350,-185,-272,-400,-400,-238},{-157,-252,-297,-193,-238,-283},{-392,-302,-162,-305,-361,-224},{-151,-364,-193,-311,-260,-168},{-216,-339,-353,-361,-322,-218}},{{-232,-160,-269,-274,-302,-375},{-339,-249,-174,-249,-311,-207},{-199,-361,-319,-235,-260,-244},{-146,-199,-330,-353,-204,-336},{-372,-412,-277,-260,-356,-232},{-202,-182,-375,-392,-185,-350},{-288,-353,-350,-255,-179,-336},{-174,-266,-322,-412,-316,-272},{-230,-190,-218,-344,-378,-398},{-140,-406,-207,-300,-199,-319}}},{{{-414,-283,-165,-412,-386,-400},{-367,-143,-269,-230,-204,-392},{-230,-297,-361,-227,-241,-336},{-193,-171,-384,-174,-409,-255},{-216,-370,-384,-409,-246,-330},{-381,-297,-260,-249,-358,-361},{-297,-196,-207,-182,-305,-165},{-263,-294,-241,-322,-277,-269},{-188,-291,-232,-269,-235,-314},{-246,-361,-140,-235,-260,-294}},{{-291,-420,-230,-213,-174,-221},{-204,-412,-389,-384,-216,-269},{-160,-193,-294,-188,-176,-252},{-252,-246,-188,-235,-339,-266},{-322,-356,-300,-364,-232,-330},{-272,-356,-375,-314,-140,-151},{-280,-311,-314,-372,-193,-190},{-213,-322,-328,-412,-319,-328},{-322,-227,-176,-283,-392,-199},{-224,-420,-358,-193,-213,-218}},{{-179,-199,-386,-414,-202,-305},{-171,-358,-291,-179,-384,-204},{-171,-294,-297,-358,-263,-353},{-171,-361,-361,-174,-386,-280},{-356,-171,-400,-283,-358,-314},{-204,-319,-280,-274,-263,-224},{-364,-168,-235,-179,-266,-291},{-283,-260,-199,-213,-420,-409},{-244,-412,-344,-176,-412,-232},{-157,-160,-190,-274,-314,-207}},{{-148,-157,-213,-319,-176,-246},{-342,-322,-176,-375,-375,-176},{-370,-353,-291,-392,-230,-347},{-342,-272,-288,-356,-188,-151},{-193,-258,-291,-300,-182,-372},{-328,-154,-386,-291,-286,-395},{-238,-339,-230,-350,-372,-216},{-325,-258,-291,-316,-154,-336},{-258,-386,-249,-328,-232,-171},{-406,-288,-305,-213,-294,-314}},{{-294,-361,-274,-370,-319,-255},{-196,-146,-193,-350,-263,-179},{-372,-386,-227,-308,-272,-185},{-249,-361,-283,-260,-342,-252},{-230,-148,-314,-160,-162,-420},{-143,-174,-386,-420,-179,-263},{-297,-176,-333,-403,-179,-266},{-294,-210,-364,-336,-210,-389},{-384,-210,-325,-210,-417,-322},{-280,-280,-330,-297,-168,-154}},{{-280,-174,-417,-409,-386,-350},{-154,-330,-232,-176,-193,-378},{-409,-381,-207,-302,-213,-252},{-406,-160,-218,-140,-207,-389},{-244,-389,-286,-325,-154,-308},{-244,-311,-246,-344,-316,-409},{-202,-168,-274,-406,-168,-238},{-403,-162,-339,-227,-241,-403},{-353,-288,-406,-328,-370,-176},{-409,-168,-252,-347,-283,-244}}}}; // 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,16,9,6,15,8,5,14,7,5,15,7,5,17,9,6,16,9,6,16,9,6,16,9,6,16,8,6,17,9,6,17,8,6,17,8,6,17,8,6,17,8,6,17,8,6,17,8,6,17,9,6,17,9,6,17,8,6,18,9,6,17,9,6,18,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,738}}; // 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,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,1,5,9,13,17,21,25,29,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,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,2,6,10,14,18,22,26,2,8,14,20,26,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,2,6,10,14,18,22,26,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,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,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,0,6,12,18,24,30,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,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,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,2,6,10,14,18,22,26,30,0,6,12,18,24,30,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,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30}; // 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,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,4,8,12,16,20,24,28,32,3,9,15,21,27,33,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,6,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,8,10,12,14,16,18,20,22,24,26,28,30,32,34,8,12,16,20,24,28,32,8,14,20,26,32,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,8,12,16,20,24,28,32,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,3,9,15,21,27,33,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,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,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,3,9,15,21,27,33,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,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,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,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,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,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,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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31}; // set of end times of each shipment 
