int Dev = 10;// 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 = 352;//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]={{{{11181,0,0,0,0,0},{11030,0,0,0,0,0},{10829,0,0,0,0,0},{10967,0,0,0,0,0},{11010,0,0,0,0,0},{10987,0,0,0,0,0},{11036,0,0,0,0,0},{11032,0,0,0,0,0},{11195,0,0,0,0,0},{11082,0,0,0,0,0},{11131,0,0,0,0,0},{11185,0,0,0,0,0},{11124,0,0,0,0,0},{11036,0,0,0,0,0},{11121,0,0,0,0,0},{11073,0,0,0,0,0},{10880,0,0,0,0,0},{11190,0,0,0,0,0},{11247,0,0,0,0,0},{11076,0,0,0,0,0}},{{10982,0,0,0,0,0},{11203,0,0,0,0,0},{11020,0,0,0,0,0},{11059,0,0,0,0,0},{11073,0,0,0,0,0},{10893,0,0,0,0,0},{11093,0,0,0,0,0},{10930,0,0,0,0,0},{10939,0,0,0,0,0},{11077,0,0,0,0,0},{10873,0,0,0,0,0},{11190,0,0,0,0,0},{10996,0,0,0,0,0},{11028,0,0,0,0,0},{11007,0,0,0,0,0},{11030,0,0,0,0,0},{10984,0,0,0,0,0},{11086,0,0,0,0,0},{11054,0,0,0,0,0},{11245,0,0,0,0,0}},{{11326,0,0,0,0,0},{10997,0,0,0,0,0},{11265,0,0,0,0,0},{11176,0,0,0,0,0},{11121,0,0,0,0,0},{11080,0,0,0,0,0},{11100,0,0,0,0,0},{11099,0,0,0,0,0},{11180,0,0,0,0,0},{11142,0,0,0,0,0},{10858,0,0,0,0,0},{10780,0,0,0,0,0},{10986,0,0,0,0,0},{11065,0,0,0,0,0},{11188,0,0,0,0,0},{11065,0,0,0,0,0},{11238,0,0,0,0,0},{10989,0,0,0,0,0},{11017,0,0,0,0,0},{11229,0,0,0,0,0}}},{{{-233,-202,-237,-226,-244,-233},{-211,-206,-233,-235,-211,-231},{-233,-211,-206,-206,-224,-246},{-217,-208,-202,-242,-228,-206},{-211,-202,-222,-206,-226,-237},{-204,-226,-242,-204,-220,-233},{-231,-231,-204,-202,-235,-215},{-211,-244,-217,-240,-211,-204},{-244,-213,-213,-244,-220,-208},{-240,-237,-235,-204,-206,-228},{-224,-222,-231,-231,-211,-215},{-231,-226,-226,-202,-217,-202},{-220,-204,-206,-244,-211,-237},{-217,-224,-226,-215,-211,-242},{-246,-211,-233,-208,-246,-208},{-215,-206,-217,-206,-215,-211},{-204,-237,-206,-226,-220,-235},{-240,-242,-217,-202,-226,-242},{-235,-244,-246,-213,-244,-235},{-233,-246,-244,-233,-237,-226}},{{-224,-240,-213,-224,-208,-204},{-235,-228,-246,-244,-228,-215},{-213,-211,-235,-228,-224,-222},{-217,-224,-246,-237,-213,-202},{-231,-233,-202,-242,-240,-217},{-204,-202,-228,-206,-235,-211},{-233,-242,-231,-228,-237,-226},{-235,-237,-211,-208,-231,-235},{-233,-202,-220,-246,-228,-215},{-233,-246,-237,-215,-244,-222},{-204,-213,-208,-237,-244,-228},{-208,-222,-231,-235,-237,-211},{-208,-240,-215,-215,-226,-231},{-213,-211,-211,-206,-226,-208},{-211,-220,-226,-208,-224,-233},{-213,-242,-206,-240,-242,-222},{-222,-242,-224,-215,-242,-220},{-202,-222,-237,-244,-215,-213},{-231,-202,-226,-215,-217,-204},{-233,-222,-211,-233,-206,-242}},{{-206,-240,-206,-206,-235,-240},{-244,-202,-226,-220,-217,-244},{-222,-228,-222,-222,-240,-211},{-224,-242,-206,-240,-220,-220},{-240,-226,-246,-244,-242,-211},{-228,-206,-224,-237,-231,-244},{-233,-208,-208,-202,-204,-246},{-204,-226,-240,-213,-211,-235},{-244,-228,-220,-242,-228,-208},{-244,-244,-237,-213,-213,-206},{-237,-202,-204,-206,-213,-242},{-224,-215,-202,-217,-206,-208},{-240,-215,-220,-244,-228,-213},{-224,-228,-222,-233,-242,-211},{-242,-240,-244,-246,-220,-202},{-240,-231,-217,-208,-242,-231},{-204,-246,-242,-208,-202,-242},{-220,-244,-233,-224,-235,-213},{-237,-204,-208,-222,-244,-237},{-213,-237,-235,-215,-237,-246}}},{{{-243,-236,-257,-243,-236,-224},{-221,-231,-217,-250,-236,-236},{-219,-221,-214,-240,-228,-231},{-221,-224,-252,-259,-224,-214},{-245,-217,-238,-231,-257,-228},{-262,-224,-250,-228,-257,-214},{-252,-240,-231,-255,-224,-228},{-221,-231,-228,-236,-233,-255},{-262,-259,-214,-252,-221,-259},{-224,-221,-224,-243,-217,-231},{-236,-224,-238,-248,-214,-259},{-262,-240,-248,-252,-243,-250},{-224,-238,-219,-240,-262,-231},{-231,-217,-255,-243,-243,-243},{-245,-226,-221,-221,-226,-238},{-257,-221,-226,-255,-248,-259},{-231,-236,-252,-245,-255,-262},{-255,-250,-248,-219,-255,-243},{-238,-238,-250,-245,-236,-245},{-250,-231,-226,-240,-250,-236}},{{-238,-240,-248,-219,-236,-262},{-221,-248,-238,-250,-221,-217},{-221,-228,-238,-250,-255,-252},{-245,-255,-243,-243,-221,-250},{-236,-250,-257,-259,-257,-228},{-245,-217,-259,-231,-214,-245},{-236,-226,-224,-221,-252,-252},{-214,-217,-228,-259,-245,-236},{-259,-219,-228,-224,-217,-250},{-255,-217,-228,-224,-231,-250},{-224,-248,-245,-219,-257,-233},{-257,-228,-259,-240,-236,-228},{-221,-236,-226,-217,-226,-252},{-252,-250,-219,-221,-217,-236},{-259,-221,-240,-236,-219,-233},{-236,-259,-250,-217,-252,-219},{-224,-262,-224,-240,-240,-259},{-231,-236,-228,-255,-231,-219},{-226,-228,-259,-221,-217,-238},{-245,-252,-257,-243,-224,-233}},{{-243,-238,-243,-262,-224,-238},{-226,-231,-245,-259,-248,-217},{-243,-255,-262,-259,-248,-248},{-224,-262,-219,-250,-255,-217},{-257,-217,-240,-262,-228,-238},{-257,-248,-255,-257,-245,-219},{-226,-259,-233,-233,-245,-257},{-243,-228,-259,-219,-240,-231},{-255,-217,-238,-243,-228,-236},{-233,-238,-231,-224,-226,-236},{-236,-224,-248,-233,-245,-224},{-224,-245,-217,-214,-262,-224},{-219,-257,-214,-214,-228,-231},{-259,-224,-259,-233,-245,-248},{-233,-245,-224,-243,-257,-217},{-226,-240,-238,-240,-257,-259},{-248,-219,-255,-245,-238,-259},{-243,-228,-262,-226,-217,-240},{-231,-219,-240,-231,-238,-221},{-250,-233,-240,-240,-243,-228}}},{{{-251,-248,-251,-276,-257,-276},{-273,-276,-248,-281,-257,-287},{-276,-284,-248,-281,-246,-295},{-298,-276,-268,-276,-276,-268},{-276,-278,-246,-270,-273,-281},{-287,-246,-257,-281,-257,-251},{-273,-276,-298,-265,-287,-298},{-254,-268,-257,-298,-265,-276},{-251,-284,-295,-281,-281,-268},{-254,-300,-278,-295,-265,-270},{-262,-289,-292,-287,-262,-268},{-281,-295,-265,-284,-273,-259},{-273,-300,-270,-259,-300,-292},{-284,-284,-298,-251,-278,-257},{-278,-287,-262,-262,-251,-248},{-295,-270,-259,-298,-246,-284},{-281,-298,-270,-259,-259,-287},{-262,-292,-278,-295,-257,-289},{-248,-251,-284,-273,-276,-284},{-287,-292,-287,-262,-248,-246}},{{-287,-298,-265,-254,-251,-287},{-295,-270,-300,-284,-298,-262},{-292,-284,-254,-265,-251,-270},{-246,-273,-251,-251,-270,-287},{-270,-284,-289,-289,-276,-259},{-300,-254,-262,-265,-251,-254},{-281,-281,-281,-246,-254,-268},{-257,-287,-273,-295,-268,-284},{-254,-278,-289,-259,-284,-262},{-276,-292,-298,-273,-268,-278},{-246,-298,-248,-259,-248,-300},{-284,-287,-270,-268,-257,-284},{-281,-262,-251,-292,-248,-284},{-270,-298,-287,-246,-246,-265},{-273,-287,-246,-270,-295,-251},{-298,-295,-265,-295,-246,-278},{-273,-254,-257,-273,-254,-273},{-265,-268,-273,-287,-273,-292},{-248,-254,-284,-273,-246,-281},{-276,-259,-270,-268,-298,-278}},{{-265,-292,-273,-292,-292,-298},{-276,-276,-251,-262,-284,-254},{-284,-251,-287,-268,-289,-289},{-278,-251,-281,-276,-292,-298},{-251,-292,-295,-287,-273,-257},{-287,-246,-270,-248,-262,-254},{-259,-289,-295,-270,-276,-270},{-259,-276,-268,-248,-292,-300},{-298,-254,-246,-295,-268,-281},{-259,-248,-278,-273,-295,-284},{-273,-257,-265,-287,-278,-251},{-248,-265,-254,-270,-281,-251},{-251,-265,-281,-287,-270,-278},{-254,-281,-287,-265,-262,-276},{-278,-259,-278,-276,-257,-259},{-259,-248,-254,-273,-265,-298},{-278,-276,-278,-265,-284,-289},{-270,-281,-246,-281,-289,-295},{-265,-300,-287,-254,-259,-278},{-270,-281,-295,-278,-289,-268}}},{{{-159,-152,-166,-157,-139,-154},{-139,-149,-156,-142,-169,-169},{-165,-165,-143,-169,-148,-149},{-140,-149,-152,-146,-146,-145},{-151,-149,-156,-143,-151,-151},{-143,-168,-146,-139,-157,-143},{-162,-142,-156,-163,-168,-139},{-169,-160,-139,-152,-143,-140},{-159,-166,-159,-143,-169,-168},{-159,-168,-159,-152,-169,-156},{-149,-163,-149,-151,-159,-157},{-159,-165,-163,-157,-151,-165},{-159,-148,-166,-156,-162,-145},{-157,-140,-143,-145,-157,-157},{-160,-163,-154,-163,-168,-169},{-165,-165,-168,-165,-157,-146},{-139,-151,-139,-140,-145,-156},{-156,-140,-151,-160,-139,-148},{-148,-152,-168,-166,-165,-159},{-163,-146,-160,-168,-151,-139}},{{-169,-152,-163,-149,-148,-157},{-142,-162,-160,-140,-168,-149},{-154,-159,-157,-165,-159,-145},{-157,-151,-168,-162,-148,-149},{-166,-156,-148,-157,-156,-152},{-163,-145,-140,-146,-140,-140},{-152,-151,-165,-156,-159,-139},{-157,-154,-149,-142,-151,-166},{-156,-159,-148,-151,-152,-157},{-148,-157,-142,-157,-162,-143},{-145,-157,-140,-162,-148,-151},{-152,-156,-145,-148,-169,-169},{-148,-142,-156,-165,-162,-149},{-159,-163,-154,-165,-143,-165},{-156,-143,-146,-162,-157,-169},{-168,-166,-142,-168,-159,-149},{-143,-149,-139,-148,-168,-149},{-149,-140,-166,-154,-168,-156},{-160,-162,-151,-165,-157,-162},{-159,-152,-152,-145,-146,-159}},{{-162,-152,-146,-149,-169,-169},{-162,-163,-146,-145,-162,-159},{-166,-156,-151,-168,-168,-168},{-151,-139,-151,-159,-156,-139},{-149,-169,-159,-156,-148,-163},{-165,-146,-156,-142,-139,-154},{-156,-139,-160,-149,-166,-168},{-152,-149,-165,-143,-159,-149},{-159,-160,-146,-148,-165,-157},{-165,-163,-160,-139,-168,-168},{-157,-148,-156,-163,-143,-143},{-160,-139,-168,-154,-146,-152},{-165,-154,-157,-168,-149,-149},{-145,-168,-163,-168,-166,-140},{-166,-148,-151,-154,-149,-165},{-149,-163,-146,-166,-163,-148},{-157,-166,-140,-139,-168,-140},{-163,-165,-139,-142,-156,-159},{-143,-145,-145,-145,-162,-162},{-162,-160,-139,-159,-152,-146}}},{{{-169,-191,-187,-198,-184,-173},{-164,-189,-166,-193,-189,-177},{-198,-193,-189,-173,-200,-184},{-189,-178,-169,-180,-197,-180},{-184,-187,-193,-178,-193,-171},{-200,-193,-200,-164,-164,-191},{-166,-164,-173,-191,-173,-195},{-175,-177,-184,-173,-169,-175},{-177,-167,-191,-184,-166,-186},{-166,-187,-167,-187,-195,-166},{-164,-180,-177,-180,-173,-169},{-189,-197,-193,-186,-177,-184},{-182,-178,-184,-189,-171,-173},{-169,-198,-189,-175,-180,-184},{-182,-191,-182,-189,-175,-197},{-180,-193,-193,-189,-166,-187},{-171,-182,-164,-171,-191,-173},{-195,-175,-187,-182,-200,-177},{-178,-175,-180,-175,-164,-173},{-178,-191,-173,-198,-187,-175}},{{-164,-186,-187,-171,-167,-175},{-200,-180,-184,-186,-200,-198},{-187,-173,-184,-191,-175,-187},{-164,-184,-182,-187,-180,-182},{-175,-177,-164,-178,-177,-197},{-195,-167,-175,-195,-197,-200},{-166,-182,-191,-186,-193,-198},{-166,-166,-197,-169,-175,-186},{-173,-187,-193,-180,-171,-193},{-166,-178,-175,-167,-186,-178},{-171,-178,-166,-177,-171,-175},{-169,-200,-178,-178,-182,-186},{-166,-189,-200,-182,-197,-198},{-182,-177,-200,-166,-200,-180},{-180,-169,-197,-175,-191,-171},{-166,-167,-180,-200,-171,-177},{-180,-175,-184,-184,-198,-197},{-164,-171,-198,-167,-187,-177},{-169,-198,-166,-180,-198,-171},{-173,-197,-200,-200,-178,-177}},{{-167,-189,-186,-171,-187,-197},{-191,-189,-180,-191,-180,-164},{-171,-173,-193,-184,-187,-167},{-193,-187,-182,-171,-169,-173},{-193,-164,-184,-182,-198,-173},{-166,-184,-189,-167,-175,-193},{-180,-187,-193,-187,-197,-184},{-184,-198,-193,-197,-167,-184},{-177,-197,-198,-198,-195,-198},{-195,-191,-180,-164,-189,-193},{-184,-171,-180,-167,-186,-184},{-169,-180,-189,-175,-198,-166},{-173,-178,-191,-198,-200,-189},{-178,-169,-175,-193,-164,-166},{-182,-180,-200,-164,-195,-178},{-186,-169,-198,-169,-180,-178},{-171,-195,-189,-195,-189,-164},{-180,-191,-169,-191,-169,-175},{-184,-193,-187,-171,-191,-164},{-193,-193,-178,-173,-200,-166}}},{{{-255,-270,-252,-238,-255,-247},{-223,-220,-238,-252,-270,-255},{-235,-245,-225,-240,-238,-238},{-247,-235,-238,-230,-250,-265},{-233,-265,-220,-245,-267,-270},{-233,-233,-247,-257,-265,-262},{-250,-228,-255,-233,-228,-252},{-260,-270,-247,-270,-257,-223},{-270,-262,-245,-245,-260,-255},{-270,-245,-265,-233,-247,-240},{-267,-252,-225,-260,-265,-252},{-233,-235,-260,-247,-225,-220},{-243,-235,-245,-238,-235,-223},{-245,-228,-270,-238,-265,-245},{-225,-265,-225,-230,-265,-260},{-245,-247,-262,-233,-225,-235},{-225,-238,-230,-223,-228,-260},{-252,-252,-230,-270,-265,-252},{-252,-267,-243,-262,-260,-267},{-243,-245,-238,-255,-233,-223}},{{-243,-243,-223,-223,-270,-245},{-235,-255,-240,-252,-223,-233},{-225,-243,-225,-260,-265,-223},{-235,-247,-257,-250,-235,-265},{-230,-262,-223,-238,-230,-223},{-270,-238,-228,-233,-223,-255},{-243,-255,-262,-257,-230,-262},{-260,-228,-225,-267,-240,-230},{-245,-265,-255,-247,-225,-247},{-262,-230,-270,-238,-233,-257},{-262,-262,-220,-255,-233,-255},{-267,-260,-230,-257,-245,-265},{-270,-228,-252,-235,-252,-257},{-245,-267,-230,-243,-260,-265},{-270,-240,-247,-225,-225,-270},{-243,-238,-233,-260,-238,-220},{-230,-225,-260,-223,-265,-270},{-265,-257,-255,-240,-270,-257},{-245,-240,-243,-220,-262,-270},{-267,-247,-235,-252,-262,-233}},{{-247,-270,-225,-238,-270,-262},{-260,-233,-250,-238,-238,-267},{-270,-262,-243,-228,-270,-230},{-267,-235,-240,-262,-225,-240},{-257,-230,-255,-250,-240,-220},{-262,-233,-252,-245,-260,-255},{-228,-265,-267,-238,-225,-233},{-265,-225,-250,-245,-245,-252},{-267,-240,-228,-260,-238,-255},{-260,-238,-245,-262,-243,-252},{-245,-225,-245,-260,-230,-235},{-265,-245,-228,-245,-262,-230},{-240,-240,-233,-270,-240,-262},{-223,-245,-230,-235,-252,-255},{-267,-265,-262,-223,-255,-255},{-238,-223,-233,-238,-267,-262},{-228,-235,-265,-238,-238,-257},{-265,-245,-230,-245,-223,-245},{-243,-255,-243,-250,-238,-250},{-262,-228,-245,-270,-235,-240}}},{{{-238,-245,-245,-215,-217,-252},{-231,-222,-245,-233,-249,-252},{-219,-226,-210,-233,-222,-226},{-249,-247,-240,-222,-252,-238},{-238,-231,-231,-224,-249,-245},{-229,-245,-229,-231,-219,-222},{-222,-238,-224,-249,-222,-254},{-224,-243,-252,-231,-208,-219},{-222,-252,-213,-213,-222,-245},{-224,-236,-215,-238,-231,-252},{-249,-252,-208,-231,-243,-215},{-247,-226,-247,-222,-238,-217},{-215,-243,-245,-252,-254,-215},{-226,-215,-254,-254,-213,-226},{-243,-247,-247,-208,-249,-236},{-215,-240,-229,-247,-245,-217},{-229,-219,-219,-252,-236,-208},{-236,-243,-245,-249,-231,-252},{-233,-233,-215,-210,-236,-229},{-247,-231,-231,-217,-233,-240}},{{-215,-229,-219,-243,-215,-238},{-226,-215,-249,-249,-210,-245},{-245,-252,-219,-213,-219,-224},{-240,-252,-231,-249,-208,-208},{-245,-219,-208,-215,-222,-252},{-208,-254,-249,-217,-254,-238},{-210,-238,-238,-208,-224,-254},{-208,-226,-245,-249,-215,-213},{-208,-210,-229,-236,-243,-240},{-238,-229,-224,-249,-247,-224},{-231,-213,-213,-245,-233,-215},{-247,-236,-252,-224,-240,-247},{-229,-252,-208,-254,-208,-219},{-238,-217,-224,-226,-217,-243},{-236,-245,-238,-222,-226,-222},{-213,-229,-249,-243,-210,-217},{-238,-243,-219,-217,-208,-210},{-217,-247,-247,-224,-215,-249},{-236,-215,-252,-254,-219,-240},{-254,-224,-215,-252,-229,-254}},{{-254,-240,-245,-238,-229,-245},{-224,-238,-236,-217,-247,-210},{-213,-247,-254,-208,-238,-254},{-226,-226,-243,-254,-231,-238},{-219,-238,-217,-249,-226,-236},{-219,-208,-219,-245,-238,-224},{-219,-254,-208,-226,-245,-247},{-238,-252,-254,-219,-254,-247},{-243,-240,-222,-224,-240,-226},{-233,-208,-233,-231,-229,-238},{-243,-236,-249,-219,-219,-247},{-210,-222,-254,-217,-247,-210},{-226,-233,-240,-208,-208,-219},{-249,-247,-240,-252,-233,-219},{-231,-247,-245,-224,-222,-224},{-210,-226,-245,-233,-208,-215},{-243,-252,-252,-245,-249,-240},{-229,-224,-208,-208,-224,-215},{-245,-213,-213,-243,-247,-226},{-245,-236,-233,-245,-233,-238}}},{{{-303,-318,-309,-297,-323,-300},{-285,-291,-323,-323,-300,-276},{-320,-270,-279,-265,-265,-288},{-291,-265,-265,-265,-323,-315},{-282,-297,-312,-268,-279,-303},{-276,-294,-312,-294,-315,-273},{-285,-265,-270,-315,-294,-315},{-276,-300,-306,-312,-309,-320},{-294,-303,-276,-312,-279,-323},{-291,-315,-309,-315,-265,-288},{-291,-320,-297,-312,-320,-288},{-309,-294,-300,-300,-323,-300},{-312,-288,-323,-318,-288,-309},{-300,-309,-270,-303,-297,-265},{-318,-309,-282,-270,-323,-309},{-318,-288,-309,-268,-291,-297},{-288,-276,-273,-315,-285,-291},{-268,-282,-297,-265,-285,-294},{-323,-320,-323,-309,-268,-309},{-323,-291,-294,-270,-268,-291}},{{-273,-285,-318,-285,-309,-320},{-315,-279,-294,-323,-276,-315},{-323,-320,-268,-320,-279,-268},{-309,-297,-303,-303,-291,-291},{-323,-294,-265,-320,-279,-303},{-297,-297,-279,-300,-270,-297},{-288,-279,-306,-306,-291,-285},{-294,-309,-306,-265,-276,-276},{-282,-279,-270,-285,-268,-318},{-279,-282,-300,-323,-273,-273},{-306,-268,-300,-279,-268,-315},{-279,-318,-270,-265,-323,-291},{-285,-309,-273,-303,-312,-265},{-279,-297,-312,-323,-291,-315},{-288,-288,-282,-291,-306,-318},{-303,-309,-282,-294,-276,-285},{-288,-300,-294,-306,-306,-270},{-294,-300,-270,-276,-318,-297},{-320,-306,-309,-297,-320,-297},{-315,-320,-270,-285,-320,-323}},{{-320,-323,-306,-300,-309,-268},{-306,-285,-303,-273,-276,-282},{-315,-268,-306,-323,-291,-265},{-323,-315,-318,-318,-270,-320},{-323,-268,-270,-276,-318,-285},{-282,-297,-320,-318,-312,-297},{-273,-279,-320,-300,-285,-309},{-273,-285,-273,-320,-297,-273},{-291,-282,-315,-294,-288,-300},{-285,-273,-303,-320,-312,-320},{-282,-270,-270,-279,-294,-303},{-297,-282,-276,-288,-273,-306},{-306,-303,-297,-265,-276,-294},{-270,-300,-318,-294,-279,-276},{-270,-285,-320,-306,-312,-323},{-315,-320,-315,-270,-315,-291},{-303,-320,-297,-282,-288,-315},{-315,-312,-306,-282,-270,-297},{-276,-318,-276,-320,-285,-309},{-312,-309,-270,-312,-282,-315}}}}; // 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,3,6,3,3,6,4,3,8,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,8,5,3,9,5,3,8,5,3,8,5,3,8,4,3,8,5,3,8,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,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},{349,350,351}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,2,6,10,0,6,12,1,3,5,7,9,11,2,6,10,0,6,12,2,4,6,8,10,12,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,1,5,9,13,0,6,12,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,0,6,12,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,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,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,16,0,6,12,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,0,4,8,12,16,1,7,13,2,4,6,8,10,12,14,16,0,4,8,12,16,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,0,4,8,12,16,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,1,3,5,7,9,11,13,1,5,9,13,0,6,12,2,4,6,8,10,12,14,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,7,11,15,5,11,17,6,8,10,12,14,16,7,11,15,5,11,17,7,9,11,13,15,17,5,9,13,17,5,11,17,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,5,9,13,17,3,9,15,4,6,8,10,12,14,16,3,7,11,15,2,8,14,4,6,8,10,12,14,16,2,6,10,14,4,10,16,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,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13,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,1,5,9,13,17,2,8,14,3,5,7,9,11,13,15,17,1,5,9,13,17,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,1,5,9,13,17,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,2,4,6,8,10,12,14,16,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,4,8,12,16,2,8,14,4,6,8,10,12,14,16,4,8,12,16,3,9,15,5,7,9,11,13,15,17,4,8,12,16,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,5,11,17}; // set of end times of each shipment 
