int Dev = 40;// Deviation
extern const int CNN = 2;// 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 = 745;//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]={{{{10885,0,0,0,0,0},{11082,0,0,0,0,0},{10863,0,0,0,0,0},{11070,0,0,0,0,0},{10566,0,0,0,0,0},{11241,0,0,0,0,0},{11826,0,0,0,0,0},{10328,0,0,0,0,0},{11074,0,0,0,0,0},{10562,0,0,0,0,0}},{{11564,0,0,0,0,0},{11043,0,0,0,0,0},{10436,0,0,0,0,0},{10649,0,0,0,0,0},{11037,0,0,0,0,0},{10868,0,0,0,0,0},{11075,0,0,0,0,0},{11658,0,0,0,0,0},{10519,0,0,0,0,0},{11217,0,0,0,0,0}},{{10657,0,0,0,0,0},{10940,0,0,0,0,0},{10963,0,0,0,0,0},{11277,0,0,0,0,0},{11489,0,0,0,0,0},{10833,0,0,0,0,0},{10649,0,0,0,0,0},{10946,0,0,0,0,0},{10615,0,0,0,0,0},{11016,0,0,0,0,0}},{{11734,0,0,0,0,0},{10062,0,0,0,0,0},{11038,0,0,0,0,0},{11595,0,0,0,0,0},{11051,0,0,0,0,0},{11411,0,0,0,0,0},{11185,0,0,0,0,0},{10966,0,0,0,0,0},{10892,0,0,0,0,0},{10654,0,0,0,0,0}},{{11087,0,0,0,0,0},{11003,0,0,0,0,0},{11862,0,0,0,0,0},{11103,0,0,0,0,0},{11627,0,0,0,0,0},{11139,0,0,0,0,0},{10656,0,0,0,0,0},{11011,0,0,0,0,0},{10546,0,0,0,0,0},{11005,0,0,0,0,0}},{{10926,0,0,0,0,0},{11359,0,0,0,0,0},{10899,0,0,0,0,0},{10764,0,0,0,0,0},{11303,0,0,0,0,0},{11151,0,0,0,0,0},{10925,0,0,0,0,0},{11136,0,0,0,0,0},{11181,0,0,0,0,0},{11062,0,0,0,0,0}}},{{{-137,-152,-282,-276,-197,-197},{-170,-307,-271,-296,-166,-150},{-190,-233,-240,-181,-273,-134},{-150,-152,-246,-246,-164,-143},{-217,-235,-155,-181,-309,-293},{-240,-314,-249,-282,-177,-237},{-269,-168,-237,-314,-264,-222},{-215,-179,-215,-186,-215,-148},{-309,-168,-284,-237,-220,-157},{-197,-199,-298,-159,-284,-146}},{{-264,-242,-217,-159,-170,-179},{-186,-222,-264,-222,-253,-237},{-215,-157,-224,-134,-170,-237},{-204,-235,-190,-148,-166,-179},{-282,-186,-264,-137,-287,-161},{-161,-251,-143,-202,-269,-146},{-237,-269,-146,-161,-137,-186},{-269,-305,-155,-233,-195,-211},{-137,-267,-186,-184,-302,-199},{-251,-170,-195,-282,-235,-222}},{{-258,-168,-314,-161,-260,-206},{-213,-170,-246,-233,-235,-161},{-262,-215,-242,-186,-240,-141},{-298,-197,-208,-195,-164,-309},{-137,-246,-199,-220,-300,-237},{-170,-211,-199,-282,-278,-157},{-197,-181,-186,-137,-264,-289},{-228,-305,-293,-267,-184,-273},{-260,-186,-179,-298,-215,-172},{-273,-273,-155,-314,-139,-293}},{{-309,-211,-273,-233,-293,-235},{-184,-143,-302,-276,-199,-190},{-287,-164,-184,-164,-175,-276},{-222,-197,-215,-273,-188,-208},{-224,-139,-157,-224,-211,-181},{-222,-143,-267,-177,-314,-157},{-284,-307,-267,-309,-170,-291},{-276,-137,-300,-231,-233,-255},{-289,-150,-264,-137,-159,-166},{-172,-202,-139,-177,-289,-152}},{{-181,-269,-228,-134,-228,-170},{-159,-228,-157,-172,-215,-211},{-282,-293,-289,-164,-314,-302},{-220,-309,-269,-246,-264,-175},{-271,-231,-148,-220,-231,-157},{-231,-222,-199,-255,-141,-146},{-251,-164,-164,-314,-244,-157},{-141,-184,-284,-143,-314,-220},{-199,-157,-188,-309,-231,-190},{-278,-249,-222,-179,-311,-190}},{{-164,-188,-255,-289,-287,-273},{-204,-278,-199,-226,-197,-293},{-204,-233,-148,-224,-224,-141},{-237,-220,-175,-289,-206,-217},{-148,-150,-215,-231,-190,-161},{-296,-226,-251,-148,-305,-197},{-139,-190,-181,-172,-202,-262},{-307,-161,-273,-269,-278,-213},{-186,-231,-255,-244,-255,-237},{-258,-204,-211,-273,-220,-150}}},{{{-233,-231,-250,-238,-164,-274},{-214,-245,-293,-314,-159,-293},{-176,-298,-250,-186,-150,-217},{-309,-231,-174,-288,-262,-293},{-328,-150,-164,-178,-217,-324},{-278,-178,-278,-252,-202,-245},{-209,-240,-150,-319,-288,-267},{-288,-169,-283,-162,-274,-159},{-243,-162,-309,-290,-276,-276},{-169,-250,-276,-198,-269,-326}},{{-307,-209,-243,-331,-159,-245},{-157,-186,-252,-188,-259,-188},{-331,-202,-298,-331,-224,-259},{-238,-214,-217,-302,-221,-150},{-193,-293,-205,-243,-233,-293},{-221,-195,-205,-195,-314,-178},{-167,-145,-331,-221,-224,-228},{-305,-262,-236,-264,-300,-290},{-143,-214,-202,-228,-228,-188},{-328,-305,-276,-321,-324,-286}},{{-167,-290,-298,-190,-228,-298},{-257,-326,-271,-145,-271,-262},{-259,-264,-145,-162,-152,-200},{-312,-307,-233,-233,-250,-252},{-176,-202,-217,-236,-300,-207},{-159,-321,-198,-271,-240,-288},{-262,-221,-262,-219,-245,-312},{-157,-274,-209,-162,-159,-226},{-212,-238,-267,-148,-150,-243},{-214,-312,-269,-233,-162,-164}},{{-219,-309,-207,-238,-181,-324},{-169,-293,-231,-257,-243,-317},{-264,-159,-236,-176,-176,-190},{-321,-274,-193,-302,-269,-150},{-290,-176,-188,-326,-286,-195},{-164,-262,-200,-150,-314,-326},{-193,-248,-174,-307,-205,-276},{-295,-300,-319,-209,-207,-245},{-162,-231,-269,-250,-319,-152},{-293,-212,-188,-178,-290,-295}},{{-219,-267,-281,-231,-217,-159},{-143,-290,-148,-205,-321,-193},{-269,-257,-293,-152,-207,-169},{-176,-183,-333,-157,-274,-186},{-169,-178,-214,-181,-293,-317},{-178,-307,-209,-245,-209,-200},{-269,-155,-248,-328,-224,-309},{-200,-224,-198,-274,-312,-295},{-267,-145,-288,-150,-276,-271},{-169,-167,-312,-290,-314,-209}},{{-328,-333,-298,-286,-178,-293},{-286,-190,-238,-250,-143,-176},{-181,-152,-283,-269,-148,-257},{-198,-326,-276,-193,-271,-205},{-195,-321,-298,-271,-317,-259},{-317,-202,-240,-226,-328,-326},{-286,-202,-186,-331,-286,-319},{-274,-236,-174,-257,-300,-283},{-221,-164,-333,-212,-186,-248},{-269,-243,-290,-228,-309,-209}}},{{{-259,-248,-227,-319,-251,-284},{-248,-248,-303,-259,-358,-167},{-358,-363,-314,-363,-210,-322},{-199,-287,-180,-369,-273,-379},{-169,-172,-306,-224,-202,-298},{-235,-259,-284,-363,-308,-232},{-227,-317,-317,-289,-317,-308},{-164,-246,-240,-273,-339,-341},{-273,-246,-197,-284,-358,-207},{-339,-276,-207,-311,-164,-273}},{{-276,-363,-257,-341,-284,-363},{-224,-229,-344,-360,-251,-175},{-186,-164,-349,-194,-186,-259},{-300,-349,-265,-306,-303,-238},{-287,-369,-202,-333,-347,-259},{-213,-377,-273,-186,-186,-300},{-363,-295,-369,-349,-240,-325},{-379,-216,-330,-336,-325,-216},{-177,-360,-229,-339,-216,-270},{-246,-339,-238,-186,-218,-186}},{{-207,-213,-300,-265,-317,-311},{-284,-319,-180,-270,-248,-358},{-199,-199,-308,-295,-352,-232},{-229,-292,-360,-363,-164,-216},{-303,-341,-227,-227,-243,-363},{-360,-308,-300,-186,-224,-183},{-363,-257,-300,-325,-216,-216},{-358,-319,-270,-317,-259,-180},{-341,-221,-186,-169,-186,-218},{-232,-167,-167,-177,-366,-325}},{{-366,-169,-265,-175,-349,-306},{-197,-175,-270,-221,-330,-169},{-352,-311,-177,-257,-265,-205},{-355,-248,-319,-311,-371,-341},{-298,-330,-191,-358,-243,-382},{-278,-366,-262,-172,-169,-322},{-238,-298,-227,-191,-377,-341},{-243,-169,-172,-341,-257,-317},{-363,-287,-333,-259,-229,-197},{-262,-251,-289,-287,-186,-238}},{{-199,-262,-303,-188,-374,-197},{-347,-191,-235,-281,-374,-205},{-306,-369,-289,-235,-366,-339},{-349,-257,-265,-336,-289,-382},{-382,-205,-382,-197,-355,-243},{-268,-188,-202,-314,-221,-213},{-325,-308,-197,-243,-281,-292},{-207,-188,-164,-240,-273,-194},{-229,-300,-238,-175,-325,-205},{-306,-216,-363,-164,-188,-243}},{{-246,-238,-243,-377,-183,-347},{-281,-227,-259,-164,-311,-205},{-172,-175,-229,-207,-308,-232},{-248,-205,-221,-202,-248,-221},{-366,-197,-344,-262,-360,-352},{-227,-325,-371,-213,-243,-205},{-363,-180,-232,-308,-265,-197},{-379,-164,-292,-278,-289,-265},{-213,-191,-235,-268,-243,-210},{-360,-207,-292,-276,-371,-224}}},{{{-137,-188,-132,-123,-154,-126},{-136,-139,-179,-149,-140,-196},{-100,-194,-126,-145,-120,-185},{-199,-199,-188,-202,-179,-149},{-111,-199,-116,-160,-156,-177},{-140,-154,-192,-165,-145,-108},{-172,-106,-126,-189,-108,-112},{-102,-105,-171,-149,-95,-112},{-183,-172,-117,-114,-128,-156},{-134,-214,-122,-114,-142,-186}},{{-160,-163,-189,-179,-146,-197},{-197,-213,-162,-179,-209,-103},{-105,-97,-183,-169,-196,-180},{-119,-160,-156,-186,-100,-106},{-152,-174,-179,-216,-106,-131},{-137,-171,-151,-117,-154,-114},{-208,-159,-171,-206,-172,-186},{-136,-136,-163,-169,-94,-120},{-95,-168,-196,-177,-99,-146},{-128,-143,-177,-97,-202,-119}},{{-95,-177,-143,-108,-120,-146},{-131,-94,-197,-171,-148,-171},{-214,-122,-186,-95,-176,-179},{-119,-205,-169,-136,-172,-183},{-112,-126,-166,-165,-209,-97},{-140,-137,-197,-203,-145,-177},{-125,-205,-117,-114,-196,-94},{-117,-189,-122,-95,-94,-216},{-185,-203,-169,-142,-214,-108},{-139,-142,-166,-94,-103,-163}},{{-160,-206,-194,-125,-103,-157},{-183,-117,-203,-166,-137,-177},{-176,-172,-182,-197,-191,-182},{-182,-117,-183,-182,-188,-176},{-216,-100,-208,-154,-123,-111},{-134,-166,-202,-179,-209,-163},{-95,-111,-131,-119,-111,-186},{-172,-171,-172,-112,-191,-143},{-151,-183,-140,-168,-183,-188},{-123,-165,-199,-166,-129,-197}},{{-176,-137,-140,-200,-183,-216},{-94,-183,-112,-192,-172,-99},{-206,-140,-97,-139,-169,-194},{-199,-177,-143,-156,-95,-114},{-172,-166,-116,-213,-159,-180},{-95,-186,-105,-203,-196,-126},{-100,-149,-209,-146,-108,-129},{-176,-163,-163,-168,-186,-123},{-137,-174,-177,-136,-172,-171},{-120,-119,-122,-106,-211,-205}},{{-103,-216,-116,-213,-109,-202},{-200,-186,-122,-168,-209,-186},{-142,-132,-186,-194,-177,-174},{-137,-213,-200,-156,-168,-140},{-128,-120,-125,-168,-108,-136},{-112,-154,-183,-185,-202,-216},{-162,-211,-183,-131,-169,-211},{-182,-140,-180,-108,-200,-148},{-169,-142,-106,-151,-182,-163},{-177,-102,-149,-106,-165,-122}}},{{{-197,-187,-246,-202,-253,-164},{-162,-124,-122,-246,-213,-160},{-220,-151,-178,-228,-177,-255},{-115,-242,-164,-164,-242,-144},{-240,-144,-138,-173,-136,-162},{-126,-180,-133,-182,-217,-182},{-126,-113,-218,-228,-198,-184},{-244,-198,-189,-229,-149,-233},{-255,-200,-131,-120,-246,-249},{-207,-155,-162,-202,-109,-162}},{{-146,-138,-135,-153,-158,-240},{-206,-222,-251,-164,-147,-191},{-138,-244,-242,-157,-211,-207},{-166,-113,-116,-138,-122,-171},{-189,-211,-151,-160,-178,-249},{-253,-158,-200,-138,-228,-184},{-171,-111,-187,-255,-167,-226},{-242,-246,-149,-215,-127,-127},{-249,-204,-173,-248,-222,-147},{-151,-171,-187,-246,-155,-126}},{{-215,-116,-153,-249,-197,-118},{-167,-191,-178,-244,-158,-118},{-231,-180,-127,-127,-228,-209},{-129,-144,-193,-136,-127,-146},{-224,-120,-255,-158,-124,-255},{-178,-169,-111,-149,-144,-206},{-135,-126,-178,-198,-198,-255},{-162,-242,-146,-116,-248,-217},{-158,-187,-151,-177,-222,-204},{-229,-213,-251,-180,-202,-248}},{{-167,-151,-209,-229,-182,-193},{-127,-127,-131,-138,-164,-157},{-109,-193,-206,-187,-191,-144},{-177,-146,-253,-240,-253,-144},{-115,-209,-237,-113,-244,-171},{-200,-248,-242,-231,-142,-229},{-151,-146,-158,-131,-235,-113},{-142,-231,-162,-229,-115,-109},{-175,-193,-138,-138,-218,-218},{-195,-167,-184,-222,-164,-178}},{{-233,-197,-193,-200,-187,-157},{-173,-138,-248,-184,-147,-178},{-217,-251,-187,-173,-207,-238},{-149,-111,-220,-189,-124,-249},{-213,-206,-237,-237,-231,-235},{-133,-124,-193,-147,-242,-222},{-109,-248,-197,-120,-115,-202},{-140,-224,-229,-237,-231,-229},{-116,-169,-122,-127,-195,-246},{-249,-151,-164,-200,-173,-204}},{{-251,-202,-198,-164,-142,-131},{-133,-111,-169,-109,-255,-231},{-186,-206,-157,-167,-180,-184},{-246,-144,-209,-184,-162,-238},{-171,-235,-240,-198,-169,-251},{-155,-248,-175,-167,-160,-195},{-220,-187,-109,-111,-120,-118},{-138,-209,-113,-198,-113,-162},{-238,-226,-158,-184,-160,-195},{-229,-202,-126,-229,-149,-111}}},{{{-203,-184,-341,-262,-238,-306},{-169,-147,-274,-289,-314,-203},{-189,-186,-321,-169,-157,-189},{-262,-228,-331,-220,-245,-316},{-220,-233,-157,-149,-301,-225},{-208,-343,-167,-289,-194,-294},{-338,-218,-245,-267,-262,-159},{-245,-159,-233,-323,-235,-203},{-149,-174,-174,-265,-284,-262},{-233,-147,-149,-238,-252,-247}},{{-189,-260,-289,-341,-252,-186},{-265,-194,-218,-213,-220,-296},{-147,-201,-309,-270,-174,-279},{-301,-328,-294,-208,-201,-203},{-326,-240,-260,-309,-294,-284},{-331,-311,-336,-228,-304,-230},{-149,-321,-243,-301,-306,-262},{-235,-282,-309,-235,-157,-321},{-154,-247,-167,-289,-157,-167},{-306,-255,-304,-270,-211,-247}},{{-247,-206,-296,-203,-225,-167},{-164,-304,-321,-311,-343,-154},{-235,-296,-314,-157,-194,-301},{-277,-341,-306,-147,-230,-252},{-174,-301,-149,-336,-314,-154},{-341,-198,-338,-147,-282,-272},{-289,-238,-238,-225,-196,-201},{-233,-296,-296,-228,-267,-216},{-218,-321,-157,-292,-179,-172},{-220,-343,-181,-147,-189,-304}},{{-331,-326,-240,-230,-323,-159},{-211,-235,-152,-328,-184,-247},{-277,-218,-262,-296,-331,-318},{-203,-220,-220,-184,-311,-223},{-186,-194,-309,-257,-289,-296},{-279,-294,-328,-282,-252,-238},{-289,-203,-333,-304,-257,-304},{-250,-260,-257,-157,-311,-211},{-157,-272,-211,-216,-252,-333},{-213,-260,-294,-172,-238,-321}},{{-260,-255,-309,-208,-179,-331},{-169,-326,-176,-314,-240,-341},{-333,-294,-218,-159,-331,-196},{-262,-252,-152,-292,-181,-245},{-167,-333,-230,-343,-255,-333},{-296,-233,-176,-208,-306,-341},{-270,-154,-318,-240,-186,-191},{-157,-211,-243,-235,-255,-299},{-159,-230,-162,-252,-206,-213},{-208,-230,-296,-176,-257,-181}},{{-159,-172,-235,-154,-245,-262},{-284,-318,-304,-235,-314,-189},{-299,-277,-341,-235,-223,-152},{-176,-296,-277,-196,-152,-198},{-164,-299,-299,-252,-294,-279},{-333,-318,-162,-255,-159,-304},{-306,-311,-162,-323,-262,-196},{-198,-267,-233,-238,-284,-326},{-321,-331,-309,-260,-167,-191},{-247,-314,-250,-252,-174,-218}}},{{{-233,-215,-240,-176,-194,-201},{-157,-236,-321,-289,-291,-280},{-252,-139,-305,-289,-180,-268},{-159,-176,-164,-243,-206,-146},{-146,-236,-249,-187,-189,-280},{-240,-159,-316,-208,-203,-199},{-185,-189,-307,-256,-310,-259},{-222,-210,-148,-199,-289,-249},{-240,-233,-282,-303,-238,-201},{-150,-247,-206,-146,-162,-298}},{{-243,-314,-319,-305,-247,-222},{-150,-171,-263,-178,-206,-303},{-224,-213,-194,-159,-321,-146},{-240,-305,-270,-194,-141,-298},{-143,-150,-256,-219,-176,-166},{-323,-219,-210,-314,-141,-201},{-314,-210,-157,-169,-176,-148},{-259,-247,-275,-185,-231,-277},{-162,-263,-270,-169,-203,-293},{-268,-217,-206,-208,-284,-208}},{{-162,-238,-143,-243,-275,-321},{-240,-275,-150,-245,-296,-226},{-233,-289,-208,-323,-270,-217},{-171,-240,-192,-206,-316,-319},{-226,-222,-319,-314,-300,-312},{-201,-259,-310,-157,-226,-268},{-240,-178,-219,-155,-201,-150},{-155,-247,-182,-189,-238,-169},{-180,-222,-236,-323,-159,-316},{-291,-236,-268,-217,-166,-307}},{{-192,-273,-182,-280,-316,-300},{-169,-150,-143,-219,-146,-150},{-217,-164,-289,-215,-238,-298},{-217,-146,-300,-261,-247,-314},{-213,-148,-261,-215,-321,-213},{-150,-180,-293,-270,-164,-310},{-266,-233,-249,-298,-282,-236},{-247,-247,-173,-176,-162,-273},{-231,-296,-298,-310,-148,-307},{-316,-300,-152,-146,-166,-173}},{{-155,-243,-194,-293,-266,-293},{-256,-173,-256,-273,-321,-240},{-155,-192,-219,-323,-189,-155},{-243,-312,-169,-296,-314,-189},{-296,-219,-189,-291,-256,-222},{-229,-314,-310,-231,-233,-215},{-231,-263,-293,-157,-162,-229},{-273,-159,-291,-201,-240,-203},{-199,-307,-219,-157,-180,-243},{-266,-300,-247,-236,-224,-217}},{{-192,-293,-236,-148,-148,-261},{-323,-180,-286,-256,-196,-277},{-215,-300,-247,-323,-148,-247},{-157,-208,-162,-215,-270,-247},{-298,-217,-139,-243,-141,-157},{-208,-178,-166,-196,-229,-296},{-182,-319,-280,-296,-201,-139},{-196,-210,-277,-222,-164,-236},{-321,-222,-146,-217,-305,-256},{-185,-219,-157,-275,-171,-263}}},{{{-309,-229,-403,-373,-203,-247},{-203,-412,-276,-265,-241,-288},{-300,-350,-229,-244,-344,-215},{-315,-335,-362,-359,-256,-215},{-376,-376,-323,-268,-223,-394},{-409,-379,-329,-288,-188,-291},{-409,-282,-406,-382,-391,-359},{-250,-203,-235,-250,-259,-344},{-300,-323,-188,-197,-291,-403},{-206,-350,-326,-241,-332,-382}},{{-353,-270,-347,-288,-344,-182},{-347,-276,-394,-329,-391,-188},{-212,-344,-229,-197,-203,-365},{-253,-285,-409,-291,-350,-200},{-285,-194,-185,-300,-268,-312},{-362,-223,-209,-285,-318,-303},{-244,-276,-176,-403,-388,-220},{-247,-306,-235,-391,-406,-309},{-326,-268,-385,-276,-262,-268},{-370,-182,-297,-318,-362,-194}},{{-300,-188,-326,-270,-318,-241},{-320,-259,-238,-200,-259,-218},{-338,-185,-262,-226,-397,-391},{-300,-312,-256,-306,-300,-365},{-288,-403,-385,-309,-238,-353},{-347,-373,-194,-176,-268,-185},{-382,-356,-226,-262,-209,-291},{-382,-241,-332,-294,-215,-362},{-273,-203,-365,-376,-391,-223},{-253,-259,-300,-341,-341,-288}},{{-338,-312,-344,-191,-303,-356},{-315,-315,-188,-294,-223,-400},{-203,-209,-379,-265,-320,-391},{-256,-182,-320,-238,-370,-385},{-318,-291,-285,-344,-276,-235},{-373,-326,-306,-318,-215,-223},{-241,-350,-197,-235,-218,-300},{-247,-391,-194,-279,-326,-350},{-212,-270,-279,-191,-368,-232},{-247,-320,-282,-406,-247,-212}},{{-276,-403,-191,-400,-273,-232},{-247,-241,-385,-409,-288,-353},{-309,-412,-191,-370,-385,-318},{-403,-291,-191,-259,-209,-247},{-347,-350,-191,-370,-276,-220},{-323,-300,-368,-365,-365,-406},{-241,-238,-347,-232,-326,-273},{-403,-356,-185,-376,-400,-200},{-320,-341,-276,-365,-409,-223},{-356,-203,-406,-253,-379,-176}},{{-209,-209,-185,-309,-315,-341},{-368,-300,-382,-250,-353,-338},{-385,-394,-206,-397,-253,-385},{-306,-385,-285,-353,-203,-323},{-182,-353,-262,-294,-406,-338},{-270,-312,-332,-215,-185,-235},{-362,-247,-206,-297,-403,-200},{-326,-259,-273,-200,-306,-338},{-318,-373,-397,-226,-368,-247},{-368,-300,-229,-229,-406,-344}}}}; // 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]={15,8,6,15,8,5,15,8,5,16,8,6,16,8,6,16,8,6,16,8,6,17,9,6,17,9,6,17,9,6,17,9,6,16,8,6,17,9,6,18,9,6,18,9,6,17,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,8,6,16,8,6,16,8,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,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,1,5,9,13,17,21,25,29,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,1,7,13,19,25,31,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,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,1,5,9,13,17,21,25,29,33,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,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,0,6,12,18,24,30,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,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,0,6,12,18,24,30,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,2,8,14,20,26,32,0,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,0,6,12,18,24,30,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,1,7,13,19,25,31,0,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,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,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,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,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,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,0,6,12,18,24,30,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}; // 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,7,11,15,19,23,27,31,35,5,11,17,23,29,35,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,6,12,18,24,30,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,5,11,17,23,29,35,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,5,11,17,23,29,35,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,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,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,3,7,11,15,19,23,27,31,35,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,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,2,8,14,20,26,32,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,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,1,7,13,19,25,31,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,3,9,15,21,27,33,1,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,1,7,13,19,25,31,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,2,8,14,20,26,32,1,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,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,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,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,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,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,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,3,9,15,21,27,33,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34}; // set of end times of each shipment 
