int Dev = 50;// 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 = 345;//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]={{{{11456,0,0,0,0,0},{11954,0,0,0,0,0},{10442,0,0,0,0,0},{11117,0,0,0,0,0},{9966,0,0,0,0,0},{10995,0,0,0,0,0},{11258,0,0,0,0,0},{11291,0,0,0,0,0},{11400,0,0,0,0,0},{11292,0,0,0,0,0},{11703,0,0,0,0,0},{10526,0,0,0,0,0},{11449,0,0,0,0,0},{12153,0,0,0,0,0},{11362,0,0,0,0,0},{11386,0,0,0,0,0},{11640,0,0,0,0,0},{11007,0,0,0,0,0},{10972,0,0,0,0,0},{11801,0,0,0,0,0}},{{11020,0,0,0,0,0},{10556,0,0,0,0,0},{11499,0,0,0,0,0},{10302,0,0,0,0,0},{11186,0,0,0,0,0},{10940,0,0,0,0,0},{11533,0,0,0,0,0},{10830,0,0,0,0,0},{10834,0,0,0,0,0},{11007,0,0,0,0,0},{10377,0,0,0,0,0},{11399,0,0,0,0,0},{11631,0,0,0,0,0},{11332,0,0,0,0,0},{11180,0,0,0,0,0},{11405,0,0,0,0,0},{11128,0,0,0,0,0},{11098,0,0,0,0,0},{11288,0,0,0,0,0},{10874,0,0,0,0,0}},{{10325,0,0,0,0,0},{10783,0,0,0,0,0},{10996,0,0,0,0,0},{11683,0,0,0,0,0},{10721,0,0,0,0,0},{11217,0,0,0,0,0},{10965,0,0,0,0,0},{10743,0,0,0,0,0},{11446,0,0,0,0,0},{10648,0,0,0,0,0},{10304,0,0,0,0,0},{10503,0,0,0,0,0},{11089,0,0,0,0,0},{10793,0,0,0,0,0},{11440,0,0,0,0,0},{11011,0,0,0,0,0},{11521,0,0,0,0,0},{11233,0,0,0,0,0},{11006,0,0,0,0,0},{10561,0,0,0,0,0}}},{{{-269,-213,-240,-253,-204,-141},{-253,-334,-231,-251,-143,-128},{-222,-228,-141,-249,-195,-329},{-114,-199,-170,-334,-334,-267},{-186,-128,-296,-325,-237,-249},{-228,-197,-226,-264,-224,-323},{-336,-282,-172,-235,-336,-327},{-332,-314,-199,-244,-155,-181},{-228,-271,-202,-240,-166,-190},{-228,-217,-260,-206,-208,-199},{-242,-197,-231,-157,-130,-332},{-334,-116,-134,-121,-190,-249},{-287,-179,-220,-260,-215,-320},{-314,-228,-211,-289,-327,-217},{-139,-309,-233,-226,-249,-116},{-137,-123,-314,-204,-193,-119},{-260,-264,-179,-276,-280,-226},{-159,-300,-130,-211,-168,-130},{-130,-125,-195,-177,-253,-179},{-300,-155,-235,-300,-284,-184}},{{-112,-307,-296,-307,-251,-298},{-159,-251,-289,-172,-244,-284},{-199,-224,-316,-186,-217,-168},{-224,-155,-186,-206,-148,-197},{-329,-336,-240,-226,-112,-130},{-172,-112,-202,-287,-217,-155},{-130,-190,-327,-222,-168,-172},{-282,-188,-226,-305,-226,-287},{-208,-332,-242,-289,-179,-137},{-291,-318,-293,-188,-280,-293},{-332,-262,-150,-302,-121,-143},{-231,-298,-213,-190,-318,-220},{-298,-211,-273,-204,-282,-305},{-271,-284,-213,-282,-287,-291},{-226,-226,-280,-262,-155,-327},{-184,-168,-264,-309,-213,-175},{-130,-143,-197,-211,-264,-157},{-293,-264,-202,-293,-208,-273},{-253,-148,-287,-302,-211,-273},{-253,-332,-276,-186,-112,-222}},{{-329,-146,-293,-309,-132,-202},{-276,-164,-298,-336,-148,-215},{-195,-217,-128,-316,-251,-134},{-199,-284,-112,-197,-233,-170},{-269,-291,-119,-323,-249,-260},{-132,-179,-273,-293,-233,-271},{-240,-188,-233,-161,-316,-199},{-237,-246,-112,-168,-269,-121},{-134,-161,-177,-146,-300,-213},{-213,-305,-186,-146,-114,-314},{-220,-119,-215,-211,-130,-251},{-242,-123,-224,-137,-222,-130},{-177,-260,-148,-298,-284,-249},{-262,-139,-289,-271,-334,-276},{-323,-128,-184,-235,-284,-177},{-121,-289,-300,-197,-282,-188},{-307,-157,-181,-309,-226,-251},{-197,-231,-181,-184,-235,-329},{-258,-168,-143,-235,-116,-255},{-336,-202,-197,-332,-119,-190}}},{{{-355,-198,-257,-176,-262,-183},{-293,-186,-331,-321,-345,-357},{-126,-195,-269,-145,-186,-298},{-136,-238,-338,-269,-309,-336},{-324,-145,-193,-212,-152,-124},{-245,-164,-224,-302,-264,-236},{-236,-124,-259,-298,-274,-243},{-290,-183,-145,-212,-243,-195},{-202,-183,-200,-352,-167,-245},{-136,-152,-276,-124,-140,-159},{-169,-305,-336,-238,-214,-338},{-169,-290,-257,-236,-195,-129},{-169,-224,-324,-169,-133,-288},{-148,-352,-255,-190,-126,-217},{-217,-228,-357,-212,-145,-140},{-333,-286,-290,-181,-276,-252},{-198,-188,-269,-193,-286,-317},{-243,-200,-148,-214,-338,-343},{-243,-233,-324,-309,-200,-238},{-259,-281,-226,-174,-252,-309}},{{-143,-312,-267,-307,-343,-288},{-133,-164,-186,-252,-202,-259},{-331,-355,-228,-193,-276,-338},{-136,-290,-267,-162,-278,-340},{-169,-212,-140,-338,-129,-193},{-355,-338,-233,-305,-233,-219},{-198,-217,-190,-155,-319,-250},{-138,-202,-333,-305,-190,-281},{-240,-300,-250,-288,-302,-131},{-283,-181,-159,-193,-240,-274},{-250,-212,-159,-228,-131,-169},{-290,-288,-307,-257,-183,-319},{-124,-255,-271,-231,-150,-224},{-176,-357,-214,-281,-195,-126},{-333,-217,-283,-119,-124,-281},{-243,-169,-281,-319,-209,-164},{-350,-305,-214,-257,-140,-155},{-340,-193,-178,-209,-126,-190},{-200,-157,-228,-124,-321,-131},{-169,-171,-295,-312,-205,-293}},{{-162,-271,-188,-288,-183,-136},{-121,-302,-307,-319,-264,-290},{-148,-226,-178,-314,-190,-259},{-186,-347,-338,-345,-188,-219},{-331,-331,-152,-183,-178,-148},{-302,-183,-195,-188,-309,-288},{-145,-309,-138,-169,-198,-157},{-267,-340,-138,-324,-317,-345},{-162,-274,-245,-300,-331,-293},{-319,-126,-257,-140,-200,-328},{-195,-307,-264,-295,-136,-357},{-274,-121,-324,-136,-176,-245},{-193,-293,-336,-278,-145,-195},{-224,-193,-240,-126,-129,-295},{-298,-186,-347,-186,-350,-164},{-345,-186,-307,-328,-274,-178},{-312,-236,-164,-248,-231,-188},{-240,-281,-350,-140,-205,-214},{-343,-169,-171,-264,-190,-195},{-178,-157,-143,-314,-298,-331}}},{{{-227,-399,-167,-401,-254,-167},{-175,-385,-347,-161,-401,-197},{-352,-221,-167,-336,-213,-150},{-229,-156,-254,-202,-177,-352},{-360,-169,-229,-218,-262,-347},{-278,-216,-379,-240,-268,-399},{-194,-216,-202,-349,-273,-147},{-352,-284,-358,-404,-142,-330},{-224,-341,-344,-287,-298,-210},{-390,-355,-254,-270,-188,-183},{-330,-197,-410,-385,-287,-213},{-262,-164,-175,-344,-147,-303},{-401,-150,-385,-371,-210,-377},{-336,-347,-352,-289,-336,-210},{-238,-399,-399,-289,-273,-390},{-300,-358,-150,-298,-240,-262},{-270,-388,-358,-382,-202,-325},{-169,-369,-339,-314,-186,-355},{-161,-347,-339,-292,-382,-199},{-325,-339,-221,-262,-330,-246}},{{-164,-246,-287,-360,-336,-349},{-177,-303,-341,-284,-207,-284},{-333,-224,-352,-319,-336,-339},{-303,-311,-202,-216,-238,-164},{-169,-292,-259,-366,-355,-262},{-139,-232,-150,-246,-396,-194},{-377,-136,-218,-292,-390,-399},{-191,-183,-371,-150,-216,-257},{-156,-303,-147,-254,-142,-396},{-292,-172,-243,-205,-347,-292},{-238,-270,-142,-341,-319,-194},{-284,-172,-197,-404,-221,-229},{-227,-336,-270,-388,-300,-246},{-352,-369,-385,-246,-235,-355},{-399,-139,-207,-377,-308,-218},{-410,-281,-322,-336,-161,-382},{-393,-347,-407,-268,-216,-156},{-210,-186,-347,-240,-404,-158},{-308,-235,-355,-270,-183,-259},{-328,-136,-197,-284,-352,-300}},{{-175,-352,-246,-158,-344,-205},{-314,-308,-172,-194,-139,-336},{-410,-243,-164,-360,-401,-311},{-281,-401,-341,-339,-339,-363},{-150,-147,-319,-167,-308,-218},{-366,-311,-385,-235,-349,-363},{-235,-238,-366,-388,-197,-210},{-355,-270,-289,-153,-347,-156},{-265,-325,-333,-268,-194,-254},{-167,-167,-358,-393,-145,-167},{-172,-311,-172,-150,-191,-186},{-153,-393,-330,-150,-328,-142},{-287,-153,-202,-295,-161,-341},{-347,-213,-191,-205,-259,-254},{-344,-142,-243,-139,-202,-360},{-352,-180,-188,-254,-191,-150},{-276,-371,-404,-352,-136,-213},{-317,-366,-388,-227,-363,-344},{-221,-300,-268,-341,-268,-188},{-139,-292,-221,-197,-180,-177}}},{{{-169,-132,-174,-132,-105,-143},{-192,-194,-222,-157,-102,-137},{-223,-120,-203,-199,-196,-77},{-157,-111,-182,-160,-116,-102},{-94,-140,-97,-122,-82,-114},{-99,-162,-171,-82,-182,-149},{-151,-89,-186,-106,-199,-109},{-220,-203,-109,-156,-192,-145},{-156,-91,-203,-228,-211,-100},{-114,-199,-149,-129,-172,-106},{-156,-179,-120,-202,-209,-80},{-117,-205,-174,-163,-139,-131},{-95,-169,-125,-163,-176,-179},{-100,-108,-172,-213,-103,-125},{-188,-199,-105,-126,-92,-231},{-128,-151,-203,-85,-226,-163},{-139,-225,-192,-160,-77,-219},{-196,-95,-131,-95,-206,-202},{-186,-92,-116,-152,-95,-213},{-95,-171,-128,-191,-177,-205}},{{-177,-88,-108,-136,-106,-128},{-176,-106,-214,-188,-103,-177},{-208,-89,-172,-180,-226,-208},{-171,-174,-91,-182,-152,-100},{-80,-226,-159,-83,-229,-176},{-140,-162,-145,-140,-200,-109},{-223,-168,-168,-177,-179,-149},{-166,-165,-183,-94,-114,-220},{-217,-129,-159,-120,-223,-142},{-109,-217,-183,-134,-169,-174},{-109,-151,-149,-111,-177,-182},{-117,-229,-137,-132,-189,-102},{-112,-223,-122,-132,-117,-203},{-188,-151,-209,-160,-112,-128},{-192,-120,-149,-156,-169,-197},{-182,-157,-217,-111,-82,-122},{-134,-225,-116,-119,-122,-134},{-139,-223,-194,-172,-128,-168},{-95,-211,-102,-145,-126,-160},{-88,-83,-123,-119,-100,-166}},{{-199,-208,-152,-151,-222,-231},{-94,-191,-208,-231,-160,-116},{-125,-82,-85,-102,-183,-208},{-166,-142,-100,-134,-105,-194},{-114,-128,-105,-200,-220,-209},{-100,-145,-185,-94,-146,-211},{-182,-191,-183,-208,-92,-128},{-116,-189,-214,-126,-80,-95},{-197,-209,-160,-203,-222,-165},{-211,-139,-105,-231,-105,-142},{-182,-91,-117,-192,-162,-112},{-206,-211,-177,-220,-179,-213},{-208,-179,-85,-188,-228,-199},{-197,-165,-151,-192,-179,-191},{-91,-132,-206,-214,-154,-88},{-216,-100,-159,-219,-160,-183},{-219,-203,-159,-129,-105,-149},{-126,-92,-99,-112,-177,-125},{-94,-177,-189,-200,-192,-163},{-162,-157,-219,-157,-186,-120}}},{{{-147,-260,-238,-206,-100,-207},{-258,-251,-253,-167,-233,-237},{-258,-253,-249,-131,-115,-122},{-251,-226,-238,-186,-104,-193},{-195,-127,-98,-140,-91,-218},{-142,-238,-238,-126,-162,-102},{-200,-268,-138,-202,-171,-127},{-153,-144,-144,-116,-151,-253},{-242,-96,-237,-251,-218,-107},{-255,-237,-187,-96,-217,-255},{-166,-140,-149,-153,-224,-142},{-242,-144,-173,-109,-184,-147},{-258,-238,-197,-273,-228,-144},{-131,-266,-160,-127,-178,-135},{-138,-226,-106,-173,-133,-177},{-197,-224,-197,-268,-206,-193},{-149,-258,-149,-118,-264,-268},{-262,-180,-142,-211,-127,-155},{-246,-248,-187,-191,-249,-140},{-142,-262,-197,-142,-120,-271}},{{-197,-140,-224,-98,-109,-111},{-202,-171,-104,-260,-229,-144},{-133,-120,-202,-226,-162,-260},{-142,-133,-195,-266,-116,-129},{-255,-271,-111,-217,-142,-177},{-129,-255,-93,-217,-189,-171},{-149,-115,-111,-240,-200,-228},{-202,-207,-155,-178,-242,-215},{-231,-100,-178,-158,-91,-118},{-271,-140,-118,-260,-187,-153},{-127,-262,-187,-246,-220,-167},{-202,-218,-138,-115,-106,-129},{-191,-202,-231,-184,-149,-228},{-244,-129,-162,-144,-186,-135},{-228,-209,-249,-113,-116,-166},{-127,-197,-166,-116,-220,-91},{-268,-175,-260,-238,-135,-158},{-140,-147,-242,-202,-133,-111},{-224,-228,-206,-249,-238,-233},{-106,-248,-271,-138,-93,-138}},{{-197,-271,-255,-113,-251,-166},{-118,-211,-151,-98,-124,-173},{-167,-171,-187,-273,-231,-206},{-206,-242,-258,-262,-189,-171},{-246,-207,-171,-198,-207,-240},{-191,-155,-200,-113,-118,-138},{-271,-218,-162,-147,-115,-207},{-217,-271,-124,-102,-204,-180},{-229,-211,-197,-113,-215,-178},{-147,-144,-140,-104,-138,-222},{-146,-200,-111,-149,-228,-189},{-235,-140,-195,-231,-186,-120},{-160,-116,-249,-146,-111,-138},{-244,-226,-106,-249,-96,-129},{-209,-213,-246,-106,-135,-233},{-260,-260,-266,-211,-260,-189},{-182,-211,-135,-122,-195,-95},{-209,-177,-248,-126,-262,-249},{-182,-207,-157,-237,-271,-115},{-111,-107,-255,-257,-195,-109}}},{{{-260,-345,-360,-368,-240,-198},{-216,-306,-328,-181,-296,-233},{-338,-137,-122,-250,-145,-203},{-147,-176,-331,-363,-233,-309},{-321,-279,-172,-132,-145,-181},{-358,-172,-304,-152,-296,-184},{-289,-157,-240,-142,-191,-292},{-353,-245,-360,-262,-213,-208},{-282,-296,-189,-162,-228,-353},{-277,-353,-294,-194,-304,-343},{-267,-142,-350,-296,-130,-287},{-270,-172,-257,-338,-174,-318},{-181,-186,-299,-265,-250,-174},{-365,-338,-270,-331,-262,-316},{-348,-198,-289,-238,-189,-343},{-309,-198,-311,-127,-365,-348},{-172,-186,-301,-365,-149,-363},{-274,-216,-238,-301,-270,-289},{-233,-191,-282,-154,-363,-262},{-287,-296,-176,-181,-321,-274}},{{-358,-336,-216,-247,-206,-142},{-162,-132,-122,-167,-164,-270},{-365,-186,-348,-127,-311,-250},{-331,-132,-213,-142,-149,-311},{-137,-368,-157,-292,-240,-289},{-368,-279,-145,-230,-230,-328},{-228,-255,-145,-328,-299,-350},{-154,-250,-284,-152,-272,-184},{-287,-287,-186,-211,-294,-318},{-355,-274,-311,-198,-240,-304},{-228,-333,-218,-137,-299,-220},{-336,-245,-311,-321,-142,-179},{-345,-201,-240,-348,-345,-179},{-172,-140,-223,-314,-345,-172},{-255,-316,-164,-247,-130,-142},{-350,-316,-255,-154,-218,-289},{-127,-206,-318,-341,-267,-181},{-289,-228,-216,-311,-348,-318},{-309,-140,-287,-189,-206,-343},{-321,-321,-162,-358,-157,-309}},{{-243,-135,-154,-203,-270,-167},{-355,-282,-174,-250,-196,-299},{-216,-240,-274,-142,-272,-154},{-277,-135,-294,-127,-311,-333},{-189,-341,-247,-135,-274,-216},{-299,-225,-272,-348,-233,-360},{-287,-235,-152,-360,-213,-125},{-172,-142,-345,-326,-274,-284},{-230,-270,-257,-282,-309,-368},{-355,-243,-157,-184,-255,-228},{-333,-309,-245,-326,-142,-149},{-326,-130,-191,-301,-147,-309},{-323,-296,-250,-341,-225,-260},{-147,-255,-132,-235,-260,-172},{-142,-306,-127,-326,-299,-294},{-206,-225,-338,-260,-225,-140},{-368,-250,-358,-157,-233,-328},{-282,-169,-159,-306,-355,-169},{-211,-294,-189,-318,-272,-250},{-218,-301,-345,-137,-216,-223}}},{{{-203,-268,-326,-256,-275,-233},{-307,-194,-330,-254,-296,-236},{-314,-231,-210,-236,-344,-132},{-233,-199,-240,-129,-300,-118},{-293,-300,-164,-187,-152,-319},{-180,-321,-141,-125,-139,-226},{-233,-273,-282,-148,-125,-282},{-268,-189,-139,-203,-344,-231},{-192,-319,-312,-222,-236,-182},{-330,-215,-249,-296,-289,-229},{-219,-129,-192,-284,-273,-291},{-344,-169,-293,-129,-328,-316},{-169,-224,-243,-192,-314,-270},{-203,-333,-340,-275,-314,-328},{-173,-346,-229,-169,-139,-335},{-335,-201,-219,-173,-247,-189},{-328,-166,-328,-238,-129,-127},{-150,-316,-240,-222,-180,-166},{-146,-122,-340,-185,-122,-196},{-321,-189,-346,-342,-199,-196}},{{-219,-171,-208,-335,-249,-224},{-192,-340,-213,-162,-323,-201},{-187,-224,-330,-146,-178,-136},{-125,-152,-340,-303,-164,-229},{-233,-277,-310,-210,-219,-296},{-213,-335,-296,-254,-298,-125},{-266,-213,-219,-275,-328,-231},{-231,-266,-185,-118,-120,-270},{-187,-268,-125,-298,-268,-330},{-224,-337,-125,-132,-196,-293},{-208,-316,-316,-282,-321,-118},{-182,-298,-273,-206,-249,-328},{-141,-199,-219,-273,-164,-335},{-231,-196,-249,-194,-215,-335},{-169,-187,-323,-266,-261,-210},{-189,-219,-305,-208,-291,-275},{-217,-282,-189,-118,-125,-222},{-118,-266,-243,-275,-120,-346},{-164,-284,-326,-293,-238,-256},{-284,-192,-157,-280,-326,-312}},{{-155,-263,-129,-134,-217,-245},{-182,-134,-307,-176,-189,-136},{-270,-176,-286,-289,-180,-321},{-122,-344,-321,-337,-289,-169},{-263,-132,-118,-346,-203,-240},{-127,-118,-182,-280,-122,-182},{-176,-268,-303,-213,-326,-199},{-245,-296,-206,-192,-310,-176},{-194,-280,-300,-312,-155,-125},{-261,-296,-185,-326,-296,-180},{-182,-233,-189,-118,-194,-192},{-129,-254,-164,-208,-245,-210},{-116,-219,-259,-187,-176,-215},{-143,-280,-125,-291,-162,-316},{-247,-330,-136,-243,-266,-328},{-152,-215,-132,-139,-157,-259},{-243,-289,-208,-187,-203,-270},{-259,-282,-139,-139,-337,-162},{-298,-263,-215,-150,-187,-303},{-159,-342,-180,-266,-289,-180}}},{{{-188,-229,-438,-370,-341,-179},{-194,-423,-256,-206,-303,-153},{-162,-294,-165,-353,-241,-397},{-276,-276,-365,-426,-238,-318},{-412,-153,-268,-423,-223,-168},{-347,-238,-315,-256,-320,-391},{-382,-406,-391,-250,-417,-309},{-215,-347,-259,-168,-318,-420},{-179,-420,-409,-259,-332,-338},{-347,-297,-182,-438,-235,-359},{-403,-359,-406,-238,-403,-403},{-417,-344,-297,-185,-147,-285},{-432,-291,-247,-426,-159,-200},{-394,-194,-223,-362,-323,-420},{-435,-429,-368,-179,-173,-329},{-335,-238,-388,-223,-226,-397},{-406,-197,-206,-218,-362,-320},{-356,-385,-262,-156,-303,-365},{-191,-209,-297,-409,-409,-420},{-276,-435,-400,-353,-250,-176}},{{-238,-147,-415,-332,-206,-176},{-223,-376,-382,-303,-294,-265},{-291,-288,-173,-303,-168,-368},{-415,-220,-350,-341,-223,-288},{-288,-247,-332,-332,-270,-306},{-335,-235,-229,-388,-238,-279},{-426,-438,-173,-179,-300,-423},{-347,-276,-150,-370,-326,-403},{-273,-176,-432,-256,-153,-323},{-247,-359,-276,-156,-171,-150},{-253,-203,-165,-294,-168,-247},{-297,-426,-171,-412,-344,-244},{-220,-370,-426,-423,-270,-244},{-391,-188,-388,-150,-353,-209},{-356,-406,-370,-368,-150,-315},{-435,-365,-147,-412,-176,-423},{-429,-403,-412,-156,-438,-303},{-332,-341,-323,-226,-265,-220},{-270,-247,-268,-435,-159,-412},{-168,-232,-306,-229,-370,-294}},{{-320,-229,-247,-176,-244,-259},{-244,-229,-220,-406,-306,-320},{-426,-253,-253,-262,-188,-329},{-165,-256,-379,-191,-300,-282},{-303,-188,-359,-253,-370,-156},{-359,-244,-153,-432,-412,-218},{-288,-309,-415,-294,-282,-329},{-176,-215,-162,-320,-171,-359},{-203,-147,-382,-329,-391,-238},{-265,-215,-406,-332,-329,-262},{-344,-341,-191,-435,-223,-397},{-341,-156,-353,-179,-265,-432},{-212,-332,-356,-303,-441,-276},{-368,-191,-285,-394,-350,-315},{-226,-320,-391,-320,-394,-426},{-394,-279,-400,-326,-212,-159},{-365,-232,-232,-423,-347,-362},{-438,-194,-223,-238,-176,-412},{-185,-406,-262,-438,-212,-276},{-182,-303,-273,-365,-259,-285}}}}; // 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,3,2,7,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,5,3,9,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,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},{342,343,344}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,1,5,9,1,7,2,4,6,8,10,12,1,5,9,2,8,2,4,6,8,10,12,1,5,9,1,7,2,4,6,8,10,12,14,2,6,10,14,1,7,13,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,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,1,7,13,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,0,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,1,5,9,13,1,7,13,1,3,5,7,9,11,13,1,5,9,13,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,6,10,14,6,12,7,9,11,13,15,17,6,10,14,7,13,7,9,11,13,15,17,6,10,14,6,12,5,7,9,11,13,15,17,5,9,13,17,4,10,16,5,7,9,11,13,15,17,5,9,13,17,5,11,17,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15,4,6,8,10,12,14,16,4,8,12,16,2,8,14,4,6,8,10,12,14,16,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,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,3,9,15,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,1,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,4,8,12,16,4,10,16}; // set of end times of each shipment 
