int Dev = 20;// 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 = 347;//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]={{{{10932,0,0,0,0,0},{11140,0,0,0,0,0},{11039,0,0,0,0,0},{10871,0,0,0,0,0},{11245,0,0,0,0,0},{11370,0,0,0,0,0},{11419,0,0,0,0,0},{11082,0,0,0,0,0},{10880,0,0,0,0,0},{10865,0,0,0,0,0},{11156,0,0,0,0,0},{11054,0,0,0,0,0},{11312,0,0,0,0,0},{11076,0,0,0,0,0},{11211,0,0,0,0,0},{11143,0,0,0,0,0},{11035,0,0,0,0,0},{10924,0,0,0,0,0},{11132,0,0,0,0,0},{11100,0,0,0,0,0}},{{11100,0,0,0,0,0},{11185,0,0,0,0,0},{11066,0,0,0,0,0},{11185,0,0,0,0,0},{11075,0,0,0,0,0},{11387,0,0,0,0,0},{10976,0,0,0,0,0},{11115,0,0,0,0,0},{11028,0,0,0,0,0},{11146,0,0,0,0,0},{11159,0,0,0,0,0},{11424,0,0,0,0,0},{11140,0,0,0,0,0},{10844,0,0,0,0,0},{11053,0,0,0,0,0},{11047,0,0,0,0,0},{10960,0,0,0,0,0},{11024,0,0,0,0,0},{11025,0,0,0,0,0},{10967,0,0,0,0,0}},{{11152,0,0,0,0,0},{11035,0,0,0,0,0},{11193,0,0,0,0,0},{11069,0,0,0,0,0},{10941,0,0,0,0,0},{11275,0,0,0,0,0},{10905,0,0,0,0,0},{10894,0,0,0,0,0},{10599,0,0,0,0,0},{11121,0,0,0,0,0},{10746,0,0,0,0,0},{11213,0,0,0,0,0},{11195,0,0,0,0,0},{11023,0,0,0,0,0},{11282,0,0,0,0,0},{10977,0,0,0,0,0},{11562,0,0,0,0,0},{10976,0,0,0,0,0},{11271,0,0,0,0,0},{11283,0,0,0,0,0}}},{{{-249,-228,-186,-186,-231,-204},{-217,-246,-244,-215,-197,-231},{-193,-215,-267,-193,-181,-246},{-190,-226,-220,-204,-179,-215},{-202,-240,-195,-260,-222,-260},{-233,-231,-228,-237,-253,-246},{-215,-202,-217,-237,-215,-249},{-179,-193,-255,-217,-237,-188},{-211,-237,-190,-264,-202,-228},{-220,-193,-249,-220,-193,-246},{-244,-215,-258,-258,-255,-188},{-260,-262,-202,-215,-206,-244},{-251,-258,-190,-195,-188,-251},{-206,-190,-231,-208,-188,-228},{-224,-253,-215,-244,-220,-269},{-204,-179,-181,-220,-215,-202},{-211,-220,-242,-226,-197,-184},{-255,-231,-246,-224,-246,-199},{-228,-264,-260,-240,-228,-249},{-220,-264,-224,-269,-267,-235}},{{-204,-211,-242,-267,-258,-267},{-269,-240,-224,-242,-253,-197},{-246,-242,-199,-235,-231,-195},{-193,-260,-264,-231,-242,-228},{-197,-246,-251,-240,-249,-264},{-190,-204,-220,-235,-190,-240},{-199,-253,-204,-181,-240,-233},{-215,-235,-193,-262,-202,-264},{-206,-215,-222,-199,-255,-208},{-260,-215,-224,-269,-213,-267},{-231,-264,-213,-199,-193,-249},{-260,-267,-267,-193,-197,-264},{-267,-253,-264,-222,-235,-264},{-179,-226,-267,-202,-235,-226},{-217,-222,-228,-222,-193,-186},{-179,-222,-186,-213,-224,-199},{-260,-202,-226,-202,-206,-197},{-269,-222,-220,-228,-215,-217},{-226,-242,-233,-258,-269,-253},{-226,-253,-202,-258,-197,-220}},{{-217,-237,-184,-195,-206,-206},{-264,-184,-197,-208,-235,-226},{-190,-249,-235,-260,-269,-195},{-195,-197,-220,-246,-264,-215},{-215,-222,-226,-188,-190,-269},{-264,-184,-228,-258,-193,-242},{-184,-197,-186,-208,-249,-264},{-217,-251,-267,-240,-267,-235},{-224,-193,-199,-181,-224,-202},{-199,-211,-269,-233,-260,-228},{-237,-258,-255,-181,-231,-215},{-244,-193,-251,-233,-262,-195},{-228,-258,-206,-217,-193,-246},{-267,-253,-222,-208,-260,-240},{-199,-197,-237,-193,-251,-260},{-195,-269,-246,-184,-208,-237},{-269,-249,-249,-233,-242,-231},{-181,-188,-206,-235,-193,-240},{-226,-267,-197,-179,-253,-179},{-269,-246,-213,-190,-193,-260}}},{{{-276,-224,-224,-274,-278,-276},{-219,-219,-262,-255,-200,-228},{-267,-238,-271,-252,-209,-224},{-212,-193,-271,-240,-209,-190},{-271,-283,-259,-231,-231,-248},{-198,-207,-233,-274,-271,-248},{-259,-190,-207,-281,-217,-240},{-276,-269,-226,-228,-250,-209},{-252,-200,-224,-255,-245,-255},{-200,-214,-252,-245,-219,-243},{-207,-262,-238,-283,-252,-195},{-274,-236,-264,-281,-281,-250},{-269,-238,-264,-269,-238,-226},{-276,-224,-236,-226,-212,-224},{-278,-195,-264,-228,-190,-245},{-274,-198,-264,-278,-276,-257},{-276,-262,-195,-190,-252,-269},{-212,-198,-219,-276,-276,-226},{-276,-221,-212,-267,-264,-207},{-202,-262,-226,-228,-255,-278}},{{-262,-231,-205,-276,-212,-228},{-271,-267,-212,-219,-238,-257},{-198,-255,-219,-259,-212,-214},{-281,-283,-193,-217,-264,-271},{-195,-264,-271,-271,-257,-214},{-248,-198,-283,-286,-219,-264},{-262,-238,-236,-240,-231,-221},{-267,-217,-271,-243,-205,-240},{-195,-236,-252,-236,-233,-267},{-219,-226,-228,-226,-207,-276},{-281,-281,-281,-276,-226,-269},{-214,-257,-193,-250,-231,-248},{-200,-209,-255,-226,-231,-193},{-207,-219,-255,-202,-214,-259},{-278,-195,-281,-231,-257,-255},{-286,-195,-240,-274,-286,-276},{-202,-212,-226,-252,-271,-257},{-224,-202,-202,-264,-205,-257},{-198,-193,-264,-221,-278,-231},{-221,-190,-255,-271,-226,-255}},{{-274,-200,-238,-248,-219,-259},{-205,-226,-252,-250,-231,-195},{-267,-283,-195,-286,-212,-259},{-217,-269,-209,-257,-255,-278},{-276,-257,-233,-283,-226,-207},{-214,-250,-274,-233,-267,-267},{-238,-214,-205,-209,-221,-231},{-245,-231,-195,-245,-248,-200},{-259,-286,-228,-214,-238,-219},{-238,-278,-271,-243,-250,-259},{-209,-267,-252,-255,-190,-238},{-236,-195,-276,-236,-198,-209},{-214,-269,-276,-250,-269,-198},{-212,-245,-231,-257,-274,-207},{-271,-214,-269,-248,-209,-274},{-207,-212,-278,-262,-219,-252},{-281,-278,-224,-269,-224,-262},{-274,-207,-212,-267,-248,-269},{-271,-283,-278,-271,-219,-276},{-274,-195,-267,-245,-202,-236}}},{{{-276,-246,-328,-246,-281,-259},{-317,-243,-317,-322,-243,-248},{-218,-308,-257,-295,-257,-254},{-238,-248,-229,-308,-259,-322},{-218,-317,-251,-248,-314,-289},{-221,-292,-311,-232,-251,-289},{-328,-300,-319,-322,-292,-298},{-254,-262,-319,-284,-308,-270},{-308,-238,-246,-311,-229,-254},{-328,-268,-224,-265,-319,-218},{-328,-276,-232,-303,-265,-232},{-238,-262,-251,-328,-278,-273},{-235,-314,-317,-317,-289,-218},{-311,-289,-268,-281,-314,-262},{-284,-273,-303,-322,-284,-322},{-328,-218,-235,-319,-308,-287},{-270,-240,-289,-328,-322,-248},{-298,-224,-229,-300,-259,-284},{-284,-273,-325,-317,-292,-273},{-268,-257,-246,-232,-262,-287}},{{-281,-278,-227,-284,-317,-235},{-319,-325,-311,-268,-273,-243},{-325,-257,-317,-287,-298,-303},{-281,-298,-273,-278,-251,-300},{-289,-314,-235,-278,-306,-227},{-287,-246,-287,-289,-281,-273},{-248,-254,-262,-248,-229,-243},{-322,-251,-273,-319,-311,-229},{-281,-218,-270,-243,-281,-317},{-314,-306,-238,-308,-218,-268},{-278,-224,-254,-328,-292,-278},{-224,-268,-270,-328,-232,-238},{-328,-300,-276,-317,-276,-284},{-308,-240,-218,-317,-287,-281},{-319,-270,-292,-232,-227,-322},{-257,-232,-221,-328,-268,-278},{-259,-227,-240,-229,-232,-251},{-251,-254,-281,-221,-251,-259},{-243,-278,-268,-278,-254,-221},{-268,-221,-295,-300,-243,-287}},{{-311,-262,-287,-273,-270,-284},{-268,-270,-262,-259,-243,-257},{-254,-227,-224,-265,-319,-232},{-246,-262,-227,-254,-306,-325},{-300,-235,-257,-243,-289,-317},{-273,-251,-254,-319,-311,-308},{-295,-273,-257,-229,-254,-317},{-276,-251,-287,-246,-246,-221},{-218,-221,-325,-262,-240,-325},{-287,-259,-221,-311,-229,-311},{-259,-262,-218,-224,-265,-273},{-319,-322,-287,-314,-287,-284},{-273,-273,-232,-319,-238,-311},{-259,-243,-232,-314,-251,-229},{-317,-248,-262,-259,-328,-227},{-227,-317,-257,-265,-248,-317},{-221,-328,-235,-314,-289,-218},{-240,-248,-246,-235,-218,-251},{-248,-303,-254,-281,-303,-221},{-273,-317,-243,-319,-221,-319}}},{{{-137,-125,-143,-128,-156,-148},{-169,-159,-129,-177,-152,-171},{-182,-165,-171,-162,-154,-142},{-171,-177,-179,-159,-131,-176},{-132,-183,-185,-183,-145,-131},{-183,-142,-168,-183,-145,-162},{-140,-182,-159,-143,-123,-140},{-137,-154,-154,-162,-172,-140},{-148,-125,-126,-149,-151,-126},{-159,-136,-169,-151,-134,-136},{-162,-146,-174,-162,-168,-160},{-126,-149,-149,-146,-134,-172},{-165,-166,-176,-152,-143,-151},{-171,-132,-169,-174,-152,-169},{-168,-179,-126,-152,-172,-166},{-136,-182,-123,-142,-185,-174},{-126,-172,-136,-128,-169,-149},{-159,-146,-151,-139,-146,-137},{-123,-163,-139,-126,-149,-151},{-152,-148,-126,-151,-168,-128}},{{-162,-179,-183,-149,-143,-165},{-174,-126,-137,-140,-180,-165},{-139,-134,-131,-132,-172,-169},{-151,-172,-160,-180,-137,-159},{-162,-182,-149,-128,-129,-185},{-139,-148,-151,-166,-143,-163},{-171,-176,-123,-129,-125,-128},{-176,-149,-146,-166,-142,-134},{-168,-172,-169,-180,-143,-171},{-129,-152,-146,-145,-162,-177},{-172,-148,-132,-134,-134,-163},{-139,-156,-152,-180,-182,-145},{-182,-169,-182,-176,-157,-129},{-176,-146,-146,-136,-174,-174},{-151,-136,-126,-176,-149,-148},{-134,-183,-146,-177,-162,-139},{-165,-140,-169,-146,-171,-157},{-128,-137,-174,-166,-152,-148},{-154,-180,-171,-126,-176,-125},{-154,-166,-125,-154,-165,-123}},{{-172,-183,-146,-172,-154,-177},{-174,-143,-157,-160,-145,-140},{-159,-145,-172,-160,-140,-143},{-137,-134,-152,-179,-143,-174},{-159,-129,-142,-183,-129,-165},{-183,-185,-169,-185,-176,-134},{-171,-131,-131,-183,-166,-148},{-132,-137,-162,-166,-146,-123},{-177,-159,-149,-139,-140,-145},{-139,-151,-142,-152,-151,-131},{-128,-166,-168,-151,-123,-160},{-154,-174,-171,-149,-151,-177},{-140,-185,-142,-166,-125,-157},{-136,-123,-182,-134,-152,-134},{-129,-172,-163,-179,-139,-171},{-163,-123,-131,-128,-151,-174},{-165,-179,-179,-125,-140,-128},{-151,-149,-159,-151,-151,-182},{-180,-134,-146,-151,-172,-137},{-125,-163,-166,-182,-140,-185}}},{{{-195,-191,-200,-178,-182,-169},{-180,-173,-195,-200,-147,-198},{-186,-187,-207,-160,-162,-147},{-173,-153,-211,-189,-166,-171},{-162,-166,-189,-149,-217,-204},{-158,-151,-149,-209,-200,-193},{-209,-146,-197,-207,-186,-209},{-177,-191,-164,-193,-149,-147},{-202,-186,-147,-178,-198,-173},{-171,-207,-171,-160,-175,-155},{-173,-169,-173,-182,-164,-155},{-200,-209,-147,-151,-215,-158},{-178,-149,-218,-146,-189,-173},{-191,-198,-209,-158,-149,-186},{-215,-177,-211,-166,-177,-213},{-182,-202,-151,-195,-149,-187},{-155,-197,-147,-178,-204,-158},{-198,-200,-193,-215,-186,-197},{-204,-146,-198,-149,-162,-204},{-169,-204,-164,-180,-215,-202}},{{-186,-153,-173,-178,-175,-206},{-195,-213,-195,-147,-157,-195},{-211,-149,-186,-175,-197,-177},{-193,-178,-184,-202,-160,-153},{-209,-155,-160,-193,-197,-200},{-166,-160,-218,-213,-202,-166},{-147,-217,-189,-177,-191,-211},{-169,-153,-169,-184,-180,-175},{-155,-164,-175,-197,-180,-160},{-157,-202,-164,-213,-197,-167},{-186,-206,-158,-184,-162,-186},{-173,-164,-186,-200,-189,-202},{-187,-167,-153,-169,-191,-160},{-217,-167,-193,-191,-146,-162},{-215,-191,-158,-169,-147,-191},{-180,-153,-209,-193,-153,-175},{-215,-162,-198,-193,-197,-162},{-206,-153,-197,-217,-153,-209},{-164,-213,-209,-147,-211,-184},{-173,-149,-204,-155,-162,-211}},{{-209,-175,-206,-175,-146,-215},{-197,-215,-198,-218,-215,-147},{-147,-218,-215,-213,-198,-184},{-187,-187,-164,-189,-202,-173},{-173,-206,-213,-217,-186,-160},{-182,-213,-187,-191,-171,-189},{-195,-217,-155,-164,-211,-155},{-167,-162,-182,-204,-160,-157},{-177,-184,-166,-158,-155,-198},{-164,-206,-158,-198,-211,-167},{-202,-171,-146,-169,-151,-153},{-155,-167,-213,-171,-211,-160},{-189,-146,-200,-211,-197,-207},{-191,-147,-191,-218,-180,-171},{-213,-167,-206,-209,-157,-189},{-157,-218,-209,-158,-171,-157},{-198,-175,-198,-211,-218,-175},{-204,-202,-162,-184,-217,-191},{-206,-207,-175,-209,-198,-191},{-182,-151,-215,-171,-206,-200}}},{{{-203,-208,-250,-262,-243,-213},{-270,-250,-213,-270,-255,-218},{-206,-277,-225,-294,-284,-250},{-235,-270,-208,-247,-287,-255},{-238,-289,-203,-262,-211,-213},{-292,-277,-235,-225,-260,-252},{-252,-284,-240,-255,-287,-265},{-274,-220,-220,-257,-274,-282},{-216,-225,-294,-235,-267,-262},{-220,-277,-279,-274,-196,-287},{-279,-255,-201,-252,-238,-257},{-220,-198,-213,-284,-196,-228},{-216,-289,-289,-201,-257,-198},{-294,-211,-218,-203,-255,-252},{-216,-265,-257,-265,-223,-240},{-250,-196,-213,-245,-216,-223},{-228,-284,-274,-201,-274,-250},{-230,-220,-274,-233,-213,-228},{-233,-284,-201,-225,-252,-289},{-240,-294,-262,-220,-260,-257}},{{-198,-257,-223,-292,-274,-272},{-277,-225,-218,-213,-198,-287},{-238,-282,-250,-216,-294,-267},{-203,-243,-203,-223,-206,-260},{-203,-208,-252,-287,-213,-211},{-245,-287,-243,-279,-230,-218},{-235,-272,-218,-270,-292,-196},{-216,-225,-228,-260,-235,-272},{-238,-211,-272,-255,-270,-279},{-228,-277,-230,-289,-272,-223},{-216,-289,-279,-270,-223,-272},{-292,-287,-277,-279,-267,-287},{-208,-238,-211,-282,-252,-216},{-208,-233,-260,-211,-255,-284},{-218,-270,-211,-250,-272,-247},{-292,-260,-267,-216,-216,-252},{-225,-267,-240,-225,-208,-267},{-198,-287,-272,-252,-284,-218},{-206,-211,-196,-223,-240,-208},{-206,-218,-274,-252,-228,-213}},{{-267,-257,-218,-240,-211,-218},{-196,-252,-292,-292,-230,-267},{-257,-250,-213,-245,-250,-243},{-265,-267,-216,-245,-240,-282},{-282,-220,-220,-216,-277,-257},{-196,-225,-211,-292,-223,-216},{-255,-220,-265,-262,-250,-270},{-240,-206,-216,-262,-277,-216},{-196,-228,-218,-267,-206,-270},{-274,-243,-274,-208,-294,-252},{-218,-223,-287,-198,-284,-238},{-201,-287,-245,-257,-220,-211},{-213,-265,-287,-243,-206,-250},{-247,-274,-230,-289,-223,-260},{-216,-287,-289,-267,-240,-225},{-228,-223,-233,-238,-255,-277},{-243,-282,-260,-274,-287,-223},{-238,-279,-265,-228,-208,-233},{-225,-294,-287,-213,-201,-196},{-289,-235,-265,-270,-262,-255}}},{{{-187,-233,-273,-256,-219,-268},{-199,-247,-217,-263,-217,-187},{-199,-189,-233,-259,-192,-208},{-226,-222,-256,-249,-224,-254},{-243,-245,-247,-243,-256,-261},{-252,-247,-261,-277,-219,-236},{-196,-203,-275,-185,-192,-243},{-252,-247,-256,-268,-245,-256},{-240,-208,-222,-222,-254,-277},{-208,-219,-192,-273,-254,-266},{-206,-226,-231,-266,-199,-236},{-206,-206,-189,-213,-194,-210},{-243,-201,-224,-247,-252,-245},{-236,-266,-231,-219,-245,-268},{-224,-245,-245,-226,-185,-226},{-231,-252,-247,-254,-247,-270},{-252,-192,-210,-252,-199,-277},{-231,-189,-249,-233,-194,-196},{-249,-217,-238,-206,-243,-187},{-222,-194,-236,-224,-275,-219}},{{-277,-247,-236,-215,-245,-189},{-236,-231,-249,-219,-206,-254},{-194,-189,-236,-222,-277,-243},{-259,-249,-194,-240,-252,-266},{-222,-252,-252,-201,-243,-226},{-259,-249,-259,-233,-233,-213},{-196,-210,-224,-273,-254,-277},{-261,-185,-236,-194,-268,-233},{-263,-263,-275,-219,-192,-224},{-236,-194,-215,-199,-236,-268},{-254,-185,-199,-259,-222,-240},{-270,-224,-187,-215,-268,-245},{-270,-231,-189,-277,-219,-187},{-243,-206,-203,-226,-215,-199},{-256,-203,-256,-194,-268,-187},{-270,-213,-268,-256,-268,-240},{-268,-231,-263,-277,-219,-243},{-249,-194,-231,-201,-263,-268},{-245,-249,-270,-266,-199,-203},{-263,-189,-245,-194,-275,-238}},{{-275,-236,-213,-213,-266,-275},{-217,-275,-233,-233,-231,-194},{-261,-270,-192,-238,-233,-201},{-275,-240,-203,-213,-256,-189},{-219,-249,-277,-224,-219,-203},{-187,-263,-261,-273,-199,-208},{-192,-247,-275,-238,-210,-240},{-219,-231,-268,-275,-236,-236},{-224,-252,-199,-268,-185,-217},{-226,-206,-270,-189,-229,-224},{-199,-185,-270,-199,-252,-194},{-245,-194,-210,-277,-275,-194},{-226,-206,-229,-245,-206,-196},{-243,-236,-185,-254,-254,-189},{-245,-196,-252,-256,-233,-245},{-217,-233,-277,-196,-263,-249},{-222,-256,-270,-268,-243,-201},{-208,-208,-215,-259,-273,-263},{-254,-185,-236,-263,-213,-254},{-185,-210,-266,-275,-219,-254}}},{{{-250,-332,-247,-279,-347,-238},{-276,-347,-315,-291,-288,-344},{-315,-326,-268,-291,-350,-303},{-315,-241,-250,-329,-288,-306},{-256,-268,-332,-323,-320,-250},{-320,-303,-318,-315,-268,-315},{-323,-279,-294,-344,-353,-320},{-268,-326,-256,-235,-247,-335},{-297,-294,-268,-303,-256,-282},{-259,-259,-294,-309,-318,-241},{-270,-338,-353,-323,-303,-244},{-312,-347,-309,-318,-312,-338},{-341,-294,-279,-335,-318,-350},{-294,-273,-256,-306,-341,-276},{-253,-350,-244,-244,-259,-309},{-235,-332,-335,-335,-291,-320},{-347,-238,-294,-344,-253,-326},{-256,-312,-259,-259,-341,-338},{-244,-235,-303,-291,-347,-294},{-344,-288,-235,-256,-315,-270}},{{-253,-265,-273,-268,-341,-238},{-350,-247,-238,-253,-279,-353},{-303,-268,-259,-291,-326,-247},{-318,-241,-259,-235,-350,-347},{-276,-265,-253,-332,-256,-306},{-338,-282,-341,-338,-312,-353},{-309,-241,-344,-347,-306,-306},{-335,-250,-250,-326,-332,-347},{-250,-320,-318,-273,-265,-273},{-309,-335,-259,-318,-312,-253},{-235,-341,-329,-241,-241,-282},{-332,-332,-332,-276,-250,-335},{-294,-262,-288,-344,-297,-253},{-238,-285,-320,-291,-303,-294},{-347,-282,-250,-320,-335,-303},{-273,-253,-350,-247,-291,-247},{-250,-323,-338,-235,-323,-332},{-347,-288,-320,-291,-326,-253},{-306,-306,-335,-303,-279,-312},{-347,-235,-347,-244,-350,-320}},{{-253,-241,-326,-326,-338,-279},{-353,-241,-315,-329,-268,-276},{-238,-288,-353,-320,-273,-353},{-259,-312,-244,-350,-259,-291},{-256,-253,-309,-265,-256,-244},{-288,-259,-285,-326,-282,-326},{-262,-276,-338,-291,-300,-256},{-294,-276,-288,-335,-262,-291},{-285,-288,-282,-262,-294,-253},{-285,-300,-238,-244,-350,-288},{-338,-250,-344,-285,-329,-276},{-335,-268,-353,-265,-294,-288},{-256,-347,-341,-315,-288,-341},{-306,-235,-300,-353,-244,-338},{-309,-350,-300,-315,-238,-262},{-279,-338,-276,-282,-300,-273},{-262,-244,-318,-341,-341,-320},{-315,-297,-309,-285,-279,-353},{-294,-329,-300,-312,-309,-291},{-291,-309,-353,-253,-262,-262}}}}; // 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,3,2,6,4,2,6,4,2,7,4,3,7,4,3,7,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,5,3,9,4,3,9,4,3,8,4,3,8,4,3,9,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}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,1,5,9,1,7,2,4,6,8,10,12,0,4,8,12,2,8,2,4,6,8,10,12,0,4,8,12,2,8,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,2,6,10,14,2,8,14,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,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,0,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,16,2,6,10,14,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,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,16,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,2,4,6,8,10,12,14,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,0,6,12,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,2,4,6,8,10,12,14,2,6,10,14,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,6,10,14,6,12,7,9,11,13,15,17,5,9,13,17,7,13,7,9,11,13,15,17,5,9,13,17,7,13,5,7,9,11,13,15,17,4,8,12,16,4,10,16,4,6,8,10,12,14,16,5,9,13,17,3,9,15,5,7,9,11,13,15,17,4,8,12,16,5,11,17,4,6,8,10,12,14,16,4,8,12,16,4,10,16,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,2,8,14,2,4,6,8,10,12,14,16,4,8,12,16,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,1,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,1,3,5,7,9,11,13,15,17,3,7,11,15,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,3,7,11,15,3,9,15,1,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,4,6,8,10,12,14,16,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,2,8,14,5,7,9,11,13,15,17,5,9,13,17,5,11,17,3,5,7,9,11,13,15,17,5,9,13,17,4,10,16,5,7,9,11,13,15,17,5,9,13,17,5,11,17}; // set of end times of each shipment 
