int Dev = 20;// 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]={{{{11394,0,0,0,0,0},{11493,0,0,0,0,0},{11516,0,0,0,0,0},{11720,0,0,0,0,0},{11641,0,0,0,0,0},{11840,0,0,0,0,0},{11427,0,0,0,0,0},{11393,0,0,0,0,0},{11786,0,0,0,0,0},{11616,0,0,0,0,0}},{{11302,0,0,0,0,0},{11437,0,0,0,0,0},{11394,0,0,0,0,0},{11498,0,0,0,0,0},{11328,0,0,0,0,0},{11385,0,0,0,0,0},{11402,0,0,0,0,0},{11550,0,0,0,0,0},{11263,0,0,0,0,0},{11245,0,0,0,0,0}},{{11686,0,0,0,0,0},{11303,0,0,0,0,0},{11338,0,0,0,0,0},{11079,0,0,0,0,0},{11509,0,0,0,0,0},{11479,0,0,0,0,0},{11750,0,0,0,0,0},{11413,0,0,0,0,0},{11420,0,0,0,0,0},{11370,0,0,0,0,0}},{{11425,0,0,0,0,0},{11571,0,0,0,0,0},{11555,0,0,0,0,0},{11561,0,0,0,0,0},{11579,0,0,0,0,0},{11628,0,0,0,0,0},{11478,0,0,0,0,0},{11258,0,0,0,0,0},{11766,0,0,0,0,0},{11365,0,0,0,0,0}},{{11476,0,0,0,0,0},{11575,0,0,0,0,0},{11451,0,0,0,0,0},{11583,0,0,0,0,0},{11581,0,0,0,0,0},{11250,0,0,0,0,0},{11607,0,0,0,0,0},{11670,0,0,0,0,0},{11631,0,0,0,0,0},{11294,0,0,0,0,0}},{{11713,0,0,0,0,0},{11488,0,0,0,0,0},{11186,0,0,0,0,0},{11527,0,0,0,0,0},{11383,0,0,0,0,0},{11330,0,0,0,0,0},{11334,0,0,0,0,0},{11323,0,0,0,0,0},{11699,0,0,0,0,0},{11361,0,0,0,0,0}}},{{{-199,-179,-175,-164,-173,-199},{-240,-203,-215,-183,-221,-215},{-199,-209,-173,-164,-231,-181},{-171,-171,-175,-223,-162,-235},{-240,-231,-183,-201,-181,-207},{-240,-201,-203,-181,-238,-225},{-164,-217,-217,-227,-215,-185},{-227,-195,-193,-231,-221,-179},{-209,-177,-195,-164,-231,-238},{-225,-219,-209,-162,-191,-179}},{{-201,-162,-240,-195,-166,-185},{-240,-187,-227,-166,-229,-197},{-187,-229,-187,-233,-185,-225},{-162,-173,-177,-233,-189,-201},{-205,-240,-235,-173,-191,-229},{-177,-177,-207,-205,-166,-187},{-187,-195,-179,-209,-173,-225},{-235,-244,-238,-233,-205,-177},{-213,-187,-185,-227,-217,-217},{-185,-197,-205,-183,-242,-181}},{{-189,-171,-171,-209,-217,-189},{-233,-189,-201,-207,-213,-223},{-195,-185,-240,-221,-193,-177},{-231,-195,-219,-162,-183,-185},{-217,-162,-205,-168,-242,-201},{-235,-183,-162,-235,-240,-187},{-175,-203,-189,-219,-235,-215},{-197,-221,-215,-223,-221,-219},{-227,-219,-179,-219,-233,-231},{-207,-205,-207,-203,-209,-181}},{{-181,-179,-227,-217,-171,-195},{-183,-221,-215,-164,-229,-217},{-185,-205,-195,-240,-199,-227},{-219,-244,-162,-213,-195,-211},{-215,-231,-201,-162,-199,-164},{-171,-233,-203,-168,-187,-168},{-201,-209,-227,-185,-201,-199},{-197,-175,-219,-227,-205,-219},{-229,-189,-203,-168,-229,-164},{-211,-213,-221,-201,-187,-229}},{{-177,-179,-168,-203,-219,-233},{-211,-215,-211,-193,-238,-189},{-201,-231,-213,-195,-231,-235},{-217,-209,-171,-171,-168,-168},{-209,-173,-201,-242,-233,-242},{-223,-195,-213,-215,-166,-225},{-211,-211,-211,-244,-217,-223},{-238,-240,-235,-242,-168,-187},{-244,-217,-215,-219,-168,-162},{-166,-168,-223,-187,-219,-235}},{{-183,-209,-205,-207,-193,-209},{-168,-164,-162,-164,-199,-215},{-205,-189,-166,-235,-209,-162},{-187,-187,-213,-191,-225,-162},{-197,-201,-162,-233,-175,-164},{-199,-187,-191,-162,-233,-205},{-179,-162,-203,-217,-187,-229},{-199,-211,-201,-166,-171,-183},{-221,-211,-164,-177,-223,-203},{-181,-177,-185,-223,-221,-235}}},{{{-129,-193,-188,-143,-155,-169},{-153,-188,-172,-190,-137,-192},{-188,-177,-184,-188,-155,-143},{-184,-148,-137,-145,-185,-129},{-185,-155,-156,-169,-177,-129},{-171,-132,-192,-130,-140,-171},{-148,-190,-164,-169,-161,-132},{-142,-140,-158,-166,-185,-134},{-172,-163,-192,-147,-158,-188},{-159,-156,-188,-180,-153,-184}},{{-171,-147,-130,-135,-158,-142},{-174,-174,-137,-134,-166,-175},{-174,-171,-156,-164,-166,-180},{-158,-193,-147,-190,-150,-187},{-132,-135,-147,-159,-184,-164},{-180,-148,-130,-169,-182,-175},{-164,-177,-172,-167,-192,-174},{-148,-161,-185,-156,-143,-179},{-158,-164,-148,-185,-151,-147},{-177,-129,-147,-148,-155,-156}},{{-185,-153,-185,-190,-159,-151},{-138,-163,-135,-156,-140,-185},{-153,-135,-135,-140,-129,-140},{-147,-164,-174,-175,-171,-184},{-137,-164,-188,-164,-193,-180},{-171,-132,-155,-180,-142,-134},{-184,-192,-193,-164,-137,-167},{-192,-158,-159,-193,-138,-138},{-142,-137,-155,-134,-158,-164},{-163,-190,-171,-148,-134,-163}},{{-167,-187,-161,-171,-184,-151},{-187,-135,-161,-129,-145,-187},{-167,-161,-175,-171,-129,-185},{-169,-192,-159,-138,-143,-175},{-179,-156,-174,-172,-134,-192},{-167,-155,-140,-155,-180,-142},{-153,-185,-132,-166,-177,-151},{-129,-155,-156,-167,-166,-132},{-192,-137,-142,-185,-130,-159},{-142,-179,-187,-159,-174,-167}},{{-140,-187,-177,-175,-177,-138},{-185,-171,-169,-172,-135,-180},{-167,-180,-134,-159,-164,-155},{-161,-135,-142,-142,-161,-138},{-193,-132,-161,-132,-190,-151},{-188,-171,-192,-161,-188,-137},{-180,-142,-155,-175,-164,-187},{-182,-155,-187,-179,-155,-138},{-182,-180,-156,-153,-169,-158},{-163,-174,-169,-150,-159,-137}},{{-164,-153,-150,-156,-180,-142},{-177,-140,-175,-153,-145,-153},{-138,-142,-182,-167,-158,-134},{-172,-179,-192,-193,-142,-140},{-151,-175,-151,-179,-171,-138},{-134,-171,-134,-164,-153,-167},{-184,-135,-187,-130,-147,-169},{-175,-155,-129,-161,-172,-184},{-175,-163,-150,-182,-150,-190},{-182,-158,-159,-182,-171,-159}}},{{{-275,-219,-199,-215,-238,-201},{-273,-233,-185,-185,-273,-263},{-217,-201,-231,-263,-194,-243},{-252,-256,-224,-222,-275,-261},{-263,-277,-238,-256,-249,-203},{-277,-213,-226,-219,-268,-243},{-259,-185,-206,-245,-189,-203},{-275,-277,-185,-189,-201,-194},{-249,-194,-243,-187,-247,-273},{-210,-185,-189,-233,-208,-243}},{{-245,-206,-219,-208,-243,-217},{-222,-206,-275,-187,-210,-270},{-222,-185,-270,-233,-268,-203},{-249,-236,-219,-203,-252,-189},{-252,-185,-210,-201,-256,-243},{-194,-263,-226,-224,-185,-240},{-263,-192,-217,-254,-266,-206},{-199,-229,-263,-229,-208,-201},{-256,-219,-266,-240,-229,-229},{-213,-210,-229,-206,-206,-210}},{{-238,-259,-192,-256,-256,-256},{-199,-245,-249,-256,-226,-229},{-245,-273,-224,-215,-263,-192},{-206,-192,-273,-247,-187,-231},{-215,-245,-189,-203,-208,-263},{-189,-259,-201,-277,-270,-201},{-252,-203,-203,-187,-219,-256},{-210,-192,-273,-192,-273,-275},{-189,-194,-217,-229,-266,-266},{-206,-203,-219,-201,-215,-185}},{{-187,-196,-256,-226,-252,-233},{-229,-247,-229,-222,-203,-259},{-268,-229,-194,-217,-194,-273},{-236,-229,-217,-254,-217,-196},{-222,-261,-238,-275,-270,-206},{-187,-254,-252,-185,-261,-252},{-206,-199,-245,-219,-277,-270},{-194,-222,-254,-231,-213,-277},{-254,-231,-266,-213,-268,-224},{-215,-213,-222,-261,-229,-236}},{{-231,-222,-240,-266,-199,-192},{-240,-226,-270,-213,-206,-245},{-273,-256,-263,-222,-266,-215},{-261,-275,-219,-247,-249,-203},{-229,-219,-252,-261,-192,-256},{-238,-226,-213,-196,-201,-247},{-196,-254,-247,-194,-219,-199},{-217,-266,-252,-185,-224,-252},{-268,-192,-249,-229,-238,-268},{-201,-273,-189,-256,-201,-215}},{{-261,-270,-249,-233,-206,-226},{-273,-219,-213,-256,-224,-261},{-208,-270,-192,-189,-243,-208},{-254,-219,-213,-215,-261,-199},{-277,-224,-224,-203,-273,-203},{-185,-229,-256,-263,-247,-270},{-249,-247,-240,-252,-185,-224},{-196,-231,-213,-256,-254,-256},{-254,-277,-226,-256,-196,-224},{-189,-215,-199,-196,-185,-219}}},{{{-182,-182,-206,-210,-247,-230},{-226,-189,-254,-241,-189,-180},{-200,-174,-210,-226,-221,-250},{-217,-256,-226,-204,-193,-193},{-243,-204,-189,-213,-197,-193},{-254,-234,-250,-193,-234,-243},{-254,-221,-184,-243,-221,-176},{-180,-230,-193,-174,-239,-204},{-260,-189,-210,-206,-243,-258},{-184,-256,-260,-228,-254,-180}},{{-213,-202,-219,-254,-226,-230},{-193,-224,-208,-202,-260,-250},{-215,-215,-176,-191,-243,-260},{-213,-258,-217,-191,-247,-217},{-184,-204,-245,-256,-239,-245},{-204,-202,-228,-193,-258,-200},{-245,-247,-197,-245,-215,-176},{-208,-174,-215,-206,-200,-200},{-197,-208,-200,-180,-219,-206},{-182,-237,-197,-204,-245,-234}},{{-182,-230,-254,-226,-256,-258},{-243,-200,-237,-187,-250,-260},{-210,-221,-239,-200,-237,-191},{-191,-174,-191,-221,-189,-237},{-176,-245,-180,-213,-260,-191},{-193,-245,-208,-217,-200,-237},{-224,-180,-200,-260,-245,-217},{-197,-210,-254,-232,-206,-232},{-174,-187,-230,-245,-210,-197},{-197,-217,-228,-202,-178,-197}},{{-189,-202,-241,-189,-230,-256},{-176,-208,-191,-189,-252,-182},{-195,-228,-250,-202,-210,-232},{-226,-234,-230,-180,-197,-187},{-195,-237,-206,-187,-180,-187},{-256,-208,-189,-189,-224,-176},{-252,-234,-221,-176,-217,-204},{-197,-178,-230,-224,-202,-256},{-184,-224,-260,-237,-258,-228},{-213,-204,-182,-239,-224,-174}},{{-208,-208,-241,-191,-252,-228},{-256,-239,-187,-174,-256,-254},{-187,-182,-189,-213,-252,-182},{-208,-206,-202,-200,-234,-237},{-226,-237,-200,-184,-250,-202},{-174,-182,-221,-200,-224,-187},{-250,-228,-237,-213,-239,-232},{-215,-241,-245,-195,-176,-256},{-250,-234,-247,-210,-184,-215},{-219,-224,-224,-228,-178,-200}},{{-180,-176,-243,-180,-187,-243},{-234,-197,-178,-215,-250,-197},{-226,-176,-174,-200,-230,-174},{-193,-180,-228,-239,-254,-252},{-232,-254,-224,-230,-184,-219},{-226,-197,-237,-174,-191,-256},{-202,-239,-187,-200,-256,-189},{-254,-193,-182,-243,-250,-254},{-200,-210,-221,-252,-206,-189},{-232,-176,-217,-191,-258,-230}}},{{{-250,-309,-306,-277,-301,-223},{-213,-269,-298,-258,-306,-287},{-237,-282,-279,-287,-298,-309},{-317,-279,-274,-223,-285,-274},{-303,-314,-234,-250,-258,-245},{-237,-277,-242,-314,-221,-266},{-290,-237,-309,-266,-239,-234},{-250,-309,-239,-218,-319,-242},{-287,-255,-258,-314,-247,-298},{-226,-309,-226,-319,-245,-298}},{{-239,-306,-293,-314,-255,-234},{-285,-215,-285,-293,-269,-269},{-213,-277,-290,-309,-239,-253},{-295,-311,-215,-247,-311,-237},{-298,-293,-231,-290,-253,-309},{-290,-266,-261,-295,-282,-213},{-271,-290,-295,-317,-234,-221},{-271,-293,-250,-293,-245,-223},{-309,-303,-274,-250,-261,-255},{-277,-213,-293,-247,-237,-298}},{{-306,-279,-290,-250,-239,-277},{-247,-317,-223,-263,-263,-279},{-306,-250,-295,-295,-287,-303},{-290,-226,-266,-215,-261,-215},{-301,-274,-237,-263,-269,-261},{-245,-258,-306,-239,-282,-274},{-258,-279,-247,-285,-298,-213},{-242,-258,-229,-282,-301,-269},{-301,-223,-303,-221,-223,-229},{-242,-290,-255,-237,-261,-237}},{{-298,-266,-314,-223,-261,-261},{-298,-242,-269,-271,-293,-215},{-301,-237,-293,-298,-314,-263},{-319,-258,-261,-261,-263,-311},{-215,-295,-269,-319,-218,-303},{-274,-303,-277,-261,-317,-282},{-231,-213,-274,-237,-298,-274},{-242,-266,-245,-285,-293,-314},{-314,-282,-309,-274,-237,-298},{-237,-239,-319,-255,-285,-285}},{{-239,-247,-247,-287,-309,-237},{-261,-279,-255,-295,-213,-253},{-306,-223,-223,-293,-237,-239},{-277,-271,-231,-269,-309,-314},{-266,-242,-295,-266,-301,-274},{-237,-279,-271,-293,-261,-309},{-213,-239,-293,-213,-234,-303},{-231,-298,-213,-237,-303,-223},{-319,-213,-279,-274,-226,-277},{-301,-258,-215,-229,-245,-314}},{{-215,-287,-279,-317,-277,-261},{-282,-295,-255,-223,-258,-287},{-298,-237,-263,-234,-231,-242},{-285,-245,-258,-293,-255,-261},{-285,-234,-279,-231,-274,-269},{-285,-255,-287,-239,-215,-287},{-231,-239,-247,-255,-231,-253},{-306,-282,-213,-263,-277,-303},{-239,-266,-213,-247,-285,-237},{-247,-253,-319,-237,-229,-306}}},{{{-336,-252,-283,-269,-266,-328},{-294,-288,-266,-235,-314,-246},{-308,-246,-241,-294,-277,-297},{-294,-258,-274,-227,-330,-319},{-274,-274,-305,-260,-330,-230},{-241,-330,-263,-311,-316,-283},{-235,-283,-305,-305,-244,-266},{-244,-336,-244,-314,-283,-314},{-244,-277,-300,-280,-269,-330},{-336,-272,-277,-283,-297,-286}},{{-288,-325,-235,-336,-224,-291},{-227,-283,-235,-283,-283,-283},{-280,-277,-238,-300,-255,-274},{-305,-230,-294,-283,-224,-325},{-328,-258,-235,-246,-319,-230},{-244,-235,-308,-269,-311,-227},{-269,-297,-288,-294,-252,-308},{-328,-328,-255,-260,-224,-241},{-244,-241,-263,-263,-272,-288},{-232,-255,-283,-238,-266,-316}},{{-328,-325,-288,-336,-244,-330},{-230,-227,-297,-255,-258,-238},{-288,-266,-252,-263,-238,-238},{-319,-286,-238,-244,-246,-258},{-246,-266,-291,-272,-258,-330},{-249,-300,-305,-328,-330,-319},{-305,-294,-330,-288,-288,-328},{-283,-274,-249,-260,-305,-230},{-288,-336,-333,-322,-291,-274},{-322,-269,-272,-272,-314,-328}},{{-336,-263,-255,-241,-300,-258},{-277,-227,-336,-328,-322,-336},{-258,-246,-286,-238,-232,-249},{-328,-232,-249,-294,-230,-283},{-297,-246,-241,-305,-227,-300},{-227,-322,-297,-252,-302,-316},{-283,-260,-230,-308,-266,-260},{-227,-241,-246,-330,-314,-232},{-230,-305,-274,-328,-328,-244},{-260,-272,-328,-244,-325,-230}},{{-283,-249,-330,-255,-266,-244},{-314,-291,-227,-272,-280,-302},{-302,-263,-241,-280,-246,-316},{-319,-280,-260,-280,-319,-333},{-227,-330,-266,-241,-333,-330},{-249,-244,-291,-246,-230,-241},{-280,-300,-314,-230,-314,-277},{-244,-249,-274,-235,-294,-249},{-283,-258,-333,-283,-269,-314},{-305,-244,-263,-252,-258,-325}},{{-300,-280,-291,-297,-333,-314},{-263,-302,-241,-308,-328,-325},{-305,-249,-246,-308,-269,-302},{-255,-230,-314,-286,-319,-252},{-294,-311,-258,-269,-277,-333},{-288,-238,-272,-263,-319,-316},{-224,-277,-277,-311,-277,-322},{-238,-227,-328,-235,-316,-333},{-297,-241,-311,-325,-319,-286},{-269,-319,-230,-333,-241,-244}}},{{{-314,-249,-319,-244,-333,-224},{-330,-319,-249,-249,-238,-291},{-277,-235,-249,-333,-328,-244},{-319,-328,-294,-302,-274,-322},{-286,-328,-277,-244,-246,-244},{-241,-305,-314,-305,-294,-238},{-286,-277,-330,-249,-288,-272},{-274,-274,-319,-286,-325,-272},{-286,-246,-272,-255,-263,-311},{-263,-283,-333,-260,-249,-244}},{{-263,-322,-246,-244,-274,-319},{-246,-244,-291,-305,-330,-305},{-297,-308,-272,-249,-274,-227},{-244,-272,-280,-258,-230,-302},{-224,-230,-230,-274,-246,-277},{-305,-232,-308,-224,-258,-255},{-297,-224,-230,-246,-232,-244},{-308,-300,-238,-314,-238,-330},{-277,-269,-246,-235,-294,-283},{-280,-224,-330,-330,-286,-232}},{{-277,-227,-333,-230,-266,-291},{-230,-238,-260,-286,-260,-260},{-258,-283,-224,-266,-286,-316},{-314,-314,-266,-255,-241,-241},{-263,-311,-322,-280,-316,-224},{-235,-260,-252,-252,-322,-294},{-319,-260,-283,-311,-316,-288},{-294,-294,-274,-244,-232,-333},{-252,-235,-258,-255,-330,-244},{-302,-336,-333,-286,-269,-283}},{{-280,-235,-235,-272,-325,-269},{-274,-286,-322,-325,-227,-319},{-288,-246,-316,-224,-330,-328},{-294,-283,-249,-288,-305,-230},{-325,-328,-274,-328,-302,-336},{-319,-330,-252,-255,-274,-280},{-224,-291,-238,-280,-316,-297},{-280,-230,-314,-255,-232,-255},{-294,-230,-302,-322,-272,-232},{-333,-277,-227,-291,-244,-230}},{{-302,-232,-297,-246,-297,-328},{-244,-308,-319,-272,-277,-300},{-244,-224,-322,-249,-319,-330},{-330,-328,-263,-238,-244,-266},{-286,-227,-319,-277,-291,-263},{-227,-277,-227,-297,-269,-238},{-308,-319,-224,-238,-333,-241},{-319,-319,-235,-283,-305,-322},{-308,-330,-232,-272,-319,-277},{-238,-224,-300,-336,-322,-311}},{{-286,-244,-311,-325,-283,-230},{-336,-283,-255,-283,-280,-258},{-314,-272,-283,-333,-258,-319},{-272,-283,-336,-311,-266,-244},{-288,-224,-230,-266,-288,-238},{-232,-322,-291,-244,-241,-252},{-336,-246,-227,-305,-305,-314},{-260,-263,-246,-269,-336,-249},{-274,-333,-266,-314,-336,-333},{-255,-300,-325,-300,-255,-316}}},{{{-333,-235,-227,-269,-294,-283},{-244,-260,-266,-230,-316,-227},{-255,-269,-252,-300,-314,-283},{-241,-238,-325,-319,-286,-274},{-319,-325,-336,-308,-249,-263},{-274,-291,-297,-336,-325,-241},{-314,-319,-258,-286,-322,-238},{-224,-328,-305,-311,-224,-227},{-297,-325,-333,-280,-336,-230},{-330,-255,-311,-336,-297,-246}},{{-227,-294,-328,-246,-227,-258},{-280,-238,-288,-294,-227,-266},{-235,-266,-305,-294,-258,-266},{-336,-325,-283,-336,-255,-249},{-235,-305,-288,-255,-297,-263},{-322,-294,-336,-319,-300,-311},{-328,-291,-283,-255,-230,-269},{-322,-255,-333,-266,-325,-274},{-230,-272,-230,-260,-322,-274},{-330,-266,-277,-272,-330,-255}},{{-241,-308,-291,-230,-241,-227},{-308,-266,-246,-269,-294,-325},{-246,-241,-336,-263,-330,-255},{-283,-297,-249,-311,-288,-227},{-333,-311,-294,-260,-232,-286},{-277,-249,-249,-232,-272,-297},{-277,-316,-263,-255,-230,-300},{-286,-224,-232,-302,-258,-238},{-269,-252,-328,-297,-277,-277},{-224,-260,-291,-314,-244,-300}},{{-305,-244,-260,-291,-322,-263},{-266,-286,-230,-277,-260,-325},{-227,-246,-288,-328,-280,-308},{-336,-302,-272,-311,-277,-302},{-297,-266,-269,-249,-300,-227},{-330,-314,-280,-274,-297,-291},{-322,-330,-322,-230,-280,-308},{-266,-308,-244,-302,-260,-252},{-274,-328,-238,-325,-230,-322},{-246,-277,-255,-314,-224,-286}},{{-255,-274,-302,-297,-333,-269},{-224,-230,-274,-302,-274,-274},{-260,-283,-244,-235,-288,-319},{-325,-305,-322,-244,-277,-255},{-272,-272,-277,-277,-244,-238},{-302,-305,-244,-314,-311,-305},{-238,-316,-280,-328,-286,-258},{-333,-269,-269,-314,-297,-325},{-319,-272,-244,-230,-224,-269},{-288,-263,-244,-286,-246,-269}},{{-314,-294,-274,-328,-291,-277},{-269,-291,-322,-300,-277,-235},{-274,-274,-255,-277,-255,-311},{-244,-255,-308,-249,-316,-300},{-263,-246,-286,-322,-269,-305},{-241,-328,-258,-252,-277,-297},{-297,-294,-255,-230,-330,-252},{-294,-235,-230,-238,-263,-230},{-280,-305,-308,-288,-235,-241},{-308,-232,-297,-274,-224,-308}}}}; // 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,9,6,16,8,6,17,8,6,14,7,5,15,8,5,15,8,5,17,9,6,17,9,6,17,9,6,17,9,6,16,9,6,17,9,6,16,8,6,16,8,6,17,9,6,16,8,6,16,9,6,16,8,6,16,8,6,16,9,6,16,8,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,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,1,5,9,13,17,21,25,29,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,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,2,6,10,14,18,22,26,0,6,12,18,24,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,1,5,9,13,17,21,25,29,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,0,6,12,18,24,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,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,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,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,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,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,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,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,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,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31,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,1,7,13,19,25,31,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,34,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}; // 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,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,4,8,12,16,20,24,28,32,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,3,9,15,21,27,33,8,10,12,14,16,18,20,22,24,26,28,30,32,34,8,12,16,20,24,28,32,6,12,18,24,30,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,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,6,12,18,24,30,3,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,4,10,16,22,28,34,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,4,10,16,22,28,34,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,3,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,2,8,14,20,26,32,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,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,3,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,5,11,17,23,29,35,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,3,7,11,15,19,23,27,31,35,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,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,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,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,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,2,8,14,20,26,32,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,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}; // set of end times of each shipment 
