int Dev = 40;// Deviation
extern const int CNN = 4;// Case Index
extern const int P = 6;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 36;// 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 = 746;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 18;//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}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={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}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{10882,0,0,0,0,0},{10840,0,0,0,0,0},{11076,0,0,0,0,0},{11170,0,0,0,0,0},{11451,0,0,0,0,0},{10478,0,0,0,0,0},{11015,0,0,0,0,0},{10928,0,0,0,0,0},{11508,0,0,0,0,0},{10867,0,0,0,0,0}},{{11532,0,0,0,0,0},{11002,0,0,0,0,0},{10785,0,0,0,0,0},{11244,0,0,0,0,0},{10877,0,0,0,0,0},{11002,0,0,0,0,0},{10539,0,0,0,0,0},{11745,0,0,0,0,0},{11116,0,0,0,0,0},{11750,0,0,0,0,0}},{{10986,0,0,0,0,0},{11142,0,0,0,0,0},{11094,0,0,0,0,0},{11295,0,0,0,0,0},{11186,0,0,0,0,0},{10947,0,0,0,0,0},{10309,0,0,0,0,0},{11588,0,0,0,0,0},{11588,0,0,0,0,0},{10312,0,0,0,0,0}},{{10715,0,0,0,0,0},{11220,0,0,0,0,0},{10995,0,0,0,0,0},{10521,0,0,0,0,0},{11339,0,0,0,0,0},{11056,0,0,0,0,0},{11013,0,0,0,0,0},{10759,0,0,0,0,0},{11761,0,0,0,0,0},{11158,0,0,0,0,0}},{{12055,0,0,0,0,0},{11190,0,0,0,0,0},{10768,0,0,0,0,0},{11574,0,0,0,0,0},{11116,0,0,0,0,0},{10647,0,0,0,0,0},{10721,0,0,0,0,0},{10753,0,0,0,0,0},{10685,0,0,0,0,0},{11052,0,0,0,0,0}},{{10997,0,0,0,0,0},{11326,0,0,0,0,0},{10478,0,0,0,0,0},{10638,0,0,0,0,0},{11190,0,0,0,0,0},{10802,0,0,0,0,0},{11018,0,0,0,0,0},{10796,0,0,0,0,0},{11176,0,0,0,0,0},{10776,0,0,0,0,0}}},{{{-175,-220,-228,-249,-157,-168},{-300,-197,-307,-213,-141,-291},{-302,-175,-269,-260,-296,-251},{-217,-150,-134,-157,-152,-164},{-172,-296,-264,-298,-289,-166},{-231,-269,-197,-141,-157,-168},{-143,-134,-237,-211,-289,-188},{-222,-181,-175,-271,-208,-184},{-240,-249,-269,-175,-249,-164},{-161,-148,-228,-146,-141,-300}},{{-249,-258,-197,-222,-249,-164},{-161,-276,-208,-193,-242,-276},{-278,-244,-146,-222,-188,-258},{-168,-148,-146,-206,-300,-139},{-284,-166,-175,-155,-289,-177},{-184,-251,-264,-206,-211,-311},{-237,-195,-141,-291,-170,-215},{-273,-258,-148,-193,-278,-289},{-258,-231,-199,-179,-309,-213},{-148,-309,-244,-150,-186,-300}},{{-199,-217,-280,-300,-202,-242},{-206,-231,-188,-284,-184,-228},{-208,-287,-284,-134,-240,-213},{-280,-255,-249,-146,-148,-267},{-184,-155,-213,-289,-159,-159},{-181,-255,-255,-296,-195,-253},{-143,-164,-161,-170,-217,-164},{-273,-287,-175,-202,-164,-276},{-271,-213,-146,-139,-199,-199},{-231,-134,-172,-305,-150,-164}},{{-289,-213,-307,-262,-220,-267},{-231,-195,-311,-168,-307,-211},{-293,-148,-175,-139,-255,-164},{-249,-166,-202,-166,-188,-240},{-269,-179,-172,-302,-276,-137},{-251,-298,-161,-208,-284,-284},{-242,-307,-226,-148,-188,-267},{-143,-193,-298,-170,-161,-276},{-177,-273,-307,-155,-172,-273},{-246,-152,-291,-314,-242,-244}},{{-258,-233,-302,-291,-237,-148},{-188,-177,-235,-276,-231,-284},{-222,-161,-280,-204,-186,-184},{-253,-195,-134,-269,-269,-255},{-240,-300,-235,-273,-217,-287},{-271,-199,-152,-289,-155,-271},{-188,-193,-253,-181,-235,-150},{-231,-168,-190,-197,-282,-202},{-280,-284,-244,-172,-220,-314},{-204,-224,-217,-242,-276,-148}},{{-264,-206,-168,-193,-146,-276},{-228,-305,-269,-164,-211,-161},{-240,-264,-255,-298,-280,-222},{-188,-166,-139,-233,-211,-278},{-150,-157,-168,-253,-177,-159},{-228,-220,-186,-217,-168,-170},{-155,-211,-139,-282,-284,-179},{-202,-226,-240,-161,-282,-300},{-287,-293,-186,-190,-267,-211},{-249,-197,-222,-177,-137,-276}}},{{{-324,-155,-176,-217,-169,-205},{-145,-169,-302,-278,-148,-288},{-193,-326,-248,-162,-295,-240},{-224,-202,-145,-240,-298,-314},{-257,-188,-224,-228,-181,-162},{-155,-143,-212,-228,-198,-281},{-155,-290,-188,-193,-274,-295},{-143,-214,-164,-286,-290,-167},{-307,-326,-328,-181,-217,-281},{-221,-202,-178,-157,-219,-314}},{{-321,-171,-219,-298,-319,-231},{-190,-250,-169,-252,-298,-188},{-150,-276,-219,-202,-174,-250},{-317,-228,-274,-259,-209,-302},{-252,-236,-267,-162,-288,-198},{-174,-236,-207,-221,-188,-290},{-205,-278,-152,-176,-212,-243},{-243,-259,-217,-186,-212,-236},{-255,-307,-238,-312,-207,-214},{-252,-214,-152,-293,-276,-295}},{{-290,-264,-209,-257,-212,-240},{-331,-288,-245,-181,-155,-219},{-178,-312,-286,-271,-233,-198},{-293,-188,-319,-331,-174,-307},{-236,-240,-145,-186,-319,-145},{-248,-162,-298,-150,-245,-150},{-143,-264,-200,-233,-262,-319},{-317,-333,-281,-143,-317,-162},{-231,-155,-300,-259,-255,-248},{-214,-162,-278,-231,-307,-167}},{{-157,-274,-150,-148,-205,-250},{-202,-164,-278,-219,-281,-195},{-145,-317,-186,-193,-245,-186},{-171,-167,-217,-307,-188,-200},{-233,-226,-321,-236,-302,-186},{-312,-295,-298,-269,-178,-188},{-314,-181,-171,-278,-164,-219},{-317,-152,-309,-219,-326,-314},{-302,-317,-269,-278,-240,-228},{-264,-248,-238,-290,-152,-305}},{{-228,-193,-295,-283,-278,-321},{-319,-295,-207,-231,-264,-228},{-174,-333,-221,-245,-233,-319},{-295,-271,-252,-248,-326,-214},{-186,-224,-271,-171,-205,-226},{-181,-167,-255,-333,-207,-224},{-250,-295,-167,-226,-159,-278},{-207,-305,-157,-148,-305,-269},{-169,-255,-193,-245,-214,-281},{-262,-200,-231,-205,-238,-209}},{{-255,-183,-286,-312,-212,-159},{-236,-176,-181,-219,-157,-171},{-257,-307,-257,-250,-159,-221},{-259,-228,-248,-219,-326,-202},{-295,-145,-333,-198,-164,-302},{-257,-202,-167,-209,-245,-226},{-207,-314,-217,-317,-224,-217},{-288,-190,-195,-226,-143,-169},{-276,-150,-293,-264,-248,-162},{-312,-333,-333,-264,-314,-238}}},{{{-379,-257,-276,-199,-363,-259},{-363,-360,-347,-330,-254,-273},{-349,-317,-186,-300,-295,-199},{-363,-333,-306,-306,-306,-336},{-243,-216,-325,-352,-355,-287},{-336,-278,-287,-246,-205,-167},{-339,-202,-270,-292,-216,-191},{-349,-355,-382,-169,-164,-227},{-268,-278,-273,-347,-369,-243},{-295,-317,-306,-303,-246,-289}},{{-371,-197,-325,-281,-172,-197},{-199,-374,-278,-374,-213,-344},{-349,-308,-254,-205,-175,-287},{-300,-298,-235,-306,-303,-349},{-167,-248,-308,-319,-199,-287},{-229,-251,-371,-284,-330,-270},{-251,-281,-229,-254,-164,-259},{-300,-175,-268,-382,-207,-308},{-172,-199,-363,-355,-273,-349},{-229,-330,-270,-360,-229,-371}},{{-202,-229,-322,-311,-292,-177},{-287,-369,-339,-246,-205,-303},{-172,-254,-248,-167,-207,-194},{-194,-240,-235,-330,-251,-246},{-347,-276,-205,-300,-308,-374},{-352,-314,-167,-347,-262,-232},{-300,-175,-205,-319,-270,-366},{-347,-262,-317,-276,-347,-216},{-284,-251,-188,-308,-172,-382},{-289,-265,-207,-336,-227,-292}},{{-240,-191,-322,-262,-238,-306},{-248,-270,-221,-314,-379,-369},{-248,-202,-216,-251,-308,-232},{-319,-188,-224,-259,-207,-352},{-382,-287,-268,-371,-202,-257},{-287,-257,-292,-224,-199,-300},{-169,-243,-257,-284,-207,-218},{-317,-210,-186,-262,-366,-205},{-360,-248,-339,-363,-276,-197},{-164,-352,-248,-347,-257,-339}},{{-227,-197,-287,-341,-336,-303},{-205,-295,-248,-347,-371,-355},{-306,-221,-382,-224,-251,-303},{-366,-377,-188,-197,-270,-194},{-336,-251,-254,-333,-246,-382},{-251,-213,-248,-180,-229,-164},{-308,-224,-355,-289,-273,-257},{-377,-194,-317,-330,-311,-194},{-246,-333,-183,-262,-188,-251},{-238,-322,-336,-341,-333,-366}},{{-276,-341,-191,-369,-360,-259},{-292,-292,-328,-369,-292,-341},{-300,-167,-210,-177,-284,-284},{-183,-360,-265,-169,-197,-197},{-235,-276,-341,-169,-259,-374},{-229,-295,-379,-227,-235,-339},{-224,-358,-306,-194,-339,-172},{-197,-328,-164,-238,-164,-202},{-164,-281,-259,-314,-238,-382},{-308,-300,-322,-221,-177,-175}}},{{{-108,-142,-143,-95,-192,-206},{-100,-100,-152,-206,-197,-183},{-186,-188,-162,-102,-156,-139},{-154,-102,-137,-179,-200,-154},{-108,-169,-203,-109,-189,-156},{-177,-136,-174,-109,-206,-140},{-188,-120,-211,-216,-185,-160},{-172,-186,-191,-97,-192,-149},{-202,-146,-183,-180,-159,-203},{-140,-208,-169,-97,-186,-197}},{{-157,-185,-94,-194,-171,-92},{-200,-197,-106,-102,-149,-131},{-203,-116,-216,-94,-140,-191},{-94,-168,-206,-169,-197,-108},{-182,-97,-102,-100,-126,-156},{-151,-128,-114,-213,-97,-188},{-103,-92,-196,-114,-128,-197},{-180,-108,-206,-126,-159,-149},{-160,-137,-105,-192,-182,-162},{-151,-134,-112,-122,-194,-196}},{{-189,-151,-186,-177,-214,-102},{-216,-174,-156,-176,-132,-205},{-177,-208,-129,-203,-169,-112},{-156,-182,-163,-163,-205,-208},{-94,-151,-149,-148,-171,-152},{-109,-134,-149,-196,-122,-109},{-213,-176,-172,-182,-174,-171},{-185,-189,-171,-125,-194,-188},{-176,-159,-206,-128,-111,-142},{-106,-151,-103,-143,-148,-165}},{{-112,-139,-111,-100,-214,-154},{-176,-131,-131,-122,-169,-213},{-152,-189,-183,-134,-151,-129},{-165,-169,-185,-196,-168,-196},{-116,-125,-188,-188,-192,-157},{-157,-100,-154,-108,-163,-103},{-123,-108,-123,-132,-114,-116},{-97,-120,-111,-209,-112,-106},{-169,-137,-137,-208,-136,-214},{-169,-188,-196,-157,-177,-100}},{{-160,-188,-145,-157,-106,-108},{-176,-172,-159,-128,-216,-209},{-140,-140,-189,-103,-162,-197},{-149,-169,-152,-129,-111,-123},{-176,-103,-119,-102,-132,-149},{-194,-189,-196,-114,-203,-213},{-177,-102,-145,-117,-194,-142},{-216,-105,-102,-106,-94,-174},{-116,-188,-125,-137,-149,-205},{-199,-111,-105,-149,-123,-165}},{{-194,-152,-146,-157,-206,-99},{-169,-214,-213,-213,-162,-134},{-94,-92,-149,-106,-180,-169},{-165,-128,-129,-128,-177,-163},{-165,-171,-199,-166,-134,-95},{-206,-157,-92,-183,-203,-180},{-92,-176,-128,-120,-105,-180},{-199,-171,-129,-211,-176,-211},{-179,-142,-97,-197,-165,-166},{-174,-196,-162,-109,-109,-122}}},{{{-180,-162,-246,-218,-124,-146},{-186,-197,-182,-204,-242,-127},{-115,-180,-167,-167,-111,-211},{-231,-213,-113,-118,-162,-178},{-244,-242,-226,-246,-140,-127},{-209,-138,-206,-157,-213,-193},{-135,-189,-131,-153,-242,-200},{-124,-187,-149,-233,-116,-109},{-182,-184,-149,-228,-129,-175},{-140,-224,-184,-175,-237,-178}},{{-144,-120,-167,-224,-218,-109},{-146,-182,-222,-160,-160,-109},{-226,-222,-206,-124,-162,-189},{-187,-253,-178,-237,-126,-215},{-217,-197,-133,-177,-248,-162},{-175,-166,-120,-237,-233,-122},{-118,-231,-253,-158,-229,-231},{-191,-142,-233,-246,-127,-224},{-184,-126,-189,-218,-175,-233},{-211,-218,-251,-229,-209,-186}},{{-109,-248,-215,-131,-142,-127},{-248,-251,-162,-124,-138,-187},{-122,-228,-248,-240,-127,-124},{-131,-209,-255,-218,-206,-184},{-187,-255,-211,-200,-131,-173},{-133,-217,-233,-173,-238,-182},{-120,-122,-169,-140,-178,-142},{-198,-144,-153,-218,-129,-228},{-237,-248,-222,-202,-213,-157},{-129,-231,-138,-115,-169,-231}},{{-120,-133,-233,-167,-162,-189},{-135,-197,-162,-118,-213,-160},{-195,-113,-202,-195,-115,-237},{-182,-166,-116,-151,-120,-206},{-207,-111,-237,-231,-238,-218},{-175,-207,-115,-229,-229,-187},{-187,-238,-213,-231,-226,-248},{-249,-171,-153,-164,-186,-187},{-111,-202,-202,-197,-233,-162},{-178,-217,-144,-127,-124,-222}},{{-111,-207,-255,-138,-246,-129},{-158,-193,-138,-198,-178,-162},{-175,-202,-146,-253,-175,-113},{-133,-131,-251,-131,-237,-209},{-246,-166,-217,-187,-178,-109},{-233,-189,-211,-249,-147,-151},{-175,-253,-126,-151,-135,-175},{-160,-204,-111,-195,-136,-122},{-182,-131,-191,-237,-120,-111},{-164,-140,-167,-226,-178,-169}},{{-229,-164,-195,-246,-122,-246},{-111,-153,-224,-118,-142,-198},{-122,-147,-153,-116,-211,-116},{-251,-222,-149,-166,-115,-206},{-235,-184,-226,-220,-237,-229},{-233,-198,-255,-113,-226,-171},{-248,-204,-193,-146,-211,-237},{-184,-138,-242,-155,-173,-133},{-109,-218,-146,-206,-127,-127},{-111,-160,-116,-147,-224,-249}}},{{{-220,-211,-172,-321,-336,-245},{-159,-157,-247,-154,-274,-245},{-301,-257,-220,-240,-299,-152},{-176,-262,-164,-201,-311,-245},{-223,-238,-284,-323,-216,-162},{-318,-265,-157,-164,-336,-228},{-292,-250,-174,-181,-274,-304},{-341,-277,-311,-328,-220,-162},{-238,-328,-309,-174,-189,-331},{-225,-282,-279,-296,-167,-174}},{{-341,-213,-272,-228,-331,-296},{-270,-179,-296,-314,-279,-260},{-318,-172,-154,-279,-189,-147},{-169,-284,-225,-328,-243,-304},{-260,-218,-154,-191,-274,-326},{-208,-189,-225,-306,-318,-198},{-252,-282,-191,-257,-245,-213},{-220,-255,-338,-311,-257,-333},{-169,-179,-174,-211,-245,-174},{-194,-262,-333,-243,-247,-331}},{{-203,-211,-314,-203,-252,-323},{-179,-284,-169,-341,-255,-176},{-225,-203,-318,-233,-270,-267},{-174,-279,-191,-203,-311,-255},{-149,-314,-336,-331,-194,-228},{-186,-282,-341,-247,-203,-243},{-176,-292,-181,-279,-245,-174},{-262,-292,-208,-194,-267,-265},{-328,-250,-191,-272,-318,-191},{-257,-304,-265,-316,-316,-311}},{{-323,-201,-299,-184,-311,-270},{-169,-304,-257,-167,-255,-252},{-318,-294,-191,-267,-267,-326},{-174,-233,-154,-176,-252,-235},{-270,-301,-218,-301,-333,-267},{-252,-289,-301,-257,-186,-326},{-277,-323,-296,-174,-294,-252},{-238,-255,-331,-277,-321,-233},{-184,-211,-331,-184,-255,-309},{-233,-186,-343,-216,-282,-174}},{{-331,-326,-262,-341,-321,-323},{-326,-279,-203,-238,-167,-265},{-240,-289,-162,-154,-216,-201},{-321,-321,-272,-311,-323,-250},{-159,-257,-179,-270,-316,-172},{-213,-169,-257,-203,-270,-152},{-301,-343,-299,-294,-184,-230},{-235,-267,-225,-223,-250,-318},{-265,-208,-194,-162,-262,-272},{-265,-147,-282,-331,-265,-169}},{{-216,-154,-201,-223,-147,-328},{-274,-228,-343,-220,-179,-252},{-326,-238,-316,-296,-172,-206},{-306,-157,-331,-186,-228,-250},{-211,-216,-338,-277,-176,-314},{-149,-306,-181,-191,-343,-277},{-296,-225,-162,-294,-306,-274},{-184,-247,-331,-267,-228,-331},{-304,-294,-289,-299,-250,-252},{-243,-279,-154,-321,-321,-154}}},{{{-319,-178,-192,-291,-157,-146},{-173,-233,-259,-247,-268,-143},{-185,-182,-203,-150,-173,-236},{-259,-282,-261,-273,-310,-238},{-296,-280,-176,-254,-270,-312},{-171,-289,-303,-164,-254,-319},{-291,-286,-231,-273,-224,-213},{-166,-217,-319,-171,-182,-259},{-201,-217,-245,-303,-146,-229},{-231,-298,-206,-252,-316,-194}},{{-314,-256,-293,-259,-206,-157},{-171,-247,-291,-180,-316,-249},{-169,-236,-201,-229,-162,-323},{-215,-256,-196,-231,-157,-166},{-238,-319,-314,-243,-139,-259},{-284,-182,-185,-240,-303,-263},{-178,-316,-319,-275,-148,-194},{-293,-256,-206,-208,-298,-319},{-180,-252,-305,-293,-268,-229},{-166,-321,-266,-300,-259,-266}},{{-291,-141,-210,-293,-196,-231},{-213,-213,-233,-148,-173,-256},{-256,-273,-298,-208,-277,-321},{-263,-291,-219,-254,-215,-182},{-259,-189,-219,-293,-266,-282},{-173,-303,-208,-192,-217,-155},{-289,-141,-171,-185,-180,-259},{-208,-166,-166,-192,-226,-316},{-296,-319,-245,-196,-162,-296},{-261,-182,-215,-185,-259,-146}},{{-146,-293,-196,-300,-164,-217},{-155,-275,-245,-173,-293,-316},{-300,-263,-206,-238,-143,-282},{-229,-296,-171,-236,-291,-307},{-219,-226,-270,-159,-312,-189},{-180,-259,-215,-169,-226,-300},{-196,-312,-284,-305,-157,-146},{-222,-155,-150,-291,-217,-141},{-233,-236,-231,-164,-286,-268},{-236,-291,-159,-254,-199,-240}},{{-201,-291,-259,-236,-256,-303},{-229,-155,-243,-243,-171,-173},{-268,-238,-164,-185,-245,-256},{-275,-166,-282,-226,-159,-321},{-187,-210,-229,-171,-321,-268},{-321,-231,-226,-196,-226,-206},{-159,-259,-166,-256,-208,-152},{-143,-233,-300,-219,-148,-270},{-155,-245,-148,-268,-245,-314},{-259,-150,-296,-187,-150,-266}},{{-148,-321,-139,-277,-240,-213},{-141,-270,-233,-321,-226,-206},{-203,-148,-157,-284,-148,-240},{-189,-256,-196,-323,-199,-289},{-219,-201,-277,-201,-254,-296},{-307,-291,-173,-182,-219,-141},{-270,-268,-217,-199,-291,-169},{-245,-178,-286,-231,-152,-259},{-180,-243,-146,-321,-152,-291},{-146,-173,-261,-319,-256,-219}}},{{{-303,-400,-362,-300,-209,-382},{-182,-188,-188,-403,-238,-300},{-391,-391,-223,-332,-329,-265},{-312,-350,-297,-332,-303,-306},{-320,-332,-291,-338,-209,-265},{-312,-412,-212,-185,-197,-235},{-300,-391,-300,-244,-253,-297},{-379,-394,-220,-344,-320,-262},{-279,-291,-303,-244,-350,-247},{-285,-318,-318,-176,-259,-285}},{{-397,-294,-250,-388,-309,-412},{-285,-259,-185,-270,-373,-229},{-397,-397,-397,-238,-250,-253},{-370,-388,-238,-273,-347,-229},{-253,-388,-253,-341,-368,-265},{-206,-294,-341,-212,-282,-344},{-229,-300,-276,-244,-244,-373},{-332,-341,-176,-376,-385,-318},{-218,-294,-362,-256,-270,-341},{-265,-309,-294,-191,-353,-329}},{{-353,-194,-182,-379,-209,-365},{-338,-297,-368,-291,-315,-235},{-341,-253,-253,-376,-323,-226},{-176,-397,-309,-238,-370,-235},{-356,-285,-232,-332,-309,-350},{-332,-226,-300,-247,-326,-409},{-385,-209,-312,-359,-259,-179},{-332,-262,-309,-406,-394,-306},{-394,-353,-385,-300,-300,-391},{-209,-250,-191,-185,-235,-265}},{{-179,-350,-288,-385,-206,-268},{-326,-320,-373,-306,-229,-315},{-273,-312,-291,-373,-356,-397},{-326,-320,-391,-203,-309,-188},{-276,-253,-176,-329,-235,-191},{-385,-203,-188,-244,-220,-344},{-338,-394,-262,-306,-182,-373},{-282,-385,-182,-373,-194,-223},{-376,-409,-270,-403,-250,-279},{-362,-209,-306,-356,-223,-197}},{{-385,-259,-256,-400,-356,-241},{-270,-397,-347,-232,-191,-218},{-265,-250,-341,-376,-209,-265},{-362,-338,-185,-394,-279,-291},{-197,-362,-262,-400,-306,-329},{-259,-273,-300,-235,-394,-238},{-279,-306,-315,-253,-338,-206},{-270,-282,-279,-350,-359,-273},{-347,-359,-194,-241,-212,-368},{-347,-250,-312,-338,-297,-253}},{{-179,-400,-341,-244,-241,-373},{-391,-312,-179,-397,-385,-326},{-200,-309,-362,-309,-209,-268},{-353,-241,-341,-206,-323,-197},{-259,-323,-262,-397,-356,-197},{-326,-356,-179,-206,-212,-347},{-318,-218,-315,-279,-359,-179},{-268,-338,-388,-229,-318,-279},{-385,-282,-220,-262,-312,-350},{-312,-185,-223,-238,-232,-306}}}}; // 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]={16,8,5,15,8,5,16,8,6,16,9,6,16,8,6,17,9,6,16,9,6,17,9,6,17,8,6,16,8,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,18,9,6,17,9,6,17,8,6,16,9,6,16,9,6,16,8,6,16,8,6,17,9,6}; // 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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,0,4,8,12,16,20,24,28,1,7,13,19,25,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,6,12,18,24,30,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,5,11,17,23,29,35,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,5,11,17,23,29,35,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,3,9,15,21,27,33,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33}; // set of end times of each shipment 
