int Dev = 30;// Deviation
extern const int CNN = 3;// 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 = 747;//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]={{{{12794,0,0,0,0,0},{12738,0,0,0,0,0},{12675,0,0,0,0,0},{12289,0,0,0,0,0},{12272,0,0,0,0,0},{12754,0,0,0,0,0},{11970,0,0,0,0,0},{12488,0,0,0,0,0},{12448,0,0,0,0,0},{12948,0,0,0,0,0}},{{12105,0,0,0,0,0},{12234,0,0,0,0,0},{12749,0,0,0,0,0},{12062,0,0,0,0,0},{12495,0,0,0,0,0},{12370,0,0,0,0,0},{12435,0,0,0,0,0},{12510,0,0,0,0,0},{12813,0,0,0,0,0},{12397,0,0,0,0,0}},{{11698,0,0,0,0,0},{11972,0,0,0,0,0},{11370,0,0,0,0,0},{11324,0,0,0,0,0},{11020,0,0,0,0,0},{11694,0,0,0,0,0},{12004,0,0,0,0,0},{11518,0,0,0,0,0},{11222,0,0,0,0,0},{11313,0,0,0,0,0}},{{10605,0,0,0,0,0},{10200,0,0,0,0,0},{10074,0,0,0,0,0},{10481,0,0,0,0,0},{10503,0,0,0,0,0},{10262,0,0,0,0,0},{10218,0,0,0,0,0},{10276,0,0,0,0,0},{10152,0,0,0,0,0},{10226,0,0,0,0,0}},{{9268,0,0,0,0,0},{9837,0,0,0,0,0},{10004,0,0,0,0,0},{9560,0,0,0,0,0},{9608,0,0,0,0,0},{9453,0,0,0,0,0},{9640,0,0,0,0,0},{9537,0,0,0,0,0},{10168,0,0,0,0,0},{9650,0,0,0,0,0}},{{9224,0,0,0,0,0},{9508,0,0,0,0,0},{9002,0,0,0,0,0},{8773,0,0,0,0,0},{9240,0,0,0,0,0},{8877,0,0,0,0,0},{9506,0,0,0,0,0},{8758,0,0,0,0,0},{9378,0,0,0,0,0},{9038,0,0,0,0,0}}},{{{-318,-376,-268,-209,-370,-373},{-235,-262,-335,-382,-315,-306},{-365,-312,-241,-276,-365,-370},{-291,-244,-215,-341,-259,-341},{-223,-259,-332,-303,-370,-294},{-285,-376,-297,-268,-238,-362},{-279,-353,-323,-312,-259,-279},{-359,-370,-209,-229,-362,-309},{-262,-238,-373,-206,-306,-268},{-338,-303,-265,-276,-244,-259}},{{-261,-300,-283,-263,-238,-243},{-325,-226,-244,-326,-347,-293},{-322,-257,-266,-326,-344,-215},{-235,-292,-358,-307,-214,-275},{-273,-257,-235,-307,-208,-332},{-328,-320,-255,-266,-259,-238},{-290,-223,-291,-208,-342,-290},{-362,-320,-210,-310,-296,-269},{-276,-309,-252,-195,-203,-181},{-287,-206,-202,-293,-328,-316}},{{-235,-201,-261,-193,-167,-218},{-280,-295,-303,-289,-235,-198},{-220,-211,-245,-168,-225,-175},{-185,-290,-284,-287,-184,-159},{-198,-177,-205,-226,-216,-157},{-238,-198,-189,-222,-250,-241},{-255,-305,-212,-258,-180,-237},{-272,-227,-254,-222,-154,-216},{-188,-223,-226,-249,-263,-208},{-275,-273,-284,-199,-225,-163}},{{-254,-239,-143,-217,-214,-202},{-162,-150,-172,-213,-198,-133},{-152,-217,-159,-155,-170,-194},{-225,-153,-202,-217,-190,-154},{-164,-180,-138,-146,-150,-173},{-213,-172,-175,-144,-214,-208},{-167,-150,-163,-127,-155,-136},{-138,-138,-156,-169,-122,-189},{-171,-213,-149,-205,-163,-130},{-175,-217,-195,-155,-193,-112}},{{-134,-110,-131,-116,-148,-110},{-185,-183,-191,-166,-138,-190},{-194,-143,-163,-169,-103,-138},{-188,-162,-169,-138,-187,-163},{-182,-133,-148,-178,-153,-173},{-120,-136,-126,-137,-181,-190},{-183,-159,-185,-129,-140,-173},{-117,-186,-113,-175,-168,-137},{-182,-194,-151,-148,-157,-115},{-123,-156,-121,-118,-159,-125}},{{-151,-128,-142,-159,-130,-127},{-131,-125,-145,-191,-143,-147},{-125,-116,-121,-131,-148,-195},{-107,-118,-119,-119,-180,-177},{-151,-143,-184,-123,-163,-179},{-132,-109,-116,-116,-129,-135},{-106,-175,-189,-165,-158,-172},{-151,-148,-116,-183,-156,-149},{-156,-122,-154,-142,-163,-165},{-122,-109,-148,-183,-127,-184}}},{{{-205,-139,-133,-127,-226,-155},{-121,-132,-126,-177,-156,-202},{-129,-154,-170,-218,-217,-204},{-150,-171,-156,-229,-129,-235},{-202,-139,-184,-215,-182,-195},{-186,-130,-163,-174,-215,-162},{-175,-150,-142,-163,-178,-174},{-158,-220,-161,-145,-215,-183},{-205,-188,-228,-145,-195,-178},{-134,-144,-144,-204,-234,-138}},{{-164,-226,-228,-272,-261,-214},{-218,-154,-204,-254,-211,-228},{-210,-258,-275,-250,-227,-283},{-246,-184,-177,-225,-229,-167},{-158,-248,-213,-250,-227,-276},{-164,-248,-151,-234,-293,-262},{-204,-201,-207,-223,-163,-302},{-224,-211,-213,-223,-231,-257},{-145,-195,-277,-261,-252,-255},{-160,-217,-271,-175,-247,-238}},{{-198,-219,-183,-284,-247,-201},{-252,-201,-223,-316,-321,-325},{-185,-230,-272,-189,-233,-263},{-222,-252,-267,-351,-227,-252},{-195,-265,-233,-305,-255,-368},{-301,-184,-322,-224,-313,-286},{-262,-212,-317,-278,-263,-362},{-195,-306,-309,-243,-194,-212},{-277,-191,-189,-302,-299,-303},{-175,-252,-231,-200,-288,-226}},{{-376,-253,-280,-250,-316,-331},{-341,-320,-253,-355,-286,-229},{-367,-379,-292,-247,-253,-343},{-306,-253,-253,-316,-238,-220},{-338,-347,-358,-322,-262,-388},{-211,-344,-337,-289,-214,-307},{-306,-370,-322,-379,-253,-274},{-260,-273,-265,-325,-235,-292},{-370,-350,-367,-307,-271,-238},{-289,-270,-355,-292,-265,-268}},{{-238,-229,-301,-276,-373,-325},{-364,-382,-292,-384,-291,-362},{-370,-304,-385,-273,-273,-322},{-226,-277,-271,-303,-259,-241},{-340,-274,-241,-306,-356,-351},{-283,-385,-283,-264,-229,-220},{-286,-244,-343,-354,-315,-310},{-232,-343,-334,-216,-270,-203},{-355,-340,-313,-312,-309,-357},{-367,-217,-310,-246,-294,-319}},{{-262,-243,-217,-222,-246,-298},{-331,-326,-198,-269,-207,-288},{-302,-204,-295,-309,-202,-228},{-219,-307,-320,-238,-182,-208},{-211,-218,-244,-306,-292,-228},{-299,-201,-344,-312,-187,-238},{-316,-251,-220,-338,-330,-293},{-362,-198,-266,-272,-197,-206},{-274,-343,-287,-312,-279,-270},{-296,-259,-238,-238,-264,-317}}},{{{-316,-355,-257,-424,-375,-392},{-257,-424,-415,-385,-392,-290},{-290,-368,-260,-424,-388,-378},{-240,-349,-345,-368,-339,-372},{-336,-359,-257,-355,-372,-339},{-352,-401,-418,-276,-345,-240},{-382,-286,-270,-276,-392,-293},{-263,-385,-286,-392,-273,-349},{-428,-388,-257,-263,-322,-280},{-392,-306,-299,-319,-375,-336}},{{-272,-274,-293,-327,-240,-286},{-413,-341,-242,-339,-237,-217},{-397,-345,-284,-245,-222,-274},{-407,-415,-246,-236,-330,-334},{-331,-396,-354,-292,-274,-286},{-321,-328,-335,-364,-339,-286},{-417,-309,-380,-399,-286,-229},{-354,-322,-402,-226,-373,-325},{-417,-396,-322,-232,-234,-328},{-400,-335,-335,-402,-302,-343}},{{-307,-348,-336,-237,-321,-306},{-319,-343,-230,-267,-276,-332},{-245,-308,-244,-305,-228,-316},{-206,-274,-252,-272,-299,-200},{-283,-228,-353,-199,-323,-288},{-218,-262,-302,-340,-326,-244},{-227,-256,-277,-294,-262,-316},{-345,-317,-333,-288,-329,-216},{-209,-242,-333,-294,-196,-229},{-230,-369,-235,-267,-252,-316}},{{-185,-190,-280,-289,-287,-173},{-245,-306,-242,-213,-287,-228},{-240,-182,-265,-222,-184,-210},{-275,-207,-256,-252,-161,-193},{-268,-277,-242,-162,-231,-226},{-250,-304,-244,-300,-168,-278},{-265,-224,-299,-243,-215,-274},{-215,-316,-211,-263,-211,-195},{-250,-241,-303,-206,-282,-261},{-278,-245,-223,-180,-269,-153}},{{-189,-254,-191,-208,-212,-153},{-250,-225,-189,-254,-216,-166},{-234,-273,-241,-231,-216,-241},{-217,-208,-166,-227,-246,-223},{-219,-164,-172,-193,-168,-233},{-163,-235,-178,-254,-237,-220},{-258,-193,-267,-153,-172,-204},{-230,-244,-256,-216,-256,-168},{-280,-206,-267,-248,-250,-191},{-158,-181,-202,-246,-172,-269}},{{-206,-258,-241,-171,-163,-281},{-233,-269,-274,-243,-273,-277},{-227,-231,-190,-210,-167,-256},{-174,-149,-162,-224,-273,-261},{-244,-256,-169,-273,-191,-178},{-183,-212,-188,-221,-266,-158},{-170,-239,-268,-276,-167,-230},{-185,-166,-238,-221,-257,-236},{-191,-191,-247,-152,-249,-225},{-181,-244,-260,-206,-161,-274}}},{{{-110,-127,-108,-119,-96,-157},{-79,-93,-102,-119,-131,-127},{-105,-93,-86,-138,-100,-136},{-79,-125,-134,-87,-109,-122},{-124,-76,-81,-131,-95,-110},{-116,-85,-113,-84,-112,-142},{-85,-111,-102,-151,-112,-114},{-116,-91,-114,-138,-92,-164},{-75,-84,-96,-133,-132,-137},{-118,-137,-139,-118,-159,-155}},{{-170,-166,-142,-121,-169,-200},{-150,-111,-123,-127,-132,-136},{-170,-171,-166,-177,-188,-197},{-97,-103,-189,-188,-143,-163},{-170,-161,-186,-166,-127,-133},{-134,-125,-107,-115,-153,-208},{-128,-141,-167,-167,-167,-129},{-105,-148,-179,-194,-163,-134},{-115,-158,-105,-166,-209,-192},{-99,-102,-121,-177,-142,-128}},{{-208,-131,-175,-175,-227,-147},{-217,-225,-138,-218,-253,-141},{-224,-218,-158,-175,-206,-257},{-189,-182,-147,-150,-249,-238},{-177,-140,-223,-190,-220,-253},{-220,-193,-208,-188,-186,-196},{-222,-223,-173,-243,-229,-170},{-140,-187,-203,-239,-218,-150},{-186,-146,-164,-232,-247,-148},{-142,-173,-225,-207,-188,-244}},{{-254,-209,-175,-238,-183,-262},{-191,-144,-242,-142,-150,-185},{-238,-150,-179,-193,-156,-150},{-183,-264,-187,-238,-217,-187},{-164,-248,-146,-213,-187,-215},{-158,-244,-166,-235,-183,-146},{-142,-199,-164,-197,-240,-193},{-156,-233,-187,-238,-158,-181},{-175,-173,-193,-256,-193,-189},{-207,-152,-189,-242,-164,-191}},{{-213,-201,-160,-189,-174,-232},{-179,-223,-158,-183,-191,-153},{-191,-238,-144,-222,-144,-160},{-235,-177,-175,-181,-180,-201},{-211,-223,-238,-176,-232,-197},{-217,-225,-169,-242,-185,-131},{-183,-197,-146,-195,-166,-173},{-173,-242,-142,-176,-240,-208},{-189,-244,-156,-224,-174,-202},{-193,-201,-219,-176,-212,-221}},{{-129,-189,-124,-189,-171,-112},{-168,-202,-157,-122,-182,-137},{-213,-202,-120,-136,-119,-181},{-231,-133,-142,-187,-142,-175},{-192,-201,-207,-163,-188,-118},{-129,-168,-202,-202,-164,-129},{-183,-211,-145,-123,-162,-134},{-141,-144,-139,-171,-135,-172},{-200,-151,-162,-162,-112,-166},{-204,-149,-139,-173,-156,-109}}},{{{-226,-278,-169,-224,-283,-167},{-191,-243,-221,-269,-281,-224},{-266,-309,-174,-231,-209,-271},{-198,-224,-178,-195,-300,-186},{-224,-167,-290,-233,-264,-202},{-266,-300,-181,-293,-200,-286},{-268,-221,-212,-171,-205,-209},{-165,-198,-245,-178,-236,-217},{-252,-200,-283,-288,-186,-305},{-275,-174,-302,-267,-302,-298}},{{-271,-176,-228,-266,-224,-270},{-188,-295,-233,-189,-206,-230},{-271,-233,-223,-273,-208,-170},{-212,-278,-258,-199,-208,-164},{-278,-300,-294,-254,-192,-201},{-262,-293,-303,-194,-179,-270},{-307,-243,-214,-199,-235,-285},{-269,-238,-176,-213,-215,-236},{-276,-278,-256,-203,-217,-221},{-281,-307,-190,-217,-292,-155}},{{-275,-167,-224,-195,-209,-225},{-262,-236,-232,-164,-202,-175},{-258,-159,-206,-168,-180,-157},{-245,-213,-178,-215,-133,-232},{-204,-203,-188,-242,-172,-155},{-239,-249,-164,-183,-159,-225},{-204,-257,-190,-181,-237,-207},{-226,-148,-198,-164,-217,-135},{-252,-171,-238,-195,-180,-148},{-185,-255,-164,-216,-198,-180}},{{-155,-120,-196,-126,-117,-138},{-143,-213,-160,-169,-128,-101},{-138,-206,-124,-138,-184,-106},{-160,-198,-176,-192,-122,-159},{-218,-191,-165,-144,-138,-113},{-143,-198,-188,-171,-111,-115},{-132,-190,-132,-154,-127,-166},{-201,-152,-198,-158,-171,-146},{-158,-170,-121,-183,-156,-98},{-194,-182,-157,-183,-156,-141}},{{-138,-92,-118,-89,-112,-152},{-110,-150,-87,-154,-136,-155},{-144,-112,-105,-137,-88,-121},{-132,-130,-139,-93,-120,-136},{-170,-98,-97,-86,-92,-124},{-136,-125,-107,-94,-148,-138},{-134,-134,-99,-118,-136,-151},{-138,-155,-138,-155,-142,-88},{-158,-145,-124,-139,-106,-127},{-157,-112,-133,-144,-105,-136}},{{-143,-86,-145,-92,-154,-117},{-96,-142,-152,-99,-126,-129},{-90,-140,-93,-93,-87,-103},{-84,-140,-113,-83,-117,-96},{-112,-126,-143,-88,-99,-115},{-143,-137,-150,-94,-120,-152},{-106,-106,-89,-86,-116,-159},{-111,-131,-144,-88,-85,-127},{-115,-90,-87,-137,-134,-154},{-100,-108,-90,-130,-155,-88}}},{{{-269,-266,-202,-306,-274,-311},{-205,-343,-279,-309,-325,-301},{-330,-340,-237,-231,-226,-332},{-282,-319,-279,-332,-322,-221},{-189,-330,-277,-237,-295,-332},{-263,-298,-263,-309,-282,-218},{-303,-346,-274,-338,-269,-322},{-226,-247,-261,-346,-317,-231},{-205,-221,-266,-290,-261,-189},{-322,-317,-343,-277,-192,-287}},{{-218,-221,-279,-287,-183,-205},{-210,-279,-200,-335,-320,-293},{-340,-221,-271,-266,-267,-205},{-205,-282,-237,-223,-233,-207},{-205,-332,-213,-207,-314,-249},{-202,-285,-197,-237,-278,-210},{-279,-229,-253,-215,-314,-308},{-269,-298,-319,-261,-278,-192},{-322,-311,-346,-239,-293,-272},{-346,-325,-298,-287,-186,-285}},{{-272,-286,-282,-255,-311,-171},{-243,-291,-181,-188,-294,-255},{-295,-314,-255,-275,-228,-214},{-228,-291,-176,-298,-311,-217},{-259,-261,-239,-263,-255,-195},{-337,-293,-199,-310,-311,-268},{-313,-256,-290,-201,-265,-268},{-313,-288,-199,-255,-294,-224},{-207,-276,-244,-320,-289,-195},{-316,-268,-184,-236,-262,-222}},{{-290,-244,-259,-218,-195,-213},{-190,-226,-275,-246,-289,-168},{-209,-273,-201,-267,-202,-258},{-295,-270,-185,-209,-246,-280},{-243,-256,-282,-216,-282,-284},{-233,-169,-270,-244,-166,-193},{-224,-251,-178,-292,-228,-172},{-174,-289,-224,-255,-240,-271},{-224,-266,-189,-253,-184,-244},{-238,-202,-236,-246,-282,-177}},{{-227,-195,-241,-265,-174,-252},{-279,-182,-247,-171,-237,-178},{-253,-241,-250,-256,-232,-265},{-279,-280,-180,-278,-208,-156},{-213,-241,-250,-206,-156,-200},{-266,-226,-250,-158,-200,-215},{-282,-252,-169,-197,-276,-234},{-249,-202,-258,-278,-208,-241},{-264,-163,-269,-276,-191,-252},{-286,-269,-167,-250,-252,-282}},{{-169,-234,-176,-263,-241,-180},{-167,-171,-169,-260,-158,-197},{-158,-200,-234,-158,-276,-276},{-241,-282,-202,-165,-282,-169},{-169,-228,-282,-217,-195,-204},{-278,-230,-263,-152,-280,-180},{-154,-273,-171,-184,-197,-282},{-171,-234,-200,-215,-167,-204},{-167,-258,-232,-254,-224,-241},{-182,-171,-221,-243,-217,-152}}},{{{-319,-268,-370,-370,-265,-302},{-325,-310,-391,-313,-262,-284},{-250,-223,-292,-319,-334,-326},{-253,-271,-280,-289,-280,-376},{-376,-232,-343,-250,-241,-275},{-253,-298,-313,-256,-388,-314},{-265,-211,-280,-232,-313,-287},{-259,-385,-214,-304,-352,-249},{-343,-379,-223,-316,-379,-332},{-289,-271,-391,-286,-304,-373}},{{-211,-362,-353,-295,-207,-218},{-205,-367,-291,-238,-196,-319},{-246,-324,-344,-265,-199,-234},{-314,-212,-221,-202,-212,-272},{-299,-342,-274,-229,-241,-267},{-331,-370,-314,-202,-323,-211},{-220,-218,-280,-289,-254,-329},{-237,-284,-344,-218,-207,-267},{-322,-313,-319,-254,-321,-262},{-366,-261,-202,-194,-246,-234}},{{-179,-230,-279,-217,-189,-168},{-278,-187,-199,-190,-273,-230},{-241,-175,-259,-248,-191,-190},{-263,-190,-293,-272,-218,-194},{-283,-266,-275,-181,-216,-170},{-243,-204,-169,-214,-153,-214},{-174,-250,-211,-217,-210,-238},{-211,-252,-289,-236,-216,-224},{-315,-187,-199,-164,-155,-261},{-278,-194,-273,-208,-153,-149}},{{-155,-223,-201,-134,-146,-113},{-142,-238,-215,-144,-128,-137},{-151,-234,-196,-157,-120,-143},{-221,-231,-231,-153,-129,-167},{-233,-186,-139,-163,-188,-150},{-229,-193,-208,-157,-206,-124},{-227,-149,-173,-165,-134,-124},{-180,-210,-230,-148,-139,-206},{-167,-160,-178,-208,-124,-121},{-155,-212,-166,-217,-149,-126}},{{-192,-145,-160,-122,-137,-188},{-122,-200,-109,-163,-157,-137},{-150,-185,-139,-191,-196,-152},{-175,-126,-197,-154,-171,-194},{-156,-189,-191,-123,-146,-129},{-162,-151,-197,-197,-192,-145},{-200,-154,-111,-188,-122,-145},{-128,-116,-145,-119,-154,-116},{-126,-179,-119,-176,-197,-146},{-159,-157,-143,-200,-151,-128}},{{-129,-180,-211,-181,-222,-145},{-151,-181,-193,-160,-175,-235},{-156,-162,-162,-176,-191,-219},{-129,-151,-123,-141,-154,-201},{-168,-135,-146,-210,-142,-150},{-112,-170,-149,-128,-138,-141},{-183,-116,-159,-188,-203,-232},{-171,-122,-149,-195,-219,-183},{-160,-164,-146,-136,-145,-147},{-146,-199,-199,-188,-187,-195}}},{{{-455,-304,-395,-322,-368,-346},{-413,-332,-444,-276,-322,-312},{-294,-276,-424,-280,-259,-455},{-444,-374,-389,-290,-315,-262},{-424,-364,-322,-298,-308,-266},{-360,-340,-378,-308,-392,-455},{-280,-343,-252,-284,-332,-392},{-270,-438,-413,-395,-413,-346},{-368,-430,-266,-413,-326,-340},{-434,-346,-280,-434,-336,-312}},{{-362,-312,-414,-287,-321,-322},{-435,-254,-376,-351,-262,-364},{-400,-261,-353,-411,-331,-364},{-348,-446,-264,-397,-338,-370},{-362,-281,-383,-334,-233,-351},{-303,-391,-342,-327,-233,-280},{-355,-394,-315,-294,-266,-277},{-428,-322,-244,-291,-292,-361},{-341,-415,-346,-411,-259,-341},{-261,-271,-427,-394,-308,-238}},{{-378,-283,-366,-325,-359,-328},{-312,-314,-357,-211,-276,-225},{-230,-388,-294,-378,-339,-228},{-277,-283,-273,-281,-205,-220},{-233,-222,-222,-220,-222,-197},{-302,-259,-351,-217,-333,-247},{-337,-246,-288,-352,-368,-211},{-293,-249,-354,-234,-322,-208},{-384,-296,-303,-226,-251,-222},{-331,-302,-306,-220,-274,-300}},{{-289,-266,-242,-314,-284,-167},{-248,-300,-249,-281,-189,-234},{-192,-224,-244,-254,-262,-294},{-216,-279,-242,-208,-304,-261},{-227,-187,-198,-274,-194,-287},{-262,-187,-200,-281,-240,-270},{-351,-242,-239,-231,-284,-196},{-262,-297,-244,-304,-284,-167},{-208,-205,-234,-284,-191,-170},{-192,-260,-293,-296,-267,-220}},{{-228,-298,-169,-263,-213,-231},{-251,-268,-231,-173,-263,-162},{-292,-296,-231,-194,-178,-224},{-270,-196,-233,-243,-180,-270},{-228,-247,-243,-275,-300,-187},{-209,-189,-215,-298,-199,-226},{-213,-252,-261,-256,-206,-222},{-254,-275,-249,-196,-296,-192},{-265,-187,-240,-217,-275,-263},{-235,-162,-273,-171,-300,-273}},{{-252,-266,-280,-276,-215,-308},{-266,-240,-284,-207,-288,-224},{-219,-178,-179,-195,-312,-317},{-280,-203,-205,-167,-198,-300},{-231,-284,-226,-252,-184,-312},{-180,-259,-242,-190,-191,-258},{-217,-176,-298,-205,-273,-312},{-164,-206,-301,-169,-201,-192},{-249,-277,-263,-281,-169,-273},{-203,-229,-303,-190,-177,-224}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1052,192,238,253,176,234,280,264,252}; // initial inventory 
int ubiv[I]={2104,384,476,507,352,468,350,495,504}; // the upper bounds of inventory 
int len[I1][I2]={{5,3,2,2,1,1,2,3}}; // 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,13.35,8.59,5.57,4.52,2.83,1.94,4.81,7.57}; // 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]={{12.14,7.81,5.06,4.11,2.57,1.76,4.37,6.88}}; // 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]={9.71,9.71,9.71,8.5,8.5,8.5,7.28,7.28,7.28,6.25,6.25,6.25,5.47,5.47,5.47,4.69,4.69,4.69,4.05,4.05,4.05,3.54,3.54,3.54,3.04,3.04,3.04,3.29,3.29,3.29,2.88,2.88,2.88,2.47,2.47,2.47,2.06,2.06,2.06,1.8,1.8,1.8,1.54,1.54,1.54,1.41,1.41,1.41,1.23,1.23,1.23,1.06,1.06,1.06,3.5,3.5,3.5,3.06,3.06,3.06,2.62,2.62,2.62,5.5,5.5,5.5,4.82,4.82,4.82,4.13,4.13,4.13}; // 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,5,15,8,5,15,8,5,17,8,6,16,9,6,17,8,6,17,8,6,17,8,6,17,9,6,17,9,6,17,8,6,17,9,6,17,9,6,18,9,6,17,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,9,6,16,9,6,16,8,6,16,8,6,17,8,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,739,740},{741,742,743,744,745,746}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,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,2,6,10,14,18,22,26,30,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,30,2,8,14,20,26,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,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,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,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,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,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,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,0,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,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,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,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,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,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,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,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,2,8,14,20,26,32,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,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,6,12,18,24,30,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,7,13,19,25,31,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,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,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,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,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,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,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,4,8,12,16,20,24,28,32,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,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,1,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,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,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,2,8,14,20,26,32,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,3,9,15,21,27,33,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,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,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,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,5,9,13,17,21,25,29,33,5,11,17,23,29,35,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,4,10,16,22,28,34}; // set of end times of each shipment 
