int Dev = 10;// Deviation
extern const int CNN = 1;// 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 = 345;//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]={{{{11629,0,0,0,0,0},{11612,0,0,0,0,0},{11325,0,0,0,0,0},{11446,0,0,0,0,0},{11543,0,0,0,0,0},{11622,0,0,0,0,0},{11470,0,0,0,0,0},{11425,0,0,0,0,0},{11361,0,0,0,0,0},{11540,0,0,0,0,0},{11506,0,0,0,0,0},{11391,0,0,0,0,0},{11485,0,0,0,0,0},{11454,0,0,0,0,0},{11607,0,0,0,0,0},{11682,0,0,0,0,0},{11364,0,0,0,0,0},{11496,0,0,0,0,0},{11701,0,0,0,0,0},{11328,0,0,0,0,0}},{{11638,0,0,0,0,0},{11414,0,0,0,0,0},{11551,0,0,0,0,0},{11512,0,0,0,0,0},{11573,0,0,0,0,0},{11422,0,0,0,0,0},{11616,0,0,0,0,0},{11417,0,0,0,0,0},{11494,0,0,0,0,0},{11583,0,0,0,0,0},{11558,0,0,0,0,0},{11646,0,0,0,0,0},{11278,0,0,0,0,0},{11467,0,0,0,0,0},{11481,0,0,0,0,0},{11480,0,0,0,0,0},{11800,0,0,0,0,0},{11579,0,0,0,0,0},{11370,0,0,0,0,0},{11631,0,0,0,0,0}},{{11535,0,0,0,0,0},{11424,0,0,0,0,0},{11234,0,0,0,0,0},{11539,0,0,0,0,0},{11575,0,0,0,0,0},{11490,0,0,0,0,0},{11470,0,0,0,0,0},{11510,0,0,0,0,0},{11367,0,0,0,0,0},{11595,0,0,0,0,0},{11453,0,0,0,0,0},{11357,0,0,0,0,0},{11495,0,0,0,0,0},{11473,0,0,0,0,0},{11403,0,0,0,0,0},{11395,0,0,0,0,0},{11525,0,0,0,0,0},{11327,0,0,0,0,0},{11606,0,0,0,0,0},{11581,0,0,0,0,0}}},{{{-205,-203,-207,-189,-197,-193},{-215,-183,-201,-215,-223,-209},{-207,-189,-193,-191,-221,-187},{-207,-185,-203,-219,-207,-199},{-205,-215,-219,-197,-205,-193},{-205,-215,-195,-217,-197,-203},{-221,-187,-223,-183,-209,-207},{-201,-217,-191,-221,-185,-213},{-223,-189,-183,-189,-193,-221},{-221,-213,-195,-195,-219,-199},{-197,-205,-193,-195,-209,-209},{-201,-201,-191,-217,-217,-205},{-193,-215,-217,-201,-211,-223},{-201,-209,-199,-219,-191,-189},{-219,-223,-191,-219,-185,-183},{-197,-223,-207,-221,-193,-217},{-193,-207,-193,-189,-209,-191},{-197,-217,-221,-217,-203,-205},{-213,-219,-215,-191,-203,-211},{-191,-193,-191,-193,-199,-183}},{{-201,-191,-189,-219,-189,-217},{-187,-197,-201,-209,-209,-191},{-215,-217,-205,-195,-197,-211},{-191,-221,-195,-203,-223,-197},{-213,-223,-201,-189,-205,-195},{-199,-201,-195,-199,-209,-205},{-211,-217,-187,-221,-187,-185},{-215,-203,-185,-185,-199,-193},{-191,-213,-201,-183,-201,-195},{-203,-223,-213,-195,-187,-213},{-193,-213,-207,-197,-223,-219},{-213,-205,-189,-201,-209,-183},{-187,-209,-197,-205,-195,-191},{-191,-217,-183,-185,-209,-185},{-215,-223,-201,-193,-187,-219},{-187,-205,-213,-195,-215,-211},{-197,-215,-217,-189,-221,-215},{-203,-203,-203,-197,-213,-219},{-191,-203,-191,-191,-221,-215},{-195,-199,-215,-223,-183,-217}},{{-215,-223,-183,-223,-185,-209},{-217,-185,-213,-209,-207,-207},{-201,-221,-189,-203,-187,-223},{-187,-189,-223,-217,-187,-205},{-215,-223,-215,-209,-199,-187},{-183,-211,-193,-223,-185,-203},{-193,-217,-191,-201,-197,-209},{-207,-215,-199,-207,-215,-185},{-189,-185,-219,-195,-193,-187},{-191,-209,-209,-211,-221,-197},{-207,-209,-183,-223,-197,-203},{-217,-213,-193,-219,-197,-207},{-195,-191,-195,-217,-205,-207},{-213,-207,-217,-209,-199,-201},{-199,-195,-207,-201,-207,-199},{-203,-211,-209,-221,-199,-201},{-207,-217,-195,-217,-203,-191},{-205,-199,-183,-187,-219,-185},{-201,-197,-195,-199,-219,-213},{-213,-193,-187,-185,-213,-215}}},{{{-163,-163,-145,-166,-156,-167},{-145,-175,-150,-155,-174,-156},{-158,-145,-145,-177,-150,-159},{-161,-174,-169,-161,-148,-148},{-175,-153,-151,-177,-148,-156},{-159,-161,-172,-177,-164,-167},{-145,-167,-161,-158,-150,-147},{-163,-166,-169,-163,-155,-172},{-174,-151,-161,-163,-150,-164},{-177,-151,-166,-166,-175,-159},{-150,-145,-171,-163,-153,-166},{-156,-153,-150,-148,-158,-166},{-158,-156,-148,-155,-172,-175},{-175,-175,-177,-150,-153,-161},{-159,-159,-151,-174,-156,-155},{-161,-167,-151,-164,-159,-167},{-151,-156,-171,-172,-166,-155},{-151,-175,-148,-156,-175,-175},{-150,-169,-175,-169,-171,-164},{-161,-169,-156,-172,-151,-169}},{{-171,-166,-164,-158,-150,-172},{-177,-151,-150,-174,-155,-177},{-151,-150,-148,-159,-166,-159},{-161,-161,-161,-161,-150,-164},{-161,-161,-169,-155,-171,-171},{-161,-171,-172,-155,-151,-175},{-155,-175,-169,-163,-171,-164},{-161,-172,-169,-145,-158,-156},{-161,-147,-166,-175,-174,-172},{-156,-164,-147,-163,-175,-169},{-177,-166,-147,-156,-150,-167},{-171,-151,-175,-150,-177,-175},{-163,-161,-156,-151,-150,-159},{-155,-163,-169,-155,-174,-177},{-147,-169,-167,-155,-156,-161},{-161,-148,-151,-175,-172,-175},{-166,-166,-151,-164,-150,-151},{-153,-156,-145,-174,-163,-164},{-158,-155,-159,-164,-171,-169},{-156,-158,-151,-156,-163,-155}},{{-174,-156,-164,-175,-161,-151},{-166,-163,-145,-166,-166,-166},{-156,-147,-169,-151,-147,-159},{-150,-174,-148,-153,-163,-145},{-147,-164,-163,-163,-158,-177},{-169,-171,-155,-171,-158,-172},{-169,-169,-147,-155,-164,-175},{-171,-156,-169,-153,-161,-169},{-153,-156,-153,-164,-161,-153},{-177,-161,-147,-171,-167,-177},{-172,-172,-147,-158,-159,-167},{-148,-158,-150,-171,-151,-153},{-145,-167,-169,-163,-147,-153},{-174,-174,-147,-167,-159,-174},{-167,-166,-147,-169,-167,-177},{-155,-164,-150,-171,-177,-151},{-147,-155,-166,-167,-155,-159},{-172,-177,-159,-164,-148,-148},{-150,-164,-156,-159,-171,-175},{-177,-147,-159,-155,-158,-156}}},{{{-231,-215,-229,-236,-217,-243},{-215,-238,-243,-231,-233,-231},{-231,-252,-231,-222,-236,-222},{-236,-231,-249,-252,-219,-233},{-219,-208,-254,-245,-222,-219},{-254,-252,-219,-217,-208,-245},{-238,-229,-213,-236,-238,-231},{-229,-240,-224,-224,-245,-208},{-231,-233,-226,-213,-238,-229},{-226,-229,-215,-252,-252,-245},{-245,-240,-217,-208,-219,-245},{-215,-208,-240,-226,-219,-238},{-222,-226,-226,-247,-224,-238},{-238,-224,-222,-224,-231,-249},{-247,-224,-231,-238,-245,-222},{-252,-215,-247,-219,-224,-231},{-208,-219,-219,-215,-252,-210},{-229,-208,-252,-217,-247,-224},{-222,-249,-247,-238,-208,-236},{-243,-217,-222,-240,-252,-208}},{{-224,-224,-226,-208,-219,-238},{-231,-243,-247,-249,-210,-226},{-224,-252,-215,-210,-247,-224},{-217,-249,-224,-226,-254,-226},{-224,-226,-240,-240,-229,-240},{-229,-224,-252,-240,-240,-210},{-252,-229,-213,-238,-238,-240},{-245,-215,-243,-226,-222,-249},{-240,-231,-231,-245,-208,-247},{-229,-215,-222,-229,-229,-208},{-229,-215,-231,-219,-219,-243},{-219,-222,-222,-247,-243,-233},{-245,-224,-249,-252,-213,-210},{-224,-231,-231,-224,-252,-210},{-224,-240,-247,-240,-210,-222},{-224,-224,-231,-231,-236,-240},{-240,-222,-219,-252,-210,-233},{-222,-229,-254,-249,-236,-224},{-213,-217,-247,-213,-236,-217},{-236,-224,-236,-249,-252,-240}},{{-236,-219,-219,-238,-238,-219},{-219,-236,-215,-215,-217,-247},{-222,-245,-247,-208,-217,-249},{-229,-233,-224,-229,-215,-229},{-249,-229,-213,-254,-236,-224},{-240,-208,-222,-215,-254,-247},{-236,-240,-249,-219,-210,-243},{-236,-245,-222,-236,-222,-215},{-222,-236,-213,-236,-240,-226},{-222,-224,-213,-217,-254,-240},{-210,-229,-243,-245,-233,-252},{-231,-233,-245,-219,-254,-231},{-236,-236,-236,-210,-252,-247},{-217,-224,-217,-222,-210,-210},{-226,-254,-229,-226,-247,-240},{-222,-222,-249,-213,-222,-240},{-213,-254,-249,-245,-243,-245},{-254,-208,-208,-243,-213,-215},{-243,-213,-249,-213,-240,-236},{-252,-249,-240,-224,-213,-254}}},{{{-239,-197,-232,-239,-221,-200},{-217,-206,-197,-197,-228,-215},{-224,-213,-232,-210,-208,-210},{-206,-206,-221,-228,-195,-195},{-237,-210,-234,-230,-232,-200},{-221,-202,-215,-228,-200,-221},{-226,-215,-197,-210,-195,-239},{-221,-226,-213,-228,-221,-195},{-197,-200,-230,-208,-239,-234},{-215,-197,-206,-208,-221,-208},{-206,-228,-230,-210,-217,-234},{-202,-226,-228,-224,-197,-204},{-208,-230,-226,-228,-228,-210},{-213,-210,-221,-204,-206,-202},{-237,-224,-210,-224,-210,-237},{-226,-228,-234,-239,-204,-224},{-217,-228,-228,-221,-202,-204},{-239,-204,-217,-230,-237,-210},{-215,-221,-221,-228,-226,-208},{-226,-213,-226,-226,-237,-215}},{{-234,-221,-232,-237,-228,-239},{-234,-224,-230,-202,-208,-217},{-213,-239,-226,-230,-195,-226},{-221,-197,-232,-230,-221,-232},{-204,-237,-206,-213,-224,-206},{-210,-234,-215,-200,-219,-232},{-226,-239,-219,-237,-195,-219},{-210,-213,-230,-202,-204,-208},{-204,-219,-221,-217,-195,-204},{-195,-230,-217,-232,-237,-237},{-210,-239,-197,-224,-219,-228},{-230,-234,-197,-206,-237,-230},{-239,-204,-204,-206,-226,-226},{-234,-221,-213,-210,-202,-202},{-217,-226,-217,-202,-237,-200},{-210,-219,-217,-221,-213,-230},{-224,-228,-224,-210,-206,-217},{-234,-224,-217,-230,-204,-200},{-219,-215,-210,-195,-200,-230},{-239,-239,-230,-197,-219,-221}},{{-213,-204,-226,-239,-237,-228},{-200,-239,-204,-230,-197,-195},{-204,-208,-234,-206,-210,-237},{-232,-237,-221,-239,-215,-230},{-221,-237,-234,-210,-217,-228},{-232,-210,-210,-200,-221,-213},{-197,-202,-215,-195,-217,-208},{-232,-232,-221,-206,-228,-219},{-210,-195,-232,-217,-210,-215},{-228,-232,-234,-206,-210,-202},{-217,-206,-215,-221,-197,-208},{-228,-208,-226,-217,-230,-237},{-197,-234,-228,-217,-210,-219},{-217,-213,-215,-213,-204,-226},{-210,-234,-213,-219,-219,-206},{-221,-204,-204,-228,-232,-228},{-228,-237,-200,-208,-208,-202},{-195,-224,-224,-213,-234,-213},{-206,-226,-232,-215,-239,-206},{-195,-215,-215,-215,-208,-197}}},{{{-261,-258,-277,-274,-263,-279},{-263,-277,-293,-285,-282,-271},{-258,-242,-253,-250,-261,-277},{-247,-247,-285,-261,-242,-263},{-277,-250,-253,-250,-282,-247},{-282,-247,-279,-250,-255,-258},{-247,-263,-266,-282,-261,-279},{-247,-242,-261,-274,-263,-263},{-239,-261,-269,-242,-255,-277},{-266,-269,-263,-269,-250,-274},{-261,-277,-287,-247,-282,-255},{-266,-239,-263,-269,-245,-269},{-269,-274,-277,-279,-253,-293},{-261,-266,-274,-287,-263,-255},{-266,-274,-245,-285,-242,-258},{-287,-271,-285,-287,-285,-261},{-261,-274,-255,-242,-290,-239},{-266,-239,-279,-258,-253,-271},{-285,-239,-253,-266,-290,-247},{-266,-253,-271,-250,-282,-290}},{{-293,-253,-242,-269,-269,-242},{-266,-245,-271,-274,-277,-271},{-263,-258,-247,-266,-293,-263},{-258,-263,-261,-239,-269,-269},{-269,-282,-255,-279,-258,-258},{-266,-250,-247,-245,-239,-245},{-293,-279,-287,-253,-255,-266},{-258,-287,-279,-247,-282,-245},{-269,-290,-277,-282,-290,-258},{-277,-274,-271,-271,-245,-255},{-258,-266,-271,-285,-253,-290},{-247,-274,-247,-279,-242,-282},{-287,-285,-239,-274,-247,-245},{-263,-287,-271,-277,-247,-266},{-258,-274,-255,-239,-245,-266},{-247,-271,-293,-245,-258,-261},{-279,-261,-271,-285,-282,-293},{-285,-282,-285,-279,-277,-245},{-247,-250,-266,-258,-261,-239},{-277,-266,-290,-258,-239,-269}},{{-261,-287,-271,-282,-255,-250},{-277,-239,-253,-282,-245,-274},{-277,-239,-250,-263,-253,-245},{-258,-287,-266,-274,-293,-247},{-293,-242,-266,-279,-258,-282},{-293,-239,-263,-293,-245,-255},{-266,-271,-247,-282,-285,-279},{-250,-269,-266,-266,-258,-258},{-271,-247,-269,-250,-277,-239},{-269,-250,-250,-239,-242,-293},{-255,-245,-282,-285,-266,-255},{-239,-255,-247,-263,-247,-239},{-290,-277,-242,-287,-247,-293},{-290,-247,-293,-250,-250,-247},{-245,-245,-277,-255,-255,-263},{-269,-263,-253,-266,-287,-245},{-250,-242,-239,-255,-287,-271},{-274,-287,-250,-255,-253,-250},{-282,-293,-282,-258,-269,-242},{-293,-285,-293,-266,-282,-250}}},{{{-260,-297,-308,-300,-300,-305},{-274,-258,-269,-302,-286,-263},{-266,-258,-255,-288,-269,-283},{-272,-305,-291,-291,-274,-255},{-274,-302,-297,-283,-269,-280},{-252,-288,-302,-297,-280,-272},{-269,-263,-286,-277,-302,-266},{-269,-263,-308,-274,-286,-277},{-291,-297,-252,-286,-274,-302},{-288,-266,-308,-252,-266,-291},{-272,-291,-263,-300,-274,-269},{-274,-266,-272,-266,-260,-305},{-258,-252,-308,-260,-286,-260},{-260,-288,-302,-288,-280,-263},{-308,-291,-252,-297,-283,-260},{-269,-297,-294,-277,-302,-272},{-272,-272,-297,-266,-302,-272},{-274,-272,-280,-272,-280,-266},{-272,-258,-283,-288,-297,-308},{-263,-266,-252,-266,-258,-269}},{{-288,-291,-294,-260,-274,-280},{-274,-274,-280,-297,-302,-277},{-305,-305,-263,-294,-277,-252},{-263,-283,-308,-291,-286,-308},{-252,-283,-277,-280,-266,-266},{-274,-280,-272,-297,-300,-294},{-283,-302,-263,-302,-308,-266},{-302,-274,-294,-258,-263,-300},{-288,-286,-297,-305,-255,-280},{-302,-297,-283,-308,-280,-291},{-297,-288,-269,-269,-283,-255},{-302,-302,-294,-272,-288,-308},{-277,-260,-263,-258,-260,-252},{-274,-308,-291,-300,-277,-294},{-294,-252,-286,-305,-277,-308},{-260,-255,-280,-288,-308,-277},{-300,-308,-258,-291,-294,-308},{-308,-288,-294,-274,-291,-283},{-260,-280,-297,-294,-302,-258},{-300,-263,-297,-266,-302,-294}},{{-263,-280,-277,-277,-260,-277},{-269,-291,-294,-272,-263,-280},{-274,-258,-266,-280,-272,-263},{-300,-252,-305,-272,-252,-300},{-260,-300,-305,-283,-260,-277},{-294,-269,-269,-269,-266,-260},{-272,-272,-286,-305,-286,-283},{-266,-260,-274,-291,-280,-269},{-283,-302,-288,-280,-255,-263},{-274,-308,-277,-302,-297,-272},{-255,-308,-277,-263,-280,-305},{-266,-305,-263,-300,-291,-286},{-274,-297,-266,-286,-283,-260},{-297,-252,-302,-258,-288,-258},{-260,-255,-297,-274,-252,-252},{-286,-269,-286,-258,-288,-252},{-260,-302,-280,-308,-269,-266},{-286,-252,-305,-252,-302,-269},{-305,-280,-302,-255,-277,-272},{-277,-288,-294,-308,-286,-269}}},{{{-269,-283,-277,-291,-280,-308},{-308,-294,-302,-252,-263,-283},{-252,-286,-263,-302,-294,-266},{-266,-302,-269,-252,-252,-263},{-260,-291,-277,-288,-269,-283},{-274,-288,-291,-283,-308,-294},{-305,-302,-274,-280,-263,-252},{-291,-277,-260,-277,-286,-274},{-258,-258,-288,-280,-266,-269},{-294,-272,-300,-280,-274,-277},{-286,-305,-297,-283,-277,-260},{-286,-263,-288,-291,-305,-308},{-297,-266,-255,-263,-255,-272},{-291,-266,-300,-277,-252,-297},{-260,-300,-297,-286,-294,-297},{-252,-255,-286,-255,-258,-294},{-288,-252,-260,-297,-300,-272},{-288,-258,-283,-258,-252,-302},{-258,-288,-294,-272,-252,-288},{-300,-252,-274,-280,-277,-291}},{{-269,-308,-300,-272,-305,-294},{-252,-286,-263,-277,-283,-286},{-252,-286,-302,-302,-283,-272},{-272,-263,-258,-288,-283,-263},{-300,-258,-291,-286,-297,-291},{-286,-266,-266,-260,-260,-305},{-291,-252,-283,-300,-288,-274},{-263,-283,-294,-305,-263,-260},{-297,-252,-252,-255,-260,-280},{-263,-286,-269,-297,-263,-286},{-266,-277,-286,-302,-302,-302},{-272,-277,-302,-272,-283,-272},{-263,-274,-258,-266,-297,-272},{-260,-274,-291,-300,-269,-302},{-302,-274,-260,-277,-302,-258},{-294,-288,-291,-288,-286,-263},{-272,-297,-274,-300,-308,-266},{-258,-255,-272,-260,-300,-272},{-277,-258,-308,-280,-291,-269},{-258,-258,-272,-269,-286,-288}},{{-266,-269,-297,-302,-274,-260},{-302,-297,-277,-263,-300,-269},{-277,-288,-258,-300,-266,-263},{-269,-280,-252,-291,-263,-280},{-308,-252,-255,-260,-263,-308},{-252,-308,-288,-302,-286,-288},{-291,-280,-274,-294,-291,-291},{-291,-260,-277,-305,-294,-258},{-283,-283,-274,-258,-297,-288},{-274,-308,-288,-300,-274,-283},{-252,-274,-294,-260,-297,-297},{-291,-266,-272,-280,-252,-291},{-252,-252,-266,-260,-274,-302},{-297,-266,-272,-297,-277,-297},{-255,-260,-291,-283,-286,-277},{-252,-266,-291,-258,-269,-263},{-291,-260,-291,-286,-272,-300},{-255,-255,-291,-274,-294,-302},{-286,-300,-286,-277,-252,-291},{-258,-308,-255,-255,-263,-283}}},{{{-274,-272,-294,-294,-266,-286},{-274,-277,-294,-291,-297,-302},{-283,-272,-272,-280,-308,-274},{-308,-308,-286,-258,-297,-300},{-283,-274,-288,-305,-274,-283},{-277,-300,-302,-258,-308,-263},{-266,-297,-286,-308,-274,-277},{-252,-266,-260,-255,-308,-302},{-269,-300,-260,-272,-297,-260},{-258,-274,-263,-286,-288,-302},{-252,-288,-266,-294,-291,-274},{-288,-280,-258,-291,-294,-255},{-294,-258,-274,-274,-297,-274},{-302,-255,-280,-272,-266,-266},{-286,-263,-291,-286,-294,-269},{-272,-294,-305,-302,-286,-266},{-258,-305,-260,-255,-291,-308},{-305,-274,-294,-252,-266,-300},{-291,-308,-288,-300,-302,-305},{-266,-263,-269,-305,-260,-252}},{{-283,-300,-291,-272,-300,-272},{-260,-252,-252,-258,-258,-280},{-302,-305,-266,-286,-280,-255},{-283,-294,-272,-308,-258,-255},{-294,-252,-297,-302,-269,-308},{-302,-266,-272,-252,-300,-280},{-274,-263,-283,-269,-260,-272},{-272,-269,-258,-302,-291,-260},{-280,-283,-302,-258,-302,-255},{-258,-266,-274,-288,-294,-297},{-255,-283,-302,-263,-260,-288},{-286,-291,-286,-297,-286,-266},{-291,-260,-286,-277,-305,-260},{-258,-283,-252,-255,-274,-277},{-288,-277,-283,-255,-269,-302},{-252,-260,-300,-288,-263,-260},{-302,-297,-263,-308,-291,-305},{-297,-283,-260,-288,-269,-258},{-308,-252,-283,-300,-269,-263},{-308,-260,-291,-288,-277,-302}},{{-286,-277,-297,-258,-288,-286},{-283,-272,-280,-283,-263,-272},{-291,-269,-269,-255,-266,-252},{-260,-302,-283,-302,-294,-283},{-269,-258,-297,-260,-308,-260},{-305,-291,-269,-255,-277,-288},{-272,-263,-266,-283,-255,-258},{-280,-283,-272,-305,-283,-274},{-288,-297,-286,-258,-266,-305},{-272,-258,-283,-274,-305,-283},{-272,-274,-283,-266,-283,-252},{-258,-252,-263,-263,-260,-272},{-297,-291,-286,-274,-255,-308},{-266,-300,-286,-258,-305,-291},{-308,-297,-294,-269,-260,-269},{-286,-274,-263,-263,-297,-294},{-300,-302,-269,-260,-291,-263},{-266,-255,-272,-300,-252,-286},{-308,-294,-255,-297,-252,-274},{-297,-288,-300,-291,-302,-255}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={2070,261,23,150,170,304,400,300,160}; // initial inventory 
int ubiv[I]={2740,522,414,300,341,608,800,600,320}; // the upper bounds of inventory 
int len[I1][I2]={{3,6,2,2,3,3,2,1}}; // 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,7.19,13.32,4.32,2.64,5.16,6.85,4.63,1.82}; // 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]={{6.54,12.11,3.93,2.4,4.69,6.23,4.21,1.65}}; // 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]={5.23,5.23,5.23,4.58,4.58,4.58,3.92,3.92,3.92,9.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,3.14,3.14,3.14,2.75,2.75,2.75,2.36,2.36,2.36,1.92,1.92,1.92,1.68,1.68,1.68,1.44,1.44,1.44,3.75,3.75,3.75,3.28,3.28,3.28,2.81,2.81,2.81,4.98,4.98,4.98,4.36,4.36,4.36,3.74,3.74,3.74,3.37,3.37,3.37,2.95,2.95,2.95,2.53,2.53,2.53,1.32,1.32,1.32,1.16,1.16,1.16,0.99,0.99,0.99}; // 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]={8,4,3,8,4,3,7,4,3,6,3,2,6,3,2,6,3,2,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,7,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,4,3,8,5,3,8,5,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}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,1,5,9,13,2,8,14,1,3,5,7,9,11,2,6,10,1,7,0,2,4,6,8,10,1,5,9,0,6,1,3,5,7,9,11,1,5,9,0,6,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,0,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,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,1,3,5,7,9,11,13,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,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,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,1,3,5,7,9,11,13,15,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,16,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,16,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={3,5,7,9,11,13,15,17,5,9,13,17,5,11,17,3,5,7,9,11,13,15,17,3,7,11,15,5,11,17,5,7,9,11,13,15,17,4,8,12,16,5,11,17,7,9,11,13,15,17,8,12,16,7,13,6,8,10,12,14,16,7,11,15,6,12,7,9,11,13,15,17,7,11,15,6,12,4,6,8,10,12,14,16,4,8,12,16,4,10,16,4,6,8,10,12,14,16,4,8,12,16,2,8,14,2,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,2,8,14,2,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,3,7,11,15,4,10,16,4,6,8,10,12,14,16,3,7,11,15,5,11,17,5,7,9,11,13,15,17,3,7,11,15,3,9,15,4,6,8,10,12,14,16,4,8,12,16,3,9,15,3,5,7,9,11,13,15,17,5,9,13,17,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,4,10,16,1,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,17,1,7,13}; // set of end times of each shipment 
