int Dev = 40;// Deviation
extern const int CNN = 2;// 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]={{{{10742,0,0,0,0,0},{11734,0,0,0,0,0},{10591,0,0,0,0,0},{11508,0,0,0,0,0},{11107,0,0,0,0,0},{10864,0,0,0,0,0},{11179,0,0,0,0,0},{11341,0,0,0,0,0},{11208,0,0,0,0,0},{11046,0,0,0,0,0}},{{10589,0,0,0,0,0},{10647,0,0,0,0,0},{11506,0,0,0,0,0},{10557,0,0,0,0,0},{10882,0,0,0,0,0},{10729,0,0,0,0,0},{10744,0,0,0,0,0},{11378,0,0,0,0,0},{10613,0,0,0,0,0},{11184,0,0,0,0,0}},{{10975,0,0,0,0,0},{11180,0,0,0,0,0},{11449,0,0,0,0,0},{11554,0,0,0,0,0},{10241,0,0,0,0,0},{11521,0,0,0,0,0},{10957,0,0,0,0,0},{11176,0,0,0,0,0},{11331,0,0,0,0,0},{11144,0,0,0,0,0}},{{10356,0,0,0,0,0},{11442,0,0,0,0,0},{11182,0,0,0,0,0},{10677,0,0,0,0,0},{11389,0,0,0,0,0},{11152,0,0,0,0,0},{11532,0,0,0,0,0},{11427,0,0,0,0,0},{10491,0,0,0,0,0},{10521,0,0,0,0,0}},{{11023,0,0,0,0,0},{11704,0,0,0,0,0},{11053,0,0,0,0,0},{11048,0,0,0,0,0},{10953,0,0,0,0,0},{11414,0,0,0,0,0},{11299,0,0,0,0,0},{11341,0,0,0,0,0},{10708,0,0,0,0,0},{11560,0,0,0,0,0}},{{10909,0,0,0,0,0},{10783,0,0,0,0,0},{11197,0,0,0,0,0},{10826,0,0,0,0,0},{11547,0,0,0,0,0},{11044,0,0,0,0,0},{11449,0,0,0,0,0},{11663,0,0,0,0,0},{11318,0,0,0,0,0},{10628,0,0,0,0,0}},{{11179,0,0,0,0,0},{11239,0,0,0,0,0},{11285,0,0,0,0,0},{10481,0,0,0,0,0},{10702,0,0,0,0,0},{11456,0,0,0,0,0},{10651,0,0,0,0,0},{10503,0,0,0,0,0},{11089,0,0,0,0,0},{11674,0,0,0,0,0}},{{11195,0,0,0,0,0},{10671,0,0,0,0,0},{10908,0,0,0,0,0},{11288,0,0,0,0,0},{11041,0,0,0,0,0},{11153,0,0,0,0,0},{11414,0,0,0,0,0},{11286,0,0,0,0,0},{10996,0,0,0,0,0},{11184,0,0,0,0,0}},{{11249,0,0,0,0,0},{11271,0,0,0,0,0},{11469,0,0,0,0,0},{11317,0,0,0,0,0},{10785,0,0,0,0,0},{10918,0,0,0,0,0},{10375,0,0,0,0,0},{11902,0,0,0,0,0},{11074,0,0,0,0,0},{11031,0,0,0,0,0}}},{{{-307,-267,-177,-168,-242,-302},{-311,-271,-152,-231,-226,-197},{-224,-148,-244,-211,-179,-240},{-309,-296,-300,-262,-179,-305},{-143,-226,-199,-148,-311,-314},{-146,-231,-195,-260,-220,-148},{-276,-280,-300,-264,-159,-305},{-179,-204,-280,-311,-282,-206},{-260,-253,-278,-211,-269,-307},{-244,-226,-155,-222,-302,-282}},{{-188,-237,-249,-215,-226,-262},{-164,-161,-186,-197,-179,-224},{-302,-244,-291,-197,-190,-267},{-143,-204,-199,-213,-141,-246},{-278,-166,-213,-224,-289,-264},{-134,-222,-217,-159,-134,-197},{-242,-228,-143,-235,-137,-228},{-164,-280,-278,-293,-193,-289},{-146,-134,-181,-278,-139,-291},{-311,-226,-226,-298,-211,-311}},{{-311,-181,-282,-260,-211,-206},{-291,-249,-161,-262,-213,-181},{-177,-199,-172,-293,-302,-231},{-181,-166,-271,-289,-300,-215},{-269,-159,-186,-139,-213,-190},{-267,-155,-137,-273,-197,-249},{-276,-213,-166,-137,-146,-161},{-249,-309,-202,-143,-309,-233},{-195,-237,-164,-190,-244,-302},{-137,-213,-186,-211,-166,-253}},{{-170,-177,-188,-311,-233,-197},{-152,-224,-220,-226,-175,-175},{-271,-251,-302,-181,-267,-280},{-258,-143,-237,-148,-307,-186},{-159,-222,-224,-264,-311,-235},{-289,-157,-224,-175,-190,-164},{-309,-258,-282,-195,-280,-307},{-155,-249,-220,-161,-228,-208},{-137,-139,-305,-188,-175,-166},{-296,-181,-166,-258,-305,-291}},{{-206,-280,-215,-181,-188,-206},{-309,-246,-293,-235,-255,-190},{-276,-271,-213,-276,-276,-179},{-284,-235,-273,-284,-188,-242},{-215,-188,-137,-269,-251,-141},{-170,-305,-226,-170,-269,-186},{-148,-155,-235,-148,-172,-213},{-152,-213,-311,-289,-172,-220},{-141,-273,-249,-211,-226,-202},{-291,-177,-179,-228,-164,-148}},{{-206,-213,-152,-242,-139,-211},{-246,-193,-222,-228,-204,-244},{-208,-293,-276,-253,-152,-262},{-284,-240,-240,-262,-251,-311},{-226,-278,-300,-152,-246,-197},{-146,-293,-159,-276,-184,-237},{-137,-302,-155,-269,-213,-206},{-208,-186,-302,-264,-287,-282},{-208,-224,-240,-282,-280,-231},{-231,-146,-137,-159,-246,-215}},{{-273,-260,-267,-193,-255,-251},{-172,-235,-186,-300,-206,-177},{-291,-184,-226,-208,-271,-202},{-226,-184,-215,-193,-222,-157},{-251,-220,-249,-231,-139,-199},{-159,-211,-164,-307,-224,-134},{-166,-172,-244,-161,-300,-217},{-244,-152,-206,-195,-159,-157},{-293,-157,-267,-137,-284,-258},{-159,-215,-260,-284,-177,-148}},{{-309,-267,-195,-170,-224,-152},{-206,-139,-222,-175,-258,-159},{-146,-269,-226,-300,-204,-240},{-251,-282,-298,-224,-206,-264},{-215,-208,-278,-226,-220,-222},{-291,-190,-139,-240,-264,-217},{-211,-267,-305,-258,-202,-311},{-152,-222,-240,-267,-249,-255},{-253,-159,-305,-139,-293,-235},{-267,-233,-186,-143,-137,-231}},{{-251,-190,-289,-282,-249,-177},{-190,-271,-267,-211,-305,-146},{-143,-228,-276,-213,-188,-305},{-271,-175,-175,-233,-258,-300},{-276,-211,-291,-246,-157,-231},{-155,-255,-197,-300,-267,-273},{-161,-152,-289,-152,-179,-262},{-269,-278,-139,-240,-184,-186},{-253,-217,-278,-199,-141,-298},{-271,-251,-296,-211,-273,-260}}},{{{-290,-159,-288,-302,-152,-183},{-176,-267,-236,-295,-317,-224},{-233,-148,-190,-221,-298,-250},{-176,-324,-314,-319,-145,-205},{-188,-324,-143,-176,-259,-309},{-202,-200,-243,-174,-281,-278},{-167,-198,-281,-214,-195,-157},{-233,-148,-169,-221,-248,-300},{-169,-169,-312,-174,-305,-333},{-181,-152,-200,-226,-328,-228}},{{-221,-269,-259,-159,-148,-143},{-259,-155,-331,-162,-312,-321},{-262,-188,-259,-209,-267,-283},{-193,-207,-190,-257,-190,-221},{-264,-178,-157,-183,-231,-176},{-219,-181,-150,-217,-333,-326},{-209,-212,-276,-290,-307,-295},{-326,-164,-188,-174,-209,-278},{-200,-302,-171,-209,-152,-321},{-171,-178,-321,-217,-159,-174}},{{-271,-300,-305,-159,-171,-143},{-152,-317,-181,-309,-186,-309},{-143,-143,-209,-259,-209,-333},{-207,-195,-231,-328,-314,-283},{-183,-333,-148,-209,-274,-152},{-219,-221,-319,-226,-328,-240},{-190,-148,-193,-328,-274,-295},{-164,-293,-321,-257,-312,-267},{-314,-200,-243,-293,-300,-278},{-231,-271,-224,-262,-198,-231}},{{-150,-309,-257,-152,-202,-314},{-195,-276,-257,-295,-157,-264},{-250,-169,-167,-228,-205,-164},{-267,-155,-152,-148,-312,-155},{-293,-171,-193,-205,-271,-167},{-259,-286,-178,-200,-278,-314},{-224,-307,-226,-317,-271,-148},{-259,-221,-328,-317,-309,-298},{-236,-243,-176,-314,-207,-193},{-205,-238,-167,-198,-228,-209}},{{-214,-264,-178,-314,-188,-155},{-248,-262,-164,-328,-195,-243},{-302,-212,-295,-169,-209,-200},{-200,-183,-331,-300,-271,-267},{-302,-259,-269,-195,-321,-224},{-217,-269,-240,-302,-176,-288},{-295,-245,-333,-169,-145,-274},{-288,-219,-159,-274,-236,-276},{-202,-148,-331,-233,-328,-298},{-298,-143,-248,-157,-293,-283}},{{-183,-174,-250,-198,-309,-317},{-193,-176,-174,-212,-145,-300},{-293,-290,-276,-176,-262,-150},{-195,-193,-262,-245,-302,-250},{-207,-214,-333,-181,-259,-214},{-205,-212,-228,-262,-169,-328},{-250,-148,-238,-198,-221,-300},{-207,-328,-257,-331,-298,-217},{-221,-226,-271,-171,-328,-264},{-207,-231,-176,-298,-198,-155}},{{-148,-152,-169,-250,-205,-217},{-259,-217,-202,-328,-148,-281},{-236,-274,-164,-145,-243,-271},{-202,-178,-209,-169,-183,-245},{-262,-288,-281,-259,-178,-207},{-302,-326,-278,-283,-250,-298},{-281,-181,-183,-233,-143,-186},{-276,-245,-231,-171,-143,-298},{-288,-145,-195,-217,-174,-333},{-286,-302,-319,-207,-288,-233}},{{-238,-169,-300,-319,-274,-238},{-257,-198,-181,-248,-317,-143},{-212,-293,-259,-281,-214,-195},{-145,-288,-283,-264,-283,-286},{-252,-240,-326,-186,-300,-212},{-267,-202,-231,-167,-317,-217},{-188,-174,-276,-167,-221,-240},{-307,-286,-307,-278,-248,-324},{-188,-200,-145,-314,-317,-240},{-257,-155,-326,-295,-200,-221}},{{-171,-169,-312,-309,-181,-186},{-307,-333,-212,-302,-178,-228},{-267,-314,-283,-169,-243,-245},{-309,-164,-190,-236,-183,-281},{-167,-190,-178,-174,-159,-248},{-255,-264,-276,-181,-150,-159},{-176,-245,-238,-255,-217,-174},{-333,-305,-231,-331,-219,-186},{-159,-326,-290,-262,-293,-252},{-198,-326,-207,-228,-240,-186}}},{{{-328,-243,-355,-205,-336,-322},{-227,-328,-339,-319,-270,-262},{-281,-349,-257,-270,-188,-270},{-355,-308,-199,-374,-366,-210},{-265,-197,-330,-273,-382,-347},{-191,-328,-341,-292,-369,-363},{-308,-347,-317,-328,-303,-349},{-347,-175,-199,-352,-352,-265},{-238,-202,-308,-314,-221,-341},{-273,-363,-186,-167,-358,-369}},{{-336,-246,-284,-164,-268,-330},{-246,-273,-300,-358,-227,-382},{-218,-355,-374,-306,-328,-210},{-363,-308,-216,-199,-246,-371},{-333,-270,-371,-213,-216,-281},{-347,-300,-262,-377,-175,-311},{-216,-257,-224,-339,-167,-175},{-254,-344,-355,-287,-238,-377},{-167,-341,-164,-308,-169,-295},{-218,-344,-276,-216,-180,-352}},{{-276,-333,-344,-221,-330,-265},{-311,-218,-336,-278,-333,-207},{-317,-308,-202,-300,-216,-379},{-257,-186,-369,-366,-183,-341},{-270,-300,-240,-328,-276,-202},{-344,-377,-232,-210,-314,-259},{-213,-213,-344,-191,-273,-322},{-259,-167,-257,-194,-287,-328},{-167,-169,-167,-213,-287,-382},{-205,-366,-216,-336,-183,-169}},{{-300,-164,-229,-319,-186,-355},{-177,-207,-202,-322,-366,-221},{-298,-289,-183,-298,-194,-325},{-377,-199,-278,-180,-289,-371},{-240,-379,-205,-349,-366,-349},{-281,-235,-379,-292,-265,-303},{-298,-358,-341,-238,-259,-199},{-180,-216,-289,-319,-363,-369},{-180,-194,-371,-265,-183,-167},{-221,-322,-205,-251,-358,-306}},{{-314,-371,-243,-333,-336,-352},{-322,-371,-216,-207,-341,-300},{-197,-172,-278,-246,-246,-341},{-377,-377,-333,-183,-341,-172},{-270,-207,-232,-281,-251,-268},{-358,-289,-295,-377,-257,-325},{-311,-265,-257,-371,-374,-322},{-183,-333,-169,-265,-333,-339},{-243,-374,-183,-265,-164,-227},{-213,-251,-336,-355,-186,-341}},{{-358,-194,-273,-377,-205,-278},{-303,-240,-180,-164,-292,-369},{-319,-205,-167,-191,-235,-379},{-325,-344,-287,-240,-333,-227},{-311,-295,-227,-306,-259,-180},{-265,-317,-262,-224,-227,-268},{-311,-232,-363,-224,-366,-355},{-341,-262,-216,-177,-344,-199},{-295,-207,-382,-270,-377,-254},{-306,-259,-276,-207,-306,-325}},{{-358,-254,-177,-298,-254,-232},{-188,-281,-298,-341,-328,-265},{-210,-352,-213,-273,-314,-360},{-322,-382,-278,-235,-317,-273},{-186,-172,-278,-268,-344,-251},{-221,-284,-180,-194,-240,-319},{-227,-229,-295,-216,-284,-177},{-276,-262,-257,-210,-360,-308},{-287,-347,-314,-213,-243,-306},{-314,-265,-341,-191,-284,-322}},{{-262,-276,-186,-164,-281,-216},{-246,-369,-186,-259,-243,-194},{-238,-292,-172,-191,-344,-246},{-382,-273,-224,-270,-333,-319},{-229,-308,-265,-248,-355,-273},{-218,-186,-232,-377,-243,-207},{-262,-248,-287,-349,-298,-172},{-235,-273,-259,-175,-336,-358},{-377,-317,-167,-175,-213,-295},{-341,-363,-333,-238,-169,-360}},{{-213,-254,-194,-317,-306,-325},{-355,-287,-191,-303,-164,-238},{-265,-194,-352,-240,-213,-363},{-325,-251,-347,-379,-262,-328},{-183,-339,-205,-300,-306,-235},{-243,-270,-341,-336,-295,-235},{-379,-188,-180,-191,-339,-194},{-314,-336,-259,-207,-292,-268},{-235,-169,-246,-276,-268,-377},{-289,-330,-167,-281,-322,-339}}},{{{-213,-139,-125,-148,-129,-94},{-172,-182,-99,-205,-214,-183},{-200,-208,-136,-140,-139,-149},{-209,-188,-137,-102,-112,-166},{-125,-216,-117,-119,-97,-100},{-100,-200,-92,-114,-99,-112},{-97,-160,-166,-134,-180,-131},{-196,-216,-154,-205,-119,-179},{-122,-189,-180,-143,-194,-97},{-168,-112,-100,-188,-97,-148}},{{-129,-188,-103,-95,-105,-165},{-179,-106,-125,-213,-157,-168},{-111,-112,-174,-200,-100,-205},{-142,-119,-149,-106,-182,-177},{-176,-166,-129,-128,-162,-194},{-182,-99,-114,-123,-126,-199},{-95,-196,-171,-160,-163,-196},{-174,-137,-109,-92,-142,-114},{-103,-154,-134,-106,-208,-216},{-185,-151,-171,-148,-205,-179}},{{-94,-185,-100,-94,-145,-109},{-166,-199,-183,-169,-134,-200},{-202,-156,-112,-112,-139,-189},{-171,-149,-145,-139,-196,-134},{-131,-214,-159,-196,-162,-131},{-199,-177,-126,-213,-142,-200},{-182,-177,-185,-188,-176,-151},{-126,-122,-100,-102,-137,-116},{-186,-209,-179,-208,-132,-152},{-196,-200,-179,-154,-120,-99}},{{-108,-152,-129,-111,-114,-172},{-213,-202,-192,-196,-216,-123},{-148,-106,-106,-194,-111,-112},{-199,-163,-119,-160,-205,-112},{-111,-208,-142,-208,-208,-203},{-208,-109,-136,-163,-125,-197},{-156,-196,-143,-102,-122,-213},{-206,-176,-140,-112,-106,-162},{-136,-136,-202,-159,-106,-185},{-106,-95,-188,-106,-154,-143}},{{-186,-112,-126,-103,-162,-197},{-146,-203,-116,-191,-112,-123},{-126,-105,-168,-131,-214,-209},{-146,-122,-131,-160,-152,-159},{-166,-149,-145,-157,-192,-160},{-119,-186,-132,-136,-206,-99},{-119,-192,-197,-183,-149,-197},{-106,-151,-129,-202,-108,-176},{-145,-192,-95,-128,-152,-211},{-129,-116,-120,-209,-94,-120}},{{-108,-188,-97,-166,-169,-202},{-137,-182,-166,-139,-176,-120},{-182,-188,-180,-126,-126,-216},{-114,-205,-146,-156,-137,-143},{-132,-205,-94,-186,-171,-102},{-194,-145,-188,-208,-151,-183},{-120,-160,-131,-140,-197,-163},{-182,-168,-145,-123,-177,-213},{-171,-122,-105,-183,-163,-196},{-174,-128,-146,-211,-148,-180}},{{-117,-123,-137,-137,-163,-174},{-143,-165,-208,-116,-179,-192},{-165,-109,-203,-134,-176,-139},{-129,-194,-202,-125,-168,-154},{-95,-97,-105,-199,-209,-143},{-114,-99,-174,-180,-160,-131},{-154,-136,-203,-94,-112,-114},{-145,-148,-151,-103,-194,-126},{-185,-216,-209,-189,-111,-143},{-122,-169,-211,-163,-106,-192}},{{-179,-159,-182,-94,-202,-142},{-196,-95,-117,-132,-157,-172},{-119,-117,-159,-102,-199,-214},{-99,-162,-145,-142,-183,-206},{-191,-128,-137,-137,-106,-148},{-186,-176,-211,-126,-163,-112},{-188,-99,-123,-189,-197,-205},{-139,-157,-125,-163,-174,-214},{-169,-148,-156,-143,-154,-128},{-99,-211,-142,-120,-139,-94}},{{-100,-208,-92,-106,-111,-137},{-112,-151,-97,-162,-197,-192},{-171,-132,-123,-213,-192,-199},{-105,-132,-128,-206,-116,-191},{-95,-142,-148,-152,-106,-186},{-143,-137,-151,-180,-129,-166},{-99,-180,-92,-114,-99,-120},{-106,-216,-134,-159,-206,-103},{-194,-131,-148,-123,-199,-149},{-106,-216,-211,-102,-128,-109}}},{{{-198,-244,-140,-191,-124,-173},{-177,-171,-175,-127,-126,-160},{-151,-122,-251,-253,-140,-187},{-151,-249,-184,-193,-120,-237},{-217,-244,-109,-240,-131,-182},{-253,-173,-220,-146,-184,-171},{-124,-197,-135,-178,-184,-151},{-177,-204,-116,-144,-186,-237},{-215,-206,-122,-222,-140,-116},{-198,-186,-180,-169,-142,-177}},{{-149,-115,-135,-229,-249,-127},{-111,-146,-177,-144,-146,-135},{-177,-240,-118,-238,-184,-116},{-178,-180,-175,-153,-220,-242},{-226,-166,-218,-171,-147,-202},{-191,-229,-153,-240,-215,-204},{-249,-126,-155,-184,-153,-135},{-202,-235,-138,-182,-211,-209},{-126,-213,-135,-178,-200,-167},{-198,-255,-182,-122,-189,-209}},{{-142,-140,-229,-131,-238,-248},{-155,-249,-162,-109,-146,-138},{-186,-153,-169,-167,-147,-248},{-111,-131,-115,-175,-147,-124},{-162,-197,-189,-206,-113,-149},{-209,-197,-238,-218,-126,-244},{-248,-215,-116,-255,-242,-235},{-169,-178,-126,-157,-255,-138},{-157,-215,-109,-142,-209,-146},{-206,-160,-253,-195,-244,-146}},{{-126,-195,-253,-131,-109,-238},{-180,-249,-155,-251,-158,-242},{-133,-248,-197,-118,-237,-177},{-233,-142,-124,-255,-228,-202},{-249,-166,-162,-140,-198,-157},{-111,-187,-127,-209,-109,-155},{-167,-153,-178,-209,-198,-147},{-248,-215,-253,-167,-124,-195},{-184,-124,-220,-238,-120,-222},{-217,-135,-127,-180,-217,-115}},{{-240,-202,-182,-142,-126,-195},{-116,-200,-207,-158,-218,-109},{-164,-129,-187,-233,-231,-113},{-158,-162,-131,-191,-171,-189},{-255,-155,-118,-133,-255,-127},{-127,-253,-249,-122,-127,-136},{-184,-113,-133,-235,-157,-115},{-186,-171,-211,-169,-198,-184},{-136,-155,-182,-217,-218,-111},{-167,-162,-180,-228,-211,-231}},{{-160,-193,-169,-131,-207,-251},{-173,-200,-189,-122,-113,-207},{-173,-224,-120,-240,-191,-177},{-191,-193,-129,-144,-253,-173},{-200,-209,-237,-197,-136,-228},{-113,-135,-200,-198,-124,-182},{-248,-131,-127,-204,-251,-109},{-147,-157,-240,-244,-238,-109},{-118,-140,-198,-149,-238,-175},{-189,-231,-124,-126,-178,-115}},{{-175,-133,-118,-191,-218,-186},{-195,-193,-164,-147,-182,-215},{-233,-149,-195,-211,-180,-213},{-153,-138,-211,-138,-171,-155},{-155,-140,-235,-182,-151,-126},{-135,-228,-248,-211,-209,-204},{-197,-193,-240,-215,-202,-202},{-158,-217,-246,-131,-220,-153},{-175,-127,-129,-228,-220,-238},{-187,-242,-209,-120,-184,-206}},{{-166,-231,-149,-202,-237,-169},{-235,-249,-217,-175,-217,-153},{-200,-144,-222,-144,-133,-131},{-166,-135,-155,-166,-157,-198},{-133,-167,-244,-211,-251,-155},{-204,-127,-222,-226,-111,-157},{-147,-162,-126,-246,-198,-242},{-111,-226,-240,-133,-186,-246},{-175,-136,-133,-193,-255,-167},{-240,-136,-133,-171,-136,-198}},{{-204,-187,-202,-133,-209,-231},{-173,-136,-228,-160,-126,-226},{-120,-173,-187,-215,-191,-237},{-224,-217,-193,-244,-177,-164},{-231,-144,-122,-133,-177,-171},{-126,-206,-160,-142,-235,-211},{-169,-244,-136,-180,-255,-118},{-228,-229,-189,-206,-231,-162},{-115,-133,-135,-177,-158,-207},{-135,-211,-127,-197,-222,-186}}},{{{-159,-287,-216,-184,-206,-179},{-230,-287,-257,-326,-152,-333},{-154,-228,-194,-306,-287,-216},{-243,-240,-220,-265,-309,-240},{-257,-333,-240,-272,-167,-318},{-316,-284,-203,-240,-196,-191},{-223,-220,-218,-184,-255,-189},{-184,-201,-208,-265,-306,-179},{-341,-235,-260,-216,-294,-216},{-176,-292,-196,-287,-223,-169}},{{-230,-296,-152,-255,-186,-289},{-189,-194,-306,-172,-333,-149},{-282,-225,-198,-191,-201,-274},{-304,-172,-164,-208,-314,-230},{-162,-225,-287,-213,-201,-179},{-245,-277,-228,-149,-159,-240},{-179,-323,-333,-198,-172,-304},{-228,-159,-338,-184,-247,-287},{-247,-196,-326,-203,-282,-289},{-250,-316,-245,-172,-274,-189}},{{-257,-265,-304,-194,-233,-306},{-233,-245,-230,-311,-311,-223},{-245,-267,-181,-333,-230,-252},{-296,-213,-282,-331,-309,-147},{-184,-255,-233,-265,-309,-220},{-245,-147,-162,-172,-159,-203},{-255,-343,-243,-157,-201,-343},{-299,-230,-301,-316,-149,-257},{-277,-247,-292,-296,-304,-228},{-274,-167,-243,-164,-267,-211}},{{-252,-341,-287,-203,-206,-198},{-186,-267,-301,-189,-318,-296},{-336,-338,-277,-294,-172,-240},{-287,-333,-196,-159,-208,-201},{-257,-162,-284,-311,-189,-233},{-189,-196,-233,-164,-296,-311},{-218,-157,-238,-323,-198,-279},{-167,-287,-299,-343,-172,-265},{-309,-336,-230,-167,-321,-294},{-220,-265,-301,-184,-152,-216}},{{-262,-260,-277,-149,-228,-201},{-338,-223,-218,-318,-243,-289},{-282,-179,-252,-328,-238,-186},{-233,-159,-331,-194,-147,-230},{-147,-323,-336,-262,-228,-184},{-306,-230,-238,-243,-211,-304},{-333,-309,-184,-223,-162,-282},{-311,-272,-257,-225,-172,-265},{-326,-179,-220,-154,-162,-311},{-341,-172,-321,-326,-301,-252}},{{-159,-299,-328,-311,-328,-230},{-233,-282,-243,-277,-174,-296},{-270,-159,-181,-167,-201,-218},{-159,-147,-299,-274,-228,-292},{-277,-301,-216,-220,-201,-272},{-203,-169,-311,-326,-179,-321},{-343,-309,-247,-309,-169,-323},{-343,-247,-220,-250,-157,-331},{-277,-223,-194,-270,-272,-174},{-321,-314,-235,-240,-272,-179}},{{-225,-152,-274,-336,-318,-311},{-174,-296,-321,-247,-157,-304},{-282,-336,-338,-309,-181,-223},{-260,-196,-216,-191,-274,-287},{-164,-172,-292,-270,-218,-201},{-265,-277,-225,-176,-301,-255},{-184,-343,-147,-304,-262,-162},{-228,-270,-301,-262,-194,-198},{-157,-245,-235,-149,-194,-191},{-230,-220,-267,-208,-326,-331}},{{-328,-309,-240,-238,-240,-343},{-270,-316,-321,-189,-220,-279},{-326,-211,-233,-201,-247,-164},{-255,-218,-216,-179,-260,-321},{-247,-172,-196,-255,-247,-270},{-240,-296,-149,-233,-289,-289},{-213,-169,-230,-279,-265,-270},{-321,-228,-174,-299,-260,-255},{-333,-314,-238,-328,-174,-189},{-147,-314,-240,-167,-203,-277}},{{-265,-333,-284,-341,-316,-294},{-306,-216,-323,-338,-255,-309},{-220,-149,-321,-203,-167,-179},{-336,-235,-306,-284,-211,-282},{-186,-282,-341,-167,-255,-328},{-189,-191,-196,-255,-331,-233},{-201,-252,-162,-270,-292,-292},{-216,-255,-311,-152,-245,-341},{-196,-296,-323,-218,-245,-164},{-201,-201,-218,-328,-213,-213}}},{{{-210,-143,-249,-222,-173,-219},{-243,-275,-150,-259,-293,-282},{-222,-224,-148,-152,-148,-182},{-314,-321,-194,-245,-157,-243},{-164,-300,-217,-217,-185,-196},{-155,-277,-307,-321,-169,-215},{-256,-298,-164,-275,-314,-178},{-298,-252,-157,-263,-286,-256},{-146,-316,-139,-316,-316,-213},{-300,-270,-275,-307,-213,-256}},{{-273,-189,-268,-148,-321,-210},{-185,-319,-293,-182,-199,-277},{-185,-273,-282,-249,-270,-305},{-252,-187,-159,-187,-157,-141},{-270,-312,-245,-178,-321,-166},{-201,-155,-259,-231,-252,-307},{-277,-243,-243,-182,-159,-189},{-321,-298,-296,-293,-261,-266},{-203,-284,-240,-141,-310,-273},{-141,-291,-226,-236,-231,-266}},{{-164,-196,-240,-280,-146,-273},{-208,-203,-236,-203,-180,-201},{-254,-226,-316,-293,-169,-310},{-263,-166,-310,-254,-176,-312},{-141,-303,-252,-171,-231,-143},{-222,-203,-298,-298,-284,-240},{-169,-192,-245,-291,-143,-215},{-182,-316,-243,-247,-141,-143},{-196,-303,-152,-231,-319,-305},{-296,-245,-314,-185,-254,-185}},{{-169,-222,-192,-243,-176,-146},{-236,-312,-289,-316,-233,-323},{-312,-284,-289,-263,-252,-261},{-208,-284,-180,-321,-199,-148},{-270,-303,-219,-289,-291,-176},{-157,-208,-282,-280,-222,-293},{-152,-247,-261,-187,-273,-178},{-222,-187,-298,-229,-273,-203},{-171,-231,-222,-303,-254,-185},{-150,-256,-189,-259,-277,-148}},{{-305,-259,-254,-139,-208,-316},{-307,-282,-247,-199,-231,-256},{-146,-312,-256,-157,-203,-305},{-229,-229,-296,-171,-249,-206},{-210,-155,-231,-321,-238,-236},{-291,-249,-298,-194,-199,-273},{-256,-249,-166,-178,-307,-194},{-169,-266,-291,-319,-310,-280},{-263,-298,-231,-173,-162,-164},{-323,-148,-273,-273,-273,-166}},{{-273,-139,-270,-169,-323,-178},{-164,-261,-319,-187,-314,-293},{-323,-310,-247,-323,-266,-182},{-150,-210,-178,-139,-305,-208},{-201,-222,-312,-176,-314,-280},{-247,-159,-224,-185,-314,-296},{-268,-249,-310,-323,-319,-176},{-192,-231,-217,-273,-270,-236},{-305,-284,-247,-150,-141,-263},{-152,-180,-270,-291,-284,-213}},{{-316,-148,-217,-312,-219,-240},{-192,-296,-307,-286,-238,-219},{-196,-231,-189,-270,-263,-226},{-162,-321,-162,-231,-208,-243},{-141,-296,-182,-226,-289,-199},{-139,-210,-323,-293,-259,-146},{-159,-217,-259,-231,-314,-243},{-300,-233,-219,-176,-240,-305},{-314,-296,-139,-236,-280,-243},{-213,-273,-249,-187,-166,-319}},{{-293,-166,-240,-266,-192,-148},{-231,-196,-162,-289,-152,-284},{-210,-259,-215,-275,-254,-286},{-231,-268,-249,-203,-152,-180},{-252,-148,-164,-270,-189,-314},{-247,-240,-323,-266,-254,-152},{-268,-141,-224,-185,-312,-280},{-189,-215,-192,-206,-226,-194},{-201,-273,-152,-187,-266,-217},{-176,-296,-289,-176,-310,-215}},{{-213,-268,-217,-305,-152,-208},{-164,-217,-323,-213,-157,-270},{-157,-305,-291,-254,-173,-215},{-206,-162,-217,-270,-180,-150},{-146,-303,-305,-316,-303,-187},{-155,-323,-256,-259,-173,-157},{-247,-300,-233,-233,-173,-173},{-224,-222,-222,-314,-256,-296},{-194,-280,-286,-238,-208,-284},{-208,-150,-231,-270,-298,-159}}},{{{-262,-362,-176,-315,-318,-318},{-365,-315,-226,-376,-397,-329},{-194,-338,-412,-365,-200,-344},{-256,-188,-412,-282,-206,-179},{-285,-309,-376,-376,-188,-276},{-406,-285,-262,-220,-200,-291},{-350,-194,-412,-241,-373,-250},{-400,-359,-223,-368,-259,-273},{-194,-329,-232,-270,-303,-262},{-403,-179,-309,-344,-200,-320}},{{-294,-256,-229,-244,-412,-344},{-229,-338,-312,-185,-279,-262},{-194,-288,-288,-394,-400,-282},{-273,-412,-373,-259,-350,-285},{-318,-391,-229,-279,-235,-279},{-344,-279,-279,-370,-209,-209},{-191,-297,-344,-338,-306,-303},{-197,-279,-370,-256,-200,-262},{-229,-362,-309,-220,-250,-341},{-373,-259,-309,-200,-279,-344}},{{-265,-350,-200,-370,-323,-185},{-329,-385,-291,-329,-179,-379},{-400,-376,-323,-197,-323,-382},{-320,-218,-409,-394,-359,-376},{-182,-270,-238,-223,-362,-179},{-341,-256,-379,-403,-294,-359},{-197,-253,-270,-373,-376,-238},{-376,-259,-379,-370,-409,-282},{-315,-200,-282,-368,-265,-362},{-409,-373,-359,-406,-335,-247}},{{-247,-238,-235,-397,-300,-253},{-200,-303,-218,-235,-356,-376},{-353,-182,-212,-197,-326,-385},{-297,-226,-335,-250,-244,-297},{-194,-218,-309,-265,-285,-379},{-338,-323,-353,-379,-291,-332},{-391,-403,-179,-312,-397,-338},{-391,-226,-220,-350,-276,-226},{-182,-335,-212,-409,-197,-262},{-226,-370,-223,-200,-306,-391}},{{-238,-223,-394,-247,-273,-279},{-368,-332,-332,-315,-312,-270},{-294,-323,-300,-294,-262,-368},{-247,-223,-215,-300,-270,-406},{-179,-347,-338,-294,-256,-376},{-229,-406,-312,-376,-179,-265},{-253,-362,-385,-391,-365,-294},{-206,-350,-335,-385,-253,-253},{-273,-323,-332,-276,-212,-409},{-306,-397,-397,-412,-256,-365}},{{-379,-297,-194,-244,-262,-206},{-247,-268,-176,-373,-347,-320},{-412,-182,-253,-329,-341,-303},{-197,-276,-259,-259,-259,-212},{-356,-362,-344,-344,-332,-335},{-362,-238,-256,-347,-215,-409},{-232,-356,-200,-306,-203,-338},{-294,-338,-203,-329,-365,-318},{-406,-212,-332,-285,-403,-191},{-323,-212,-332,-203,-370,-209}},{{-200,-347,-347,-320,-406,-406},{-253,-294,-332,-353,-262,-197},{-394,-306,-303,-209,-191,-294},{-191,-288,-356,-335,-220,-212},{-379,-276,-365,-379,-253,-300},{-356,-297,-344,-379,-376,-368},{-379,-379,-276,-403,-188,-244},{-176,-315,-194,-244,-297,-209},{-350,-309,-391,-200,-212,-320},{-262,-397,-335,-397,-182,-406}},{{-379,-382,-238,-235,-194,-412},{-306,-241,-241,-359,-203,-297},{-329,-212,-215,-288,-368,-409},{-241,-353,-335,-356,-276,-206},{-309,-215,-226,-388,-282,-326},{-409,-223,-400,-229,-338,-350},{-344,-206,-397,-341,-326,-406},{-350,-262,-206,-403,-212,-209},{-335,-215,-279,-315,-368,-323},{-412,-362,-370,-344,-344,-268}},{{-291,-300,-188,-376,-259,-344},{-356,-370,-212,-288,-194,-312},{-315,-376,-376,-385,-370,-359},{-373,-200,-356,-206,-276,-303},{-338,-223,-294,-182,-394,-332},{-409,-194,-359,-209,-332,-259},{-294,-256,-297,-203,-338,-382},{-294,-320,-388,-403,-291,-406},{-332,-303,-253,-203,-370,-273},{-206,-235,-335,-344,-376,-220}}}}; // 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]={24,13,8,25,12,8,24,12,8,25,13,9,25,13,9,25,13,9,26,13,9,26,13,9,25,13,9,26,13,9,26,13,9,26,13,9,27,13,9,26,13,9,27,13,9,27,13,9,27,14,9,27,14,9,26,13,9,26,13,9,26,13,9,25,13,9,25,13,9,25,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]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,0,4,8,12,16,20,24,28,32,36,40,44,48,1,7,13,19,25,31,37,43,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,1,7,13,19,25,31,37,43,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,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,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,1,7,13,19,25,31,37,43,49,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,0,4,8,12,16,20,24,28,32,36,40,44,48,1,7,13,19,25,31,37,43,49,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,1,7,13,19,25,31,37,43,49,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,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,1,5,9,13,17,21,25,29,33,37,41,45,49,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,0,4,8,12,16,20,24,28,32,36,40,44,48,1,7,13,19,25,31,37,43,49,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,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,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,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,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,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,0,4,8,12,16,20,24,28,32,36,40,44,48,52,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,52,0,4,8,12,16,20,24,28,32,36,40,44,48,52,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,0,4,8,12,16,20,24,28,32,36,40,44,48,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,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,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,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,0,4,8,12,16,20,24,28,32,36,40,44,48,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,2,6,10,14,18,22,26,30,34,38,42,46,50,2,8,14,20,26,32,38,44,50}; // set of start times of each shipment 
int SHets[SPN]={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,6,12,18,24,30,36,42,48,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,6,12,18,24,30,36,42,48,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,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,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,3,7,11,15,19,23,27,31,35,39,43,47,51,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,3,7,11,15,19,23,27,31,35,39,43,47,51,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,4,8,12,16,20,24,28,32,36,40,44,48,52,2,8,14,20,26,32,38,44,50,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,3,7,11,15,19,23,27,31,35,39,43,47,51,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,2,6,10,14,18,22,26,30,34,38,42,46,50,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,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,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,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,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,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,1,5,9,13,17,21,25,29,33,37,41,45,49,53,1,7,13,19,25,31,37,43,49,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,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,2,6,10,14,18,22,26,30,34,38,42,46,50,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,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,2,8,14,20,26,32,38,44,50,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,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,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,5,9,13,17,21,25,29,33,37,41,45,49,53,5,11,17,23,29,35,41,47,53}; // set of end times of each shipment 
