int Dev = 50;// Deviation
extern const int CNN = 4;// Case Index
extern const int P = 3;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 18;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 349;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 9;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{10621,0,0,0,0,0},{10986,0,0,0,0,0},{11482,0,0,0,0,0},{11239,0,0,0,0,0},{11010,0,0,0,0,0},{10665,0,0,0,0,0},{10944,0,0,0,0,0},{10945,0,0,0,0,0},{11176,0,0,0,0,0},{11192,0,0,0,0,0},{11189,0,0,0,0,0},{10670,0,0,0,0,0},{11234,0,0,0,0,0},{11380,0,0,0,0,0},{10915,0,0,0,0,0},{11101,0,0,0,0,0},{11519,0,0,0,0,0},{11182,0,0,0,0,0},{10860,0,0,0,0,0},{11268,0,0,0,0,0}},{{10756,0,0,0,0,0},{11559,0,0,0,0,0},{10923,0,0,0,0,0},{11410,0,0,0,0,0},{10548,0,0,0,0,0},{11421,0,0,0,0,0},{12077,0,0,0,0,0},{11002,0,0,0,0,0},{11202,0,0,0,0,0},{10424,0,0,0,0,0},{10915,0,0,0,0,0},{11338,0,0,0,0,0},{10608,0,0,0,0,0},{10521,0,0,0,0,0},{11576,0,0,0,0,0},{10634,0,0,0,0,0},{10363,0,0,0,0,0},{10722,0,0,0,0,0},{10236,0,0,0,0,0},{10988,0,0,0,0,0}},{{11232,0,0,0,0,0},{11398,0,0,0,0,0},{10834,0,0,0,0,0},{10669,0,0,0,0,0},{11360,0,0,0,0,0},{11748,0,0,0,0,0},{10292,0,0,0,0,0},{11142,0,0,0,0,0},{11747,0,0,0,0,0},{10036,0,0,0,0,0},{10842,0,0,0,0,0},{10908,0,0,0,0,0},{11199,0,0,0,0,0},{10976,0,0,0,0,0},{10948,0,0,0,0,0},{11742,0,0,0,0,0},{11325,0,0,0,0,0},{10698,0,0,0,0,0},{11096,0,0,0,0,0},{11494,0,0,0,0,0}}},{{{-155,-237,-175,-262,-217,-240},{-302,-309,-244,-224,-251,-116},{-195,-307,-159,-112,-296,-258},{-161,-130,-235,-329,-208,-273},{-244,-116,-177,-233,-157,-224},{-197,-208,-264,-128,-278,-293},{-255,-128,-228,-291,-199,-264},{-269,-276,-188,-240,-143,-139},{-224,-258,-280,-181,-119,-258},{-264,-235,-152,-220,-168,-323},{-190,-143,-323,-148,-237,-289},{-271,-197,-237,-213,-195,-289},{-329,-193,-329,-320,-280,-242},{-314,-249,-170,-224,-161,-309},{-280,-242,-161,-235,-284,-300},{-170,-323,-269,-116,-231,-267},{-305,-309,-276,-273,-329,-242},{-152,-291,-195,-298,-251,-307},{-240,-146,-242,-177,-179,-233},{-291,-253,-249,-289,-116,-240}},{{-334,-175,-242,-217,-296,-199},{-289,-269,-116,-302,-159,-280},{-125,-235,-311,-148,-280,-320},{-327,-179,-164,-170,-235,-246},{-121,-336,-323,-220,-130,-199},{-318,-137,-260,-211,-240,-125},{-296,-334,-334,-269,-226,-289},{-215,-195,-334,-195,-273,-139},{-262,-220,-323,-143,-179,-329},{-139,-184,-300,-293,-276,-269},{-240,-258,-161,-255,-336,-132},{-226,-296,-282,-224,-116,-246},{-166,-143,-143,-211,-273,-249},{-175,-267,-284,-284,-240,-325},{-253,-332,-146,-311,-170,-323},{-123,-119,-278,-242,-199,-318},{-172,-119,-202,-184,-164,-282},{-311,-181,-217,-267,-311,-215},{-188,-237,-139,-150,-141,-222},{-215,-119,-211,-228,-334,-179}},{{-181,-186,-217,-253,-255,-293},{-116,-325,-202,-175,-125,-307},{-224,-186,-121,-334,-128,-255},{-143,-175,-202,-231,-276,-175},{-329,-298,-316,-179,-208,-146},{-267,-202,-284,-240,-143,-155},{-258,-323,-327,-155,-224,-260},{-164,-202,-242,-233,-184,-217},{-327,-168,-336,-224,-327,-320},{-264,-211,-318,-184,-139,-159},{-114,-170,-228,-231,-195,-296},{-300,-323,-291,-287,-302,-258},{-179,-172,-287,-172,-128,-175},{-300,-267,-137,-226,-125,-296},{-323,-199,-193,-235,-278,-148},{-305,-237,-244,-161,-309,-161},{-329,-251,-186,-253,-172,-240},{-242,-233,-170,-327,-228,-267},{-121,-197,-298,-132,-332,-215},{-112,-284,-280,-316,-132,-233}}},{{{-157,-164,-119,-312,-319,-255},{-188,-309,-140,-169,-281,-162},{-352,-293,-183,-269,-250,-331},{-140,-178,-193,-340,-262,-326},{-336,-198,-174,-183,-176,-274},{-264,-205,-338,-217,-345,-314},{-252,-198,-278,-228,-150,-159},{-207,-209,-186,-255,-317,-129},{-167,-245,-347,-124,-195,-176},{-238,-307,-171,-250,-126,-238},{-233,-195,-336,-317,-328,-233},{-226,-319,-245,-176,-314,-126},{-121,-121,-259,-150,-352,-338},{-350,-167,-319,-343,-205,-198},{-200,-148,-188,-250,-281,-238},{-195,-181,-119,-171,-293,-300},{-162,-124,-226,-202,-345,-214},{-243,-150,-167,-343,-221,-202},{-212,-193,-176,-288,-248,-274},{-145,-171,-205,-321,-267,-267}},{{-338,-298,-138,-228,-307,-169},{-243,-317,-319,-355,-357,-238},{-267,-300,-259,-228,-169,-326},{-188,-343,-240,-324,-350,-148},{-138,-288,-343,-264,-305,-150},{-226,-169,-136,-126,-236,-202},{-286,-171,-326,-224,-140,-236},{-238,-176,-262,-155,-309,-264},{-233,-126,-145,-352,-290,-326},{-188,-252,-217,-190,-345,-219},{-121,-300,-188,-276,-321,-121},{-183,-312,-333,-207,-143,-283},{-167,-328,-181,-343,-288,-228},{-193,-314,-181,-293,-131,-209},{-150,-226,-205,-126,-243,-205},{-181,-133,-119,-207,-309,-221},{-309,-345,-133,-205,-293,-124},{-140,-148,-205,-336,-298,-164},{-259,-314,-193,-124,-167,-293},{-164,-236,-255,-326,-133,-286}},{{-181,-314,-245,-350,-178,-338},{-157,-131,-188,-326,-278,-324},{-248,-209,-152,-228,-248,-224},{-159,-131,-255,-319,-157,-198},{-267,-355,-200,-143,-150,-238},{-298,-338,-352,-252,-148,-264},{-148,-188,-188,-143,-326,-259},{-305,-126,-157,-317,-331,-267},{-319,-293,-164,-157,-250,-257},{-157,-169,-307,-243,-167,-209},{-145,-143,-148,-181,-319,-331},{-171,-245,-212,-143,-231,-205},{-269,-269,-159,-274,-283,-281},{-131,-183,-164,-340,-226,-257},{-176,-278,-171,-133,-200,-343},{-248,-338,-357,-352,-190,-288},{-186,-183,-202,-295,-321,-209},{-181,-314,-295,-259,-255,-336},{-345,-338,-319,-343,-178,-214},{-324,-302,-309,-162,-317,-219}}},{{{-281,-382,-156,-369,-382,-262},{-388,-147,-188,-303,-289,-169},{-276,-377,-278,-232,-393,-377},{-385,-265,-218,-366,-197,-366},{-358,-210,-197,-281,-388,-399},{-262,-229,-273,-197,-292,-213},{-336,-243,-390,-265,-278,-303},{-183,-191,-390,-404,-300,-248},{-276,-240,-188,-273,-153,-194},{-235,-317,-175,-336,-393,-145},{-180,-278,-377,-194,-390,-188},{-385,-388,-216,-262,-270,-292},{-180,-268,-347,-142,-355,-240},{-145,-388,-142,-341,-257,-363},{-388,-363,-188,-153,-265,-393},{-333,-399,-319,-169,-336,-153},{-177,-344,-358,-164,-199,-393},{-369,-306,-287,-218,-227,-218},{-227,-161,-396,-281,-205,-341},{-259,-268,-153,-388,-300,-311}},{{-276,-410,-202,-235,-177,-210},{-139,-246,-303,-366,-281,-369},{-355,-393,-268,-191,-216,-347},{-177,-330,-393,-172,-333,-374},{-243,-169,-161,-254,-369,-278},{-371,-248,-360,-257,-349,-396},{-142,-390,-308,-355,-303,-281},{-393,-257,-136,-246,-251,-197},{-281,-145,-205,-317,-341,-259},{-147,-207,-139,-167,-328,-229},{-262,-358,-262,-139,-287,-164},{-336,-358,-355,-322,-273,-240},{-175,-289,-177,-202,-300,-167},{-158,-349,-142,-281,-142,-158},{-347,-410,-298,-147,-396,-136},{-276,-319,-407,-265,-278,-314},{-328,-156,-180,-205,-246,-175},{-216,-205,-281,-150,-328,-172},{-287,-292,-268,-333,-161,-355},{-358,-229,-262,-188,-259,-259}},{{-262,-374,-333,-349,-325,-306},{-339,-210,-325,-202,-216,-366},{-139,-227,-284,-371,-248,-161},{-238,-399,-232,-270,-281,-210},{-172,-276,-262,-278,-221,-158},{-328,-339,-390,-251,-369,-221},{-268,-379,-268,-254,-161,-344},{-251,-259,-235,-270,-399,-363},{-213,-374,-306,-147,-232,-322},{-158,-232,-317,-363,-139,-243},{-404,-278,-344,-169,-369,-167},{-314,-330,-202,-306,-336,-379},{-314,-308,-186,-379,-254,-145},{-202,-207,-246,-306,-352,-238},{-363,-139,-202,-385,-330,-246},{-295,-322,-341,-399,-202,-352},{-142,-374,-385,-232,-388,-393},{-183,-164,-360,-259,-194,-145},{-142,-317,-328,-265,-314,-385},{-344,-216,-172,-311,-207,-246}}},{{{-142,-80,-145,-148,-208,-213},{-117,-213,-134,-94,-180,-186},{-122,-97,-231,-200,-97,-219},{-165,-140,-123,-213,-80,-105},{-165,-100,-83,-202,-83,-80},{-197,-120,-79,-92,-165,-129},{-169,-132,-160,-148,-188,-119},{-168,-196,-174,-89,-219,-143},{-134,-162,-180,-174,-172,-119},{-186,-225,-199,-120,-180,-99},{-189,-228,-97,-114,-112,-199},{-94,-128,-172,-149,-146,-216},{-119,-159,-103,-186,-197,-116},{-123,-85,-88,-226,-140,-109},{-131,-128,-139,-117,-223,-148},{-108,-180,-192,-92,-192,-117},{-191,-186,-213,-194,-162,-123},{-182,-97,-126,-194,-217,-180},{-191,-156,-197,-125,-192,-146},{-183,-122,-156,-219,-143,-194}},{{-211,-217,-182,-134,-94,-128},{-123,-214,-89,-95,-123,-197},{-202,-82,-97,-186,-128,-171},{-219,-109,-185,-179,-128,-112},{-168,-191,-125,-177,-92,-114},{-202,-228,-183,-171,-152,-97},{-116,-231,-142,-140,-159,-103},{-228,-102,-126,-112,-177,-222},{-146,-123,-134,-220,-140,-131},{-180,-200,-108,-134,-205,-111},{-106,-219,-228,-143,-196,-131},{-185,-171,-145,-105,-225,-109},{-183,-149,-79,-117,-228,-200},{-222,-197,-169,-139,-157,-79},{-159,-214,-211,-225,-94,-219},{-86,-182,-100,-186,-174,-217},{-109,-143,-208,-211,-185,-229},{-149,-88,-180,-192,-152,-102},{-129,-213,-137,-95,-149,-109},{-128,-88,-134,-206,-197,-82}},{{-206,-197,-86,-208,-122,-109},{-228,-226,-131,-99,-105,-106},{-97,-97,-91,-148,-95,-179},{-220,-134,-206,-116,-162,-143},{-106,-177,-202,-152,-165,-185},{-145,-179,-196,-186,-169,-171},{-79,-174,-95,-176,-211,-154},{-191,-143,-131,-229,-82,-126},{-134,-134,-88,-211,-188,-112},{-137,-149,-211,-217,-122,-143},{-151,-172,-126,-129,-213,-142},{-199,-188,-108,-160,-172,-225},{-102,-137,-169,-166,-120,-174},{-128,-95,-131,-163,-95,-137},{-168,-106,-122,-177,-85,-119},{-79,-99,-229,-116,-177,-85},{-142,-119,-85,-168,-99,-205},{-148,-86,-180,-137,-214,-105},{-116,-156,-95,-209,-208,-94},{-172,-220,-105,-142,-217,-106}}},{{{-151,-237,-158,-191,-162,-138},{-248,-200,-115,-184,-271,-240},{-218,-226,-269,-213,-178,-215},{-160,-113,-147,-235,-157,-146},{-258,-104,-255,-118,-153,-213},{-124,-207,-164,-264,-237,-198},{-98,-104,-207,-184,-116,-104},{-211,-218,-173,-149,-255,-206},{-244,-268,-249,-175,-224,-129},{-102,-238,-167,-257,-266,-240},{-220,-164,-264,-98,-124,-158},{-111,-258,-115,-195,-98,-171},{-109,-253,-229,-144,-228,-107},{-120,-218,-222,-104,-109,-269},{-222,-149,-133,-167,-187,-98},{-116,-260,-213,-162,-269,-116},{-91,-96,-171,-184,-157,-222},{-228,-169,-111,-147,-104,-264},{-240,-248,-193,-127,-91,-220},{-138,-102,-107,-160,-138,-235}},{{-120,-140,-111,-160,-191,-155},{-177,-186,-127,-167,-193,-113},{-109,-164,-222,-273,-200,-217},{-238,-93,-262,-246,-95,-220},{-249,-213,-151,-224,-140,-116},{-102,-175,-187,-173,-224,-251},{-222,-164,-228,-258,-144,-133},{-193,-206,-136,-268,-253,-127},{-127,-249,-167,-102,-213,-136},{-213,-242,-209,-177,-186,-116},{-209,-162,-173,-200,-146,-106},{-169,-213,-213,-124,-266,-209},{-91,-120,-153,-191,-169,-235},{-146,-273,-98,-187,-135,-147},{-273,-269,-171,-144,-198,-209},{-231,-133,-169,-162,-180,-151},{-217,-184,-136,-193,-122,-253},{-231,-228,-217,-200,-189,-146},{-98,-106,-115,-162,-144,-167},{-268,-91,-140,-226,-251,-273}},{{-126,-102,-146,-178,-257,-253},{-182,-91,-200,-255,-255,-195},{-207,-233,-113,-153,-180,-191},{-91,-213,-189,-171,-91,-124},{-136,-271,-142,-249,-191,-197},{-258,-106,-217,-126,-197,-260},{-136,-202,-244,-98,-217,-246},{-177,-211,-189,-237,-206,-226},{-255,-268,-206,-142,-266,-187},{-246,-106,-164,-235,-204,-153},{-93,-213,-231,-133,-187,-226},{-133,-217,-144,-120,-155,-171},{-198,-240,-91,-91,-258,-100},{-209,-187,-127,-146,-237,-136},{-273,-266,-91,-147,-273,-169},{-249,-175,-131,-140,-138,-95},{-195,-202,-180,-207,-175,-258},{-162,-204,-111,-182,-197,-107},{-129,-244,-231,-191,-238,-202},{-197,-255,-237,-235,-100,-187}}},{{{-247,-147,-149,-172,-270,-301},{-292,-228,-169,-162,-211,-279},{-326,-135,-262,-174,-223,-189},{-230,-191,-279,-270,-368,-233},{-358,-137,-130,-296,-260,-358},{-289,-198,-196,-228,-140,-225},{-284,-147,-296,-270,-292,-270},{-125,-169,-196,-216,-311,-223},{-318,-252,-279,-353,-228,-279},{-257,-355,-189,-149,-333,-267},{-142,-194,-350,-316,-176,-306},{-127,-191,-243,-145,-279,-194},{-284,-294,-147,-228,-270,-130},{-198,-316,-132,-223,-238,-355},{-321,-186,-230,-142,-164,-181},{-179,-250,-228,-181,-306,-365},{-167,-355,-233,-130,-159,-164},{-252,-216,-149,-172,-265,-250},{-203,-201,-260,-255,-235,-262},{-225,-360,-348,-147,-240,-350}},{{-341,-265,-235,-262,-314,-211},{-336,-194,-191,-299,-147,-255},{-196,-255,-203,-257,-122,-267},{-353,-154,-135,-174,-358,-245},{-326,-245,-203,-189,-125,-274},{-149,-282,-189,-147,-149,-355},{-358,-338,-262,-203,-350,-147},{-274,-279,-277,-208,-198,-311},{-304,-194,-296,-272,-326,-198},{-164,-272,-135,-314,-265,-216},{-181,-338,-267,-274,-176,-164},{-328,-157,-125,-289,-323,-289},{-247,-277,-331,-338,-174,-247},{-162,-265,-318,-145,-267,-277},{-331,-267,-333,-277,-152,-247},{-331,-287,-186,-174,-135,-125},{-154,-162,-341,-348,-358,-338},{-216,-208,-240,-228,-132,-235},{-220,-272,-338,-152,-247,-328},{-294,-157,-350,-338,-235,-145}},{{-331,-149,-304,-363,-252,-169},{-309,-331,-257,-326,-309,-365},{-250,-194,-341,-365,-213,-341},{-135,-343,-220,-365,-292,-358},{-309,-355,-365,-336,-238,-196},{-189,-145,-235,-274,-262,-326},{-137,-223,-277,-125,-147,-279},{-220,-159,-262,-257,-125,-147},{-257,-140,-250,-355,-142,-240},{-154,-154,-328,-157,-194,-240},{-140,-189,-255,-125,-140,-331},{-149,-358,-309,-189,-154,-164},{-318,-326,-360,-358,-252,-238},{-191,-328,-365,-318,-272,-252},{-184,-363,-240,-172,-262,-272},{-341,-228,-243,-331,-338,-353},{-125,-203,-174,-331,-211,-257},{-145,-137,-360,-326,-235,-270},{-309,-208,-169,-255,-127,-343},{-272,-181,-196,-311,-277,-316}}},{{{-176,-203,-240,-236,-217,-146},{-146,-196,-268,-199,-157,-307},{-203,-328,-116,-233,-252,-219},{-277,-134,-222,-307,-319,-307},{-342,-249,-229,-182,-166,-333},{-148,-247,-252,-243,-296,-176},{-275,-155,-323,-303,-231,-187},{-166,-314,-323,-243,-224,-243},{-270,-307,-273,-169,-252,-171},{-157,-178,-330,-300,-159,-208},{-268,-249,-143,-194,-284,-243},{-189,-261,-340,-337,-208,-256},{-173,-159,-346,-261,-330,-185},{-333,-293,-333,-291,-273,-238},{-307,-132,-342,-233,-238,-217},{-199,-346,-176,-240,-296,-231},{-312,-342,-139,-199,-280,-261},{-312,-303,-333,-310,-143,-146},{-263,-132,-233,-326,-266,-150},{-312,-148,-340,-176,-337,-305}},{{-166,-303,-122,-146,-187,-176},{-229,-307,-229,-155,-310,-196},{-316,-277,-120,-282,-146,-152},{-217,-139,-303,-176,-134,-319},{-261,-206,-127,-182,-180,-300},{-344,-166,-259,-335,-215,-226},{-337,-141,-344,-310,-171,-344},{-208,-333,-187,-266,-141,-182},{-256,-243,-284,-328,-312,-155},{-286,-194,-326,-199,-231,-120},{-240,-252,-180,-215,-337,-192},{-199,-132,-152,-201,-245,-176},{-127,-182,-187,-159,-187,-219},{-155,-330,-194,-173,-233,-254},{-159,-194,-139,-155,-305,-284},{-143,-176,-247,-321,-208,-330},{-157,-166,-217,-122,-261,-210},{-139,-150,-256,-263,-247,-182},{-185,-192,-243,-136,-245,-252},{-247,-319,-254,-266,-187,-116}},{{-233,-157,-266,-139,-293,-305},{-291,-307,-146,-116,-326,-314},{-146,-275,-270,-208,-134,-293},{-118,-286,-164,-155,-203,-340},{-321,-289,-132,-143,-219,-247},{-226,-139,-273,-222,-296,-252},{-127,-245,-171,-176,-259,-122},{-196,-305,-328,-169,-277,-310},{-300,-323,-146,-293,-266,-300},{-277,-122,-243,-208,-303,-120},{-282,-189,-312,-159,-229,-196},{-146,-129,-215,-143,-259,-236},{-196,-319,-173,-224,-171,-312},{-217,-213,-303,-310,-159,-164},{-291,-275,-224,-231,-340,-213},{-189,-148,-337,-171,-146,-219},{-243,-118,-178,-298,-280,-316},{-199,-215,-120,-157,-323,-217},{-152,-176,-321,-162,-275,-280},{-159,-150,-314,-178,-136,-291}}},{{{-368,-403,-423,-165,-165,-176},{-282,-382,-309,-429,-350,-259},{-282,-347,-235,-185,-291,-259},{-191,-435,-259,-203,-282,-376},{-285,-209,-235,-335,-370,-397},{-156,-282,-176,-238,-306,-376},{-153,-306,-232,-432,-173,-441},{-312,-173,-341,-323,-406,-162},{-300,-279,-347,-403,-162,-406},{-350,-150,-153,-347,-397,-341},{-323,-385,-250,-244,-238,-338},{-173,-147,-291,-397,-256,-162},{-297,-226,-273,-315,-432,-368},{-365,-191,-176,-359,-188,-420},{-356,-212,-282,-282,-359,-332},{-250,-200,-332,-238,-294,-429},{-397,-297,-332,-332,-394,-394},{-259,-218,-326,-297,-376,-391},{-365,-223,-259,-391,-303,-188},{-273,-344,-306,-326,-185,-156}},{{-379,-268,-220,-297,-297,-273},{-441,-273,-265,-353,-265,-362},{-309,-168,-197,-388,-191,-288},{-400,-435,-306,-212,-359,-212},{-185,-318,-353,-406,-232,-185},{-341,-197,-341,-400,-397,-417},{-241,-323,-215,-417,-376,-250},{-259,-332,-197,-306,-318,-341},{-265,-315,-344,-273,-173,-300},{-171,-247,-185,-241,-400,-288},{-420,-273,-312,-368,-341,-185},{-153,-406,-294,-353,-285,-362},{-397,-294,-394,-265,-282,-356},{-147,-441,-276,-156,-300,-353},{-209,-265,-391,-323,-353,-382},{-215,-282,-412,-168,-400,-215},{-365,-270,-350,-162,-182,-188},{-259,-432,-320,-279,-429,-288},{-362,-241,-412,-226,-218,-220},{-341,-156,-294,-426,-250,-288}},{{-147,-194,-312,-241,-238,-209},{-326,-226,-253,-185,-429,-197},{-365,-382,-265,-253,-406,-362},{-247,-238,-368,-382,-200,-344},{-429,-238,-406,-268,-159,-341},{-429,-350,-294,-147,-256,-382},{-394,-185,-188,-185,-394,-153},{-179,-409,-285,-238,-303,-303},{-326,-285,-150,-432,-318,-297},{-168,-300,-282,-285,-212,-223},{-403,-268,-353,-423,-429,-171},{-171,-312,-385,-147,-209,-406},{-268,-220,-273,-438,-394,-279},{-388,-379,-185,-309,-423,-206},{-370,-206,-270,-165,-276,-256},{-185,-303,-403,-376,-200,-417},{-318,-403,-365,-291,-262,-176},{-147,-373,-226,-365,-200,-438},{-294,-159,-300,-229,-191,-250},{-270,-335,-415,-273,-329,-432}}}}; // 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]={6,4,2,7,3,3,7,3,2,7,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,5,3,8,4,3,8,4,3,8,5,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,4,3,7,4,3}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5},{6,7,8,9},{10,11},{12,13,14,15,16,17,18},{19,20,21},{22,23,24},{25,26,27,28,29,30,31},{32,33,34},{35,36},{37,38,39,40,41,42,43},{44,45,46,47},{48,49,50},{51,52,53,54,55,56,57},{58,59,60,61},{62,63,64},{65,66,67,68,69,70,71,72},{73,74,75,76},{77,78,79},{80,81,82,83,84,85,86},{87,88,89,90},{91,92,93},{94,95,96,97,98,99,100,101},{102,103,104,105},{106,107,108},{109,110,111,112,113,114,115,116},{117,118,119,120},{121,122,123},{124,125,126,127,128,129,130,131},{132,133,134,135},{136,137,138},{139,140,141,142,143,144,145,146},{147,148,149,150},{151,152,153},{154,155,156,157,158,159,160,161},{162,163,164,165},{166,167,168},{169,170,171,172,173,174,175,176,177},{178,179,180,181,182},{183,184,185},{186,187,188,189,190,191,192,193},{194,195,196,197},{198,199,200},{201,202,203,204,205,206,207,208},{209,210,211,212},{213,214,215},{216,217,218,219,220,221,222,223},{224,225,226,227,228},{229,230,231},{232,233,234,235,236,237,238,239},{240,241,242,243},{244,245,246},{247,248,249,250,251,252,253,254},{255,256,257,258},{259,260,261},{262,263,264,265,266,267,268,269},{270,271,272,273},{274,275,276},{277,278,279,280,281,282,283},{284,285,286,287},{288,289,290},{291,292,293,294,295,296,297,298},{299,300,301,302},{303,304,305},{306,307,308,309,310,311,312},{313,314,315,316},{317,318,319},{320,321,322,323,324,325,326,327},{328,329,330,331},{332,333,334},{335,336,337,338,339,340,341},{342,343,344,345},{346,347,348}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,0,4,8,12,2,8,0,2,4,6,8,10,12,1,5,9,0,6,12,0,2,4,6,8,10,12,1,5,9,1,7,2,4,6,8,10,12,14,1,5,9,13,0,6,12,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,0,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,16,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,0,6,12,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,2,8,14,1,3,5,7,9,11,13,0,4,8,12,1,7,13,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,1,5,9,13,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,5,9,13,17,7,13,5,7,9,11,13,15,17,6,10,14,5,11,17,5,7,9,11,13,15,17,6,10,14,6,12,5,7,9,11,13,15,17,4,8,12,16,3,9,15,5,7,9,11,13,15,17,5,9,13,17,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,4,8,12,16,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,1,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,4,10,16,4,6,8,10,12,14,16,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,4,6,8,10,12,14,16,4,8,12,16,5,11,17}; // set of end times of each shipment 
