int Dev = 50;// Deviation
extern const int CNN = 5;// 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 = 348;//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]={{{{12666,0,0,0,0,0},{11991,0,0,0,0,0},{12652,0,0,0,0,0},{12704,0,0,0,0,0},{12728,0,0,0,0,0},{12379,0,0,0,0,0},{12584,0,0,0,0,0},{12329,0,0,0,0,0},{12515,0,0,0,0,0},{12426,0,0,0,0,0},{13183,0,0,0,0,0},{13082,0,0,0,0,0},{12291,0,0,0,0,0},{12518,0,0,0,0,0},{11874,0,0,0,0,0},{12556,0,0,0,0,0},{12379,0,0,0,0,0},{12752,0,0,0,0,0},{12099,0,0,0,0,0},{11630,0,0,0,0,0}},{{12374,0,0,0,0,0},{12779,0,0,0,0,0},{11997,0,0,0,0,0},{12193,0,0,0,0,0},{13211,0,0,0,0,0},{12044,0,0,0,0,0},{13240,0,0,0,0,0},{11383,0,0,0,0,0},{12058,0,0,0,0,0},{12062,0,0,0,0,0},{11968,0,0,0,0,0},{11957,0,0,0,0,0},{12617,0,0,0,0,0},{12274,0,0,0,0,0},{12588,0,0,0,0,0},{12914,0,0,0,0,0},{12693,0,0,0,0,0},{12461,0,0,0,0,0},{12077,0,0,0,0,0},{12715,0,0,0,0,0}},{{11912,0,0,0,0,0},{12452,0,0,0,0,0},{11099,0,0,0,0,0},{12038,0,0,0,0,0},{11936,0,0,0,0,0},{11401,0,0,0,0,0},{12141,0,0,0,0,0},{11244,0,0,0,0,0},{12200,0,0,0,0,0},{11732,0,0,0,0,0},{12290,0,0,0,0,0},{11527,0,0,0,0,0},{11270,0,0,0,0,0},{11410,0,0,0,0,0},{11852,0,0,0,0,0},{11853,0,0,0,0,0},{10816,0,0,0,0,0},{11218,0,0,0,0,0},{10961,0,0,0,0,0},{11663,0,0,0,0,0}}},{{{-391,-168,-353,-162,-241,-397},{-223,-212,-279,-368,-426,-356},{-397,-353,-362,-403,-279,-282},{-212,-176,-400,-406,-185,-194},{-176,-326,-347,-373,-335,-276},{-241,-273,-182,-312,-188,-244},{-282,-365,-171,-235,-232,-409},{-338,-185,-335,-441,-256,-220},{-426,-373,-356,-232,-247,-385},{-438,-191,-182,-282,-353,-238},{-279,-344,-182,-265,-315,-406},{-420,-153,-250,-365,-356,-388},{-188,-315,-250,-353,-282,-441},{-241,-250,-368,-194,-406,-409},{-262,-385,-347,-147,-409,-218},{-279,-173,-353,-209,-303,-441},{-212,-297,-238,-220,-379,-288},{-376,-329,-197,-165,-441,-300},{-318,-153,-285,-282,-218,-285},{-229,-156,-379,-441,-297,-350}},{{-235,-400,-412,-384,-382,-215},{-246,-292,-241,-181,-246,-205},{-310,-260,-148,-301,-254,-174},{-284,-160,-336,-392,-152,-319},{-313,-386,-266,-403,-318,-184},{-383,-163,-232,-260,-168,-142},{-432,-315,-174,-195,-168,-194},{-220,-186,-414,-225,-384,-246},{-374,-297,-283,-233,-171,-158},{-249,-235,-146,-408,-344,-202},{-293,-189,-294,-148,-358,-321},{-290,-369,-414,-285,-275,-202},{-209,-409,-246,-329,-195,-365},{-238,-366,-395,-282,-235,-158},{-174,-400,-283,-293,-392,-311},{-386,-212,-263,-353,-392,-275},{-331,-255,-272,-162,-262,-267},{-409,-303,-258,-247,-355,-231},{-383,-229,-384,-299,-307,-370},{-270,-297,-319,-225,-150,-161}},{{-340,-310,-347,-309,-163,-245},{-335,-322,-343,-199,-268,-192},{-172,-266,-298,-211,-272,-247},{-202,-155,-151,-307,-250,-299},{-275,-329,-347,-199,-180,-105},{-295,-196,-317,-273,-214,-282},{-248,-269,-231,-329,-310,-175},{-332,-140,-319,-206,-141,-227},{-265,-334,-270,-327,-238,-251},{-172,-339,-193,-298,-276,-177},{-298,-351,-317,-314,-201,-148},{-290,-237,-123,-246,-163,-181},{-162,-361,-196,-184,-199,-157},{-330,-288,-261,-132,-261,-134},{-140,-276,-144,-204,-285,-284},{-288,-186,-147,-170,-282,-105},{-218,-121,-207,-170,-113,-258},{-342,-351,-135,-311,-167,-187},{-155,-155,-245,-273,-315,-177},{-185,-319,-128,-125,-167,-276}}},{{{-148,-248,-257,-179,-151,-220},{-168,-189,-184,-109,-164,-115},{-136,-152,-240,-104,-162,-206},{-228,-218,-115,-172,-118,-183},{-170,-100,-234,-95,-212,-130},{-234,-98,-98,-202,-107,-147},{-116,-208,-105,-247,-164,-265},{-245,-140,-117,-209,-129,-136},{-144,-245,-259,-179,-138,-269},{-113,-106,-144,-236,-98,-275},{-131,-98,-89,-227,-155,-189},{-234,-122,-215,-231,-116,-183},{-190,-91,-119,-122,-191,-246},{-217,-221,-126,-122,-272,-256},{-150,-164,-254,-143,-140,-229},{-176,-172,-114,-90,-213,-162},{-218,-223,-217,-263,-272,-147},{-225,-206,-194,-116,-270,-227},{-160,-134,-196,-159,-252,-222},{-203,-145,-145,-154,-118,-271}},{{-212,-193,-128,-164,-142,-338},{-141,-244,-302,-172,-131,-209},{-99,-113,-168,-318,-183,-321},{-150,-207,-151,-254,-327,-157},{-283,-207,-234,-234,-300,-283},{-152,-176,-138,-248,-215,-209},{-281,-125,-164,-305,-282,-226},{-200,-234,-183,-128,-147,-181},{-125,-115,-117,-272,-213,-140},{-180,-285,-264,-285,-208,-140},{-214,-172,-300,-272,-135,-178},{-158,-234,-279,-296,-334,-143},{-232,-250,-285,-256,-302,-321},{-186,-199,-294,-287,-295,-224},{-240,-129,-300,-245,-339,-255},{-224,-160,-245,-270,-302,-295},{-154,-266,-185,-199,-147,-336},{-178,-213,-298,-161,-261,-157},{-186,-248,-213,-164,-160,-276},{-224,-279,-166,-139,-300,-150}},{{-366,-332,-280,-159,-263,-422},{-287,-196,-301,-213,-307,-408},{-331,-143,-157,-284,-343,-376},{-193,-365,-380,-373,-332,-342},{-351,-324,-181,-362,-355,-195},{-341,-191,-272,-273,-180,-144},{-259,-278,-385,-278,-302,-212},{-304,-184,-183,-251,-377,-416},{-299,-303,-202,-202,-291,-391},{-311,-280,-346,-135,-211,-419},{-356,-291,-322,-243,-327,-374},{-141,-332,-388,-189,-244,-325},{-353,-332,-307,-157,-377,-419},{-217,-145,-149,-294,-416,-144},{-301,-156,-157,-389,-191,-337},{-321,-382,-390,-286,-283,-325},{-136,-365,-141,-375,-155,-331},{-245,-214,-309,-351,-294,-413},{-348,-270,-181,-221,-404,-249},{-321,-232,-183,-370,-202,-359}}},{{{-332,-494,-398,-280,-339,-184},{-464,-359,-191,-470,-211,-395},{-191,-168,-240,-434,-178,-260},{-178,-418,-467,-349,-316,-345},{-428,-188,-490,-214,-188,-250},{-273,-372,-464,-164,-290,-220},{-283,-365,-434,-365,-207,-349},{-490,-490,-438,-178,-339,-319},{-447,-207,-184,-467,-329,-392},{-467,-306,-447,-487,-211,-352},{-316,-484,-372,-467,-411,-382},{-316,-382,-322,-368,-372,-487},{-487,-332,-270,-428,-418,-392},{-428,-444,-250,-322,-336,-270},{-398,-296,-194,-191,-276,-411},{-339,-342,-184,-273,-438,-339},{-303,-349,-405,-174,-276,-480},{-217,-487,-296,-415,-441,-171},{-227,-454,-424,-378,-444,-405},{-250,-204,-217,-303,-217,-372}},{{-367,-325,-383,-182,-450,-439},{-384,-345,-466,-207,-431,-268},{-200,-431,-287,-192,-326,-355},{-194,-270,-478,-220,-176,-289},{-351,-457,-306,-157,-293,-190},{-358,-412,-431,-176,-166,-452},{-328,-235,-405,-396,-459,-316},{-302,-248,-440,-248,-268,-214},{-279,-399,-466,-229,-425,-361},{-230,-464,-242,-236,-425,-352},{-236,-280,-412,-251,-382,-397},{-197,-238,-300,-176,-422,-295},{-335,-245,-300,-327,-277,-337},{-259,-457,-348,-173,-283,-388},{-285,-270,-440,-198,-305,-235},{-351,-448,-332,-163,-351,-328},{-197,-477,-450,-226,-456,-415},{-292,-377,-313,-364,-431,-256},{-459,-280,-163,-179,-256,-367},{-443,-238,-316,-170,-163,-394}},{{-404,-262,-252,-384,-352,-195},{-437,-331,-361,-169,-376,-159},{-437,-179,-179,-234,-310,-236},{-292,-400,-258,-310,-278,-162},{-230,-297,-409,-199,-159,-357},{-245,-164,-190,-329,-342,-177},{-268,-242,-280,-310,-371,-229},{-313,-351,-146,-188,-164,-226},{-192,-392,-409,-307,-246,-332},{-198,-202,-286,-204,-217,-177},{-295,-389,-288,-364,-318,-180},{-224,-409,-392,-316,-331,-242},{-201,-294,-280,-381,-273,-144},{-298,-415,-202,-296,-193,-172},{-159,-176,-311,-177,-233,-221},{-159,-348,-414,-386,-215,-290},{-192,-173,-162,-375,-342,-270},{-292,-259,-171,-245,-199,-128},{-307,-199,-207,-381,-146,-272},{-162,-259,-398,-283,-146,-262}}},{{{-76,-125,-73,-70,-100,-110},{-114,-93,-119,-171,-113,-74},{-134,-158,-104,-88,-152,-148},{-135,-129,-128,-159,-90,-91},{-102,-61,-124,-151,-61,-155},{-83,-137,-129,-85,-157,-183},{-132,-58,-95,-85,-149,-174},{-79,-91,-125,-112,-61,-122},{-108,-86,-111,-138,-62,-110},{-100,-94,-65,-146,-102,-154},{-120,-129,-100,-98,-146,-90},{-128,-83,-140,-92,-148,-163},{-106,-55,-160,-118,-92,-183},{-105,-140,-58,-66,-142,-183},{-153,-127,-146,-161,-155,-106},{-107,-108,-81,-125,-160,-84},{-103,-159,-156,-94,-90,-156},{-132,-129,-86,-160,-117,-163},{-62,-148,-131,-69,-144,-172},{-136,-63,-94,-106,-142,-170}},{{-169,-178,-133,-157,-132,-156},{-194,-147,-176,-200,-122,-108},{-197,-209,-115,-136,-172,-118},{-174,-196,-203,-129,-151,-124},{-180,-204,-123,-214,-230,-208},{-123,-144,-138,-124,-184,-156},{-84,-103,-219,-189,-90,-235},{-165,-83,-149,-189,-155,-228},{-126,-79,-95,-160,-103,-245},{-174,-124,-98,-150,-238,-143},{-190,-137,-83,-138,-187,-129},{-140,-171,-118,-135,-124,-89},{-88,-207,-115,-81,-95,-143},{-144,-109,-121,-81,-121,-87},{-158,-154,-78,-208,-119,-215},{-70,-200,-160,-170,-145,-198},{-185,-159,-107,-194,-158,-240},{-109,-182,-155,-96,-208,-99},{-153,-152,-123,-108,-148,-171},{-140,-123,-215,-172,-85,-97}},{{-168,-167,-177,-203,-102,-158},{-205,-164,-160,-241,-106,-99},{-233,-126,-206,-239,-110,-119},{-205,-203,-184,-150,-120,-249},{-172,-261,-203,-209,-241,-160},{-256,-121,-113,-188,-267,-208},{-248,-121,-272,-262,-218,-127},{-161,-209,-216,-120,-110,-218},{-201,-117,-162,-180,-159,-232},{-126,-227,-125,-226,-194,-150},{-219,-182,-221,-190,-276,-186},{-217,-95,-180,-274,-145,-279},{-203,-164,-266,-131,-237,-180},{-200,-257,-270,-152,-208,-141},{-198,-250,-199,-177,-292,-283},{-254,-92,-238,-203,-120,-242},{-212,-90,-266,-196,-108,-158},{-147,-265,-117,-220,-188,-232},{-222,-92,-179,-272,-176,-246},{-236,-133,-100,-211,-267,-133}}},{{{-303,-131,-226,-350,-290,-178},{-200,-333,-162,-259,-338,-124},{-200,-155,-331,-219,-293,-233},{-135,-283,-312,-236,-181,-181},{-280,-267,-159,-136,-193,-193},{-289,-283,-169,-324,-324,-288},{-303,-148,-162,-178,-278,-159},{-331,-140,-236,-140,-236,-288},{-142,-202,-228,-252,-188,-228},{-226,-262,-331,-309,-162,-233},{-182,-357,-290,-243,-276,-212},{-121,-271,-355,-238,-212,-347},{-186,-205,-248,-276,-219,-328},{-291,-209,-267,-186,-328,-264},{-175,-198,-267,-231,-200,-307},{-224,-152,-269,-350,-267,-198},{-291,-202,-290,-343,-231,-136},{-214,-176,-121,-269,-231,-207},{-298,-198,-257,-257,-176,-221},{-168,-155,-214,-178,-200,-219}},{{-121,-345,-155,-236,-154,-113},{-231,-221,-207,-328,-262,-183},{-155,-193,-134,-146,-312,-241},{-200,-288,-157,-293,-334,-159},{-331,-328,-235,-289,-267,-203},{-119,-264,-157,-159,-181,-219},{-281,-252,-303,-231,-298,-223},{-171,-264,-160,-187,-181,-139},{-212,-317,-125,-342,-115,-181},{-233,-174,-235,-139,-160,-210},{-333,-207,-251,-270,-231,-181},{-328,-174,-190,-192,-120,-283},{-328,-314,-219,-335,-316,-203},{-162,-164,-169,-289,-215,-236},{-262,-319,-200,-335,-215,-316},{-159,-183,-308,-194,-172,-175},{-281,-233,-235,-122,-122,-110},{-290,-243,-172,-263,-303,-148},{-150,-207,-221,-150,-118,-287},{-205,-298,-190,-125,-330,-298}},{{-292,-270,-174,-138,-159,-175},{-312,-196,-248,-172,-125,-252},{-176,-236,-133,-154,-266,-126},{-312,-140,-244,-160,-94,-221},{-170,-119,-263,-224,-172,-110},{-288,-274,-198,-232,-251,-166},{-120,-109,-297,-250,-193,-185},{-273,-161,-240,-146,-112,-227},{-120,-125,-194,-246,-174,-99},{-241,-238,-129,-287,-217,-202},{-292,-274,-222,-158,-120,-202},{-256,-265,-255,-273,-114,-108},{-249,-117,-137,-279,-142,-135},{-234,-165,-216,-99,-232,-239},{-307,-297,-255,-220,-122,-180},{-258,-228,-186,-259,-151,-207},{-163,-180,-145,-185,-123,-133},{-202,-253,-164,-261,-131,-245},{-144,-303,-174,-105,-144,-144},{-312,-295,-303,-103,-245,-238}}},{{{-399,-380,-394,-207,-279,-234},{-325,-221,-285,-223,-165,-258},{-192,-396,-168,-202,-348,-154},{-215,-141,-253,-295,-263,-359},{-396,-330,-383,-279,-205,-330},{-184,-391,-325,-394,-160,-285},{-388,-277,-178,-178,-378,-314},{-279,-237,-152,-348,-229,-271},{-213,-279,-160,-173,-362,-170},{-223,-330,-152,-160,-226,-138},{-205,-378,-210,-301,-253,-160},{-205,-215,-301,-330,-261,-221},{-242,-207,-170,-279,-295,-255},{-327,-213,-359,-200,-173,-221},{-394,-176,-325,-205,-149,-309},{-317,-348,-325,-168,-261,-391},{-194,-138,-261,-250,-346,-184},{-359,-229,-192,-239,-335,-317},{-141,-380,-391,-157,-141,-332},{-141,-362,-274,-396,-367,-207}},{{-170,-375,-165,-221,-354,-298},{-149,-338,-295,-311,-341,-363},{-194,-396,-311,-242,-231,-344},{-348,-295,-146,-157,-131,-241},{-285,-343,-184,-261,-241,-334},{-330,-396,-375,-215,-170,-140},{-351,-239,-218,-181,-317,-251},{-351,-290,-319,-277,-259,-319},{-197,-253,-309,-332,-275,-233},{-157,-133,-386,-351,-330,-163},{-194,-170,-234,-343,-149,-225},{-290,-322,-168,-266,-272,-319},{-223,-354,-168,-210,-385,-140},{-335,-141,-290,-141,-162,-148},{-370,-332,-261,-197,-183,-256},{-144,-186,-274,-309,-307,-249},{-186,-306,-178,-348,-359,-342},{-338,-186,-181,-181,-291,-319},{-325,-215,-152,-168,-380,-282},{-335,-194,-356,-263,-375,-334}},{{-243,-245,-202,-126,-125,-210},{-132,-147,-340,-285,-176,-321},{-210,-190,-365,-293,-164,-123},{-277,-261,-370,-273,-196,-289},{-259,-266,-328,-327,-301,-248},{-282,-220,-164,-355,-272,-253},{-212,-250,-363,-136,-350,-284},{-145,-377,-282,-186,-333,-333},{-287,-180,-363,-303,-282,-234},{-352,-329,-126,-226,-216,-229},{-192,-326,-373,-223,-243,-193},{-272,-291,-239,-161,-220,-328},{-163,-288,-154,-218,-167,-318},{-249,-288,-262,-223,-181,-145},{-256,-283,-295,-335,-208,-304},{-332,-286,-239,-253,-345,-337},{-370,-228,-328,-154,-247,-294},{-140,-301,-151,-171,-247,-210},{-306,-215,-353,-293,-135,-190},{-365,-126,-338,-270,-257,-349}}},{{{-259,-187,-349,-436,-406,-308},{-325,-238,-349,-220,-154,-246},{-322,-253,-412,-196,-220,-391},{-421,-376,-337,-358,-439,-284},{-319,-178,-334,-352,-427,-317},{-364,-223,-319,-352,-292,-414},{-361,-382,-271,-295,-280,-382},{-280,-352,-187,-150,-400,-429},{-322,-256,-298,-355,-214,-160},{-304,-322,-391,-253,-211,-346},{-304,-265,-448,-334,-334,-308},{-361,-412,-409,-256,-325,-367},{-286,-316,-286,-247,-226,-231},{-178,-289,-184,-232,-415,-231},{-196,-415,-304,-445,-178,-195},{-310,-442,-250,-334,-229,-231},{-364,-295,-166,-262,-376,-326},{-436,-235,-442,-283,-241,-426},{-265,-202,-310,-262,-154,-302},{-452,-181,-295,-352,-334,-373}},{{-437,-204,-199,-319,-318,-144},{-246,-405,-291,-287,-342,-154},{-272,-244,-241,-194,-384,-141},{-343,-396,-316,-197,-246,-172},{-258,-238,-168,-344,-286,-383},{-387,-422,-143,-292,-223,-221},{-314,-428,-375,-202,-366,-267},{-407,-155,-190,-248,-180,-329},{-384,-350,-367,-177,-233,-290},{-243,-307,-291,-207,-355,-208},{-261,-181,-140,-344,-246,-272},{-179,-146,-165,-265,-223,-229},{-378,-166,-263,-194,-167,-380},{-223,-169,-400,-303,-350,-370},{-185,-307,-358,-240,-331,-144},{-346,-379,-185,-180,-344,-198},{-384,-402,-300,-278,-268,-180},{-208,-270,-174,-317,-191,-290},{-398,-204,-350,-158,-387,-157},{-366,-218,-398,-328,-384,-146}},{{-308,-187,-147,-219,-174,-281},{-350,-264,-215,-214,-182,-216},{-322,-283,-190,-146,-172,-202},{-325,-324,-140,-305,-197,-131},{-273,-185,-213,-155,-295,-240},{-201,-173,-316,-217,-248,-133},{-154,-233,-188,-194,-261,-113},{-141,-281,-250,-135,-208,-277},{-134,-326,-289,-256,-301,-291},{-231,-314,-302,-197,-273,-277},{-161,-149,-215,-301,-121,-186},{-278,-293,-158,-155,-195,-178},{-295,-158,-284,-243,-165,-131},{-166,-312,-195,-278,-114,-121},{-146,-240,-135,-267,-189,-206},{-283,-130,-119,-157,-197,-176},{-208,-298,-133,-166,-293,-238},{-191,-312,-204,-325,-146,-202},{-144,-247,-250,-281,-112,-200},{-171,-161,-311,-113,-280,-248}}},{{{-304,-241,-329,-182,-340,-458},{-210,-224,-368,-441,-522,-234},{-518,-336,-511,-462,-336,-473},{-326,-280,-455,-241,-452,-469},{-504,-231,-357,-458,-490,-424},{-248,-290,-378,-301,-374,-525},{-252,-500,-424,-490,-301,-210},{-312,-480,-259,-340,-266,-392},{-424,-248,-483,-399,-357,-508},{-514,-301,-402,-469,-270,-304},{-308,-469,-518,-413,-427,-193},{-294,-224,-224,-276,-473,-350},{-304,-413,-207,-182,-427,-427},{-315,-452,-276,-448,-298,-336},{-224,-329,-220,-378,-186,-406},{-350,-438,-416,-287,-332,-402},{-228,-248,-490,-462,-399,-178},{-329,-193,-473,-360,-368,-217},{-256,-525,-234,-438,-270,-210},{-438,-175,-301,-182,-294,-210}},{{-244,-504,-183,-240,-180,-419},{-348,-446,-454,-458,-239,-222},{-505,-466,-275,-327,-482,-180},{-508,-388,-220,-367,-331,-467},{-358,-360,-363,-230,-295,-303},{-411,-364,-488,-190,-377,-451},{-188,-247,-461,-501,-462,-364},{-181,-244,-214,-244,-341,-296},{-351,-490,-393,-200,-184,-283},{-466,-250,-244,-414,-243,-341},{-501,-425,-203,-321,-213,-377},{-393,-257,-481,-394,-266,-351},{-425,-209,-400,-321,-190,-380},{-522,-298,-322,-367,-469,-299},{-306,-292,-264,-237,-246,-406},{-501,-501,-203,-478,-318,-328},{-184,-364,-475,-494,-262,-180},{-491,-384,-332,-434,-341,-161},{-251,-408,-417,-261,-492,-161},{-487,-418,-312,-418,-440,-261}},{{-328,-305,-333,-231,-402,-278},{-454,-385,-330,-311,-379,-267},{-346,-462,-171,-226,-151,-284},{-189,-213,-399,-211,-399,-208},{-343,-391,-306,-170,-194,-284},{-261,-194,-306,-316,-328,-175},{-450,-314,-291,-422,-237,-311},{-321,-403,-273,-261,-185,-192},{-472,-326,-171,-161,-308,-256},{-422,-422,-405,-255,-142,-211},{-173,-447,-327,-161,-373,-208},{-164,-176,-360,-278,-336,-211},{-375,-163,-381,-193,-382,-175},{-195,-419,-426,-366,-399,-311},{-466,-425,-198,-419,-217,-342},{-183,-354,-252,-270,-314,-211},{-274,-456,-168,-419,-296,-183},{-312,-425,-237,-208,-162,-236},{-340,-176,-261,-190,-237,-325},{-328,-169,-288,-360,-254,-322}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1052,192,238,253,176,234,280,264,252}; // initial inventory 
int ubiv[I]={2104,384,476,507,352,468,350,495,504}; // 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.35,8.59,5.57,4.52,2.83,1.94,4.81,7.57}; // 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.14,7.81,5.06,4.11,2.57,1.76,4.37,6.88}}; // 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.71,9.71,9.71,8.5,8.5,8.5,7.28,7.28,7.28,6.25,6.25,6.25,5.47,5.47,5.47,4.69,4.69,4.69,4.05,4.05,4.05,3.54,3.54,3.54,3.04,3.04,3.04,3.29,3.29,3.29,2.88,2.88,2.88,2.47,2.47,2.47,2.06,2.06,2.06,1.8,1.8,1.8,1.54,1.54,1.54,1.41,1.41,1.41,1.23,1.23,1.23,1.06,1.06,1.06,3.5,3.5,3.5,3.06,3.06,3.06,2.62,2.62,2.62,5.5,5.5,5.5,4.82,4.82,4.82,4.13,4.13,4.13}; // freight rate of each bid 
int lbcap[BN]={75,75,75,1,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226,75,75,75,301,151,151,151,226,226}; // capacity lower bound of each bid 
int ubcap[BN]={150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300,150,150,150,225,225,225,300,300,300}; // capacity upper bound of each bid 
// shipment parameters: 
int SHN[BN]={6,3,2,7,3,3,7,4,3,7,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,7,4,3,7,4,3,8,4,3,9,4,3,9,4,3,8,4,3,8,5,3,9,4,3,8,4,3,7,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5},{6,7,8},{9,10},{11,12,13,14,15,16,17},{18,19,20},{21,22,23},{24,25,26,27,28,29,30},{31,32,33,34},{35,36,37},{38,39,40,41,42,43,44},{45,46,47,48},{49,50,51},{52,53,54,55,56,57,58},{59,60,61,62},{63,64,65},{66,67,68,69,70,71,72},{73,74,75,76},{77,78,79},{80,81,82,83,84,85,86,87},{88,89,90,91},{92,93,94},{95,96,97,98,99,100,101,102},{103,104,105,106},{107,108,109},{110,111,112,113,114,115,116,117},{118,119,120,121},{122,123,124},{125,126,127,128,129,130,131},{132,133,134,135},{136,137,138},{139,140,141,142,143,144,145},{146,147,148,149},{150,151,152},{153,154,155,156,157,158,159,160},{161,162,163,164},{165,166,167},{168,169,170,171,172,173,174,175,176},{177,178,179,180},{181,182,183},{184,185,186,187,188,189,190,191,192},{193,194,195,196},{197,198,199},{200,201,202,203,204,205,206,207},{208,209,210,211},{212,213,214},{215,216,217,218,219,220,221,222},{223,224,225,226,227},{228,229,230},{231,232,233,234,235,236,237,238,239},{240,241,242,243},{244,245,246},{247,248,249,250,251,252,253,254},{255,256,257,258},{259,260,261},{262,263,264,265,266,267,268},{269,270,271,272},{273,274,275},{276,277,278,279,280,281,282},{283,284,285,286},{287,288,289},{290,291,292,293,294,295,296,297},{298,299,300,301},{302,303,304},{305,306,307,308,309,310,311},{312,313,314,315},{316,317,318},{319,320,321,322,323,324,325},{326,327,328,329},{330,331,332},{333,334,335,336,337,338,339,340},{341,342,343,344},{345,346,347}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,1,5,9,2,8,0,2,4,6,8,10,12,2,6,10,0,6,12,0,2,4,6,8,10,12,0,4,8,12,0,6,12,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,2,8,14,2,4,6,8,10,12,14,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,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,16,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,0,2,4,6,8,10,12,14,16,1,5,9,13,1,7,13,1,3,5,7,9,11,13,15,2,6,10,14,2,8,14,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,2,6,10,14,0,6,12,1,3,5,7,9,11,13,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,6,10,14,7,13,5,7,9,11,13,15,17,7,11,15,5,11,17,5,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,4,8,12,16,5,11,17,2,4,6,8,10,12,14,16,4,8,12,16,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,4,8,12,16,2,8,14,1,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,1,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,1,7,13,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,1,3,5,7,9,11,13,15,17,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,4,6,8,10,12,14,16,4,8,12,16,2,8,14,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,4,6,8,10,12,14,16,5,9,13,17,3,9,15,4,6,8,10,12,14,16,5,9,13,17,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,5,11,17}; // set of end times of each shipment 
