int Dev = 40;// Deviation
extern const int CNN = 4;// 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 = 349;//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]={{{{10481,0,0,0,0,0},{10807,0,0,0,0,0},{10526,0,0,0,0,0},{11682,0,0,0,0,0},{11642,0,0,0,0,0},{11139,0,0,0,0,0},{11780,0,0,0,0,0},{11668,0,0,0,0,0},{11286,0,0,0,0,0},{11008,0,0,0,0,0},{11033,0,0,0,0,0},{10873,0,0,0,0,0},{11567,0,0,0,0,0},{11073,0,0,0,0,0},{10637,0,0,0,0,0},{10456,0,0,0,0,0},{11963,0,0,0,0,0},{10659,0,0,0,0,0},{11760,0,0,0,0,0},{11170,0,0,0,0,0}},{{10922,0,0,0,0,0},{10993,0,0,0,0,0},{11119,0,0,0,0,0},{10699,0,0,0,0,0},{10906,0,0,0,0,0},{11437,0,0,0,0,0},{10780,0,0,0,0,0},{11028,0,0,0,0,0},{10411,0,0,0,0,0},{11313,0,0,0,0,0},{10724,0,0,0,0,0},{11174,0,0,0,0,0},{10752,0,0,0,0,0},{10632,0,0,0,0,0},{11185,0,0,0,0,0},{10509,0,0,0,0,0},{11860,0,0,0,0,0},{10784,0,0,0,0,0},{10655,0,0,0,0,0},{11158,0,0,0,0,0}},{{10690,0,0,0,0,0},{11031,0,0,0,0,0},{11609,0,0,0,0,0},{10703,0,0,0,0,0},{10966,0,0,0,0,0},{10654,0,0,0,0,0},{10612,0,0,0,0,0},{11193,0,0,0,0,0},{11437,0,0,0,0,0},{11768,0,0,0,0,0},{10921,0,0,0,0,0},{11435,0,0,0,0,0},{10463,0,0,0,0,0},{11205,0,0,0,0,0},{10208,0,0,0,0,0},{11477,0,0,0,0,0},{11446,0,0,0,0,0},{10274,0,0,0,0,0},{11499,0,0,0,0,0},{10527,0,0,0,0,0}}},{{{-208,-195,-217,-175,-193,-246},{-150,-164,-302,-307,-137,-298},{-251,-202,-184,-141,-157,-204},{-309,-246,-244,-184,-302,-181},{-170,-246,-314,-197,-195,-296},{-298,-233,-231,-278,-278,-235},{-228,-240,-242,-217,-224,-177},{-193,-258,-195,-311,-276,-181},{-302,-137,-291,-197,-206,-208},{-202,-269,-188,-244,-276,-204},{-177,-168,-164,-262,-181,-235},{-264,-246,-161,-226,-206,-280},{-280,-186,-146,-291,-197,-298},{-249,-204,-213,-231,-314,-287},{-226,-177,-249,-139,-137,-168},{-204,-143,-152,-195,-307,-172},{-311,-246,-208,-244,-300,-278},{-280,-240,-208,-181,-246,-139},{-222,-235,-242,-278,-202,-235},{-237,-302,-253,-161,-208,-164}},{{-155,-141,-175,-251,-193,-141},{-199,-150,-224,-190,-148,-220},{-159,-246,-184,-280,-309,-228},{-199,-278,-291,-186,-235,-249},{-280,-157,-155,-258,-190,-300},{-157,-141,-293,-211,-284,-244},{-267,-148,-204,-206,-269,-139},{-282,-246,-159,-289,-264,-139},{-253,-235,-222,-199,-222,-175},{-146,-199,-305,-211,-220,-291},{-143,-155,-314,-164,-242,-226},{-222,-166,-213,-141,-202,-226},{-237,-211,-249,-251,-276,-143},{-231,-141,-246,-155,-181,-242},{-293,-224,-228,-188,-186,-311},{-213,-231,-240,-168,-166,-228},{-291,-253,-206,-314,-166,-211},{-284,-296,-215,-240,-224,-278},{-296,-179,-137,-287,-166,-181},{-296,-222,-307,-255,-255,-168}},{{-311,-166,-269,-311,-244,-226},{-282,-220,-278,-179,-143,-242},{-155,-242,-213,-284,-244,-253},{-273,-251,-172,-141,-255,-291},{-278,-195,-311,-146,-166,-222},{-134,-188,-267,-166,-307,-195},{-280,-276,-202,-309,-287,-242},{-258,-152,-244,-188,-199,-237},{-150,-195,-311,-296,-177,-278},{-253,-251,-307,-300,-264,-253},{-240,-231,-280,-172,-184,-184},{-307,-298,-282,-271,-262,-255},{-244,-143,-143,-217,-152,-190},{-208,-157,-298,-311,-246,-253},{-244,-231,-233,-146,-260,-255},{-287,-246,-255,-251,-293,-134},{-302,-134,-150,-137,-175,-233},{-240,-159,-222,-193,-155,-271},{-202,-278,-213,-141,-148,-271},{-186,-278,-302,-224,-269,-300}}},{{{-233,-209,-221,-167,-281,-331},{-217,-176,-171,-195,-295,-245},{-300,-236,-328,-309,-264,-300},{-240,-224,-226,-326,-221,-231},{-309,-178,-181,-319,-317,-167},{-333,-190,-174,-255,-324,-317},{-319,-283,-290,-269,-328,-190},{-324,-267,-171,-257,-271,-255},{-319,-219,-202,-198,-200,-317},{-212,-307,-164,-248,-276,-143},{-319,-283,-259,-181,-312,-305},{-148,-164,-143,-174,-186,-155},{-319,-152,-314,-193,-233,-157},{-283,-155,-248,-293,-152,-157},{-178,-240,-143,-174,-205,-257},{-143,-262,-209,-207,-221,-233},{-314,-319,-324,-324,-183,-214},{-281,-195,-286,-207,-162,-267},{-193,-295,-321,-295,-333,-236},{-312,-219,-181,-238,-171,-200}},{{-264,-312,-200,-331,-164,-250},{-186,-302,-174,-193,-193,-195},{-162,-176,-286,-307,-293,-188},{-312,-290,-233,-159,-217,-236},{-255,-178,-295,-321,-145,-276},{-176,-240,-312,-300,-293,-207},{-293,-326,-164,-307,-271,-290},{-209,-295,-231,-224,-305,-290},{-224,-214,-148,-200,-298,-278},{-257,-286,-245,-269,-219,-221},{-202,-209,-314,-228,-214,-188},{-236,-300,-295,-205,-257,-212},{-207,-319,-298,-302,-259,-198},{-271,-278,-228,-143,-309,-190},{-200,-324,-148,-188,-300,-262},{-238,-148,-167,-148,-293,-300},{-219,-286,-267,-307,-321,-176},{-167,-328,-195,-257,-317,-245},{-209,-317,-155,-164,-157,-307},{-328,-267,-219,-238,-228,-226}},{{-324,-145,-159,-233,-186,-188},{-186,-259,-309,-307,-176,-209},{-328,-288,-324,-248,-305,-145},{-228,-228,-228,-209,-157,-198},{-152,-243,-281,-288,-157,-157},{-219,-200,-183,-250,-312,-198},{-152,-278,-288,-198,-190,-274},{-276,-309,-326,-331,-326,-186},{-305,-257,-321,-224,-159,-331},{-264,-288,-295,-271,-259,-205},{-319,-224,-200,-324,-186,-193},{-278,-221,-288,-207,-321,-233},{-286,-274,-228,-181,-171,-193},{-257,-224,-178,-240,-183,-238},{-305,-183,-164,-309,-152,-217},{-269,-233,-295,-245,-219,-159},{-240,-293,-240,-317,-333,-324},{-167,-300,-262,-186,-207,-286},{-233,-262,-217,-169,-281,-157},{-233,-276,-300,-221,-283,-157}}},{{{-197,-216,-197,-281,-188,-325},{-194,-382,-177,-210,-218,-344},{-227,-246,-205,-306,-273,-207},{-287,-191,-358,-366,-248,-164},{-339,-197,-363,-227,-306,-289},{-235,-199,-347,-257,-188,-177},{-330,-257,-382,-322,-303,-339},{-374,-349,-295,-347,-358,-303},{-278,-188,-276,-167,-262,-262},{-224,-221,-289,-298,-287,-341},{-248,-325,-319,-262,-273,-243},{-164,-188,-292,-205,-254,-205},{-377,-371,-341,-229,-270,-289},{-169,-287,-205,-273,-207,-276},{-213,-341,-295,-265,-379,-306},{-180,-197,-248,-229,-169,-164},{-229,-369,-224,-371,-328,-363},{-186,-363,-194,-221,-355,-311},{-339,-319,-360,-221,-363,-180},{-188,-339,-300,-300,-382,-306}},{{-273,-229,-363,-191,-371,-229},{-314,-330,-360,-328,-202,-366},{-194,-369,-339,-257,-314,-213},{-363,-360,-207,-246,-218,-197},{-183,-363,-379,-251,-175,-213},{-336,-311,-366,-221,-330,-257},{-229,-270,-175,-216,-268,-308},{-221,-300,-257,-300,-268,-319},{-358,-229,-202,-238,-355,-197},{-270,-344,-235,-333,-317,-344},{-188,-379,-333,-352,-194,-330},{-167,-238,-254,-262,-246,-265},{-254,-205,-278,-199,-369,-248},{-183,-254,-257,-319,-167,-207},{-262,-314,-374,-303,-276,-194},{-210,-221,-180,-360,-273,-268},{-254,-382,-287,-339,-333,-259},{-218,-295,-374,-240,-172,-371},{-248,-164,-317,-371,-175,-221},{-306,-221,-229,-377,-369,-360}},{{-199,-186,-232,-216,-366,-188},{-183,-218,-333,-257,-349,-374},{-292,-202,-287,-317,-308,-254},{-175,-371,-292,-191,-248,-221},{-276,-207,-238,-336,-363,-371},{-246,-199,-183,-377,-268,-169},{-328,-349,-265,-377,-221,-218},{-210,-238,-221,-366,-224,-172},{-377,-262,-287,-311,-183,-216},{-202,-232,-369,-287,-287,-177},{-207,-382,-229,-251,-232,-172},{-177,-298,-289,-355,-352,-371},{-177,-183,-224,-374,-207,-355},{-300,-306,-232,-202,-374,-292},{-265,-191,-199,-210,-306,-289},{-292,-186,-194,-205,-278,-216},{-333,-382,-292,-319,-377,-292},{-169,-172,-180,-188,-292,-341},{-273,-284,-360,-328,-369,-210},{-262,-330,-287,-347,-194,-341}}},{{{-162,-166,-131,-192,-174,-142},{-162,-148,-196,-186,-183,-154},{-106,-136,-211,-103,-202,-194},{-214,-152,-176,-206,-188,-123},{-176,-189,-186,-111,-208,-163},{-194,-171,-166,-192,-205,-208},{-92,-213,-177,-132,-185,-154},{-182,-139,-196,-176,-171,-112},{-140,-186,-203,-208,-146,-156},{-149,-92,-200,-97,-136,-103},{-152,-117,-180,-146,-196,-116},{-165,-109,-199,-200,-214,-211},{-169,-182,-182,-186,-196,-197},{-159,-145,-111,-131,-119,-151},{-182,-196,-156,-92,-196,-194},{-168,-159,-157,-211,-97,-136},{-163,-194,-142,-177,-202,-116},{-208,-131,-94,-171,-95,-208},{-123,-211,-171,-182,-137,-168},{-186,-165,-137,-129,-148,-143}},{{-208,-97,-119,-132,-172,-136},{-157,-149,-100,-203,-159,-102},{-209,-172,-159,-95,-156,-213},{-188,-108,-136,-194,-106,-137},{-205,-171,-197,-157,-142,-180},{-92,-103,-209,-92,-200,-192},{-149,-183,-146,-106,-148,-143},{-119,-106,-97,-209,-214,-119},{-97,-137,-177,-94,-97,-148},{-137,-176,-125,-149,-216,-103},{-149,-194,-151,-152,-203,-142},{-126,-132,-123,-216,-182,-122},{-174,-186,-151,-200,-160,-160},{-143,-143,-139,-109,-136,-123},{-183,-191,-168,-105,-199,-131},{-154,-123,-100,-151,-134,-176},{-179,-152,-97,-192,-199,-191},{-146,-120,-139,-199,-208,-183},{-94,-105,-95,-197,-200,-145},{-199,-163,-114,-95,-108,-126}},{{-108,-120,-214,-92,-169,-179},{-92,-148,-206,-203,-99,-136},{-117,-191,-160,-131,-95,-189},{-120,-199,-140,-95,-156,-139},{-203,-117,-120,-179,-188,-148},{-152,-132,-189,-108,-154,-211},{-171,-163,-214,-165,-100,-179},{-119,-105,-99,-128,-145,-189},{-171,-146,-202,-149,-183,-126},{-131,-165,-209,-194,-160,-94},{-143,-206,-100,-192,-123,-214},{-129,-174,-126,-136,-152,-177},{-111,-172,-160,-152,-92,-122},{-168,-203,-112,-102,-185,-146},{-129,-213,-202,-102,-171,-119},{-100,-211,-211,-129,-129,-114},{-137,-163,-156,-126,-117,-151},{-205,-145,-151,-163,-185,-183},{-213,-106,-186,-117,-94,-211},{-112,-132,-151,-143,-100,-214}}},{{{-235,-120,-157,-206,-244,-120},{-222,-220,-213,-195,-133,-189},{-229,-147,-111,-182,-229,-142},{-191,-189,-229,-135,-231,-218},{-135,-253,-217,-249,-111,-238},{-116,-244,-193,-186,-166,-135},{-240,-122,-144,-133,-149,-233},{-180,-109,-153,-157,-127,-147},{-177,-248,-138,-178,-231,-195},{-153,-226,-240,-202,-166,-224},{-189,-151,-166,-135,-149,-228},{-151,-193,-235,-131,-140,-129},{-116,-204,-226,-198,-249,-189},{-213,-138,-197,-166,-249,-162},{-151,-197,-197,-122,-238,-249},{-111,-246,-175,-202,-235,-167},{-253,-253,-146,-249,-248,-233},{-246,-118,-135,-138,-182,-122},{-202,-237,-240,-126,-153,-213},{-187,-200,-115,-244,-131,-129}},{{-140,-160,-197,-124,-253,-193},{-213,-244,-244,-155,-228,-187},{-189,-246,-178,-229,-113,-186},{-149,-138,-129,-109,-217,-127},{-147,-213,-187,-207,-116,-158},{-178,-138,-237,-120,-198,-111},{-116,-136,-237,-118,-166,-195},{-118,-171,-197,-251,-240,-217},{-124,-122,-189,-126,-220,-198},{-186,-248,-120,-238,-191,-135},{-177,-113,-217,-213,-246,-217},{-244,-209,-233,-244,-217,-220},{-244,-171,-149,-206,-177,-147},{-147,-162,-169,-238,-215,-207},{-213,-204,-193,-193,-175,-153},{-133,-127,-166,-175,-237,-215},{-195,-182,-118,-204,-224,-140},{-184,-164,-226,-124,-115,-180},{-228,-166,-193,-177,-173,-213},{-135,-253,-111,-120,-136,-164}},{{-151,-180,-120,-237,-193,-187},{-173,-113,-136,-233,-206,-118},{-113,-146,-211,-127,-118,-177},{-136,-138,-211,-228,-186,-202},{-171,-215,-244,-126,-122,-118},{-211,-186,-235,-222,-195,-146},{-244,-126,-142,-136,-224,-158},{-189,-180,-158,-226,-213,-115},{-120,-167,-202,-135,-209,-209},{-153,-124,-226,-160,-178,-229},{-206,-118,-164,-127,-193,-253},{-215,-157,-127,-144,-131,-138},{-177,-207,-189,-191,-217,-162},{-231,-238,-253,-242,-144,-175},{-109,-217,-229,-109,-133,-238},{-244,-224,-136,-220,-202,-231},{-142,-187,-229,-186,-167,-198},{-173,-122,-118,-244,-249,-248},{-116,-187,-255,-211,-118,-147},{-193,-120,-171,-178,-131,-255}}},{{{-152,-223,-328,-198,-218,-198},{-157,-336,-152,-179,-282,-164},{-149,-174,-240,-147,-179,-211},{-216,-228,-328,-274,-336,-247},{-326,-314,-172,-274,-169,-321},{-198,-218,-301,-311,-284,-159},{-272,-176,-220,-343,-301,-323},{-255,-154,-235,-169,-238,-284},{-243,-270,-164,-260,-306,-167},{-309,-211,-260,-306,-196,-218},{-243,-179,-189,-272,-301,-265},{-323,-167,-262,-186,-326,-318},{-208,-270,-270,-272,-282,-316},{-333,-233,-194,-272,-218,-257},{-252,-240,-292,-238,-301,-265},{-267,-162,-321,-294,-164,-270},{-159,-243,-262,-176,-284,-157},{-216,-316,-270,-265,-304,-203},{-191,-333,-343,-247,-211,-326},{-247,-304,-326,-213,-326,-282}},{{-172,-282,-216,-292,-270,-194},{-287,-245,-206,-233,-245,-206},{-162,-186,-289,-309,-172,-338},{-265,-299,-184,-306,-206,-149},{-292,-257,-147,-154,-176,-154},{-287,-220,-220,-247,-250,-191},{-279,-289,-228,-194,-274,-296},{-198,-230,-282,-245,-304,-176},{-172,-287,-252,-154,-211,-272},{-194,-289,-272,-277,-331,-262},{-152,-270,-230,-164,-238,-186},{-149,-272,-208,-338,-169,-218},{-223,-184,-265,-287,-172,-194},{-282,-282,-174,-154,-316,-211},{-157,-179,-321,-167,-336,-230},{-267,-213,-277,-318,-184,-235},{-198,-314,-314,-299,-279,-292},{-282,-309,-162,-208,-277,-216},{-326,-152,-326,-211,-270,-216},{-198,-338,-211,-167,-260,-333}},{{-336,-260,-294,-225,-292,-164},{-218,-294,-240,-338,-196,-316},{-201,-154,-277,-299,-331,-260},{-162,-154,-279,-159,-314,-196},{-243,-169,-147,-323,-238,-228},{-311,-262,-274,-247,-149,-260},{-220,-176,-169,-152,-172,-282},{-277,-292,-252,-174,-189,-260},{-203,-279,-172,-328,-265,-176},{-296,-240,-277,-309,-328,-341},{-314,-164,-184,-267,-321,-206},{-309,-321,-235,-211,-314,-230},{-167,-321,-167,-301,-230,-179},{-230,-198,-206,-216,-309,-282},{-169,-301,-169,-267,-167,-213},{-336,-336,-247,-243,-338,-179},{-299,-311,-336,-149,-306,-296},{-257,-191,-235,-262,-181,-184},{-274,-289,-186,-336,-338,-167},{-157,-174,-189,-191,-257,-152}}},{{{-312,-289,-143,-314,-180,-155},{-303,-185,-166,-261,-164,-291},{-226,-252,-180,-316,-219,-143},{-247,-141,-321,-238,-226,-229},{-310,-296,-189,-196,-178,-263},{-296,-152,-213,-275,-196,-298},{-305,-169,-291,-310,-169,-256},{-203,-261,-176,-303,-319,-261},{-162,-189,-238,-310,-245,-310},{-261,-187,-148,-249,-247,-252},{-268,-159,-249,-259,-206,-238},{-289,-305,-155,-305,-231,-240},{-150,-201,-282,-236,-141,-159},{-310,-266,-256,-316,-252,-300},{-229,-178,-178,-146,-245,-187},{-312,-261,-162,-217,-307,-310},{-226,-268,-171,-243,-247,-201},{-266,-155,-187,-307,-185,-305},{-201,-259,-298,-173,-192,-178},{-249,-270,-173,-210,-252,-300}},{{-266,-213,-303,-233,-268,-249},{-243,-240,-146,-252,-199,-273},{-314,-268,-148,-178,-176,-166},{-166,-229,-166,-252,-203,-148},{-252,-275,-148,-152,-296,-176},{-319,-314,-240,-252,-310,-323},{-277,-240,-146,-162,-155,-277},{-182,-180,-231,-148,-310,-162},{-196,-310,-189,-321,-157,-206},{-152,-185,-303,-152,-259,-143},{-323,-231,-233,-159,-143,-162},{-275,-208,-141,-296,-236,-310},{-146,-296,-182,-192,-155,-152},{-192,-291,-270,-268,-233,-238},{-307,-215,-215,-215,-229,-282},{-141,-141,-270,-189,-312,-282},{-296,-307,-266,-305,-226,-150},{-180,-310,-196,-157,-196,-182},{-263,-268,-268,-173,-222,-194},{-247,-185,-159,-139,-238,-312}},{{-178,-291,-314,-266,-199,-143},{-143,-247,-194,-173,-146,-189},{-222,-261,-289,-273,-293,-185},{-192,-321,-238,-300,-182,-261},{-303,-307,-164,-233,-270,-305},{-196,-321,-176,-310,-169,-266},{-150,-148,-196,-252,-171,-146},{-298,-243,-180,-316,-296,-226},{-199,-298,-203,-300,-249,-240},{-185,-252,-307,-282,-312,-173},{-284,-312,-199,-194,-201,-206},{-180,-155,-176,-162,-300,-266},{-286,-319,-208,-155,-178,-194},{-171,-155,-286,-178,-173,-208},{-238,-217,-291,-157,-141,-215},{-319,-208,-243,-252,-182,-310},{-192,-196,-226,-139,-192,-187},{-180,-150,-169,-187,-159,-166},{-199,-261,-261,-293,-164,-261},{-182,-148,-263,-233,-270,-171}}},{{{-370,-182,-226,-182,-329,-353},{-320,-200,-250,-341,-385,-288},{-256,-382,-382,-315,-197,-226},{-412,-209,-309,-318,-406,-197},{-247,-197,-259,-350,-323,-412},{-341,-220,-341,-185,-185,-241},{-341,-223,-359,-223,-235,-350},{-359,-279,-382,-329,-259,-368},{-341,-300,-382,-179,-388,-397},{-276,-326,-200,-338,-373,-270},{-406,-232,-385,-194,-262,-285},{-382,-194,-370,-300,-394,-388},{-297,-391,-385,-203,-320,-247},{-220,-223,-297,-315,-347,-320},{-262,-315,-188,-218,-253,-388},{-179,-326,-326,-397,-220,-262},{-335,-394,-273,-226,-294,-279},{-188,-185,-182,-376,-303,-276},{-350,-262,-332,-279,-356,-197},{-197,-244,-182,-294,-329,-397}},{{-291,-209,-315,-403,-279,-303},{-268,-406,-300,-282,-238,-309},{-312,-335,-376,-218,-185,-338},{-285,-253,-385,-318,-312,-359},{-397,-335,-282,-294,-365,-300},{-312,-250,-194,-206,-356,-397},{-194,-276,-412,-265,-229,-394},{-191,-306,-385,-256,-368,-218},{-279,-253,-350,-200,-338,-288},{-338,-288,-206,-247,-329,-350},{-176,-235,-332,-409,-220,-312},{-291,-312,-397,-232,-338,-409},{-200,-406,-176,-309,-188,-397},{-232,-306,-382,-250,-212,-406},{-220,-194,-294,-300,-282,-359},{-312,-200,-359,-276,-220,-370},{-223,-285,-294,-297,-312,-259},{-220,-215,-244,-309,-235,-182},{-262,-323,-403,-182,-256,-303},{-265,-391,-382,-212,-188,-338}},{{-188,-365,-220,-256,-247,-353},{-191,-394,-370,-403,-412,-200},{-394,-315,-365,-391,-409,-226},{-323,-391,-315,-329,-332,-176},{-382,-376,-241,-229,-270,-200},{-294,-200,-259,-244,-329,-185},{-329,-220,-315,-253,-320,-185},{-262,-412,-397,-223,-185,-382},{-323,-303,-288,-285,-388,-279},{-194,-250,-365,-291,-379,-200},{-259,-382,-365,-212,-323,-279},{-379,-259,-288,-209,-335,-235},{-294,-229,-338,-388,-300,-315},{-279,-273,-335,-335,-326,-347},{-368,-188,-303,-197,-209,-268},{-262,-362,-226,-279,-359,-388},{-312,-179,-306,-282,-412,-294},{-309,-265,-241,-197,-409,-356},{-344,-391,-344,-279,-379,-376},{-315,-300,-226,-206,-185,-218}}}}; // 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]={7,3,2,6,3,2,6,4,3,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,5,3,8,4,3,8,4,3,9,4,3,9,4,3,8,5,3,8,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,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},{342,343,344,345},{346,347,348}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,1,5,9,2,8,2,4,6,8,10,12,1,5,9,1,7,1,3,5,7,9,11,0,4,8,12,0,6,12,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,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,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,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,16,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,16,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,0,4,8,12,1,7,13,0,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,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,6,10,14,7,13,7,9,11,13,15,17,6,10,14,6,12,6,8,10,12,14,16,5,9,13,17,5,11,17,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,5,11,17,3,5,7,9,11,13,15,17,3,7,11,15,5,11,17,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,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,2,6,10,14,4,10,16,2,4,6,8,10,12,14,16,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,1,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,4,10,16,4,6,8,10,12,14,16,2,6,10,14,3,9,15,3,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,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15}; // set of end times of each shipment 
