int Dev = 40;// Deviation
extern const int CNN = 5;// Case Index
extern const int P = 9;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 54;// 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 = 1142;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 27;//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},{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,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},{36,37,38,39,40,41},{42,43,44,45,46,47},{48,49,50,51,52,53}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{12162,0,0,0,0,0},{11899,0,0,0,0,0},{12433,0,0,0,0,0},{12230,0,0,0,0,0},{12465,0,0,0,0,0},{12444,0,0,0,0,0},{11997,0,0,0,0,0},{12241,0,0,0,0,0},{13105,0,0,0,0,0},{12530,0,0,0,0,0}},{{12545,0,0,0,0,0},{12871,0,0,0,0,0},{12481,0,0,0,0,0},{12357,0,0,0,0,0},{13085,0,0,0,0,0},{12136,0,0,0,0,0},{12030,0,0,0,0,0},{12349,0,0,0,0,0},{13173,0,0,0,0,0},{12592,0,0,0,0,0}},{{11468,0,0,0,0,0},{11092,0,0,0,0,0},{11250,0,0,0,0,0},{11630,0,0,0,0,0},{11169,0,0,0,0,0},{11898,0,0,0,0,0},{11707,0,0,0,0,0},{11134,0,0,0,0,0},{11338,0,0,0,0,0},{11961,0,0,0,0,0}},{{9930,0,0,0,0,0},{10538,0,0,0,0,0},{10304,0,0,0,0,0},{10660,0,0,0,0,0},{10355,0,0,0,0,0},{10430,0,0,0,0,0},{9961,0,0,0,0,0},{11119,0,0,0,0,0},{10460,0,0,0,0,0},{10455,0,0,0,0,0}},{{8978,0,0,0,0,0},{9634,0,0,0,0,0},{9892,0,0,0,0,0},{9582,0,0,0,0,0},{9185,0,0,0,0,0},{9772,0,0,0,0,0},{9698,0,0,0,0,0},{9363,0,0,0,0,0},{9585,0,0,0,0,0},{9108,0,0,0,0,0}},{{9322,0,0,0,0,0},{9197,0,0,0,0,0},{9561,0,0,0,0,0},{8457,0,0,0,0,0},{9593,0,0,0,0,0},{9007,0,0,0,0,0},{9257,0,0,0,0,0},{9439,0,0,0,0,0},{9428,0,0,0,0,0},{9457,0,0,0,0,0}},{{10400,0,0,0,0,0},{9840,0,0,0,0,0},{9806,0,0,0,0,0},{10095,0,0,0,0,0},{9507,0,0,0,0,0},{10194,0,0,0,0,0},{9385,0,0,0,0,0},{9958,0,0,0,0,0},{9637,0,0,0,0,0},{9853,0,0,0,0,0}},{{11351,0,0,0,0,0},{11172,0,0,0,0,0},{10633,0,0,0,0,0},{11228,0,0,0,0,0},{11073,0,0,0,0,0},{10723,0,0,0,0,0},{10531,0,0,0,0,0},{10916,0,0,0,0,0},{10723,0,0,0,0,0},{11129,0,0,0,0,0}},{{12253,0,0,0,0,0},{11831,0,0,0,0,0},{12273,0,0,0,0,0},{12374,0,0,0,0,0},{11963,0,0,0,0,0},{11157,0,0,0,0,0},{12184,0,0,0,0,0},{12225,0,0,0,0,0},{12172,0,0,0,0,0},{12402,0,0,0,0,0}}},{{{-179,-279,-185,-206,-335,-341},{-385,-294,-282,-376,-250,-182},{-376,-282,-350,-182,-229,-312},{-203,-353,-191,-265,-288,-403},{-403,-188,-376,-262,-226,-247},{-244,-179,-209,-253,-397,-385},{-356,-362,-244,-253,-323,-182},{-270,-235,-412,-365,-382,-185},{-373,-382,-409,-241,-382,-279},{-182,-253,-394,-218,-406,-344}},{{-380,-172,-185,-214,-248,-306},{-325,-378,-333,-211,-254,-269},{-313,-395,-344,-266,-344,-329},{-273,-383,-316,-175,-243,-254},{-304,-197,-185,-230,-272,-295},{-270,-197,-350,-173,-272,-189},{-218,-252,-269,-227,-310,-264},{-365,-277,-283,-299,-320,-199},{-377,-400,-381,-353,-278,-347},{-226,-240,-272,-299,-272,-311}},{{-152,-247,-249,-181,-156,-208},{-262,-281,-179,-296,-225,-258},{-195,-305,-147,-146,-244,-220},{-230,-155,-205,-224,-158,-266},{-232,-327,-242,-208,-139,-132},{-325,-220,-140,-141,-276,-204},{-348,-259,-184,-155,-195,-264},{-188,-227,-296,-220,-270,-270},{-205,-276,-221,-215,-182,-140},{-298,-177,-240,-164,-293,-128}},{{-134,-178,-231,-114,-195,-205},{-158,-150,-131,-217,-183,-126},{-150,-202,-120,-157,-150,-98},{-236,-208,-233,-174,-109,-112},{-270,-224,-136,-217,-185,-216},{-191,-196,-159,-194,-134,-192},{-199,-144,-242,-220,-147,-205},{-201,-166,-154,-160,-221,-133},{-132,-142,-197,-220,-160,-178},{-230,-241,-224,-108,-198,-187}},{{-203,-91,-171,-175,-112,-190},{-183,-103,-112,-104,-112,-151},{-176,-95,-106,-201,-184,-201},{-206,-155,-129,-203,-206,-118},{-203,-125,-104,-137,-203,-178},{-194,-127,-196,-118,-169,-147},{-185,-140,-100,-184,-132,-163},{-180,-179,-146,-132,-140,-116},{-157,-195,-137,-107,-154,-144},{-99,-156,-187,-171,-134,-198}},{{-178,-169,-166,-157,-116,-230},{-165,-148,-98,-202,-129,-197},{-203,-156,-187,-202,-138,-189},{-118,-175,-91,-159,-187,-127},{-118,-160,-127,-171,-222,-159},{-153,-154,-177,-137,-101,-169},{-144,-129,-107,-216,-109,-102},{-118,-156,-146,-214,-174,-234},{-134,-187,-98,-197,-159,-215},{-162,-166,-192,-139,-221,-164}},{{-209,-230,-266,-165,-224,-191},{-195,-199,-245,-267,-145,-208},{-110,-250,-230,-155,-230,-189},{-188,-219,-256,-151,-221,-234},{-151,-132,-224,-181,-139,-163},{-244,-168,-154,-215,-265,-293},{-197,-246,-150,-263,-170,-245},{-155,-243,-239,-247,-207,-237},{-226,-232,-122,-249,-286,-286},{-122,-161,-169,-159,-219,-165}},{{-152,-237,-156,-331,-342,-320},{-218,-244,-300,-329,-159,-304},{-243,-223,-151,-342,-308,-207},{-277,-275,-168,-344,-245,-202},{-304,-157,-146,-197,-211,-199},{-211,-263,-156,-172,-167,-218},{-179,-204,-273,-202,-196,-285},{-313,-202,-210,-354,-256,-207},{-309,-258,-310,-273,-277,-175},{-266,-172,-283,-281,-162,-274}},{{-334,-301,-221,-175,-388,-288},{-168,-329,-402,-225,-253,-185},{-174,-289,-204,-345,-350,-291},{-232,-270,-258,-315,-194,-194},{-270,-216,-339,-359,-244,-312},{-213,-301,-278,-207,-329,-223},{-295,-222,-399,-277,-362,-291},{-373,-306,-287,-345,-241,-379},{-309,-298,-362,-385,-244,-179},{-284,-368,-356,-187,-238,-291}}},{{{-148,-139,-124,-217,-155,-120},{-133,-226,-198,-175,-142,-206},{-150,-110,-243,-127,-243,-241},{-217,-128,-115,-188,-160,-256},{-102,-106,-150,-145,-199,-210},{-185,-157,-177,-243,-191,-210},{-128,-117,-240,-115,-175,-256},{-200,-177,-172,-107,-112,-174},{-212,-106,-189,-165,-201,-120},{-230,-174,-214,-158,-171,-235}},{{-190,-127,-166,-179,-192,-286},{-156,-277,-141,-298,-172,-231},{-125,-193,-128,-137,-204,-248},{-249,-182,-251,-148,-211,-224},{-232,-133,-192,-301,-289,-312},{-180,-242,-170,-172,-295,-307},{-133,-256,-179,-201,-165,-259},{-248,-219,-247,-256,-309,-155},{-204,-266,-228,-292,-165,-317},{-238,-137,-296,-206,-144,-171}},{{-333,-316,-307,-319,-379,-272},{-163,-265,-280,-184,-269,-362},{-170,-184,-186,-316,-377,-374},{-198,-337,-228,-273,-379,-243},{-151,-291,-364,-327,-202,-374},{-247,-298,-296,-348,-271,-337},{-299,-301,-328,-254,-277,-320},{-151,-298,-170,-359,-266,-229},{-237,-201,-225,-354,-274,-215},{-331,-278,-312,-238,-274,-374}},{{-214,-253,-277,-181,-301,-316},{-361,-338,-352,-328,-313,-301},{-347,-320,-367,-280,-265,-355},{-263,-350,-232,-373,-376,-235},{-396,-229,-232,-298,-256,-331},{-289,-323,-352,-295,-397,-202},{-379,-294,-247,-268,-385,-196},{-329,-382,-346,-364,-256,-397},{-194,-218,-301,-235,-241,-373},{-295,-253,-194,-190,-214,-391}},{{-352,-274,-301,-312,-323,-249},{-304,-400,-331,-207,-320,-249},{-403,-391,-370,-315,-226,-371},{-223,-388,-181,-288,-250,-203},{-268,-253,-271,-375,-373,-203},{-217,-310,-313,-348,-350,-345},{-337,-250,-319,-279,-406,-397},{-199,-364,-346,-258,-268,-246},{-256,-415,-316,-399,-276,-371},{-196,-205,-388,-279,-268,-389}},{{-242,-237,-295,-161,-312,-330},{-222,-318,-187,-227,-189,-332},{-345,-198,-241,-259,-300,-342},{-185,-315,-203,-275,-154,-184},{-262,-195,-344,-219,-223,-340},{-239,-363,-317,-158,-297,-228},{-291,-301,-355,-172,-358,-300},{-345,-268,-304,-161,-346,-216},{-368,-170,-222,-343,-317,-161},{-202,-326,-187,-338,-323,-320}},{{-288,-244,-145,-166,-203,-133},{-221,-255,-178,-200,-153,-157},{-283,-146,-176,-202,-153,-205},{-214,-230,-303,-282,-267,-211},{-173,-146,-285,-159,-269,-267},{-190,-306,-174,-176,-153,-149},{-199,-197,-230,-204,-228,-155},{-192,-267,-210,-267,-275,-237},{-156,-200,-156,-286,-259,-159},{-192,-295,-192,-226,-159,-175}},{{-242,-190,-118,-228,-128,-141},{-136,-260,-197,-156,-203,-134},{-179,-115,-165,-150,-115,-121},{-140,-188,-252,-158,-103,-106},{-132,-214,-239,-152,-174,-195},{-207,-160,-237,-175,-226,-138},{-115,-158,-199,-229,-176,-188},{-182,-182,-239,-219,-217,-185},{-182,-156,-130,-121,-183,-225},{-253,-208,-154,-180,-210,-161}},{{-210,-146,-160,-138,-109,-218},{-156,-111,-192,-232,-218,-176},{-118,-131,-144,-123,-133,-165},{-190,-170,-106,-118,-180,-141},{-136,-104,-128,-180,-133,-230},{-186,-128,-119,-153,-198,-150},{-193,-228,-173,-193,-207,-165},{-153,-230,-144,-126,-113,-144},{-178,-148,-213,-141,-198,-106},{-104,-155,-148,-210,-228,-143}}},{{{-260,-415,-306,-349,-352,-447},{-260,-201,-257,-257,-257,-345},{-247,-243,-447,-345,-293,-401},{-276,-332,-250,-227,-398,-401},{-207,-431,-454,-339,-204,-359},{-392,-240,-398,-260,-418,-253},{-313,-280,-339,-227,-431,-263},{-227,-319,-434,-280,-257,-303},{-276,-345,-313,-260,-438,-293},{-451,-375,-342,-424,-240,-309}},{{-387,-374,-367,-389,-317,-421},{-440,-354,-268,-418,-240,-271},{-253,-351,-204,-270,-410,-301},{-377,-374,-300,-305,-200,-391},{-351,-258,-392,-336,-308,-355},{-328,-193,-214,-436,-360,-412},{-456,-322,-367,-192,-296,-244},{-371,-451,-437,-374,-191,-238},{-377,-393,-233,-204,-397,-292},{-459,-390,-434,-342,-354,-385}},{{-327,-302,-277,-343,-175,-298},{-274,-369,-260,-373,-228,-159},{-407,-222,-288,-218,-252,-311},{-375,-251,-344,-223,-299,-329},{-360,-210,-344,-313,-215,-321},{-254,-337,-378,-294,-363,-211},{-319,-265,-294,-261,-350,-288},{-245,-251,-238,-193,-273,-290},{-245,-403,-300,-228,-313,-301},{-266,-262,-199,-163,-334,-236}},{{-302,-255,-164,-270,-226,-210},{-165,-204,-273,-312,-166,-232},{-190,-158,-209,-310,-307,-147},{-208,-272,-246,-162,-181,-265},{-165,-233,-201,-224,-172,-177},{-298,-340,-197,-219,-155,-153},{-325,-311,-156,-187,-199,-300},{-278,-253,-256,-259,-309,-226},{-182,-301,-166,-146,-289,-149},{-240,-197,-301,-298,-255,-180}},{{-245,-128,-145,-130,-214,-250},{-135,-145,-294,-210,-214,-267},{-284,-273,-229,-241,-153,-279},{-200,-252,-275,-271,-170,-231},{-156,-260,-244,-130,-193,-214},{-230,-256,-277,-256,-128,-187},{-208,-248,-294,-235,-147,-260},{-302,-256,-149,-204,-145,-258},{-191,-126,-218,-174,-292,-227},{-217,-170,-145,-241,-284,-271}},{{-231,-225,-266,-219,-165,-299},{-229,-176,-165,-130,-198,-299},{-200,-216,-133,-210,-198,-200},{-246,-250,-291,-210,-180,-171},{-265,-290,-243,-228,-277,-189},{-139,-147,-281,-213,-152,-187},{-202,-229,-266,-250,-145,-153},{-178,-149,-291,-289,-229,-171},{-218,-216,-264,-250,-209,-315},{-181,-248,-133,-150,-200,-178}},{{-256,-265,-327,-259,-268,-306},{-166,-223,-151,-274,-325,-223},{-289,-296,-300,-261,-261,-340},{-310,-232,-300,-196,-230,-327},{-155,-197,-168,-206,-227,-348},{-296,-190,-181,-294,-181,-348},{-192,-197,-276,-294,-297,-189},{-203,-282,-149,-171,-170,-258},{-178,-213,-178,-188,-279,-189},{-323,-147,-303,-326,-312,-298}},{{-293,-222,-269,-222,-356,-333},{-252,-205,-191,-299,-399,-425},{-233,-250,-306,-308,-332,-231},{-214,-295,-217,-287,-239,-376},{-216,-351,-298,-314,-371,-305},{-238,-360,-211,-192,-371,-225},{-219,-242,-173,-184,-269,-222},{-312,-200,-373,-314,-223,-354},{-233,-216,-283,-204,-405,-290},{-236,-332,-393,-240,-257,-391}},{{-243,-224,-290,-431,-365,-375},{-356,-416,-367,-441,-237,-227},{-230,-394,-367,-332,-266,-253},{-438,-355,-348,-263,-408,-451},{-202,-442,-348,-395,-359,-263},{-343,-304,-354,-201,-388,-280},{-224,-358,-390,-326,-280,-240},{-410,-374,-419,-454,-313,-266},{-438,-192,-335,-266,-365,-240},{-252,-448,-245,-352,-438,-322}}},{{{-86,-106,-110,-73,-128,-137},{-80,-76,-149,-153,-102,-77},{-99,-80,-69,-73,-98,-178},{-130,-68,-122,-99,-96,-78},{-106,-89,-92,-110,-104,-90},{-111,-65,-83,-90,-171,-79},{-124,-82,-151,-84,-146,-156},{-65,-136,-123,-135,-126,-125},{-69,-120,-127,-143,-110,-137},{-76,-103,-85,-147,-170,-145}},{{-126,-147,-186,-212,-203,-227},{-100,-117,-138,-164,-171,-151},{-132,-196,-176,-146,-182,-129},{-127,-190,-206,-124,-182,-192},{-154,-107,-176,-167,-113,-166},{-148,-128,-132,-169,-143,-166},{-107,-173,-121,-160,-175,-136},{-88,-116,-203,-172,-106,-230},{-140,-140,-130,-158,-216,-158},{-82,-113,-135,-191,-129,-161}},{{-191,-121,-166,-135,-192,-275},{-208,-167,-169,-160,-176,-208},{-149,-180,-180,-266,-169,-174},{-208,-205,-177,-120,-159,-265},{-122,-121,-216,-203,-163,-172},{-201,-160,-251,-124,-210,-238},{-229,-153,-195,-125,-120,-186},{-121,-212,-128,-165,-274,-164},{-187,-146,-255,-142,-161,-216},{-115,-236,-221,-148,-253,-238}},{{-221,-242,-148,-211,-146,-205},{-225,-240,-126,-144,-242,-148},{-173,-248,-132,-221,-164,-181},{-256,-164,-195,-205,-130,-130},{-219,-156,-272,-128,-268,-238},{-270,-246,-201,-254,-240,-193},{-284,-185,-138,-128,-134,-221},{-154,-189,-209,-189,-266,-201},{-124,-282,-197,-262,-175,-209},{-183,-256,-154,-242,-250,-177}},{{-140,-229,-197,-166,-157,-223},{-140,-150,-193,-127,-153,-250},{-164,-274,-134,-158,-130,-197},{-160,-260,-203,-234,-191,-190},{-284,-177,-270,-191,-138,-247},{-203,-189,-234,-158,-265,-182},{-252,-244,-205,-211,-221,-112},{-177,-146,-165,-125,-174,-250},{-238,-193,-185,-140,-214,-193},{-136,-154,-140,-195,-127,-151}},{{-166,-111,-144,-109,-141,-198},{-166,-225,-174,-150,-205,-162},{-134,-178,-170,-133,-115,-159},{-183,-180,-167,-214,-139,-132},{-222,-131,-229,-128,-103,-200},{-199,-161,-165,-166,-106,-103},{-209,-171,-199,-150,-148,-197},{-134,-161,-122,-131,-148,-159},{-195,-202,-164,-104,-190,-163},{-222,-235,-224,-187,-104,-110}},{{-157,-110,-168,-121,-144,-113},{-147,-170,-142,-75,-80,-77},{-132,-104,-138,-96,-71,-109},{-137,-186,-166,-149,-102,-111},{-143,-148,-146,-162,-145,-92},{-178,-97,-156,-148,-115,-105},{-130,-182,-76,-122,-113,-123},{-120,-98,-130,-96,-151,-101},{-84,-102,-137,-129,-113,-81},{-169,-184,-146,-116,-137,-75}},{{-128,-66,-135,-62,-113,-119},{-102,-116,-134,-59,-135,-65},{-93,-84,-117,-72,-127,-92},{-94,-119,-133,-69,-116,-111},{-77,-138,-117,-126,-74,-75},{-81,-103,-122,-62,-129,-95},{-146,-88,-73,-114,-106,-137},{-131,-76,-60,-125,-63,-59},{-101,-84,-120,-136,-107,-86},{-123,-87,-117,-92,-91,-98}},{{-59,-132,-85,-125,-105,-60},{-103,-106,-73,-85,-94,-128},{-77,-114,-68,-65,-115,-99},{-124,-85,-83,-131,-66,-64},{-72,-91,-116,-117,-77,-65},{-98,-114,-92,-102,-91,-63},{-111,-137,-115,-129,-99,-99},{-76,-73,-92,-108,-124,-113},{-83,-124,-130,-64,-114,-76},{-111,-98,-119,-118,-100,-63}}},{{{-231,-224,-217,-281,-205,-193},{-240,-276,-298,-264,-145,-221},{-156,-286,-288,-271,-300,-150},{-156,-212,-228,-274,-319,-198},{-219,-278,-257,-245,-319,-248},{-310,-317,-171,-248,-236,-159},{-233,-324,-264,-164,-207,-174},{-151,-150,-190,-240,-217,-248},{-217,-186,-231,-290,-314,-164},{-161,-169,-307,-150,-148,-288}},{{-233,-298,-167,-171,-208,-133},{-274,-221,-280,-143,-194,-150},{-176,-305,-263,-312,-199,-186},{-219,-143,-303,-286,-219,-133},{-271,-240,-240,-319,-269,-278},{-205,-233,-277,-252,-183,-219},{-152,-238,-270,-215,-190,-212},{-190,-221,-230,-196,-292,-245},{-209,-195,-169,-240,-264,-232},{-245,-228,-322,-226,-217,-265}},{{-146,-268,-220,-119,-140,-209},{-215,-153,-139,-181,-185,-202},{-267,-127,-206,-150,-112,-155},{-155,-161,-263,-261,-183,-220},{-194,-130,-228,-244,-202,-117},{-260,-270,-160,-218,-142,-178},{-245,-161,-164,-138,-219,-184},{-228,-255,-246,-226,-118,-218},{-185,-146,-178,-179,-166,-175},{-226,-286,-252,-158,-241,-189}},{{-172,-224,-149,-134,-138,-135},{-153,-213,-170,-186,-115,-193},{-191,-158,-111,-118,-99,-152},{-213,-163,-168,-198,-174,-175},{-138,-140,-160,-209,-134,-160},{-136,-148,-135,-100,-173,-91},{-162,-226,-166,-150,-109,-170},{-148,-115,-148,-134,-144,-90},{-189,-152,-201,-141,-114,-132},{-191,-226,-157,-132,-88,-177}},{{-116,-91,-94,-118,-149,-86},{-129,-122,-143,-118,-104,-123},{-93,-147,-113,-163,-130,-154},{-186,-92,-141,-82,-101,-84},{-92,-173,-113,-145,-152,-114},{-96,-103,-149,-84,-104,-74},{-114,-76,-135,-133,-140,-117},{-108,-137,-122,-144,-98,-154},{-114,-123,-76,-161,-132,-87},{-102,-131,-139,-125,-142,-118}},{{-109,-109,-129,-138,-111,-170},{-76,-146,-74,-115,-81,-174},{-74,-106,-96,-100,-122,-158},{-164,-81,-79,-159,-143,-97},{-113,-83,-133,-115,-162,-108},{-143,-125,-127,-79,-124,-88},{-117,-87,-79,-137,-105,-82},{-88,-157,-140,-98,-157,-100},{-107,-131,-89,-105,-83,-127},{-90,-142,-83,-76,-82,-129}},{{-140,-87,-134,-96,-205,-162},{-132,-91,-192,-195,-208,-165},{-134,-170,-162,-95,-105,-146},{-85,-190,-178,-139,-200,-128},{-83,-147,-171,-152,-95,-157},{-151,-171,-118,-141,-95,-206},{-169,-95,-86,-101,-170,-120},{-89,-120,-127,-130,-206,-130},{-181,-102,-109,-135,-209,-188},{-101,-92,-190,-182,-93,-164}},{{-178,-147,-237,-177,-171,-126},{-156,-140,-244,-117,-127,-272},{-192,-131,-163,-194,-253,-237},{-177,-246,-115,-244,-175,-255},{-143,-166,-233,-244,-239,-227},{-107,-188,-253,-265,-187,-142},{-128,-230,-126,-225,-175,-235},{-238,-198,-128,-156,-127,-183},{-195,-159,-137,-225,-125,-235},{-139,-216,-192,-180,-273,-239}},{{-275,-197,-237,-171,-298,-303},{-179,-180,-300,-159,-189,-162},{-253,-283,-271,-229,-199,-236},{-277,-226,-249,-298,-201,-210},{-224,-232,-181,-266,-222,-199},{-149,-147,-291,-270,-307,-319},{-217,-208,-282,-164,-139,-289},{-222,-252,-217,-180,-139,-286},{-145,-256,-204,-291,-229,-266},{-158,-155,-220,-270,-224,-210}}},{{{-223,-306,-234,-354,-343,-162},{-229,-231,-189,-231,-173,-327},{-250,-295,-277,-274,-332,-359},{-279,-359,-359,-170,-253,-242},{-314,-162,-348,-218,-325,-274},{-356,-335,-186,-319,-356,-178},{-319,-330,-250,-231,-186,-215},{-372,-346,-194,-306,-343,-168},{-340,-362,-178,-269,-359,-346},{-218,-253,-338,-370,-285,-197}},{{-162,-255,-287,-282,-231,-355},{-287,-327,-293,-335,-262,-319},{-295,-301,-269,-293,-346,-280},{-277,-301,-170,-372,-320,-246},{-192,-364,-234,-372,-272,-285},{-162,-210,-258,-301,-181,-285},{-184,-317,-295,-367,-259,-259},{-205,-327,-165,-189,-335,-205},{-359,-184,-362,-314,-267,-311},{-160,-293,-162,-202,-207,-329}},{{-256,-258,-330,-255,-147,-227},{-194,-263,-222,-149,-272,-169},{-285,-321,-280,-191,-314,-207},{-246,-319,-249,-303,-336,-210},{-321,-301,-164,-243,-213,-272},{-316,-223,-290,-181,-174,-313},{-311,-326,-290,-246,-181,-260},{-249,-180,-209,-174,-289,-321},{-205,-205,-335,-342,-270,-210},{-194,-256,-249,-342,-230,-287}},{{-298,-188,-199,-221,-161,-215},{-205,-303,-316,-276,-177,-166},{-198,-280,-226,-281,-267,-258},{-245,-266,-303,-292,-197,-260},{-226,-306,-185,-216,-311,-188},{-267,-256,-270,-202,-222,-282},{-271,-247,-247,-145,-148,-307},{-328,-226,-254,-175,-300,-280},{-305,-162,-194,-304,-311,-298},{-267,-294,-286,-262,-309,-249}},{{-154,-291,-221,-286,-135,-139},{-306,-260,-293,-165,-291,-304},{-202,-280,-200,-182,-282,-150},{-275,-284,-252,-165,-271,-143},{-134,-154,-171,-224,-265,-165},{-277,-163,-291,-193,-167,-293},{-134,-145,-267,-230,-171,-135},{-147,-250,-245,-228,-215,-263},{-282,-304,-139,-254,-141,-278},{-163,-243,-189,-289,-169,-267}},{{-247,-184,-189,-156,-161,-260},{-141,-145,-250,-232,-273,-295},{-252,-265,-269,-224,-230,-180},{-150,-167,-226,-165,-174,-174},{-210,-286,-289,-204,-260,-224},{-180,-267,-219,-167,-132,-304},{-135,-282,-260,-132,-263,-226},{-191,-213,-280,-295,-206,-213},{-280,-254,-215,-143,-163,-191},{-141,-206,-260,-286,-217,-189}},{{-256,-222,-269,-214,-291,-322},{-285,-222,-143,-230,-254,-226},{-281,-262,-148,-163,-150,-315},{-197,-175,-141,-278,-256,-315},{-278,-305,-226,-159,-280,-317},{-152,-298,-244,-237,-226,-275},{-265,-314,-141,-168,-245,-141},{-133,-309,-262,-209,-152,-327},{-159,-253,-177,-166,-296,-258},{-263,-134,-278,-170,-157,-209}},{{-240,-273,-247,-156,-207,-311},{-264,-281,-267,-260,-290,-344},{-224,-220,-233,-184,-297,-185},{-193,-174,-167,-325,-252,-301},{-183,-235,-225,-347,-192,-157},{-274,-259,-284,-171,-199,-192},{-214,-206,-343,-248,-333,-319},{-150,-247,-218,-196,-285,-215},{-157,-165,-218,-260,-224,-195},{-148,-247,-252,-258,-239,-271}},{{-332,-254,-314,-269,-253,-354},{-181,-233,-341,-210,-189,-277},{-205,-277,-341,-309,-340,-197},{-184,-220,-309,-330,-215,-255},{-251,-269,-157,-372,-250,-295},{-233,-189,-346,-218,-162,-207},{-236,-210,-362,-181,-189,-282},{-233,-298,-178,-181,-173,-311},{-285,-202,-244,-301,-205,-170},{-186,-275,-299,-303,-317,-274}}},{{{-271,-232,-337,-292,-196,-329},{-388,-412,-397,-232,-400,-320},{-214,-310,-229,-247,-250,-346},{-223,-340,-412,-379,-271,-195},{-373,-379,-322,-259,-289,-243},{-184,-361,-244,-295,-310,-382},{-292,-319,-322,-295,-226,-323},{-340,-322,-406,-280,-199,-397},{-400,-403,-325,-307,-325,-184},{-262,-244,-313,-271,-235,-204}},{{-331,-350,-339,-287,-159,-224},{-337,-293,-176,-194,-347,-326},{-179,-399,-330,-216,-228,-162},{-363,-204,-350,-330,-281,-170},{-188,-387,-336,-210,-299,-342},{-366,-382,-342,-265,-257,-342},{-381,-235,-336,-213,-164,-339},{-311,-273,-244,-317,-201,-211},{-322,-187,-171,-199,-231,-157},{-381,-284,-342,-374,-366,-252}},{{-181,-166,-259,-281,-138,-186},{-241,-254,-169,-150,-195,-255},{-231,-173,-321,-294,-235,-216},{-149,-305,-247,-223,-267,-149},{-159,-242,-286,-305,-167,-162},{-198,-218,-215,-287,-276,-255},{-211,-180,-202,-307,-165,-123},{-196,-331,-153,-223,-195,-131},{-303,-254,-236,-212,-233,-234},{-298,-324,-321,-141,-201,-220}},{{-122,-188,-178,-215,-141,-190},{-138,-231,-217,-167,-118,-196},{-138,-177,-226,-222,-188,-192},{-161,-251,-224,-107,-181,-213},{-144,-145,-137,-222,-164,-108},{-266,-171,-141,-208,-124,-132},{-122,-180,-169,-172,-103,-114},{-217,-206,-226,-239,-231,-105},{-231,-193,-189,-213,-221,-203},{-128,-126,-126,-172,-174,-105}},{{-139,-183,-117,-162,-192,-183},{-94,-131,-214,-174,-92,-179},{-94,-131,-125,-206,-186,-108},{-98,-191,-95,-148,-111,-203},{-115,-94,-134,-94,-94,-192},{-108,-162,-157,-188,-186,-186},{-195,-114,-196,-176,-134,-213},{-100,-202,-134,-174,-211,-180},{-162,-139,-126,-169,-95,-165},{-144,-186,-126,-143,-163,-105}},{{-192,-176,-134,-134,-214,-210},{-209,-178,-130,-208,-236,-206},{-179,-215,-170,-227,-140,-243},{-203,-122,-204,-106,-108,-110},{-97,-169,-123,-136,-194,-252},{-142,-100,-177,-113,-186,-239},{-169,-178,-138,-158,-135,-206},{-140,-107,-151,-163,-229,-230},{-209,-116,-207,-195,-133,-241},{-159,-149,-227,-208,-122,-228}},{{-124,-259,-138,-243,-205,-253},{-163,-257,-253,-226,-151,-295},{-175,-216,-183,-131,-284,-260},{-190,-129,-190,-262,-250,-161},{-135,-261,-194,-234,-216,-201},{-249,-210,-222,-273,-135,-206},{-239,-220,-208,-133,-268,-145},{-114,-224,-276,-157,-299,-250},{-218,-145,-225,-146,-173,-239},{-243,-240,-278,-284,-212,-173}},{{-275,-272,-271,-277,-317,-391},{-282,-307,-266,-309,-224,-204},{-284,-295,-324,-344,-207,-184},{-199,-282,-342,-307,-323,-334},{-216,-338,-238,-363,-177,-275},{-294,-267,-326,-229,-306,-269},{-306,-345,-222,-180,-254,-294},{-211,-343,-311,-256,-188,-258},{-163,-239,-279,-231,-168,-391},{-221,-164,-256,-226,-362,-255}},{{-350,-356,-350,-202,-208,-181},{-318,-373,-326,-292,-388,-301},{-338,-294,-266,-403,-310,-349},{-303,-209,-329,-283,-283,-367},{-202,-412,-347,-352,-247,-262},{-223,-209,-272,-184,-292,-400},{-202,-206,-383,-202,-196,-334},{-396,-400,-347,-343,-229,-280},{-185,-332,-374,-421,-271,-367},{-292,-320,-287,-223,-223,-322}}},{{{-441,-487,-406,-318,-389,-294},{-360,-368,-357,-210,-340,-228},{-385,-410,-210,-248,-455,-473},{-430,-371,-256,-374,-427,-259},{-357,-374,-343,-416,-252,-452},{-395,-395,-340,-270,-466,-241},{-416,-276,-406,-290,-220,-368},{-298,-392,-420,-231,-252,-458},{-392,-364,-364,-308,-343,-444},{-399,-410,-234,-438,-458,-332}},{{-303,-223,-373,-371,-364,-438},{-386,-261,-454,-451,-246,-438},{-240,-333,-285,-374,-367,-367},{-219,-449,-247,-214,-413,-251},{-386,-302,-397,-421,-292,-364},{-365,-422,-214,-261,-289,-219},{-348,-278,-427,-230,-433,-206},{-369,-206,-346,-344,-377,-196},{-292,-388,-390,-458,-407,-419},{-251,-250,-410,-284,-239,-316}},{{-271,-428,-306,-261,-256,-239},{-230,-431,-279,-270,-274,-225},{-268,-274,-276,-220,-225,-222},{-202,-367,-306,-278,-194,-186},{-293,-286,-258,-281,-174,-178},{-208,-231,-306,-243,-259,-353},{-337,-317,-279,-211,-331,-350},{-413,-209,-339,-223,-174,-336},{-192,-333,-324,-349,-219,-211},{-299,-280,-270,-229,-376,-314}},{{-248,-342,-154,-208,-289,-222},{-262,-239,-254,-271,-243,-294},{-213,-308,-308,-191,-257,-294},{-362,-163,-303,-201,-279,-246},{-284,-334,-262,-243,-343,-153},{-338,-195,-247,-151,-277,-208},{-176,-189,-188,-153,-328,-225},{-265,-292,-280,-206,-318,-294},{-294,-358,-226,-256,-201,-299},{-202,-350,-262,-221,-225,-268}},{{-149,-166,-215,-169,-192,-254},{-318,-319,-310,-157,-157,-277},{-204,-249,-162,-307,-247,-222},{-242,-321,-206,-247,-217,-240},{-235,-261,-300,-185,-146,-236},{-218,-208,-312,-206,-282,-166},{-306,-169,-155,-256,-273,-185},{-178,-280,-226,-159,-169,-314},{-197,-266,-252,-162,-196,-247},{-318,-139,-222,-243,-189,-152}},{{-217,-275,-273,-171,-186,-310},{-222,-196,-226,-159,-281,-251},{-268,-243,-287,-193,-177,-337},{-171,-215,-210,-240,-293,-160},{-203,-284,-217,-188,-198,-300},{-210,-316,-319,-217,-184,-337},{-303,-243,-149,-269,-189,-312},{-233,-303,-233,-283,-201,-184},{-310,-196,-287,-207,-203,-175},{-321,-213,-291,-276,-273,-177}},{{-328,-342,-189,-371,-267,-325},{-330,-267,-285,-306,-183,-305},{-260,-360,-160,-344,-337,-239},{-181,-179,-303,-210,-228,-308},{-265,-202,-261,-248,-315,-179},{-348,-350,-362,-205,-239,-305},{-192,-282,-181,-229,-278,-320},{-262,-287,-372,-270,-225,-323},{-302,-332,-258,-295,-183,-400},{-267,-231,-372,-259,-295,-196}},{{-373,-245,-394,-355,-382,-426},{-320,-321,-388,-260,-240,-267},{-195,-385,-242,-352,-434,-310},{-326,-364,-350,-330,-392,-327},{-397,-403,-363,-254,-343,-333},{-234,-312,-422,-320,-437,-267},{-266,-251,-260,-298,-379,-317},{-278,-327,-369,-263,-395,-320},{-379,-327,-369,-266,-399,-353},{-302,-333,-298,-361,-240,-396}},{{-427,-280,-399,-480,-210,-371},{-282,-232,-292,-416,-444,-287},{-440,-382,-392,-434,-444,-234},{-333,-419,-399,-413,-430,-448},{-292,-225,-258,-287,-487,-476},{-222,-280,-275,-284,-427,-336},{-444,-368,-478,-262,-413,-424},{-259,-276,-372,-241,-301,-448},{-339,-324,-327,-315,-444,-487},{-437,-314,-430,-410,-490,-385}}}}; // 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]={24,13,9,25,12,8,24,12,9,26,13,9,25,13,9,26,13,9,26,13,9,26,13,9,26,13,9,25,13,9,26,13,9,26,13,9,27,13,9,27,13,9,26,14,9,26,14,9,26,13,9,26,13,9,26,13,9,25,13,9,25,13,9,25,13,9,25,13,9,26,13,9}; // 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,747,748,749,750,751,752},{753,754,755,756,757,758,759,760,761},{762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787},{788,789,790,791,792,793,794,795,796,797,798,799,800},{801,802,803,804,805,806,807,808,809},{810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835},{836,837,838,839,840,841,842,843,844,845,846,847,848},{849,850,851,852,853,854,855,856,857},{858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883},{884,885,886,887,888,889,890,891,892,893,894,895,896},{897,898,899,900,901,902,903,904,905},{906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930},{931,932,933,934,935,936,937,938,939,940,941,942,943},{944,945,946,947,948,949,950,951,952},{953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977},{978,979,980,981,982,983,984,985,986,987,988,989,990},{991,992,993,994,995,996,997,998,999},{1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024},{1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037},{1038,1039,1040,1041,1042,1043,1044,1045,1046},{1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071},{1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084},{1085,1086,1087,1088,1089,1090,1091,1092,1093},{1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119},{1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132},{1133,1134,1135,1136,1137,1138,1139,1140,1141}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,0,4,8,12,16,20,24,28,32,36,40,44,48,0,6,12,18,24,30,36,42,48,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,1,5,9,13,17,21,25,29,33,37,41,45,2,8,14,20,26,32,38,44,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,2,6,10,14,18,22,26,30,34,38,42,46,0,6,12,18,24,30,36,42,48,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,1,5,9,13,17,21,25,29,33,37,41,45,49,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,1,5,9,13,17,21,25,29,33,37,41,45,49,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,0,4,8,12,16,20,24,28,32,36,40,44,48,0,6,12,18,24,30,36,42,48,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,2,6,10,14,18,22,26,30,34,38,42,46,50,1,7,13,19,25,31,37,43,49,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,0,4,8,12,16,20,24,28,32,36,40,44,48,2,8,14,20,26,32,38,44,50,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,2,6,10,14,18,22,26,30,34,38,42,46,50,1,7,13,19,25,31,37,43,49,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,1,5,9,13,17,21,25,29,33,37,41,45,49,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,0,4,8,12,16,20,24,28,32,36,40,44,48,52,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,0,4,8,12,16,20,24,28,32,36,40,44,48,52,2,8,14,20,26,32,38,44,50,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,2,6,10,14,18,22,26,30,34,38,42,46,50,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,2,6,10,14,18,22,26,30,34,38,42,46,50,0,6,12,18,24,30,36,42,48,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,1,5,9,13,17,21,25,29,33,37,41,45,49,2,8,14,20,26,32,38,44,50,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,0,4,8,12,16,20,24,28,32,36,40,44,48,2,8,14,20,26,32,38,44,50,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,1,5,9,13,17,21,25,29,33,37,41,45,49,0,6,12,18,24,30,36,42,48,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,2,6,10,14,18,22,26,30,34,38,42,46,50,0,6,12,18,24,30,36,42,48,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,0,4,8,12,16,20,24,28,32,36,40,44,48,0,6,12,18,24,30,36,42,48}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,5,9,13,17,21,25,29,33,37,41,45,49,53,5,11,17,23,29,35,41,47,53,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,6,10,14,18,22,26,30,34,38,42,46,50,7,13,19,25,31,37,43,49,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,7,11,15,19,23,27,31,35,39,43,47,51,5,11,17,23,29,35,41,47,53,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,4,8,12,16,20,24,28,32,36,40,44,48,52,3,9,15,21,27,33,39,45,51,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,5,9,13,17,21,25,29,33,37,41,45,49,53,5,11,17,23,29,35,41,47,53,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,4,8,12,16,20,24,28,32,36,40,44,48,52,3,9,15,21,27,33,39,45,51,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,4,8,12,16,20,24,28,32,36,40,44,48,52,3,9,15,21,27,33,39,45,51,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,2,6,10,14,18,22,26,30,34,38,42,46,50,4,10,16,22,28,34,40,46,52,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,4,8,12,16,20,24,28,32,36,40,44,48,52,4,10,16,22,28,34,40,46,52,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,4,8,12,16,20,24,28,32,36,40,44,48,52,3,9,15,21,27,33,39,45,51,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,4,8,12,16,20,24,28,32,36,40,44,48,52,4,10,16,22,28,34,40,46,52,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,3,7,11,15,19,23,27,31,35,39,43,47,51,3,9,15,21,27,33,39,45,51,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,2,6,10,14,18,22,26,30,34,38,42,46,50,1,7,13,19,25,31,37,43,49,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,1,5,9,13,17,21,25,29,33,37,41,45,49,53,1,7,13,19,25,31,37,43,49,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,1,5,9,13,17,21,25,29,33,37,41,45,49,53,3,9,15,21,27,33,39,45,51,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,3,7,11,15,19,23,27,31,35,39,43,47,51,1,7,13,19,25,31,37,43,49,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,3,7,11,15,19,23,27,31,35,39,43,47,51,1,7,13,19,25,31,37,43,49,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,3,7,11,15,19,23,27,31,35,39,43,47,51,4,10,16,22,28,34,40,46,52,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,2,6,10,14,18,22,26,30,34,38,42,46,50,4,10,16,22,28,34,40,46,52,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,4,8,12,16,20,24,28,32,36,40,44,48,52,4,10,16,22,28,34,40,46,52,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,4,8,12,16,20,24,28,32,36,40,44,48,52,3,9,15,21,27,33,39,45,51,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,5,9,13,17,21,25,29,33,37,41,45,49,53,3,9,15,21,27,33,39,45,51,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,3,7,11,15,19,23,27,31,35,39,43,47,51,3,9,15,21,27,33,39,45,51}; // set of end times of each shipment 
