int Dev = 30;// 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 = 343;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 8;//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]={{{{11607,0,0,0,0,0},{10666,0,0,0,0,0},{11435,0,0,0,0,0},{11020,0,0,0,0,0},{10989,0,0,0,0,0},{11146,0,0,0,0,0},{11433,0,0,0,0,0},{10934,0,0,0,0,0},{10994,0,0,0,0,0},{11438,0,0,0,0,0},{10855,0,0,0,0,0},{10969,0,0,0,0,0},{10891,0,0,0,0,0},{10889,0,0,0,0,0},{11247,0,0,0,0,0},{11088,0,0,0,0,0},{10912,0,0,0,0,0},{11384,0,0,0,0,0},{11524,0,0,0,0,0},{10879,0,0,0,0,0}},{{10961,0,0,0,0,0},{11419,0,0,0,0,0},{10692,0,0,0,0,0},{10704,0,0,0,0,0},{11163,0,0,0,0,0},{11132,0,0,0,0,0},{11009,0,0,0,0,0},{11054,0,0,0,0,0},{11123,0,0,0,0,0},{10907,0,0,0,0,0},{11088,0,0,0,0,0},{11123,0,0,0,0,0},{11466,0,0,0,0,0},{10661,0,0,0,0,0},{10644,0,0,0,0,0},{11004,0,0,0,0,0},{11148,0,0,0,0,0},{10883,0,0,0,0,0},{10177,0,0,0,0,0},{10982,0,0,0,0,0}},{{11027,0,0,0,0,0},{10818,0,0,0,0,0},{10888,0,0,0,0,0},{11213,0,0,0,0,0},{10669,0,0,0,0,0},{10903,0,0,0,0,0},{10714,0,0,0,0,0},{10767,0,0,0,0,0},{11447,0,0,0,0,0},{10958,0,0,0,0,0},{10830,0,0,0,0,0},{11250,0,0,0,0,0},{11126,0,0,0,0,0},{11108,0,0,0,0,0},{11142,0,0,0,0,0},{11045,0,0,0,0,0},{11175,0,0,0,0,0},{10820,0,0,0,0,0},{11054,0,0,0,0,0},{11387,0,0,0,0,0}}},{{{-287,-258,-231,-251,-166,-168},{-157,-213,-202,-278,-184,-264},{-181,-258,-228,-289,-258,-240},{-202,-267,-206,-289,-217,-287},{-231,-282,-217,-166,-224,-204},{-215,-264,-240,-161,-271,-195},{-271,-208,-264,-199,-242,-220},{-244,-159,-264,-267,-213,-166},{-213,-240,-190,-233,-237,-211},{-204,-253,-251,-217,-249,-233},{-193,-195,-235,-179,-273,-168},{-278,-231,-280,-202,-164,-157},{-264,-184,-267,-164,-287,-197},{-161,-271,-170,-179,-190,-211},{-215,-195,-208,-260,-186,-177},{-199,-179,-228,-220,-184,-172},{-280,-235,-204,-220,-170,-249},{-244,-226,-208,-278,-213,-164},{-278,-175,-228,-186,-224,-235},{-188,-170,-204,-164,-164,-215}},{{-242,-204,-161,-186,-235,-177},{-220,-282,-224,-199,-208,-170},{-202,-184,-231,-181,-186,-246},{-246,-161,-197,-204,-195,-172},{-253,-164,-244,-249,-273,-224},{-190,-287,-199,-204,-269,-280},{-242,-273,-168,-170,-291,-157},{-166,-184,-264,-224,-260,-184},{-197,-188,-220,-226,-240,-168},{-233,-177,-258,-231,-240,-260},{-278,-179,-253,-251,-213,-166},{-172,-242,-231,-184,-262,-199},{-224,-269,-202,-231,-208,-246},{-224,-159,-255,-181,-206,-159},{-168,-244,-220,-181,-204,-213},{-287,-240,-157,-175,-267,-284},{-168,-213,-287,-242,-231,-244},{-188,-264,-186,-264,-267,-217},{-242,-168,-284,-249,-199,-177},{-211,-217,-237,-289,-204,-271}},{{-222,-244,-264,-220,-190,-271},{-197,-273,-190,-179,-175,-184},{-224,-190,-255,-164,-175,-206},{-220,-188,-168,-159,-249,-246},{-164,-204,-237,-271,-195,-226},{-231,-222,-193,-291,-199,-224},{-280,-284,-157,-253,-164,-188},{-159,-226,-179,-249,-208,-164},{-164,-186,-228,-244,-175,-280},{-240,-233,-195,-168,-255,-267},{-244,-224,-240,-197,-284,-224},{-284,-186,-267,-246,-172,-287},{-213,-188,-242,-211,-271,-164},{-242,-204,-237,-224,-271,-276},{-217,-269,-206,-184,-282,-237},{-202,-253,-175,-289,-159,-240},{-195,-246,-179,-282,-240,-255},{-184,-289,-208,-253,-262,-193},{-255,-204,-161,-206,-172,-208},{-159,-251,-280,-224,-253,-278}}},{{{-228,-195,-248,-307,-207,-224},{-264,-176,-181,-307,-186,-283},{-255,-286,-259,-205,-283,-193},{-283,-290,-267,-183,-178,-302},{-186,-257,-307,-228,-219,-169},{-214,-293,-238,-259,-300,-286},{-217,-228,-298,-233,-274,-202},{-305,-169,-231,-226,-193,-243},{-281,-221,-207,-257,-250,-252},{-214,-188,-188,-281,-293,-176},{-248,-214,-238,-181,-305,-198},{-221,-236,-238,-169,-290,-190},{-188,-183,-226,-226,-231,-174},{-243,-255,-293,-178,-267,-257},{-207,-212,-278,-240,-300,-298},{-305,-295,-298,-226,-169,-195},{-186,-300,-283,-259,-298,-186},{-205,-209,-298,-240,-309,-181},{-305,-255,-274,-236,-224,-276},{-278,-248,-298,-188,-295,-250}},{{-309,-255,-271,-200,-169,-167},{-205,-278,-190,-298,-252,-309},{-236,-228,-281,-186,-243,-259},{-281,-274,-259,-243,-298,-178},{-186,-181,-207,-174,-202,-295},{-293,-309,-305,-240,-221,-307},{-214,-202,-245,-269,-212,-178},{-238,-183,-255,-212,-186,-257},{-209,-217,-298,-202,-262,-193},{-205,-264,-252,-207,-252,-171},{-207,-283,-174,-171,-288,-278},{-217,-278,-278,-178,-181,-274},{-207,-302,-178,-307,-190,-228},{-176,-219,-226,-283,-255,-190},{-293,-169,-248,-257,-309,-217},{-290,-295,-169,-169,-217,-259},{-302,-259,-190,-288,-214,-278},{-186,-245,-262,-293,-193,-231},{-171,-171,-198,-214,-302,-178},{-295,-250,-209,-309,-167,-193}},{{-190,-178,-286,-219,-174,-300},{-207,-243,-274,-190,-169,-183},{-219,-176,-183,-262,-224,-217},{-259,-278,-252,-240,-288,-288},{-224,-233,-226,-307,-186,-295},{-307,-264,-174,-198,-248,-238},{-307,-245,-305,-236,-224,-309},{-293,-295,-240,-219,-174,-207},{-309,-309,-186,-271,-271,-267},{-245,-200,-231,-248,-236,-171},{-193,-255,-209,-307,-274,-174},{-243,-290,-293,-221,-219,-309},{-231,-200,-183,-228,-267,-293},{-262,-212,-169,-186,-188,-267},{-309,-200,-257,-259,-293,-233},{-276,-307,-300,-169,-183,-198},{-267,-226,-238,-305,-278,-278},{-186,-286,-264,-169,-202,-302},{-228,-300,-174,-264,-295,-245},{-224,-233,-264,-212,-300,-293}}},{{{-254,-306,-287,-311,-259,-213},{-232,-339,-221,-259,-243,-221},{-308,-311,-344,-205,-300,-248},{-328,-191,-248,-191,-276,-347},{-235,-205,-254,-325,-344,-259},{-254,-284,-303,-322,-278,-270},{-207,-213,-352,-352,-227,-243},{-270,-287,-194,-259,-265,-328},{-322,-308,-199,-317,-265,-339},{-330,-262,-194,-289,-339,-328},{-344,-319,-207,-295,-268,-344},{-257,-278,-216,-224,-349,-199},{-227,-254,-322,-191,-325,-268},{-281,-347,-281,-349,-314,-202},{-197,-229,-330,-322,-349,-295},{-328,-276,-251,-202,-194,-259},{-278,-194,-270,-232,-273,-308},{-246,-270,-292,-352,-251,-352},{-232,-281,-273,-240,-251,-325},{-295,-308,-276,-319,-257,-259}},{{-221,-216,-273,-265,-306,-205},{-273,-314,-322,-240,-276,-254},{-303,-199,-317,-355,-303,-319},{-276,-216,-339,-235,-205,-308},{-213,-306,-284,-303,-300,-232},{-238,-311,-199,-235,-207,-238},{-352,-224,-265,-262,-221,-270},{-281,-224,-202,-336,-311,-300},{-336,-306,-216,-355,-213,-314},{-287,-221,-300,-265,-336,-202},{-246,-248,-322,-229,-292,-330},{-254,-352,-213,-259,-235,-229},{-355,-205,-251,-344,-330,-251},{-238,-322,-336,-197,-347,-218},{-289,-238,-235,-341,-308,-311},{-311,-328,-325,-319,-300,-268},{-276,-295,-232,-210,-235,-273},{-341,-262,-254,-257,-194,-262},{-257,-194,-251,-317,-314,-197},{-325,-270,-238,-319,-229,-221}},{{-257,-235,-276,-191,-262,-227},{-317,-336,-352,-229,-292,-273},{-276,-355,-330,-347,-276,-303},{-336,-319,-328,-232,-300,-344},{-227,-347,-232,-270,-210,-238},{-339,-314,-295,-259,-336,-240},{-262,-221,-246,-235,-229,-298},{-248,-278,-216,-284,-268,-213},{-298,-344,-292,-197,-221,-257},{-347,-191,-314,-227,-276,-276},{-227,-276,-259,-311,-295,-347},{-197,-330,-202,-199,-322,-221},{-317,-235,-311,-295,-232,-278},{-308,-257,-314,-295,-207,-259},{-273,-284,-287,-339,-238,-265},{-287,-347,-213,-330,-336,-306},{-322,-281,-202,-216,-287,-194},{-268,-251,-246,-202,-197,-254},{-292,-292,-240,-227,-292,-265},{-347,-298,-232,-322,-308,-295}}},{{{-156,-183,-188,-172,-128,-143},{-162,-169,-191,-179,-163,-174},{-157,-163,-136,-139,-176,-179},{-191,-139,-116,-156,-166,-117},{-179,-122,-131,-152,-166,-156},{-169,-186,-174,-137,-186,-119},{-166,-176,-182,-146,-152,-154},{-171,-166,-166,-171,-146,-152},{-200,-149,-154,-179,-132,-196},{-186,-134,-128,-182,-159,-191},{-186,-116,-143,-154,-137,-152},{-120,-160,-157,-128,-143,-134},{-191,-200,-146,-116,-200,-116},{-114,-129,-108,-149,-171,-163},{-156,-142,-200,-116,-168,-129},{-142,-169,-174,-172,-112,-137},{-137,-162,-119,-136,-189,-137},{-142,-131,-186,-125,-199,-136},{-117,-172,-183,-112,-162,-112},{-109,-151,-154,-112,-139,-117}},{{-132,-194,-185,-176,-148,-152},{-169,-139,-131,-182,-152,-194},{-166,-191,-111,-136,-165,-145},{-169,-136,-137,-154,-132,-151},{-131,-123,-162,-136,-151,-197},{-131,-142,-168,-156,-126,-123},{-149,-192,-197,-166,-194,-200},{-171,-157,-139,-185,-148,-189},{-128,-196,-192,-143,-149,-142},{-194,-168,-128,-197,-194,-176},{-140,-132,-139,-162,-185,-196},{-189,-168,-151,-154,-151,-129},{-160,-142,-142,-151,-166,-163},{-119,-108,-120,-142,-120,-122},{-112,-172,-140,-132,-162,-134},{-176,-176,-176,-132,-109,-137},{-112,-108,-131,-165,-157,-160},{-145,-116,-140,-160,-191,-149},{-125,-122,-125,-182,-132,-122},{-166,-134,-194,-148,-182,-132}},{{-116,-149,-140,-146,-151,-120},{-171,-152,-188,-136,-169,-132},{-186,-157,-166,-154,-179,-129},{-194,-162,-137,-165,-116,-169},{-169,-179,-134,-145,-136,-197},{-108,-128,-134,-169,-125,-120},{-128,-197,-157,-111,-145,-152},{-148,-156,-162,-148,-136,-200},{-156,-189,-171,-174,-157,-200},{-145,-134,-145,-196,-152,-148},{-169,-126,-109,-120,-123,-186},{-154,-159,-146,-179,-176,-168},{-157,-114,-159,-174,-176,-152},{-125,-169,-168,-148,-148,-188},{-117,-192,-140,-125,-139,-166},{-163,-183,-139,-143,-117,-129},{-134,-154,-172,-176,-148,-151},{-154,-182,-134,-174,-168,-136},{-140,-159,-188,-179,-191,-148},{-142,-199,-125,-191,-162,-166}}},{{{-131,-231,-207,-131,-202,-158},{-195,-158,-187,-177,-229,-178},{-215,-206,-213,-231,-155,-228},{-177,-177,-146,-222,-226,-180},{-220,-224,-153,-155,-162,-224},{-177,-155,-177,-235,-169,-180},{-136,-189,-207,-167,-218,-158},{-162,-189,-193,-151,-204,-182},{-224,-153,-229,-164,-177,-206},{-222,-217,-237,-178,-211,-167},{-171,-164,-173,-182,-217,-191},{-127,-235,-133,-233,-155,-218},{-237,-131,-220,-153,-167,-160},{-147,-138,-151,-140,-222,-136},{-177,-135,-157,-173,-184,-153},{-206,-224,-162,-204,-184,-164},{-162,-229,-187,-149,-135,-178},{-178,-207,-237,-200,-149,-144},{-189,-237,-202,-218,-131,-129},{-184,-127,-177,-133,-129,-202}},{{-151,-207,-198,-153,-215,-206},{-235,-127,-129,-207,-224,-197},{-217,-147,-200,-207,-186,-129},{-144,-184,-144,-144,-162,-233},{-164,-189,-193,-191,-175,-211},{-202,-160,-140,-184,-160,-202},{-215,-195,-233,-193,-197,-180},{-151,-129,-209,-198,-198,-144},{-187,-158,-233,-175,-157,-218},{-177,-218,-151,-167,-189,-177},{-189,-237,-235,-136,-175,-187},{-169,-224,-235,-131,-195,-229},{-202,-191,-175,-222,-184,-228},{-211,-171,-138,-235,-213,-231},{-167,-162,-157,-187,-160,-187},{-158,-222,-209,-197,-178,-167},{-158,-127,-229,-193,-207,-186},{-195,-215,-197,-129,-131,-222},{-136,-142,-158,-222,-135,-164},{-228,-140,-213,-182,-204,-226}},{{-224,-233,-229,-222,-149,-184},{-217,-193,-158,-166,-164,-213},{-229,-198,-153,-140,-131,-171},{-206,-144,-173,-178,-197,-169},{-167,-186,-146,-186,-187,-158},{-213,-218,-197,-135,-235,-135},{-151,-233,-218,-151,-138,-198},{-151,-209,-164,-177,-151,-149},{-149,-153,-184,-171,-177,-200},{-220,-133,-182,-144,-195,-182},{-158,-182,-169,-193,-129,-189},{-171,-166,-202,-136,-162,-202},{-147,-218,-140,-140,-231,-206},{-228,-127,-209,-217,-166,-206},{-144,-233,-206,-180,-217,-207},{-200,-136,-158,-138,-184,-215},{-228,-157,-135,-237,-204,-171},{-151,-224,-202,-178,-175,-171},{-228,-213,-133,-160,-182,-229},{-142,-175,-209,-197,-140,-229}}},{{{-279,-294,-228,-247,-296,-240},{-245,-172,-230,-213,-279,-220},{-316,-247,-262,-301,-228,-198},{-296,-233,-245,-189,-247,-201},{-252,-260,-292,-211,-311,-311},{-287,-296,-274,-176,-230,-211},{-233,-314,-314,-191,-194,-311},{-247,-252,-218,-228,-201,-218},{-191,-220,-306,-260,-213,-277},{-179,-233,-274,-274,-287,-309},{-220,-311,-265,-203,-304,-186},{-282,-184,-174,-318,-314,-296},{-316,-189,-274,-301,-172,-279},{-274,-176,-247,-218,-203,-309},{-257,-314,-260,-208,-238,-282},{-247,-228,-250,-196,-257,-299},{-301,-201,-238,-250,-292,-179},{-272,-277,-238,-306,-270,-211},{-294,-296,-296,-230,-282,-174},{-284,-292,-230,-287,-181,-267}},{{-172,-277,-314,-233,-240,-296},{-274,-284,-314,-228,-230,-174},{-240,-296,-235,-191,-189,-223},{-277,-220,-311,-208,-216,-270},{-247,-250,-228,-203,-277,-301},{-265,-223,-292,-247,-265,-216},{-216,-179,-270,-198,-287,-172},{-274,-225,-294,-233,-179,-316},{-316,-213,-238,-233,-243,-282},{-304,-309,-172,-220,-270,-172},{-272,-179,-296,-250,-279,-235},{-284,-274,-284,-176,-284,-289},{-179,-260,-230,-270,-225,-296},{-309,-174,-304,-203,-225,-223},{-184,-179,-201,-301,-296,-287},{-196,-301,-172,-220,-301,-186},{-243,-292,-206,-179,-265,-306},{-311,-304,-299,-262,-296,-176},{-194,-277,-216,-174,-294,-223},{-316,-203,-203,-191,-279,-292}},{{-257,-255,-196,-292,-189,-235},{-196,-223,-306,-314,-301,-174},{-228,-184,-176,-314,-279,-238},{-223,-196,-196,-284,-287,-287},{-179,-289,-179,-201,-179,-201},{-191,-213,-194,-284,-274,-277},{-208,-314,-201,-311,-194,-270},{-255,-318,-279,-270,-206,-243},{-220,-306,-230,-296,-314,-203},{-301,-299,-318,-257,-194,-179},{-206,-194,-208,-203,-262,-203},{-267,-292,-318,-213,-203,-301},{-245,-228,-314,-225,-201,-289},{-218,-228,-304,-189,-279,-194},{-314,-235,-181,-186,-255,-240},{-279,-206,-282,-314,-240,-250},{-289,-306,-252,-247,-218,-191},{-245,-277,-196,-172,-309,-277},{-211,-172,-208,-211,-272,-279},{-262,-220,-235,-208,-191,-213}}},{{{-266,-263,-266,-282,-252,-291},{-164,-270,-298,-164,-215,-164},{-284,-166,-176,-178,-213,-169},{-199,-187,-203,-247,-286,-240},{-238,-291,-203,-199,-263,-273},{-192,-169,-268,-273,-166,-194},{-224,-296,-178,-300,-282,-208},{-231,-189,-166,-240,-293,-245},{-178,-238,-176,-176,-166,-291},{-169,-252,-180,-208,-256,-275},{-298,-173,-176,-162,-176,-194},{-298,-254,-300,-293,-187,-300},{-173,-256,-164,-217,-261,-289},{-182,-256,-289,-289,-162,-300},{-282,-296,-194,-166,-268,-238},{-277,-289,-176,-210,-286,-222},{-263,-203,-169,-252,-249,-206},{-275,-178,-233,-259,-261,-254},{-284,-280,-201,-261,-268,-219},{-249,-231,-185,-231,-282,-245}},{{-254,-270,-206,-210,-293,-229},{-182,-219,-296,-268,-277,-185},{-233,-289,-213,-261,-231,-215},{-206,-192,-249,-273,-245,-185},{-210,-254,-293,-224,-268,-219},{-277,-192,-185,-268,-208,-213},{-192,-238,-277,-208,-196,-199},{-238,-224,-222,-236,-293,-298},{-240,-199,-298,-182,-203,-224},{-277,-245,-213,-178,-176,-219},{-189,-233,-206,-201,-169,-296},{-224,-277,-243,-192,-277,-206},{-270,-270,-298,-189,-291,-300},{-233,-277,-249,-171,-203,-226},{-226,-231,-196,-206,-182,-263},{-293,-199,-196,-180,-210,-268},{-194,-291,-261,-261,-273,-201},{-280,-162,-282,-224,-243,-247},{-277,-254,-187,-201,-173,-229},{-180,-219,-187,-173,-259,-270}},{{-185,-219,-254,-280,-298,-201},{-164,-261,-185,-185,-166,-263},{-203,-173,-215,-187,-217,-293},{-203,-259,-243,-185,-173,-213},{-291,-249,-259,-166,-171,-261},{-224,-231,-162,-164,-249,-178},{-162,-224,-164,-243,-166,-286},{-164,-231,-261,-213,-266,-291},{-296,-176,-252,-266,-217,-270},{-268,-162,-231,-185,-169,-247},{-203,-268,-215,-164,-256,-162},{-203,-171,-210,-282,-201,-284},{-268,-245,-217,-180,-210,-164},{-249,-282,-189,-296,-210,-268},{-215,-189,-180,-226,-243,-196},{-199,-182,-296,-256,-217,-238},{-291,-300,-185,-196,-213,-192},{-219,-182,-196,-162,-196,-236},{-224,-217,-189,-215,-266,-277},{-266,-236,-247,-268,-259,-233}}},{{{-318,-373,-294,-353,-262,-373},{-270,-232,-359,-229,-350,-220},{-223,-329,-244,-332,-347,-373},{-235,-350,-268,-232,-365,-232},{-291,-229,-318,-212,-241,-238},{-212,-270,-288,-368,-335,-226},{-273,-370,-206,-329,-356,-353},{-365,-226,-312,-338,-326,-303},{-270,-206,-318,-297,-291,-215},{-300,-235,-241,-365,-365,-335},{-220,-362,-262,-268,-376,-309},{-206,-297,-297,-312,-288,-247},{-288,-356,-238,-303,-285,-315},{-256,-379,-276,-312,-332,-212},{-318,-268,-253,-326,-362,-329},{-362,-323,-368,-218,-303,-347},{-344,-262,-273,-270,-297,-318},{-232,-285,-285,-303,-379,-294},{-350,-373,-368,-262,-265,-359},{-309,-229,-353,-270,-297,-347}},{{-241,-294,-356,-215,-344,-338},{-215,-368,-353,-223,-350,-379},{-250,-270,-209,-244,-209,-235},{-226,-320,-368,-223,-256,-282},{-338,-368,-253,-335,-312,-270},{-379,-323,-241,-282,-262,-368},{-288,-320,-297,-344,-370,-232},{-359,-276,-215,-285,-270,-332},{-250,-282,-288,-368,-350,-276},{-259,-273,-232,-282,-306,-303},{-362,-215,-382,-250,-335,-218},{-241,-303,-379,-215,-300,-312},{-329,-218,-359,-270,-279,-279},{-303,-303,-273,-382,-235,-247},{-238,-270,-294,-282,-276,-215},{-220,-309,-215,-268,-353,-220},{-273,-332,-306,-259,-268,-368},{-235,-209,-370,-206,-206,-215},{-218,-250,-209,-347,-350,-256},{-250,-276,-226,-241,-338,-276}},{{-362,-279,-282,-318,-300,-356},{-265,-300,-300,-279,-238,-376},{-318,-306,-276,-309,-250,-347},{-315,-270,-241,-332,-223,-379},{-226,-373,-373,-285,-279,-226},{-370,-250,-262,-365,-276,-250},{-256,-238,-226,-218,-232,-379},{-218,-270,-276,-256,-347,-332},{-365,-341,-297,-253,-359,-206},{-359,-250,-332,-347,-282,-282},{-270,-347,-379,-273,-365,-259},{-318,-326,-285,-253,-370,-244},{-347,-376,-332,-368,-285,-259},{-220,-288,-335,-206,-306,-370},{-288,-259,-379,-332,-253,-273},{-250,-370,-250,-273,-259,-209},{-285,-350,-220,-294,-323,-265},{-232,-297,-365,-259,-362,-373},{-244,-288,-350,-332,-379,-250},{-297,-256,-288,-279,-341,-238}}}}; // 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]={7,3,2,6,3,2,6,4,2,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,5,3,8,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,7,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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,1,5,9,2,8,1,3,5,7,9,11,1,5,9,1,7,1,3,5,7,9,11,0,4,8,12,1,7,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,0,4,8,12,0,6,12,1,3,5,7,9,11,13,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,2,4,6,8,10,12,14,1,5,9,13,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,0,4,8,12,16,0,6,12,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,2,4,6,8,10,12,14,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,1,5,9,13,1,7,13,1,3,5,7,9,11,13,2,6,10,14,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,6,10,14,7,13,6,8,10,12,14,16,6,10,14,6,12,6,8,10,12,14,16,5,9,13,17,6,12,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,3,7,11,15,3,9,15,4,6,8,10,12,14,16,4,8,12,16,4,10,16,2,4,6,8,10,12,14,16,3,7,11,15,4,10,16,2,4,6,8,10,12,14,16,4,8,12,16,2,8,14,4,6,8,10,12,14,16,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,4,6,8,10,12,14,16,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,5,7,9,11,13,15,17,4,8,12,16,3,9,15,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,5,9,13,17,4,10,16}; // set of end times of each shipment 
