int Dev = 10;// Deviation
extern const int CNN = 1;// 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 = 735;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 17;//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]={{{{11476,0,0,0,0,0},{11706,0,0,0,0,0},{11630,0,0,0,0,0},{11392,0,0,0,0,0},{11688,0,0,0,0,0},{11460,0,0,0,0,0},{11435,0,0,0,0,0},{11560,0,0,0,0,0},{11544,0,0,0,0,0},{11602,0,0,0,0,0}},{{11613,0,0,0,0,0},{11443,0,0,0,0,0},{11434,0,0,0,0,0},{11483,0,0,0,0,0},{11474,0,0,0,0,0},{11543,0,0,0,0,0},{11577,0,0,0,0,0},{11652,0,0,0,0,0},{11636,0,0,0,0,0},{11604,0,0,0,0,0}},{{11484,0,0,0,0,0},{11491,0,0,0,0,0},{11341,0,0,0,0,0},{11653,0,0,0,0,0},{11497,0,0,0,0,0},{11537,0,0,0,0,0},{11489,0,0,0,0,0},{11714,0,0,0,0,0},{11467,0,0,0,0,0},{11614,0,0,0,0,0}},{{11542,0,0,0,0,0},{11526,0,0,0,0,0},{11402,0,0,0,0,0},{11274,0,0,0,0,0},{11568,0,0,0,0,0},{11633,0,0,0,0,0},{11494,0,0,0,0,0},{11638,0,0,0,0,0},{11500,0,0,0,0,0},{11586,0,0,0,0,0}},{{11410,0,0,0,0,0},{11460,0,0,0,0,0},{11664,0,0,0,0,0},{11663,0,0,0,0,0},{11626,0,0,0,0,0},{11535,0,0,0,0,0},{11407,0,0,0,0,0},{11410,0,0,0,0,0},{11526,0,0,0,0,0},{11603,0,0,0,0,0}},{{11548,0,0,0,0,0},{11503,0,0,0,0,0},{11494,0,0,0,0,0},{11413,0,0,0,0,0},{11429,0,0,0,0,0},{11511,0,0,0,0,0},{11648,0,0,0,0,0},{11540,0,0,0,0,0},{11363,0,0,0,0,0},{11649,0,0,0,0,0}}},{{{-191,-189,-193,-209,-189,-223},{-199,-195,-193,-201,-223,-183},{-221,-223,-215,-213,-187,-207},{-203,-207,-205,-195,-197,-207},{-203,-187,-209,-191,-221,-205},{-211,-191,-195,-199,-213,-195},{-223,-183,-221,-193,-213,-189},{-189,-211,-213,-201,-209,-215},{-215,-187,-205,-189,-219,-187},{-221,-201,-215,-203,-217,-189}},{{-183,-189,-185,-213,-197,-197},{-201,-209,-183,-219,-199,-193},{-203,-211,-201,-185,-201,-183},{-209,-187,-209,-211,-201,-185},{-189,-195,-215,-217,-185,-213},{-221,-213,-197,-211,-195,-193},{-183,-205,-199,-211,-195,-199},{-219,-185,-199,-191,-191,-195},{-219,-203,-223,-221,-197,-187},{-195,-219,-217,-187,-221,-211}},{{-195,-183,-205,-213,-217,-197},{-209,-217,-189,-209,-195,-213},{-183,-197,-203,-213,-199,-197},{-187,-195,-223,-215,-207,-191},{-215,-197,-205,-207,-197,-215},{-209,-219,-211,-215,-195,-217},{-223,-217,-191,-219,-207,-213},{-211,-197,-209,-185,-223,-209},{-197,-185,-211,-217,-213,-195},{-189,-203,-209,-201,-201,-183}},{{-195,-185,-205,-209,-187,-193},{-209,-209,-203,-207,-199,-207},{-205,-219,-191,-209,-213,-211},{-217,-191,-199,-185,-185,-195},{-213,-195,-189,-197,-217,-183},{-203,-219,-197,-221,-205,-221},{-211,-205,-215,-185,-219,-209},{-207,-209,-207,-197,-209,-197},{-217,-217,-207,-201,-191,-201},{-223,-217,-217,-189,-201,-199}},{{-205,-195,-187,-219,-185,-221},{-205,-203,-219,-191,-221,-203},{-223,-191,-209,-223,-199,-195},{-191,-219,-201,-217,-193,-187},{-211,-195,-203,-207,-207,-211},{-217,-187,-217,-195,-213,-191},{-195,-191,-209,-213,-195,-223},{-189,-215,-205,-199,-219,-203},{-213,-213,-191,-193,-209,-211},{-195,-191,-191,-197,-197,-223}},{{-219,-223,-223,-191,-217,-203},{-189,-209,-187,-213,-199,-207},{-193,-213,-189,-219,-217,-189},{-199,-193,-217,-191,-219,-219},{-197,-211,-211,-195,-205,-183},{-191,-195,-215,-201,-209,-189},{-223,-199,-201,-223,-219,-215},{-189,-183,-195,-207,-197,-185},{-195,-201,-205,-199,-209,-221},{-195,-221,-201,-205,-213,-197}}},{{{-148,-174,-147,-155,-166,-171},{-171,-177,-169,-148,-147,-164},{-164,-159,-174,-169,-164,-166},{-158,-167,-169,-171,-145,-172},{-174,-171,-150,-153,-169,-177},{-177,-167,-164,-145,-158,-159},{-172,-169,-177,-161,-169,-153},{-177,-159,-172,-175,-153,-174},{-147,-147,-175,-175,-158,-177},{-158,-175,-148,-145,-158,-153}},{{-177,-145,-172,-145,-175,-150},{-177,-147,-161,-171,-159,-156},{-172,-159,-147,-167,-172,-172},{-158,-147,-169,-177,-163,-148},{-177,-150,-172,-172,-171,-171},{-171,-161,-155,-161,-156,-153},{-151,-166,-161,-155,-155,-156},{-161,-171,-172,-159,-161,-166},{-148,-172,-172,-155,-161,-147},{-175,-159,-148,-151,-145,-167}},{{-167,-156,-164,-150,-158,-167},{-155,-161,-156,-174,-164,-177},{-163,-167,-156,-159,-155,-150},{-151,-159,-148,-164,-174,-155},{-145,-164,-156,-161,-153,-172},{-147,-158,-148,-174,-147,-167},{-147,-169,-150,-147,-145,-164},{-177,-148,-177,-161,-147,-177},{-148,-174,-150,-158,-175,-156},{-164,-158,-169,-169,-163,-145}},{{-174,-156,-169,-164,-155,-163},{-169,-169,-156,-151,-169,-148},{-175,-159,-153,-172,-150,-164},{-167,-153,-177,-177,-171,-156},{-172,-147,-166,-175,-150,-155},{-151,-174,-145,-155,-171,-156},{-161,-164,-150,-153,-151,-153},{-161,-150,-161,-177,-148,-171},{-153,-166,-175,-153,-163,-148},{-147,-156,-167,-164,-148,-159}},{{-177,-156,-155,-158,-171,-155},{-148,-147,-167,-172,-156,-148},{-151,-167,-174,-148,-155,-163},{-166,-171,-171,-166,-164,-172},{-158,-171,-151,-156,-150,-167},{-171,-159,-163,-159,-158,-175},{-155,-153,-169,-164,-172,-150},{-156,-161,-175,-153,-158,-174},{-174,-172,-148,-156,-156,-177},{-153,-164,-166,-145,-155,-148}},{{-177,-158,-148,-151,-166,-163},{-177,-151,-164,-155,-167,-164},{-145,-161,-169,-167,-163,-155},{-172,-161,-153,-159,-153,-175},{-175,-150,-166,-158,-164,-174},{-175,-159,-156,-161,-177,-151},{-174,-171,-161,-167,-164,-153},{-161,-151,-171,-163,-145,-177},{-158,-163,-159,-156,-158,-156},{-145,-172,-177,-164,-171,-164}}},{{{-249,-233,-217,-252,-236,-210},{-233,-219,-252,-247,-247,-208},{-247,-233,-252,-219,-252,-245},{-238,-213,-245,-247,-231,-229},{-254,-219,-252,-252,-247,-252},{-238,-210,-231,-208,-213,-231},{-219,-238,-217,-252,-252,-213},{-238,-224,-208,-215,-243,-245},{-213,-215,-238,-238,-222,-229},{-252,-240,-233,-254,-226,-226}},{{-208,-224,-226,-240,-224,-238},{-210,-215,-219,-240,-222,-213},{-217,-231,-245,-208,-236,-224},{-236,-236,-224,-231,-233,-226},{-213,-222,-229,-213,-222,-224},{-249,-240,-249,-247,-210,-208},{-233,-222,-252,-219,-247,-222},{-236,-245,-254,-226,-226,-231},{-240,-249,-231,-226,-249,-243},{-247,-229,-219,-208,-240,-222}},{{-247,-240,-240,-215,-229,-231},{-208,-208,-240,-245,-213,-210},{-208,-217,-238,-247,-247,-208},{-215,-233,-222,-226,-243,-208},{-219,-226,-231,-222,-249,-231},{-215,-229,-219,-215,-231,-222},{-210,-238,-219,-247,-240,-224},{-254,-231,-213,-245,-249,-243},{-252,-240,-219,-243,-254,-233},{-236,-249,-222,-229,-217,-208}},{{-224,-213,-226,-238,-231,-247},{-233,-231,-226,-249,-224,-217},{-238,-224,-217,-215,-224,-247},{-226,-240,-217,-213,-213,-222},{-249,-222,-247,-222,-222,-226},{-215,-229,-240,-245,-210,-245},{-247,-219,-213,-229,-215,-233},{-210,-231,-226,-236,-249,-249},{-249,-219,-210,-208,-213,-210},{-252,-224,-254,-238,-224,-252}},{{-233,-236,-215,-224,-215,-222},{-210,-252,-233,-243,-226,-213},{-249,-215,-229,-215,-236,-217},{-247,-254,-213,-252,-215,-208},{-252,-231,-254,-254,-249,-226},{-222,-224,-229,-236,-245,-236},{-213,-233,-224,-231,-249,-219},{-240,-222,-213,-213,-213,-222},{-224,-231,-224,-215,-215,-236},{-224,-252,-215,-210,-226,-226}},{{-245,-243,-222,-208,-233,-252},{-217,-236,-222,-254,-247,-231},{-238,-217,-226,-245,-217,-243},{-231,-226,-236,-240,-217,-224},{-252,-222,-226,-249,-254,-222},{-217,-238,-254,-210,-208,-245},{-222,-224,-245,-233,-213,-215},{-245,-231,-229,-254,-233,-226},{-243,-219,-238,-208,-229,-217},{-213,-240,-245,-233,-240,-254}}},{{{-237,-195,-213,-217,-195,-215},{-224,-221,-221,-208,-237,-237},{-221,-206,-195,-221,-221,-204},{-210,-230,-219,-234,-195,-197},{-219,-234,-232,-228,-215,-210},{-239,-224,-239,-206,-195,-234},{-210,-210,-221,-206,-217,-215},{-237,-232,-237,-206,-219,-230},{-239,-206,-228,-206,-230,-202},{-206,-217,-234,-197,-213,-215}},{{-204,-213,-219,-226,-221,-197},{-237,-226,-219,-210,-215,-230},{-202,-210,-219,-232,-197,-210},{-232,-228,-224,-215,-210,-219},{-215,-237,-200,-219,-195,-234},{-224,-232,-226,-210,-215,-204},{-213,-224,-217,-215,-206,-226},{-237,-206,-210,-224,-239,-226},{-237,-226,-230,-200,-195,-208},{-206,-210,-195,-234,-197,-208}},{{-195,-204,-234,-195,-200,-226},{-217,-224,-219,-202,-224,-215},{-224,-213,-239,-210,-202,-217},{-237,-239,-237,-195,-195,-221},{-226,-195,-197,-237,-228,-204},{-239,-202,-215,-200,-213,-228},{-195,-197,-215,-197,-204,-215},{-221,-232,-230,-219,-234,-234},{-234,-197,-195,-226,-204,-239},{-237,-219,-219,-213,-228,-232}},{{-230,-217,-228,-237,-237,-237},{-197,-226,-232,-215,-208,-217},{-210,-228,-215,-197,-221,-237},{-237,-217,-237,-195,-228,-200},{-217,-228,-232,-228,-208,-202},{-213,-224,-234,-213,-213,-237},{-221,-213,-215,-226,-226,-215},{-217,-226,-226,-228,-232,-219},{-221,-230,-232,-206,-213,-208},{-208,-217,-215,-224,-239,-232}},{{-221,-226,-239,-234,-239,-195},{-219,-202,-204,-202,-239,-239},{-202,-228,-224,-213,-228,-202},{-210,-202,-213,-210,-221,-219},{-237,-208,-230,-206,-228,-202},{-195,-204,-213,-226,-200,-228},{-228,-202,-195,-219,-204,-232},{-208,-224,-206,-226,-197,-200},{-204,-230,-217,-234,-215,-234},{-239,-239,-230,-234,-200,-206}},{{-226,-239,-239,-195,-239,-232},{-224,-200,-232,-234,-239,-204},{-197,-208,-217,-215,-234,-197},{-197,-204,-202,-215,-224,-215},{-195,-204,-234,-226,-200,-213},{-228,-237,-232,-234,-206,-234},{-228,-202,-206,-200,-217,-213},{-206,-228,-195,-219,-221,-237},{-204,-195,-208,-228,-208,-208},{-226,-232,-228,-239,-217,-213}}},{{{-285,-258,-274,-253,-239,-282},{-277,-263,-271,-245,-285,-285},{-282,-269,-277,-250,-269,-269},{-255,-266,-258,-285,-266,-245},{-271,-285,-261,-293,-245,-271},{-245,-263,-290,-279,-271,-261},{-263,-253,-261,-253,-274,-266},{-253,-274,-253,-250,-290,-261},{-258,-253,-279,-293,-263,-253},{-255,-242,-255,-290,-279,-287}},{{-277,-258,-285,-293,-271,-287},{-253,-250,-279,-282,-266,-290},{-287,-282,-253,-242,-258,-253},{-242,-258,-250,-245,-274,-279},{-277,-239,-269,-239,-285,-245},{-255,-255,-271,-271,-285,-263},{-285,-290,-282,-263,-290,-282},{-279,-290,-247,-261,-255,-269},{-293,-271,-242,-239,-261,-271},{-269,-258,-245,-258,-290,-263}},{{-274,-282,-245,-277,-250,-253},{-285,-239,-239,-266,-247,-287},{-290,-282,-250,-255,-239,-285},{-293,-285,-271,-271,-287,-258},{-247,-261,-242,-247,-293,-269},{-282,-290,-274,-274,-277,-271},{-293,-277,-247,-277,-279,-271},{-253,-261,-287,-258,-290,-285},{-245,-245,-282,-269,-263,-293},{-290,-287,-266,-271,-279,-263}},{{-279,-247,-285,-282,-266,-255},{-247,-282,-247,-261,-279,-274},{-258,-277,-290,-255,-285,-293},{-285,-250,-285,-247,-263,-290},{-277,-263,-293,-269,-253,-290},{-293,-263,-271,-279,-242,-287},{-253,-247,-285,-250,-245,-274},{-274,-266,-242,-285,-287,-263},{-242,-271,-285,-245,-253,-250},{-263,-250,-242,-282,-271,-274}},{{-279,-250,-261,-293,-269,-290},{-239,-245,-274,-287,-247,-287},{-242,-285,-293,-247,-266,-271},{-290,-266,-255,-282,-287,-250},{-261,-287,-285,-253,-261,-285},{-239,-269,-247,-274,-290,-258},{-287,-274,-290,-255,-242,-245},{-279,-282,-269,-274,-239,-279},{-290,-293,-287,-269,-285,-247},{-290,-239,-271,-255,-263,-287}},{{-290,-271,-285,-269,-274,-242},{-282,-247,-245,-290,-271,-266},{-282,-290,-245,-247,-261,-247},{-250,-287,-250,-290,-242,-279},{-245,-263,-287,-266,-293,-274},{-271,-271,-247,-253,-258,-263},{-290,-282,-266,-266,-250,-274},{-263,-277,-263,-282,-282,-277},{-290,-290,-279,-239,-290,-263},{-239,-247,-287,-269,-261,-253}}},{{{-300,-280,-288,-294,-266,-255},{-302,-283,-291,-288,-269,-294},{-272,-291,-305,-286,-266,-272},{-272,-277,-283,-252,-308,-277},{-308,-274,-269,-288,-297,-291},{-269,-263,-300,-286,-252,-274},{-260,-297,-297,-272,-266,-252},{-258,-277,-297,-283,-280,-288},{-297,-283,-272,-297,-283,-300},{-305,-291,-277,-266,-260,-260}},{{-305,-294,-272,-305,-302,-297},{-274,-297,-294,-272,-255,-308},{-274,-266,-288,-263,-269,-266},{-269,-252,-263,-297,-300,-300},{-291,-288,-252,-294,-252,-308},{-274,-297,-280,-283,-277,-308},{-294,-266,-294,-260,-263,-260},{-291,-274,-255,-308,-277,-286},{-291,-291,-297,-300,-308,-269},{-308,-294,-305,-305,-286,-291}},{{-269,-280,-294,-274,-297,-274},{-266,-277,-294,-288,-252,-263},{-266,-300,-269,-288,-263,-291},{-291,-286,-272,-308,-255,-291},{-266,-297,-252,-286,-302,-286},{-283,-277,-252,-277,-252,-291},{-263,-297,-272,-283,-308,-305},{-300,-260,-255,-308,-277,-308},{-291,-297,-252,-255,-283,-286},{-252,-308,-297,-280,-300,-291}},{{-286,-283,-302,-258,-272,-258},{-283,-272,-294,-258,-286,-274},{-263,-294,-263,-258,-255,-286},{-274,-269,-260,-283,-286,-255},{-300,-277,-291,-266,-283,-277},{-283,-291,-274,-294,-308,-258},{-263,-274,-294,-308,-300,-263},{-255,-263,-308,-258,-269,-308},{-294,-263,-300,-269,-308,-266},{-283,-258,-280,-266,-258,-297}},{{-266,-274,-280,-263,-272,-252},{-277,-294,-283,-277,-294,-260},{-302,-274,-260,-297,-269,-302},{-291,-302,-252,-302,-297,-258},{-272,-272,-272,-291,-308,-263},{-260,-277,-288,-277,-300,-305},{-269,-263,-291,-272,-272,-274},{-288,-302,-308,-277,-272,-260},{-277,-288,-260,-255,-258,-308},{-260,-283,-305,-288,-283,-300}},{{-280,-277,-294,-286,-269,-277},{-305,-294,-286,-266,-258,-269},{-258,-272,-300,-258,-291,-308},{-258,-260,-258,-252,-305,-266},{-252,-266,-286,-252,-274,-252},{-269,-294,-305,-288,-280,-266},{-297,-291,-302,-286,-297,-266},{-308,-260,-274,-280,-260,-266},{-283,-297,-263,-272,-255,-269},{-300,-294,-294,-286,-252,-255}}},{{{-258,-263,-302,-294,-277,-288},{-297,-272,-305,-294,-308,-258},{-297,-258,-288,-277,-266,-280},{-302,-283,-263,-263,-266,-288},{-280,-255,-280,-286,-266,-283},{-260,-269,-272,-263,-288,-300},{-277,-294,-291,-288,-266,-274},{-255,-269,-280,-294,-272,-277},{-305,-280,-266,-263,-302,-272},{-291,-255,-297,-286,-269,-308}},{{-280,-258,-308,-305,-305,-260},{-277,-255,-283,-300,-288,-266},{-266,-288,-291,-272,-305,-258},{-286,-300,-280,-260,-308,-258},{-305,-260,-263,-291,-294,-280},{-252,-291,-280,-302,-260,-288},{-305,-274,-286,-291,-266,-266},{-280,-286,-300,-263,-305,-302},{-286,-266,-300,-302,-300,-258},{-300,-294,-277,-297,-297,-266}},{{-272,-300,-297,-308,-255,-294},{-308,-305,-260,-291,-294,-294},{-283,-252,-274,-266,-294,-288},{-291,-286,-288,-302,-260,-291},{-297,-294,-302,-272,-263,-300},{-260,-297,-291,-308,-258,-300},{-286,-280,-255,-252,-294,-255},{-258,-260,-258,-305,-272,-260},{-255,-269,-286,-300,-269,-274},{-272,-272,-297,-263,-258,-294}},{{-283,-263,-286,-302,-258,-266},{-258,-283,-286,-291,-302,-294},{-291,-280,-269,-255,-263,-269},{-255,-286,-255,-263,-263,-263},{-272,-308,-305,-283,-297,-263},{-305,-300,-252,-286,-308,-260},{-266,-291,-258,-255,-305,-272},{-294,-297,-274,-269,-258,-272},{-297,-277,-277,-297,-286,-300},{-291,-252,-297,-291,-272,-305}},{{-263,-266,-288,-288,-286,-260},{-266,-255,-274,-266,-297,-305},{-277,-260,-297,-291,-305,-308},{-260,-302,-305,-274,-272,-294},{-283,-302,-291,-294,-272,-277},{-288,-255,-302,-269,-305,-302},{-260,-258,-294,-266,-308,-297},{-266,-297,-274,-252,-272,-269},{-252,-258,-294,-288,-272,-272},{-294,-288,-283,-305,-297,-260}},{{-269,-302,-297,-274,-260,-255},{-258,-252,-280,-288,-274,-286},{-286,-260,-300,-277,-263,-294},{-308,-258,-302,-266,-263,-252},{-300,-283,-255,-260,-266,-260},{-286,-302,-252,-277,-305,-300},{-308,-286,-288,-286,-274,-286},{-258,-283,-283,-280,-308,-286},{-291,-258,-266,-266,-286,-258},{-255,-288,-308,-272,-294,-263}}},{{{-305,-277,-288,-269,-266,-291},{-283,-280,-286,-258,-305,-283},{-283,-263,-272,-308,-269,-283},{-274,-255,-255,-277,-283,-255},{-269,-255,-300,-252,-308,-277},{-291,-288,-283,-277,-283,-291},{-274,-255,-286,-260,-294,-269},{-258,-255,-272,-297,-283,-302},{-308,-255,-272,-277,-297,-269},{-263,-305,-258,-305,-308,-294}},{{-288,-286,-269,-291,-291,-258},{-260,-280,-260,-269,-280,-274},{-305,-291,-288,-294,-263,-308},{-286,-305,-291,-258,-272,-272},{-302,-272,-266,-286,-294,-272},{-258,-263,-272,-263,-297,-297},{-294,-286,-260,-286,-294,-308},{-263,-252,-291,-300,-297,-291},{-258,-269,-280,-288,-280,-277},{-283,-263,-308,-291,-286,-260}},{{-286,-258,-283,-277,-297,-260},{-255,-305,-286,-291,-255,-300},{-255,-272,-266,-288,-258,-255},{-283,-305,-308,-277,-291,-263},{-283,-263,-277,-294,-255,-297},{-280,-291,-269,-291,-291,-266},{-283,-291,-291,-294,-277,-266},{-305,-305,-297,-280,-274,-272},{-252,-272,-294,-269,-288,-263},{-272,-277,-291,-269,-302,-300}},{{-252,-305,-280,-269,-297,-288},{-255,-297,-272,-300,-269,-291},{-263,-286,-260,-255,-274,-266},{-252,-274,-280,-258,-302,-258},{-283,-258,-269,-277,-283,-269},{-260,-277,-258,-297,-288,-263},{-300,-300,-283,-258,-294,-308},{-300,-297,-300,-263,-302,-291},{-263,-258,-300,-297,-294,-297},{-288,-291,-277,-286,-266,-280}},{{-258,-294,-255,-263,-294,-263},{-263,-269,-302,-263,-274,-300},{-269,-300,-300,-297,-308,-288},{-305,-308,-294,-297,-283,-255},{-255,-286,-277,-297,-260,-258},{-283,-272,-302,-252,-286,-272},{-252,-302,-258,-274,-280,-286},{-274,-252,-277,-274,-283,-300},{-272,-252,-300,-274,-286,-297},{-260,-305,-308,-305,-274,-274}},{{-260,-255,-252,-255,-255,-288},{-277,-252,-300,-272,-308,-255},{-288,-288,-308,-269,-260,-308},{-258,-274,-302,-308,-283,-300},{-300,-277,-291,-283,-258,-300},{-255,-283,-260,-252,-286,-266},{-291,-291,-263,-263,-294,-263},{-286,-277,-302,-277,-269,-291},{-288,-258,-274,-297,-266,-280},{-305,-263,-277,-305,-300,-277}}}}; // 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]={16,8,6,17,8,6,16,8,6,15,7,5,14,8,5,15,8,5,17,8,6,17,9,6,16,9,6,17,9,6,16,9,6,17,8,6,16,8,6,17,8,6,16,8,6,16,9,6,16,8,6,16,9,6,17,9,6,17,9,6,16,9,6,17,9,6,17,9,6,17,9,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}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,0,6,12,18,24,30,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,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,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,2,6,10,14,18,22,26,1,7,13,19,25,2,4,6,8,10,12,14,16,18,20,22,24,26,28,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,0,4,8,12,16,20,24,28,2,8,14,20,26,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,2,8,14,20,26,32,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,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,2,8,14,20,26,32,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,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,0,6,12,18,24,30,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,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,2,8,14,20,26,32,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,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,2,8,14,20,26,32,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,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,0,6,12,18,24,30,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,0,6,12,18,24,30,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,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,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,2,8,14,20,26,32,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,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,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}; // set of start times of each shipment 
int SHets[SPN]={4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,3,9,15,21,27,33,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,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,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,8,12,16,20,24,28,32,7,13,19,25,31,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,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,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,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,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,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,2,8,14,20,26,32,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,3,9,15,21,27,33,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,5,11,17,23,29,35,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,5,11,17,23,29,35,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,5,11,17,23,29,35,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,5,11,17,23,29,35,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,3,9,15,21,27,33,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,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,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,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,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,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,2,8,14,20,26,32,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}; // set of end times of each shipment 
