int Dev = 10;// Deviation
extern const int CNN = 4;// Case Index
extern const int P = 6;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 36;// Number of periods
extern const int I1 =1;// Number of suppliers
extern const int I2 = 8;// Number of customers
extern const int I = 9;// Number of sites
extern const int BN = 72;//Number of bids
extern const int LBN = 9;//Number of bids on each arc
extern const int SPN = 743;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 18;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6,6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17},{18,19,20,21,22,23},{24,25,26,27,28,29},{30,31,32,33,34,35}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{11128,0,0,0,0,0},{11080,0,0,0,0,0},{11162,0,0,0,0,0},{11079,0,0,0,0,0},{11158,0,0,0,0,0},{10965,0,0,0,0,0},{11110,0,0,0,0,0},{11209,0,0,0,0,0},{10864,0,0,0,0,0},{10928,0,0,0,0,0}},{{11155,0,0,0,0,0},{11063,0,0,0,0,0},{11237,0,0,0,0,0},{11051,0,0,0,0,0},{10830,0,0,0,0,0},{10956,0,0,0,0,0},{10918,0,0,0,0,0},{10890,0,0,0,0,0},{10965,0,0,0,0,0},{11256,0,0,0,0,0}},{{11034,0,0,0,0,0},{11080,0,0,0,0,0},{11234,0,0,0,0,0},{11117,0,0,0,0,0},{10941,0,0,0,0,0},{10994,0,0,0,0,0},{11040,0,0,0,0,0},{11121,0,0,0,0,0},{11195,0,0,0,0,0},{11032,0,0,0,0,0}},{{11185,0,0,0,0,0},{11083,0,0,0,0,0},{11266,0,0,0,0,0},{11005,0,0,0,0,0},{10998,0,0,0,0,0},{10961,0,0,0,0,0},{11102,0,0,0,0,0},{11130,0,0,0,0,0},{10903,0,0,0,0,0},{11113,0,0,0,0,0}},{{10982,0,0,0,0,0},{11016,0,0,0,0,0},{11095,0,0,0,0,0},{11000,0,0,0,0,0},{10899,0,0,0,0,0},{11094,0,0,0,0,0},{11191,0,0,0,0,0},{10874,0,0,0,0,0},{11116,0,0,0,0,0},{11111,0,0,0,0,0}},{{11119,0,0,0,0,0},{11022,0,0,0,0,0},{11014,0,0,0,0,0},{11080,0,0,0,0,0},{11126,0,0,0,0,0},{10877,0,0,0,0,0},{10847,0,0,0,0,0},{10945,0,0,0,0,0},{10964,0,0,0,0,0},{10992,0,0,0,0,0}}},{{{-237,-228,-204,-233,-242,-246},{-244,-237,-242,-220,-246,-206},{-242,-242,-235,-240,-215,-233},{-215,-244,-237,-233,-208,-206},{-244,-224,-202,-211,-228,-246},{-213,-217,-240,-235,-208,-213},{-220,-244,-224,-224,-224,-204},{-204,-242,-208,-242,-224,-222},{-228,-204,-206,-231,-242,-204},{-220,-242,-233,-208,-237,-240}},{{-242,-222,-215,-233,-208,-202},{-202,-237,-222,-204,-213,-215},{-222,-220,-231,-242,-204,-204},{-226,-224,-204,-228,-244,-226},{-217,-233,-222,-217,-231,-204},{-202,-231,-204,-235,-217,-204},{-208,-211,-208,-244,-237,-208},{-208,-240,-235,-224,-244,-208},{-240,-208,-220,-240,-208,-224},{-246,-246,-228,-213,-213,-242}},{{-246,-213,-220,-228,-237,-231},{-222,-217,-211,-235,-226,-237},{-244,-233,-204,-244,-211,-204},{-242,-233,-235,-217,-224,-231},{-215,-233,-226,-244,-242,-208},{-237,-226,-206,-202,-220,-220},{-204,-220,-206,-242,-233,-235},{-231,-208,-206,-215,-208,-237},{-244,-233,-217,-217,-240,-208},{-235,-226,-220,-213,-208,-246}},{{-222,-246,-215,-235,-204,-235},{-240,-208,-226,-213,-228,-202},{-240,-220,-213,-235,-228,-206},{-226,-213,-206,-244,-211,-217},{-233,-204,-231,-206,-237,-220},{-202,-213,-224,-206,-206,-244},{-244,-235,-202,-213,-206,-226},{-215,-202,-220,-244,-246,-228},{-206,-226,-222,-246,-224,-211},{-224,-206,-222,-237,-228,-220}},{{-202,-211,-220,-211,-235,-246},{-231,-204,-217,-235,-208,-213},{-226,-246,-211,-244,-206,-235},{-226,-202,-246,-237,-244,-224},{-220,-206,-235,-220,-213,-204},{-220,-246,-215,-237,-240,-240},{-220,-206,-231,-231,-226,-237},{-246,-202,-215,-235,-202,-217},{-213,-224,-235,-211,-220,-202},{-208,-244,-202,-242,-217,-240}},{{-213,-233,-204,-208,-217,-206},{-211,-213,-208,-224,-217,-217},{-215,-220,-204,-226,-211,-244},{-228,-220,-213,-240,-224,-211},{-237,-211,-204,-237,-224,-220},{-242,-204,-224,-208,-246,-204},{-237,-208,-213,-220,-217,-237},{-246,-204,-206,-202,-237,-237},{-222,-222,-237,-208,-202,-233},{-211,-208,-233,-246,-206,-202}}},{{{-262,-217,-259,-259,-228,-226},{-240,-228,-233,-240,-217,-221},{-233,-262,-257,-221,-217,-233},{-259,-214,-257,-236,-262,-245},{-262,-238,-248,-262,-214,-243},{-236,-233,-219,-248,-248,-236},{-250,-259,-226,-243,-248,-231},{-240,-219,-236,-217,-245,-214},{-252,-236,-214,-217,-243,-262},{-219,-236,-262,-259,-219,-231}},{{-240,-259,-219,-262,-219,-252},{-259,-257,-245,-238,-252,-231},{-259,-255,-245,-255,-257,-250},{-243,-217,-252,-240,-236,-217},{-233,-226,-233,-214,-245,-219},{-243,-224,-259,-219,-228,-219},{-236,-224,-248,-217,-252,-245},{-228,-224,-236,-240,-257,-224},{-250,-252,-238,-214,-224,-238},{-262,-224,-243,-262,-228,-252}},{{-228,-250,-221,-228,-255,-240},{-233,-245,-217,-245,-259,-243},{-255,-259,-228,-245,-219,-257},{-233,-245,-221,-252,-255,-240},{-236,-252,-255,-226,-219,-219},{-243,-226,-224,-217,-257,-240},{-233,-255,-257,-224,-250,-255},{-240,-231,-214,-243,-219,-238},{-252,-221,-224,-238,-236,-231},{-252,-214,-226,-226,-221,-214}},{{-236,-245,-245,-236,-243,-262},{-238,-226,-255,-221,-245,-262},{-238,-248,-219,-228,-233,-252},{-236,-231,-262,-221,-224,-252},{-224,-259,-217,-259,-233,-217},{-259,-252,-231,-255,-248,-226},{-238,-236,-250,-217,-233,-236},{-259,-226,-238,-259,-233,-259},{-236,-240,-238,-221,-219,-217},{-228,-262,-228,-252,-252,-255}},{{-259,-243,-219,-228,-243,-228},{-255,-252,-240,-226,-248,-250},{-262,-226,-252,-250,-245,-252},{-240,-214,-252,-262,-217,-245},{-250,-255,-214,-214,-240,-214},{-259,-228,-231,-238,-217,-252},{-224,-262,-255,-243,-221,-224},{-257,-219,-224,-221,-238,-252},{-238,-226,-245,-238,-238,-252},{-243,-243,-231,-221,-217,-257}},{{-259,-231,-245,-252,-250,-224},{-248,-240,-219,-224,-226,-255},{-238,-257,-245,-221,-221,-240},{-252,-217,-243,-252,-214,-245},{-214,-252,-259,-226,-219,-255},{-252,-250,-243,-221,-259,-214},{-248,-248,-226,-243,-224,-221},{-217,-221,-243,-233,-245,-259},{-259,-236,-236,-262,-221,-226},{-214,-250,-236,-255,-255,-250}}},{{{-254,-254,-298,-257,-270,-284},{-284,-262,-295,-248,-273,-298},{-298,-251,-289,-251,-298,-298},{-281,-292,-287,-268,-292,-257},{-259,-268,-295,-254,-281,-262},{-270,-273,-300,-287,-270,-246},{-254,-257,-262,-254,-265,-268},{-273,-284,-298,-273,-259,-295},{-273,-281,-300,-257,-251,-246},{-262,-268,-298,-248,-298,-257}},{{-246,-268,-273,-281,-287,-284},{-278,-254,-300,-270,-262,-262},{-262,-254,-268,-276,-298,-273},{-287,-281,-281,-298,-295,-276},{-248,-251,-246,-276,-278,-257},{-259,-287,-259,-292,-259,-289},{-284,-254,-289,-254,-257,-298},{-257,-251,-259,-281,-276,-248},{-278,-284,-265,-246,-257,-262},{-289,-273,-289,-278,-257,-284}},{{-251,-295,-257,-276,-300,-298},{-251,-287,-276,-259,-262,-259},{-265,-287,-289,-292,-246,-278},{-268,-278,-257,-270,-265,-276},{-295,-257,-248,-268,-251,-273},{-254,-300,-257,-281,-254,-300},{-300,-268,-262,-287,-265,-259},{-270,-268,-254,-265,-292,-300},{-251,-289,-292,-268,-295,-276},{-268,-273,-287,-259,-284,-287}},{{-300,-298,-262,-300,-254,-298},{-287,-298,-265,-276,-265,-295},{-278,-295,-295,-276,-281,-246},{-268,-300,-287,-265,-270,-265},{-300,-276,-248,-284,-262,-262},{-298,-246,-289,-259,-262,-273},{-251,-292,-281,-292,-295,-284},{-295,-270,-276,-268,-273,-270},{-278,-248,-265,-251,-273,-248},{-273,-251,-273,-284,-281,-262}},{{-278,-298,-254,-273,-265,-248},{-251,-254,-295,-300,-268,-298},{-298,-292,-251,-289,-246,-268},{-268,-292,-278,-292,-257,-295},{-298,-284,-251,-246,-287,-257},{-287,-273,-276,-284,-276,-265},{-257,-281,-248,-246,-276,-278},{-298,-273,-265,-292,-287,-262},{-278,-292,-257,-281,-268,-270},{-284,-276,-300,-257,-292,-268}},{{-295,-268,-292,-295,-262,-284},{-292,-289,-248,-292,-246,-259},{-298,-259,-287,-281,-300,-273},{-284,-262,-259,-251,-278,-254},{-276,-248,-295,-259,-289,-284},{-259,-248,-254,-281,-262,-251},{-281,-276,-248,-248,-259,-295},{-265,-273,-254,-270,-246,-295},{-289,-246,-292,-248,-270,-257},{-276,-262,-254,-265,-265,-287}}},{{{-163,-139,-169,-142,-165,-169},{-139,-151,-152,-168,-168,-169},{-159,-148,-146,-145,-165,-165},{-165,-160,-156,-148,-169,-166},{-168,-139,-152,-145,-160,-140},{-151,-154,-156,-139,-152,-148},{-163,-160,-166,-160,-156,-159},{-143,-145,-154,-166,-162,-145},{-139,-151,-159,-145,-151,-152},{-154,-162,-148,-165,-159,-146}},{{-149,-156,-159,-159,-149,-169},{-163,-163,-148,-140,-139,-165},{-163,-159,-162,-151,-165,-162},{-151,-163,-160,-146,-157,-165},{-156,-159,-169,-154,-168,-146},{-168,-154,-157,-142,-139,-163},{-159,-168,-140,-143,-145,-159},{-152,-168,-166,-146,-165,-139},{-151,-142,-152,-165,-154,-146},{-165,-152,-157,-139,-162,-165}},{{-166,-139,-169,-140,-169,-151},{-163,-157,-151,-168,-168,-162},{-146,-163,-162,-145,-159,-169},{-168,-163,-142,-169,-163,-163},{-162,-143,-142,-146,-163,-162},{-145,-169,-165,-165,-149,-148},{-143,-148,-165,-157,-151,-140},{-156,-140,-139,-142,-157,-148},{-162,-162,-163,-152,-166,-169},{-166,-156,-169,-142,-142,-157}},{{-139,-145,-166,-165,-139,-146},{-168,-148,-139,-152,-160,-157},{-152,-169,-169,-140,-146,-162},{-152,-162,-157,-152,-149,-159},{-140,-157,-156,-168,-156,-163},{-149,-140,-156,-139,-163,-139},{-156,-166,-151,-169,-166,-148},{-166,-159,-168,-157,-146,-154},{-146,-140,-166,-163,-165,-148},{-169,-166,-154,-152,-169,-142}},{{-154,-160,-151,-157,-151,-151},{-166,-152,-162,-143,-148,-166},{-165,-166,-143,-148,-140,-140},{-149,-146,-139,-148,-139,-143},{-154,-160,-145,-165,-143,-152},{-156,-148,-140,-163,-160,-139},{-166,-166,-152,-148,-163,-151},{-145,-145,-154,-152,-140,-143},{-162,-149,-169,-152,-157,-160},{-142,-148,-145,-169,-156,-169}},{{-166,-163,-139,-146,-160,-168},{-156,-168,-166,-146,-139,-146},{-159,-162,-143,-166,-149,-140},{-169,-154,-168,-146,-152,-154},{-143,-162,-160,-162,-140,-165},{-148,-168,-143,-152,-142,-146},{-169,-160,-154,-160,-156,-160},{-156,-148,-149,-140,-160,-157},{-145,-159,-143,-143,-148,-143},{-149,-156,-163,-154,-154,-139}}},{{{-167,-186,-195,-177,-177,-187},{-173,-193,-200,-167,-164,-198},{-180,-182,-189,-184,-180,-178},{-175,-195,-164,-182,-189,-175},{-169,-173,-191,-184,-167,-182},{-171,-175,-177,-182,-186,-184},{-198,-182,-173,-191,-178,-171},{-197,-189,-169,-187,-180,-193},{-187,-164,-187,-184,-173,-175},{-173,-169,-197,-171,-177,-182}},{{-166,-189,-166,-200,-178,-195},{-173,-167,-184,-198,-186,-189},{-186,-200,-178,-193,-169,-180},{-164,-186,-182,-164,-180,-166},{-166,-189,-184,-173,-164,-178},{-193,-166,-189,-200,-189,-198},{-171,-175,-177,-167,-171,-167},{-167,-182,-180,-178,-189,-169},{-167,-198,-169,-187,-187,-187},{-173,-193,-189,-200,-166,-171}},{{-177,-187,-169,-200,-171,-184},{-178,-178,-186,-198,-182,-164},{-178,-178,-164,-200,-197,-166},{-184,-169,-186,-197,-171,-166},{-187,-186,-187,-193,-191,-193},{-184,-180,-200,-180,-166,-198},{-167,-193,-193,-171,-175,-167},{-187,-195,-187,-198,-167,-187},{-197,-191,-180,-187,-198,-189},{-193,-171,-187,-178,-189,-198}},{{-177,-164,-186,-182,-173,-180},{-167,-180,-197,-171,-169,-171},{-177,-187,-175,-180,-195,-193},{-164,-178,-195,-169,-167,-164},{-166,-191,-189,-189,-191,-177},{-178,-189,-186,-167,-169,-171},{-178,-200,-166,-198,-197,-173},{-200,-177,-195,-171,-175,-189},{-184,-187,-169,-186,-171,-195},{-189,-166,-167,-166,-191,-166}},{{-191,-195,-187,-180,-171,-191},{-198,-182,-198,-164,-180,-195},{-164,-175,-193,-177,-180,-186},{-178,-164,-180,-195,-184,-169},{-164,-171,-175,-193,-189,-197},{-169,-178,-187,-164,-198,-200},{-187,-177,-186,-186,-180,-166},{-198,-187,-173,-175,-177,-175},{-193,-186,-184,-193,-182,-167},{-173,-164,-200,-200,-164,-200}},{{-169,-193,-167,-189,-180,-177},{-193,-187,-182,-171,-189,-178},{-200,-189,-177,-189,-195,-166},{-187,-184,-193,-187,-191,-180},{-195,-191,-193,-195,-195,-187},{-193,-200,-197,-175,-169,-164},{-169,-184,-167,-173,-186,-166},{-189,-177,-184,-177,-167,-187},{-177,-197,-198,-193,-184,-171},{-187,-198,-180,-195,-171,-178}}},{{{-262,-235,-245,-220,-220,-250},{-228,-228,-270,-228,-240,-252},{-238,-247,-240,-243,-255,-257},{-233,-262,-223,-243,-235,-262},{-260,-238,-260,-270,-270,-260},{-247,-255,-225,-255,-255,-228},{-250,-262,-250,-247,-252,-220},{-250,-228,-240,-250,-233,-257},{-223,-250,-225,-250,-223,-245},{-223,-233,-238,-223,-238,-245}},{{-265,-250,-265,-270,-257,-243},{-250,-257,-240,-243,-220,-265},{-245,-225,-257,-267,-235,-235},{-270,-255,-233,-225,-267,-262},{-233,-220,-247,-240,-225,-260},{-223,-252,-235,-255,-245,-228},{-228,-260,-265,-220,-220,-255},{-233,-257,-225,-250,-267,-233},{-267,-243,-238,-235,-243,-228},{-255,-252,-235,-255,-255,-262}},{{-240,-228,-265,-260,-243,-243},{-233,-257,-238,-233,-225,-270},{-235,-233,-235,-230,-255,-265},{-235,-250,-255,-235,-260,-220},{-238,-247,-228,-228,-262,-250},{-267,-257,-240,-243,-233,-267},{-270,-240,-245,-260,-220,-250},{-270,-220,-267,-247,-243,-255},{-245,-267,-243,-260,-262,-238},{-235,-233,-233,-238,-267,-252}},{{-245,-230,-257,-247,-240,-252},{-230,-267,-238,-243,-233,-267},{-270,-265,-257,-260,-262,-243},{-243,-270,-257,-265,-230,-220},{-223,-265,-225,-223,-245,-262},{-260,-240,-267,-247,-265,-230},{-270,-252,-223,-223,-250,-235},{-270,-257,-247,-235,-233,-233},{-240,-228,-240,-235,-247,-267},{-247,-233,-257,-255,-247,-262}},{{-260,-223,-270,-245,-245,-220},{-250,-225,-240,-235,-240,-250},{-240,-262,-245,-225,-255,-233},{-220,-255,-265,-225,-240,-255},{-238,-223,-247,-252,-223,-235},{-223,-252,-233,-260,-260,-252},{-235,-250,-252,-265,-265,-252},{-225,-220,-245,-240,-235,-245},{-255,-245,-228,-250,-260,-265},{-270,-230,-257,-247,-262,-245}},{{-267,-252,-255,-262,-247,-247},{-223,-260,-250,-257,-247,-262},{-243,-225,-262,-235,-233,-223},{-270,-257,-270,-250,-262,-260},{-255,-243,-233,-247,-260,-223},{-238,-230,-255,-238,-220,-235},{-228,-262,-233,-220,-230,-228},{-243,-243,-270,-260,-262,-257},{-257,-257,-243,-238,-225,-260},{-243,-225,-223,-220,-260,-267}}},{{{-254,-217,-249,-219,-238,-240},{-238,-238,-240,-224,-245,-254},{-210,-240,-240,-213,-219,-224},{-226,-210,-236,-247,-243,-222},{-233,-226,-224,-229,-208,-254},{-240,-210,-226,-233,-247,-210},{-222,-254,-210,-213,-238,-210},{-252,-240,-240,-236,-236,-254},{-224,-226,-245,-213,-240,-231},{-210,-233,-245,-238,-224,-231}},{{-217,-208,-210,-252,-208,-240},{-247,-245,-240,-254,-236,-219},{-245,-213,-238,-224,-249,-238},{-240,-208,-224,-226,-252,-222},{-213,-217,-217,-245,-247,-213},{-245,-236,-245,-243,-213,-238},{-236,-240,-219,-249,-217,-226},{-233,-236,-243,-231,-240,-208},{-215,-236,-236,-233,-229,-233},{-240,-249,-243,-249,-222,-215}},{{-219,-213,-240,-236,-219,-226},{-226,-233,-231,-213,-229,-254},{-249,-254,-249,-213,-243,-233},{-243,-236,-215,-240,-249,-249},{-238,-222,-219,-217,-208,-210},{-229,-247,-231,-210,-219,-247},{-213,-229,-224,-217,-231,-217},{-226,-254,-254,-249,-210,-222},{-215,-254,-208,-243,-217,-254},{-245,-217,-208,-249,-240,-238}},{{-224,-222,-252,-252,-213,-249},{-238,-233,-226,-252,-240,-243},{-254,-233,-245,-233,-240,-224},{-252,-249,-240,-215,-238,-217},{-252,-236,-238,-252,-217,-208},{-236,-224,-249,-219,-213,-233},{-226,-245,-217,-236,-229,-245},{-210,-213,-238,-247,-243,-249},{-208,-247,-229,-222,-243,-233},{-233,-229,-238,-215,-249,-252}},{{-231,-233,-243,-217,-226,-236},{-210,-249,-247,-217,-213,-233},{-210,-240,-243,-249,-210,-217},{-252,-208,-213,-252,-210,-240},{-249,-231,-213,-238,-215,-252},{-224,-217,-222,-222,-243,-236},{-243,-252,-240,-243,-254,-249},{-231,-252,-233,-217,-215,-222},{-213,-224,-231,-231,-243,-213},{-217,-236,-226,-224,-240,-224}},{{-236,-219,-208,-210,-238,-247},{-243,-215,-208,-249,-238,-215},{-238,-219,-217,-243,-238,-222},{-226,-236,-233,-222,-222,-224},{-213,-213,-233,-240,-240,-247},{-217,-238,-240,-243,-240,-247},{-224,-238,-249,-245,-226,-231},{-254,-219,-219,-247,-219,-213},{-249,-208,-231,-249,-233,-249},{-247,-222,-210,-229,-247,-245}}},{{{-265,-297,-320,-315,-288,-300},{-279,-306,-309,-276,-276,-273},{-276,-300,-318,-276,-318,-312},{-268,-306,-276,-268,-312,-270},{-318,-306,-312,-268,-288,-323},{-276,-303,-306,-323,-291,-268},{-320,-306,-312,-309,-318,-303},{-306,-318,-309,-300,-323,-312},{-300,-273,-323,-288,-303,-268},{-291,-282,-270,-303,-291,-270}},{{-282,-297,-312,-323,-300,-309},{-282,-282,-312,-297,-270,-288},{-318,-297,-323,-306,-276,-303},{-279,-303,-291,-265,-282,-288},{-312,-312,-294,-312,-282,-285},{-268,-282,-320,-276,-291,-273},{-273,-312,-270,-309,-312,-291},{-276,-265,-309,-279,-285,-279},{-323,-315,-282,-312,-276,-268},{-315,-276,-285,-320,-291,-276}},{{-297,-312,-268,-268,-273,-288},{-312,-276,-306,-320,-282,-303},{-291,-315,-315,-312,-320,-300},{-312,-303,-291,-294,-282,-265},{-279,-300,-273,-312,-315,-273},{-265,-265,-312,-282,-279,-288},{-315,-294,-323,-285,-279,-303},{-309,-306,-291,-318,-315,-323},{-318,-285,-282,-276,-265,-315},{-312,-270,-279,-303,-294,-312}},{{-320,-309,-294,-270,-291,-320},{-265,-282,-273,-297,-315,-312},{-315,-294,-320,-279,-273,-323},{-282,-291,-306,-306,-270,-288},{-288,-312,-273,-285,-270,-309},{-270,-276,-276,-320,-285,-312},{-273,-294,-279,-294,-294,-318},{-288,-268,-303,-273,-303,-282},{-320,-297,-297,-265,-320,-276},{-294,-303,-291,-312,-291,-270}},{{-270,-270,-323,-270,-297,-303},{-288,-285,-288,-276,-306,-265},{-320,-309,-297,-306,-288,-270},{-294,-276,-285,-285,-288,-312},{-285,-309,-279,-297,-303,-294},{-276,-312,-276,-297,-285,-318},{-300,-291,-279,-318,-291,-318},{-300,-270,-291,-300,-282,-282},{-270,-306,-320,-306,-294,-320},{-318,-285,-288,-285,-279,-306}},{{-312,-268,-323,-297,-306,-270},{-306,-300,-285,-312,-312,-291},{-291,-276,-291,-318,-265,-300},{-323,-294,-276,-273,-297,-273},{-265,-312,-306,-294,-285,-320},{-268,-320,-300,-273,-268,-288},{-312,-279,-270,-273,-270,-276},{-270,-273,-294,-282,-273,-303},{-265,-268,-300,-315,-282,-268},{-288,-270,-282,-309,-294,-312}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1841,192,221,150,198,208,315,198,294}; // initial inventory 
int ubiv[I]={2104,384,442,300,396,416,630,396,588}; // the upper bounds of inventory 
int len[I1][I2]={{5,3,2,2,1,1,2,3}}; // the traveling time between two sites 
// cost parameters: 
double c1[I]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // inventory holding cost 
double c2[I]={0.05,13.32,8.46,5.6,4.24,2.89,1.51,4.53,7.74}; // cost of leftover and unmet 
double c3[BN]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // transportation cost for capacity contracts 
double c4[I1][I2]={{12.11,7.69,5.09,3.85,2.63,1.37,4.12,7.04}}; // cost of spot market 
// bid parameters: 
int RLBN[I1][I2]={{9,9,9,9,9,9,9,9}}; // number of bids on each arc 
int LBset[I1][I2][LBN]={{{0,1,2,3,4,5,6,7,8},{9,10,11,12,13,14,15,16,17},{18,19,20,21,22,23,24,25,26},{27,28,29,30,31,32,33,34,35},{36,37,38,39,40,41,42,43,44},{45,46,47,48,49,50,51,52,53},{54,55,56,57,58,59,60,61,62},{63,64,65,66,67,68,69,70,71}}}; // set of bids on each arc 
double frt[BN]={9.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,6.15,6.15,6.15,5.38,5.38,5.38,4.61,4.61,4.61,4.07,4.07,4.07,3.56,3.56,3.56,3.05,3.05,3.05,3.08,3.08,3.08,2.7,2.7,2.7,2.31,2.31,2.31,2.1,2.1,2.1,1.84,1.84,1.84,1.58,1.58,1.58,1.1,1.1,1.1,0.96,0.96,0.96,0.82,0.82,0.82,3.3,3.3,3.3,2.88,2.88,2.88,2.47,2.47,2.47,5.63,5.63,5.63,4.93,4.93,4.93,4.22,4.22,4.22}; // freight rate of each bid 
int lbcap[BN]={75,75,75,1,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226}; // capacity lower bound of each bid 
int ubcap[BN]={150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300}; // capacity upper bound of each bid 
// shipment parameters: 
int SHN[BN]={15,8,5,15,8,5,15,8,5,16,8,6,16,8,6,16,8,6,16,9,6,16,9,6,17,8,6,16,9,6,16,9,6,17,9,6,17,9,6,18,9,6,17,9,6,18,9,6,18,9,6,18,9,6,16,9,6,17,9,6,17,9,6,16,9,6,16,8,6,16,8,6}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14},{15,16,17,18,19,20,21,22},{23,24,25,26,27},{28,29,30,31,32,33,34,35,36,37,38,39,40,41,42},{43,44,45,46,47,48,49,50},{51,52,53,54,55},{56,57,58,59,60,61,62,63,64,65,66,67,68,69,70},{71,72,73,74,75,76,77,78},{79,80,81,82,83},{84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99},{100,101,102,103,104,105,106,107},{108,109,110,111,112,113},{114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129},{130,131,132,133,134,135,136,137},{138,139,140,141,142,143},{144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159},{160,161,162,163,164,165,166,167},{168,169,170,171,172,173},{174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189},{190,191,192,193,194,195,196,197,198},{199,200,201,202,203,204},{205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220},{221,222,223,224,225,226,227,228,229},{230,231,232,233,234,235},{236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252},{253,254,255,256,257,258,259,260},{261,262,263,264,265,266},{267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282},{283,284,285,286,287,288,289,290,291},{292,293,294,295,296,297},{298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313},{314,315,316,317,318,319,320,321,322},{323,324,325,326,327,328},{329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345},{346,347,348,349,350,351,352,353,354},{355,356,357,358,359,360},{361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377},{378,379,380,381,382,383,384,385,386},{387,388,389,390,391,392},{393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410},{411,412,413,414,415,416,417,418,419},{420,421,422,423,424,425},{426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442},{443,444,445,446,447,448,449,450,451},{452,453,454,455,456,457},{458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475},{476,477,478,479,480,481,482,483,484},{485,486,487,488,489,490},{491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508},{509,510,511,512,513,514,515,516,517},{518,519,520,521,522,523},{524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541},{542,543,544,545,546,547,548,549,550},{551,552,553,554,555,556},{557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572},{573,574,575,576,577,578,579,580,581},{582,583,584,585,586,587},{588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604},{605,606,607,608,609,610,611,612,613},{614,615,616,617,618,619},{620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636},{637,638,639,640,641,642,643,644,645},{646,647,648,649,650,651},{652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667},{668,669,670,671,672,673,674,675,676},{677,678,679,680,681,682},{683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698},{699,700,701,702,703,704,705,706},{707,708,709,710,711,712},{713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728},{729,730,731,732,733,734,735,736},{737,738,739,740,741,742}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,2,8,14,20,26,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,2,8,14,20,26,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,1,7,13,19,25,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,2,6,10,14,18,22,26,30,0,6,12,18,24,30}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,7,13,19,25,31,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,7,13,19,25,31,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,6,12,18,24,30,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,5,11,17,23,29,35,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,3,9,15,21,27,33,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,3,9,15,21,27,33}; // set of end times of each shipment 
