int Dev = 30;// Deviation
extern const int CNN = 2;// Case Index
extern const int P = 3;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 18;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 342;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 9;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{11263,0,0,0,0,0},{10692,0,0,0,0,0},{11214,0,0,0,0,0},{11000,0,0,0,0,0},{11394,0,0,0,0,0},{11107,0,0,0,0,0},{11409,0,0,0,0,0},{10931,0,0,0,0,0},{11243,0,0,0,0,0},{11412,0,0,0,0,0},{11434,0,0,0,0,0},{11078,0,0,0,0,0},{11228,0,0,0,0,0},{11318,0,0,0,0,0},{11359,0,0,0,0,0},{11476,0,0,0,0,0},{11120,0,0,0,0,0},{11274,0,0,0,0,0},{11320,0,0,0,0,0},{10933,0,0,0,0,0}},{{10933,0,0,0,0,0},{11286,0,0,0,0,0},{10663,0,0,0,0,0},{10895,0,0,0,0,0},{11162,0,0,0,0,0},{10903,0,0,0,0,0},{11302,0,0,0,0,0},{11305,0,0,0,0,0},{10624,0,0,0,0,0},{10912,0,0,0,0,0},{10841,0,0,0,0,0},{11388,0,0,0,0,0},{10727,0,0,0,0,0},{11065,0,0,0,0,0},{11109,0,0,0,0,0},{10943,0,0,0,0,0},{10695,0,0,0,0,0},{11526,0,0,0,0,0},{10740,0,0,0,0,0},{10744,0,0,0,0,0}},{{11451,0,0,0,0,0},{11225,0,0,0,0,0},{10842,0,0,0,0,0},{10988,0,0,0,0,0},{11346,0,0,0,0,0},{11146,0,0,0,0,0},{10898,0,0,0,0,0},{11262,0,0,0,0,0},{11155,0,0,0,0,0},{11416,0,0,0,0,0},{11303,0,0,0,0,0},{11416,0,0,0,0,0},{10244,0,0,0,0,0},{11318,0,0,0,0,0},{11136,0,0,0,0,0},{11198,0,0,0,0,0},{11033,0,0,0,0,0},{11371,0,0,0,0,0},{11330,0,0,0,0,0},{11060,0,0,0,0,0}}},{{{-164,-181,-213,-249,-258,-246},{-264,-260,-255,-204,-237,-177},{-264,-233,-278,-188,-184,-166},{-264,-246,-193,-260,-184,-204},{-246,-271,-267,-220,-258,-228},{-267,-157,-233,-264,-208,-161},{-204,-255,-188,-186,-181,-195},{-166,-246,-253,-164,-197,-251},{-190,-231,-202,-282,-168,-273},{-164,-253,-289,-184,-206,-284},{-273,-226,-186,-228,-175,-177},{-186,-244,-284,-179,-184,-211},{-197,-278,-251,-244,-157,-253},{-222,-267,-179,-184,-222,-170},{-289,-244,-181,-287,-276,-175},{-235,-213,-195,-237,-264,-255},{-233,-206,-233,-222,-211,-289},{-276,-199,-249,-273,-287,-291},{-179,-159,-244,-226,-255,-193},{-211,-222,-244,-190,-197,-177}},{{-255,-157,-188,-215,-172,-206},{-195,-215,-184,-276,-260,-168},{-164,-271,-170,-235,-161,-253},{-228,-202,-217,-164,-271,-280},{-242,-197,-237,-287,-244,-260},{-172,-186,-237,-170,-179,-264},{-289,-291,-260,-289,-179,-206},{-278,-280,-289,-246,-244,-269},{-244,-208,-157,-179,-172,-177},{-190,-264,-190,-233,-190,-246},{-246,-287,-235,-175,-202,-222},{-190,-258,-233,-224,-208,-278},{-222,-157,-159,-208,-276,-177},{-284,-240,-217,-284,-164,-206},{-282,-255,-278,-202,-262,-240},{-175,-164,-217,-278,-204,-226},{-215,-161,-181,-276,-202,-166},{-161,-284,-242,-233,-186,-184},{-211,-188,-215,-244,-224,-284},{-164,-289,-217,-208,-231,-226}},{{-258,-226,-193,-255,-172,-215},{-242,-289,-211,-208,-244,-249},{-190,-242,-280,-280,-213,-199},{-159,-197,-179,-267,-177,-186},{-249,-271,-255,-211,-264,-184},{-195,-264,-249,-179,-168,-280},{-258,-157,-157,-166,-222,-168},{-231,-206,-166,-244,-213,-168},{-213,-233,-260,-199,-282,-255},{-240,-224,-190,-161,-249,-289},{-278,-255,-190,-195,-224,-289},{-228,-284,-177,-278,-251,-237},{-211,-184,-208,-195,-161,-206},{-291,-157,-276,-264,-217,-291},{-280,-267,-226,-240,-170,-251},{-217,-206,-224,-159,-233,-246},{-168,-280,-159,-175,-195,-249},{-242,-199,-215,-159,-282,-168},{-222,-211,-240,-237,-206,-195},{-199,-157,-164,-235,-206,-172}}},{{{-245,-228,-186,-281,-281,-198},{-233,-248,-198,-231,-293,-195},{-188,-186,-288,-255,-259,-300},{-238,-178,-181,-257,-259,-267},{-174,-307,-198,-245,-193,-286},{-288,-178,-290,-290,-240,-295},{-298,-217,-281,-238,-226,-286},{-186,-167,-233,-248,-221,-190},{-262,-186,-226,-274,-255,-214},{-295,-174,-236,-224,-224,-283},{-243,-193,-276,-264,-183,-257},{-176,-283,-288,-250,-169,-181},{-221,-176,-262,-262,-178,-174},{-169,-271,-200,-209,-276,-219},{-207,-169,-228,-183,-302,-167},{-193,-248,-217,-224,-288,-174},{-286,-217,-290,-271,-178,-283},{-278,-181,-219,-269,-233,-238},{-245,-169,-278,-305,-174,-217},{-171,-226,-205,-183,-198,-295}},{{-290,-200,-250,-181,-309,-245},{-302,-274,-238,-228,-300,-193},{-257,-178,-181,-300,-288,-250},{-286,-245,-259,-283,-271,-250},{-207,-281,-231,-269,-283,-226},{-186,-178,-183,-250,-307,-195},{-300,-198,-307,-295,-302,-209},{-257,-288,-188,-293,-174,-231},{-186,-288,-212,-255,-178,-226},{-198,-264,-236,-300,-183,-174},{-274,-252,-209,-288,-212,-245},{-228,-264,-288,-219,-300,-281},{-214,-226,-226,-309,-293,-274},{-302,-238,-278,-252,-219,-219},{-205,-274,-217,-295,-302,-269},{-200,-195,-202,-302,-231,-181},{-236,-202,-271,-243,-262,-267},{-307,-169,-276,-286,-248,-262},{-233,-217,-240,-178,-267,-183},{-257,-181,-186,-283,-202,-278}},{{-309,-259,-250,-283,-226,-276},{-178,-267,-226,-281,-178,-286},{-217,-209,-181,-231,-236,-274},{-274,-309,-169,-236,-243,-214},{-200,-293,-205,-278,-278,-288},{-269,-193,-188,-252,-264,-209},{-202,-302,-193,-269,-190,-286},{-283,-233,-295,-245,-243,-193},{-255,-271,-236,-217,-240,-178},{-281,-276,-228,-190,-214,-176},{-288,-259,-288,-219,-257,-309},{-269,-186,-286,-188,-205,-233},{-183,-217,-228,-295,-236,-212},{-288,-305,-171,-207,-269,-198},{-198,-300,-281,-267,-233,-200},{-178,-309,-169,-169,-300,-271},{-262,-288,-286,-224,-195,-238},{-300,-224,-169,-271,-238,-207},{-243,-305,-207,-271,-288,-176},{-305,-190,-309,-169,-198,-267}}},{{{-265,-336,-235,-213,-276,-349},{-292,-314,-278,-197,-216,-268},{-287,-240,-325,-238,-289,-308},{-232,-213,-273,-287,-254,-289},{-314,-339,-355,-205,-317,-325},{-349,-232,-251,-257,-333,-248},{-311,-262,-341,-295,-295,-355},{-232,-344,-268,-352,-199,-254},{-355,-303,-207,-199,-314,-216},{-339,-317,-341,-328,-300,-221},{-314,-218,-257,-257,-303,-284},{-347,-333,-202,-246,-298,-240},{-295,-341,-347,-319,-235,-308},{-352,-339,-336,-218,-347,-336},{-213,-314,-314,-325,-270,-287},{-314,-306,-289,-235,-281,-224},{-238,-268,-314,-240,-339,-238},{-202,-246,-336,-278,-328,-202},{-213,-292,-298,-308,-227,-194},{-355,-284,-254,-273,-262,-248}},{{-278,-194,-284,-232,-232,-216},{-306,-265,-197,-287,-218,-251},{-268,-199,-292,-308,-276,-210},{-227,-347,-325,-328,-265,-210},{-218,-322,-202,-306,-306,-352},{-262,-347,-270,-238,-194,-355},{-197,-232,-322,-229,-199,-268},{-218,-322,-330,-273,-202,-344},{-265,-232,-287,-235,-347,-251},{-306,-251,-281,-235,-202,-303},{-311,-229,-243,-325,-268,-248},{-295,-232,-235,-240,-314,-311},{-339,-213,-246,-273,-262,-270},{-202,-281,-319,-216,-328,-207},{-254,-224,-259,-205,-207,-306},{-218,-328,-278,-281,-314,-300},{-319,-300,-278,-227,-281,-262},{-240,-325,-235,-339,-238,-292},{-322,-308,-328,-229,-194,-270},{-311,-254,-251,-284,-248,-328}},{{-281,-308,-352,-248,-197,-339},{-224,-289,-224,-270,-352,-262},{-336,-333,-221,-221,-265,-268},{-270,-262,-355,-336,-319,-218},{-298,-257,-278,-213,-303,-243},{-303,-281,-257,-191,-308,-314},{-202,-235,-352,-336,-221,-259},{-333,-308,-257,-202,-240,-325},{-300,-194,-336,-257,-265,-284},{-287,-216,-322,-308,-289,-278},{-246,-339,-213,-339,-355,-202},{-298,-276,-251,-328,-216,-254},{-240,-298,-248,-262,-232,-207},{-238,-311,-194,-273,-311,-202},{-273,-325,-243,-306,-227,-197},{-306,-349,-202,-202,-325,-325},{-311,-317,-344,-336,-240,-289},{-221,-344,-292,-322,-330,-218},{-235,-322,-322,-281,-352,-281},{-355,-287,-265,-191,-303,-295}}},{{{-149,-197,-154,-123,-119,-183},{-177,-109,-143,-145,-122,-171},{-163,-174,-111,-160,-156,-154},{-191,-132,-200,-159,-134,-160},{-152,-126,-200,-125,-176,-152},{-160,-117,-177,-122,-117,-186},{-139,-120,-185,-151,-145,-159},{-156,-152,-194,-146,-129,-151},{-148,-148,-159,-131,-169,-194},{-134,-119,-168,-117,-197,-189},{-171,-140,-186,-149,-199,-174},{-123,-114,-129,-180,-152,-156},{-182,-186,-197,-120,-140,-188},{-185,-168,-183,-183,-134,-199},{-146,-200,-200,-196,-139,-142},{-162,-185,-189,-154,-163,-140},{-191,-151,-189,-180,-171,-152},{-200,-169,-151,-145,-122,-152},{-169,-129,-145,-191,-146,-188},{-166,-129,-143,-192,-191,-116}},{{-126,-169,-199,-142,-157,-154},{-200,-180,-194,-114,-162,-148},{-129,-183,-165,-168,-174,-119},{-152,-191,-117,-114,-179,-180},{-125,-185,-143,-183,-114,-149},{-200,-168,-145,-131,-186,-171},{-139,-183,-139,-200,-182,-162},{-192,-109,-157,-160,-168,-119},{-145,-194,-116,-192,-128,-163},{-140,-194,-132,-183,-160,-120},{-191,-200,-171,-185,-139,-148},{-109,-171,-145,-143,-132,-185},{-199,-140,-166,-165,-128,-137},{-129,-134,-123,-179,-139,-108},{-186,-120,-137,-122,-136,-120},{-108,-196,-111,-179,-145,-128},{-120,-125,-112,-129,-191,-116},{-136,-143,-188,-192,-108,-199},{-159,-191,-120,-177,-200,-109},{-171,-188,-177,-179,-117,-129}},{{-179,-151,-117,-200,-112,-108},{-200,-125,-132,-194,-139,-151},{-172,-120,-188,-136,-185,-199},{-174,-179,-117,-154,-112,-120},{-182,-114,-197,-154,-143,-114},{-146,-116,-191,-183,-182,-117},{-157,-189,-171,-162,-160,-128},{-165,-183,-126,-166,-125,-194},{-188,-186,-151,-148,-109,-120},{-117,-196,-108,-122,-189,-119},{-162,-117,-186,-197,-114,-108},{-185,-171,-199,-194,-196,-171},{-180,-165,-137,-151,-137,-185},{-169,-148,-162,-109,-125,-189},{-163,-157,-136,-160,-186,-140},{-171,-194,-112,-182,-183,-137},{-146,-122,-189,-139,-145,-159},{-151,-112,-197,-134,-116,-179},{-160,-112,-174,-169,-162,-172},{-166,-112,-134,-152,-140,-156}}},{{{-149,-175,-228,-191,-193,-146},{-164,-164,-211,-206,-138,-142},{-186,-228,-231,-162,-144,-147},{-146,-206,-138,-158,-209,-182},{-215,-147,-133,-167,-178,-237},{-220,-140,-158,-198,-228,-127},{-198,-224,-153,-149,-151,-229},{-231,-153,-233,-191,-213,-153},{-218,-198,-231,-200,-178,-215},{-202,-136,-226,-235,-171,-180},{-195,-215,-186,-144,-164,-235},{-235,-235,-206,-224,-147,-155},{-144,-207,-167,-135,-166,-229},{-178,-197,-167,-224,-138,-215},{-177,-186,-237,-195,-195,-215},{-164,-173,-237,-217,-204,-224},{-233,-175,-211,-153,-127,-160},{-157,-235,-206,-167,-140,-191},{-226,-197,-147,-195,-207,-147},{-187,-180,-191,-173,-213,-142}},{{-149,-142,-177,-202,-200,-182},{-186,-189,-140,-211,-213,-140},{-131,-186,-207,-166,-187,-217},{-204,-215,-127,-131,-147,-146},{-167,-146,-182,-178,-146,-231},{-146,-142,-233,-211,-200,-157},{-129,-162,-233,-127,-231,-229},{-207,-149,-180,-204,-224,-147},{-195,-146,-131,-217,-222,-187},{-207,-237,-135,-175,-224,-166},{-197,-182,-231,-202,-173,-157},{-200,-202,-200,-173,-146,-146},{-197,-151,-226,-206,-129,-135},{-235,-217,-169,-135,-186,-217},{-162,-187,-160,-164,-235,-144},{-200,-211,-197,-228,-228,-209},{-228,-218,-140,-233,-178,-224},{-195,-129,-237,-175,-157,-213},{-136,-147,-182,-186,-147,-228},{-144,-127,-206,-136,-215,-206}},{{-226,-222,-184,-237,-140,-157},{-231,-187,-142,-200,-189,-215},{-178,-131,-231,-177,-169,-135},{-206,-166,-153,-158,-186,-153},{-169,-195,-217,-142,-193,-182},{-149,-202,-204,-211,-131,-202},{-211,-164,-198,-237,-131,-177},{-164,-217,-155,-213,-218,-211},{-155,-197,-166,-135,-206,-140},{-133,-209,-171,-177,-166,-218},{-160,-135,-209,-135,-167,-226},{-144,-222,-218,-237,-200,-167},{-217,-180,-204,-138,-149,-207},{-191,-209,-162,-235,-142,-158},{-127,-131,-138,-215,-237,-197},{-200,-224,-175,-235,-228,-195},{-131,-191,-217,-131,-131,-222},{-235,-147,-173,-171,-224,-198},{-142,-160,-180,-233,-224,-144},{-206,-187,-157,-167,-206,-226}}},{{{-270,-292,-262,-277,-279,-284},{-218,-194,-201,-277,-179,-172},{-282,-309,-314,-245,-206,-198},{-245,-218,-260,-181,-245,-287},{-176,-181,-211,-282,-174,-292},{-179,-260,-260,-186,-211,-230},{-211,-304,-260,-243,-294,-194},{-230,-299,-255,-296,-201,-238},{-270,-189,-299,-201,-296,-250},{-292,-267,-279,-304,-203,-247},{-289,-230,-206,-238,-294,-255},{-287,-194,-201,-318,-228,-220},{-223,-272,-301,-247,-218,-196},{-223,-311,-272,-296,-279,-206},{-223,-301,-243,-194,-220,-292},{-282,-223,-267,-255,-211,-225},{-220,-223,-284,-235,-220,-274},{-270,-289,-194,-191,-279,-257},{-301,-304,-206,-301,-203,-255},{-299,-304,-255,-189,-179,-306}},{{-287,-272,-301,-272,-314,-260},{-301,-294,-296,-299,-216,-284},{-247,-277,-176,-218,-277,-213},{-299,-287,-174,-194,-176,-181},{-191,-238,-284,-228,-299,-292},{-189,-179,-292,-289,-245,-184},{-179,-260,-206,-194,-311,-238},{-311,-304,-211,-243,-216,-265},{-318,-176,-179,-252,-235,-260},{-284,-211,-301,-206,-257,-233},{-318,-198,-201,-233,-218,-174},{-318,-206,-189,-174,-292,-225},{-184,-230,-211,-208,-203,-211},{-179,-306,-247,-196,-301,-191},{-282,-289,-306,-265,-301,-216},{-299,-172,-294,-304,-176,-294},{-216,-230,-223,-262,-223,-277},{-240,-196,-255,-306,-233,-296},{-203,-294,-201,-274,-191,-228},{-270,-218,-172,-201,-211,-174}},{{-243,-223,-189,-223,-213,-216},{-240,-306,-196,-301,-233,-216},{-306,-270,-179,-213,-274,-228},{-289,-260,-184,-301,-240,-299},{-277,-252,-191,-304,-191,-203},{-284,-289,-233,-262,-289,-247},{-235,-206,-223,-179,-287,-255},{-260,-206,-270,-194,-216,-243},{-316,-208,-282,-191,-225,-260},{-260,-247,-299,-284,-301,-314},{-184,-228,-272,-206,-294,-176},{-196,-284,-201,-206,-292,-274},{-201,-198,-223,-218,-216,-191},{-228,-294,-194,-230,-260,-194},{-235,-311,-243,-260,-208,-257},{-174,-223,-260,-218,-289,-294},{-318,-272,-228,-267,-225,-220},{-218,-284,-247,-228,-267,-260},{-216,-198,-252,-277,-267,-294},{-294,-218,-238,-318,-191,-250}}},{{{-245,-185,-280,-293,-164,-236},{-187,-296,-240,-238,-201,-196},{-298,-229,-222,-277,-208,-273},{-238,-293,-171,-270,-231,-252},{-194,-282,-238,-236,-166,-259},{-249,-282,-178,-169,-273,-199},{-203,-229,-286,-280,-245,-293},{-219,-224,-178,-266,-270,-215},{-266,-261,-261,-236,-173,-254},{-224,-219,-185,-189,-268,-243},{-178,-213,-300,-293,-247,-298},{-187,-187,-254,-222,-247,-249},{-219,-231,-210,-282,-263,-261},{-164,-284,-210,-164,-178,-266},{-203,-273,-245,-291,-293,-245},{-282,-284,-282,-298,-222,-176},{-240,-289,-236,-208,-192,-173},{-263,-291,-226,-273,-284,-300},{-268,-273,-268,-298,-275,-189},{-166,-268,-277,-261,-206,-166}},{{-259,-222,-206,-256,-249,-173},{-275,-171,-256,-247,-182,-300},{-169,-185,-199,-176,-282,-217},{-171,-259,-171,-263,-166,-268},{-178,-171,-208,-261,-236,-238},{-199,-171,-256,-203,-277,-289},{-201,-206,-178,-296,-180,-236},{-215,-164,-210,-256,-282,-266},{-203,-185,-171,-240,-240,-298},{-238,-236,-194,-219,-171,-206},{-194,-185,-222,-226,-185,-164},{-249,-222,-243,-240,-224,-261},{-270,-194,-282,-238,-233,-203},{-169,-164,-300,-256,-263,-252},{-240,-210,-240,-192,-173,-236},{-166,-245,-162,-196,-245,-162},{-192,-298,-208,-178,-173,-277},{-254,-268,-215,-280,-213,-210},{-298,-263,-164,-229,-180,-215},{-298,-266,-270,-164,-226,-226}},{{-291,-252,-296,-293,-173,-249},{-291,-233,-270,-266,-199,-280},{-215,-169,-224,-201,-236,-162},{-215,-284,-273,-263,-164,-263},{-256,-249,-273,-208,-199,-277},{-284,-187,-192,-236,-280,-206},{-252,-176,-243,-199,-263,-300},{-259,-298,-273,-286,-222,-226},{-298,-243,-268,-286,-224,-286},{-194,-206,-259,-224,-273,-208},{-291,-194,-247,-300,-199,-182},{-199,-256,-282,-282,-224,-275},{-166,-176,-189,-182,-217,-236},{-240,-296,-259,-280,-189,-164},{-296,-178,-180,-300,-275,-296},{-217,-249,-277,-206,-259,-187},{-259,-236,-166,-289,-173,-240},{-206,-282,-268,-259,-194,-245},{-273,-213,-238,-270,-182,-208},{-300,-289,-296,-196,-206,-247}}},{{{-359,-206,-259,-226,-365,-370},{-206,-315,-270,-335,-350,-365},{-303,-206,-370,-250,-259,-273},{-285,-300,-356,-341,-315,-218},{-356,-370,-309,-341,-356,-215},{-365,-276,-297,-279,-353,-370},{-209,-318,-303,-329,-212,-379},{-368,-223,-285,-294,-282,-315},{-323,-300,-244,-265,-303,-306},{-297,-241,-347,-256,-362,-253},{-218,-382,-350,-306,-306,-359},{-350,-350,-350,-309,-215,-353},{-223,-341,-226,-332,-256,-368},{-273,-332,-262,-273,-285,-353},{-347,-212,-312,-232,-212,-362},{-229,-315,-356,-244,-359,-362},{-259,-206,-309,-379,-315,-209},{-262,-235,-229,-329,-253,-229},{-229,-376,-382,-232,-329,-368},{-326,-347,-370,-270,-229,-297}},{{-253,-276,-315,-312,-259,-344},{-315,-279,-273,-265,-379,-220},{-379,-382,-206,-235,-209,-323},{-235,-273,-285,-229,-368,-335},{-297,-273,-282,-326,-238,-303},{-297,-370,-265,-229,-350,-356},{-376,-306,-320,-318,-244,-365},{-256,-265,-235,-268,-220,-376},{-312,-241,-259,-353,-288,-279},{-347,-285,-223,-338,-341,-303},{-235,-218,-309,-356,-276,-282},{-326,-368,-288,-270,-370,-373},{-326,-232,-238,-347,-356,-238},{-288,-359,-318,-241,-370,-238},{-309,-344,-270,-268,-241,-318},{-365,-294,-318,-276,-326,-215},{-294,-282,-223,-238,-273,-265},{-320,-353,-368,-373,-276,-291},{-268,-312,-259,-300,-326,-218},{-303,-279,-206,-241,-244,-382}},{{-312,-323,-379,-379,-282,-235},{-306,-229,-365,-291,-212,-206},{-320,-220,-338,-297,-238,-335},{-309,-297,-229,-344,-306,-220},{-368,-382,-241,-273,-359,-273},{-303,-318,-238,-256,-335,-309},{-338,-265,-379,-362,-241,-235},{-229,-250,-306,-347,-285,-370},{-276,-303,-273,-294,-320,-226},{-320,-250,-356,-370,-376,-332},{-300,-279,-341,-300,-323,-326},{-350,-232,-297,-206,-288,-323},{-282,-265,-270,-359,-359,-223},{-212,-370,-368,-382,-370,-326},{-220,-323,-262,-241,-212,-368},{-373,-238,-338,-229,-232,-309},{-220,-209,-253,-265,-379,-335},{-229,-303,-379,-382,-359,-323},{-329,-306,-232,-270,-347,-332},{-262,-315,-326,-241,-362,-235}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1841,192,221,150,198,208,315,198,294}; // initial inventory 
int ubiv[I]={2104,384,442,300,396,416,630,396,588}; // 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.32,8.46,5.6,4.24,2.89,1.51,4.53,7.74}; // 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.11,7.69,5.09,3.85,2.63,1.37,4.12,7.04}}; // 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.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,6.15,6.15,6.15,5.38,5.38,5.38,4.61,4.61,4.61,4.07,4.07,4.07,3.56,3.56,3.56,3.05,3.05,3.05,3.08,3.08,3.08,2.7,2.7,2.7,2.31,2.31,2.31,2.1,2.1,2.1,1.84,1.84,1.84,1.58,1.58,1.58,1.1,1.1,1.1,0.96,0.96,0.96,0.82,0.82,0.82,3.3,3.3,3.3,2.88,2.88,2.88,2.47,2.47,2.47,5.63,5.63,5.63,4.93,4.93,4.93,4.22,4.22,4.22}; // 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]={6,3,3,6,3,2,6,3,2,7,4,3,7,4,3,7,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,9,5,3,8,4,3,8,5,3,7,4,3,8,4,3,8,4,3,7,4,3,7,4,3,7,4,3}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5},{6,7,8},{9,10,11},{12,13,14,15,16,17},{18,19,20},{21,22},{23,24,25,26,27,28},{29,30,31},{32,33},{34,35,36,37,38,39,40},{41,42,43,44},{45,46,47},{48,49,50,51,52,53,54},{55,56,57,58},{59,60,61},{62,63,64,65,66,67,68},{69,70,71,72},{73,74,75},{76,77,78,79,80,81,82,83},{84,85,86,87},{88,89,90},{91,92,93,94,95,96,97,98},{99,100,101,102},{103,104,105},{106,107,108,109,110,111,112},{113,114,115,116},{117,118,119},{120,121,122,123,124,125,126},{127,128,129,130},{131,132,133},{134,135,136,137,138,139,140,141},{142,143,144,145},{146,147,148},{149,150,151,152,153,154,155},{156,157,158,159},{160,161,162},{163,164,165,166,167,168,169,170},{171,172,173,174},{175,176,177},{178,179,180,181,182,183,184,185},{186,187,188,189},{190,191,192},{193,194,195,196,197,198,199,200},{201,202,203,204},{205,206,207},{208,209,210,211,212,213,214,215,216},{217,218,219,220,221},{222,223,224},{225,226,227,228,229,230,231,232},{233,234,235,236},{237,238,239},{240,241,242,243,244,245,246,247},{248,249,250,251,252},{253,254,255},{256,257,258,259,260,261,262},{263,264,265,266},{267,268,269},{270,271,272,273,274,275,276,277},{278,279,280,281},{282,283,284},{285,286,287,288,289,290,291,292},{293,294,295,296},{297,298,299},{300,301,302,303,304,305,306},{307,308,309,310},{311,312,313},{314,315,316,317,318,319,320},{321,322,323,324},{325,326,327},{328,329,330,331,332,333,334},{335,336,337,338},{339,340,341}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,2,6,10,0,6,12,1,3,5,7,9,11,1,5,9,1,7,1,3,5,7,9,11,1,5,9,2,8,1,3,5,7,9,11,13,1,5,9,13,1,7,13,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,0,4,8,12,16,1,7,13,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,1,3,5,7,9,11,13,2,6,10,14,1,7,13,2,4,6,8,10,12,14,1,5,9,13,2,8,14,1,3,5,7,9,11,13,1,5,9,13,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,7,11,15,5,11,17,6,8,10,12,14,16,6,10,14,6,12,6,8,10,12,14,16,6,10,14,7,13,4,6,8,10,12,14,16,4,8,12,16,4,10,16,5,7,9,11,13,15,17,4,8,12,16,3,9,15,4,6,8,10,12,14,16,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,1,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,1,5,9,13,17,2,8,14,4,6,8,10,12,14,16,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,4,10,16,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,4,6,8,10,12,14,16,5,9,13,17,4,10,16,5,7,9,11,13,15,17,4,8,12,16,5,11,17,4,6,8,10,12,14,16,4,8,12,16,3,9,15}; // set of end times of each shipment 
