int Dev = 40;// Deviation
extern const int CNN = 3;// 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 = 745;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 18;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={6,6,6,6,6,6}; // number of periods in each phase 
int PTset[P][PT]={{0,1,2,3,4,5},{6,7,8,9,10,11},{12,13,14,15,16,17},{18,19,20,21,22,23},{24,25,26,27,28,29},{30,31,32,33,34,35}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{12465,0,0,0,0,0},{12466,0,0,0,0,0},{12057,0,0,0,0,0},{12528,0,0,0,0,0},{12917,0,0,0,0,0},{12820,0,0,0,0,0},{12557,0,0,0,0,0},{12813,0,0,0,0,0},{12762,0,0,0,0,0},{11090,0,0,0,0,0}},{{12351,0,0,0,0,0},{12542,0,0,0,0,0},{11615,0,0,0,0,0},{12365,0,0,0,0,0},{12843,0,0,0,0,0},{12391,0,0,0,0,0},{11691,0,0,0,0,0},{12658,0,0,0,0,0},{12822,0,0,0,0,0},{13189,0,0,0,0,0}},{{11983,0,0,0,0,0},{11632,0,0,0,0,0},{11702,0,0,0,0,0},{11838,0,0,0,0,0},{10929,0,0,0,0,0},{11942,0,0,0,0,0},{11847,0,0,0,0,0},{11374,0,0,0,0,0},{11362,0,0,0,0,0},{11352,0,0,0,0,0}},{{10269,0,0,0,0,0},{9723,0,0,0,0,0},{9901,0,0,0,0,0},{9861,0,0,0,0,0},{9740,0,0,0,0,0},{10757,0,0,0,0,0},{10342,0,0,0,0,0},{10563,0,0,0,0,0},{10504,0,0,0,0,0},{10525,0,0,0,0,0}},{{9257,0,0,0,0,0},{9242,0,0,0,0,0},{9892,0,0,0,0,0},{9306,0,0,0,0,0},{9935,0,0,0,0,0},{9710,0,0,0,0,0},{9353,0,0,0,0,0},{8922,0,0,0,0,0},{8977,0,0,0,0,0},{9583,0,0,0,0,0}},{{9537,0,0,0,0,0},{9576,0,0,0,0,0},{9368,0,0,0,0,0},{9802,0,0,0,0,0},{8806,0,0,0,0,0},{9818,0,0,0,0,0},{9585,0,0,0,0,0},{9515,0,0,0,0,0},{9709,0,0,0,0,0},{9331,0,0,0,0,0}}},{{{-212,-359,-309,-382,-382,-268},{-356,-215,-265,-312,-373,-394},{-341,-270,-232,-270,-306,-197},{-279,-359,-288,-194,-291,-356},{-335,-332,-282,-259,-376,-365},{-179,-256,-209,-412,-315,-268},{-323,-279,-268,-197,-229,-320},{-379,-406,-223,-200,-365,-350},{-356,-306,-179,-394,-191,-356},{-262,-276,-191,-194,-188,-229}},{{-362,-183,-322,-225,-323,-262},{-342,-286,-347,-373,-227,-199},{-310,-317,-260,-260,-230,-287},{-397,-326,-171,-364,-363,-186},{-287,-372,-188,-197,-235,-316},{-212,-246,-316,-181,-176,-337},{-194,-203,-190,-271,-262,-158},{-215,-306,-314,-370,-251,-251},{-365,-369,-182,-356,-366,-166},{-339,-378,-204,-233,-195,-277}},{{-328,-266,-319,-269,-289,-237},{-208,-334,-324,-228,-214,-258},{-170,-230,-144,-246,-197,-276},{-242,-334,-184,-220,-182,-177},{-242,-162,-259,-150,-223,-179},{-245,-312,-270,-296,-282,-237},{-240,-295,-235,-166,-169,-169},{-322,-172,-254,-226,-214,-200},{-258,-290,-175,-244,-238,-253},{-180,-269,-168,-224,-212,-214}},{{-264,-140,-154,-196,-102,-96},{-146,-122,-125,-229,-115,-118},{-173,-224,-136,-136,-148,-182},{-130,-262,-111,-124,-144,-149},{-248,-224,-195,-187,-124,-162},{-211,-256,-111,-236,-185,-198},{-266,-157,-174,-134,-178,-214},{-154,-172,-234,-174,-168,-146},{-234,-176,-165,-153,-178,-202},{-171,-127,-138,-229,-155,-118}},{{-165,-134,-107,-203,-182,-98},{-157,-191,-91,-118,-175,-197},{-172,-170,-91,-172,-103,-109},{-114,-136,-165,-187,-119,-134},{-179,-192,-198,-190,-135,-169},{-169,-192,-113,-132,-198,-153},{-116,-98,-168,-151,-168,-138},{-149,-89,-196,-131,-131,-107},{-117,-104,-193,-122,-96,-119},{-189,-137,-198,-144,-201,-176}},{{-140,-156,-142,-209,-137,-217},{-98,-185,-118,-105,-101,-215},{-162,-179,-128,-146,-187,-172},{-184,-190,-196,-106,-224,-137},{-160,-106,-128,-112,-129,-192},{-150,-193,-122,-214,-126,-172},{-107,-182,-121,-174,-172,-152},{-193,-191,-162,-160,-98,-204},{-110,-126,-107,-131,-216,-129},{-185,-175,-211,-200,-151,-159}}},{{{-101,-105,-159,-224,-177,-134},{-155,-171,-182,-147,-138,-141},{-104,-152,-210,-215,-112,-139},{-217,-142,-105,-243,-247,-241},{-131,-157,-215,-127,-160,-164},{-175,-167,-164,-163,-252,-229},{-166,-188,-115,-152,-234,-216},{-213,-226,-210,-208,-217,-262},{-163,-176,-193,-231,-201,-124},{-203,-159,-115,-131,-219,-120}},{{-152,-281,-298,-201,-252,-188},{-232,-266,-202,-137,-213,-274},{-184,-172,-155,-139,-238,-328},{-277,-156,-177,-276,-176,-326},{-218,-154,-207,-261,-229,-281},{-236,-285,-273,-192,-268,-219},{-210,-146,-134,-197,-151,-202},{-190,-285,-253,-276,-286,-188},{-170,-178,-130,-278,-266,-236},{-246,-223,-266,-152,-227,-309}},{{-237,-339,-367,-265,-208,-212},{-314,-212,-299,-189,-224,-320},{-212,-260,-257,-375,-321,-263},{-232,-357,-362,-194,-368,-277},{-200,-332,-178,-165,-213,-300},{-343,-209,-367,-292,-310,-181},{-188,-204,-325,-284,-260,-215},{-336,-224,-307,-176,-271,-229},{-198,-171,-301,-327,-211,-263},{-277,-171,-364,-294,-313,-184}},{{-272,-223,-271,-184,-313,-199},{-347,-238,-197,-184,-232,-280},{-303,-229,-244,-412,-346,-232},{-225,-341,-235,-196,-244,-310},{-197,-291,-361,-358,-343,-355},{-205,-315,-304,-274,-367,-271},{-237,-309,-322,-343,-418,-400},{-338,-253,-286,-418,-199,-406},{-399,-253,-399,-340,-286,-361},{-358,-323,-378,-373,-379,-361}},{{-217,-322,-289,-207,-350,-249},{-211,-319,-388,-234,-294,-206},{-358,-388,-406,-336,-394,-264},{-304,-256,-286,-330,-382,-365},{-397,-373,-223,-357,-391,-188},{-313,-358,-346,-363,-247,-284},{-343,-199,-364,-219,-273,-360},{-364,-244,-394,-183,-279,-276},{-277,-235,-202,-225,-347,-197},{-217,-211,-352,-405,-185,-273}},{{-385,-329,-279,-364,-297,-258},{-291,-220,-217,-322,-353,-300},{-171,-365,-320,-264,-218,-221},{-256,-385,-282,-325,-251,-263},{-185,-265,-268,-304,-197,-243},{-248,-223,-339,-354,-189,-164},{-171,-374,-312,-330,-259,-342},{-379,-212,-344,-309,-338,-342},{-385,-318,-341,-275,-284,-241},{-365,-335,-322,-293,-294,-238}}},{{{-296,-257,-359,-322,-326,-296},{-336,-461,-398,-224,-438,-263},{-332,-359,-395,-438,-385,-253},{-336,-424,-227,-454,-345,-237},{-211,-378,-306,-240,-461,-220},{-434,-418,-461,-405,-283,-451},{-326,-207,-273,-451,-243,-339},{-375,-332,-270,-405,-372,-243},{-365,-227,-451,-224,-457,-342},{-207,-352,-234,-382,-451,-395}},{{-380,-338,-309,-396,-370,-214},{-459,-367,-405,-242,-407,-283},{-272,-441,-195,-389,-191,-205},{-331,-312,-233,-421,-213,-382},{-233,-303,-370,-430,-308,-205},{-226,-283,-418,-192,-293,-355},{-246,-422,-322,-245,-425,-235},{-292,-245,-364,-267,-367,-361},{-433,-357,-351,-308,-428,-208},{-400,-406,-303,-254,-354,-358}},{{-268,-233,-297,-299,-209,-301},{-333,-377,-171,-248,-315,-321},{-257,-308,-168,-234,-302,-319},{-333,-222,-185,-286,-368,-239},{-283,-230,-372,-329,-191,-231},{-242,-340,-176,-299,-355,-316},{-398,-213,-269,-373,-292,-337},{-251,-228,-277,-196,-315,-249},{-322,-380,-302,-332,-178,-159},{-245,-348,-319,-193,-329,-236}},{{-182,-209,-320,-222,-208,-243},{-238,-156,-249,-236,-260,-149},{-228,-165,-194,-201,-267,-155},{-198,-228,-294,-152,-224,-298},{-342,-197,-313,-187,-157,-204},{-255,-275,-164,-176,-161,-195},{-280,-211,-178,-289,-267,-212},{-215,-207,-292,-217,-309,-247},{-265,-270,-173,-189,-137,-182},{-240,-228,-294,-323,-242,-153}},{{-245,-187,-145,-185,-277,-170},{-232,-189,-210,-269,-174,-191},{-191,-284,-258,-262,-145,-136},{-213,-216,-141,-191,-273,-134},{-191,-254,-176,-244,-235,-288},{-254,-172,-227,-151,-151,-277},{-176,-235,-208,-145,-237,-191},{-154,-136,-208,-136,-158,-132},{-202,-164,-281,-139,-206,-149},{-273,-248,-220,-158,-155,-265}},{{-231,-126,-245,-254,-286,-306},{-204,-271,-247,-265,-189,-250},{-267,-164,-131,-239,-255,-202},{-189,-294,-276,-156,-231,-142},{-158,-176,-236,-267,-224,-202},{-158,-281,-276,-156,-255,-304},{-229,-216,-257,-178,-306,-252},{-279,-174,-276,-145,-165,-248},{-250,-160,-205,-280,-172,-227},{-160,-206,-276,-302,-185,-212}}},{{{-74,-99,-157,-104,-143,-145},{-64,-132,-90,-126,-163,-148},{-109,-67,-156,-119,-99,-101},{-142,-145,-157,-82,-116,-140},{-66,-105,-115,-161,-161,-163},{-145,-147,-143,-143,-133,-102},{-142,-129,-91,-71,-167,-131},{-133,-118,-82,-144,-100,-78},{-84,-127,-106,-71,-73,-170},{-78,-77,-96,-82,-145,-159}},{{-116,-185,-105,-102,-179,-183},{-113,-152,-203,-212,-130,-198},{-176,-94,-117,-127,-127,-175},{-101,-118,-117,-101,-177,-193},{-155,-141,-181,-99,-185,-123},{-154,-93,-142,-184,-126,-185},{-143,-178,-172,-121,-217,-185},{-101,-124,-195,-121,-213,-195},{-124,-121,-105,-105,-214,-180},{-167,-189,-198,-180,-169,-225}},{{-122,-203,-166,-222,-223,-263},{-240,-135,-175,-144,-133,-121},{-201,-153,-216,-266,-261,-164},{-170,-191,-206,-236,-188,-150},{-233,-176,-136,-114,-229,-251},{-124,-171,-234,-194,-225,-269},{-124,-166,-199,-163,-161,-188},{-240,-236,-154,-142,-172,-137},{-233,-247,-134,-116,-233,-123},{-198,-194,-246,-182,-120,-186}},{{-238,-282,-258,-207,-235,-132},{-266,-173,-126,-284,-254,-185},{-225,-238,-231,-181,-256,-140},{-252,-146,-235,-211,-132,-201},{-150,-150,-148,-144,-185,-146},{-122,-187,-203,-177,-252,-274},{-128,-199,-189,-138,-142,-122},{-160,-138,-132,-158,-175,-148},{-264,-177,-260,-272,-219,-181},{-162,-189,-227,-274,-256,-168}},{{-160,-256,-225,-172,-172,-219},{-248,-144,-266,-129,-161,-199},{-128,-266,-272,-162,-231,-144},{-195,-244,-134,-146,-240,-215},{-201,-152,-173,-140,-249,-221},{-142,-128,-130,-228,-251,-112},{-156,-209,-144,-117,-197,-134},{-240,-227,-173,-148,-183,-188},{-268,-250,-158,-156,-221,-110},{-242,-231,-118,-209,-164,-173}},{{-183,-192,-157,-136,-121,-156},{-147,-242,-150,-155,-136,-151},{-195,-239,-182,-101,-177,-159},{-116,-220,-112,-205,-210,-178},{-197,-240,-179,-123,-187,-206},{-240,-112,-152,-165,-173,-94},{-190,-168,-112,-114,-181,-125},{-132,-130,-212,-171,-127,-191},{-215,-178,-120,-120,-203,-204},{-122,-137,-110,-184,-96,-106}}},{{{-149,-243,-159,-183,-333,-305},{-240,-300,-281,-328,-181,-276},{-280,-188,-152,-200,-293,-148},{-175,-219,-188,-145,-252,-290},{-319,-293,-333,-243,-328,-328},{-301,-276,-143,-157,-250,-148},{-214,-171,-157,-255,-259,-159},{-291,-245,-319,-264,-259,-250},{-154,-321,-195,-214,-257,-312},{-151,-159,-174,-290,-152,-309}},{{-317,-295,-181,-206,-158,-135},{-295,-214,-263,-141,-226,-223},{-152,-150,-315,-141,-292,-276},{-150,-276,-230,-222,-197,-179},{-283,-148,-190,-192,-246,-179},{-328,-328,-240,-266,-192,-159},{-300,-152,-141,-245,-160,-236},{-221,-326,-275,-238,-145,-192},{-238,-262,-320,-245,-199,-270},{-169,-290,-287,-266,-167,-301}},{{-185,-245,-226,-183,-129,-209},{-198,-163,-220,-209,-239,-166},{-230,-282,-133,-234,-150,-180},{-146,-272,-152,-226,-131,-216},{-267,-249,-121,-148,-168,-214},{-275,-194,-152,-119,-224,-131},{-155,-236,-176,-133,-245,-169},{-286,-146,-204,-152,-153,-205},{-178,-171,-279,-189,-256,-121},{-178,-222,-216,-172,-148,-153}},{{-196,-231,-143,-112,-127,-168},{-120,-124,-107,-192,-132,-157},{-205,-228,-99,-210,-148,-88},{-148,-129,-141,-98,-124,-192},{-184,-177,-192,-110,-167,-98},{-236,-125,-206,-159,-143,-117},{-119,-170,-204,-172,-135,-167},{-181,-185,-159,-117,-108,-155},{-172,-134,-190,-159,-148,-123},{-215,-119,-140,-93,-151,-190}},{{-153,-154,-157,-76,-125,-95},{-142,-105,-110,-132,-124,-150},{-157,-145,-174,-126,-162,-138},{-126,-127,-164,-102,-88,-89},{-81,-147,-94,-88,-76,-99},{-185,-93,-92,-104,-84,-167},{-185,-160,-113,-101,-111,-90},{-108,-105,-94,-146,-121,-167},{-129,-126,-112,-99,-92,-158},{-121,-93,-150,-144,-146,-73}},{{-145,-162,-161,-139,-117,-132},{-132,-144,-149,-100,-81,-130},{-136,-86,-109,-93,-129,-169},{-113,-101,-143,-142,-127,-93},{-98,-90,-143,-131,-109,-116},{-146,-115,-164,-108,-171,-101},{-90,-156,-113,-79,-92,-118},{-89,-149,-164,-74,-92,-137},{-102,-131,-118,-73,-116,-86},{-86,-159,-142,-89,-135,-88}}},{{{-351,-215,-184,-263,-170,-205},{-210,-231,-205,-263,-266,-176},{-295,-303,-176,-354,-327,-170},{-309,-162,-170,-194,-343,-346},{-332,-186,-298,-202,-202,-348},{-287,-314,-319,-343,-335,-247},{-287,-322,-343,-332,-319,-295},{-338,-303,-239,-200,-200,-335},{-274,-351,-255,-176,-327,-309},{-197,-372,-194,-181,-295,-255}},{{-274,-343,-367,-162,-275,-233},{-176,-311,-197,-176,-314,-316},{-298,-176,-346,-231,-244,-189},{-322,-229,-255,-290,-267,-181},{-351,-202,-239,-325,-351,-287},{-229,-295,-346,-359,-170,-171},{-263,-372,-290,-303,-249,-308},{-362,-335,-364,-359,-249,-290},{-325,-269,-279,-356,-346,-225},{-370,-351,-370,-194,-202,-262}},{{-194,-256,-323,-310,-196,-157},{-199,-187,-300,-246,-265,-284},{-269,-268,-161,-233,-243,-210},{-272,-258,-227,-223,-216,-318},{-220,-286,-204,-216,-274,-193},{-241,-281,-282,-305,-169,-234},{-313,-225,-192,-275,-284,-287},{-179,-273,-257,-330,-179,-272},{-308,-220,-249,-342,-243,-243},{-251,-164,-189,-169,-318,-337}},{{-312,-324,-286,-156,-293,-300},{-181,-310,-254,-168,-253,-175},{-264,-313,-259,-196,-152,-181},{-214,-160,-148,-152,-137,-220},{-207,-162,-139,-177,-143,-172},{-295,-275,-273,-186,-311,-278},{-248,-306,-268,-143,-137,-224},{-295,-240,-323,-271,-143,-168},{-219,-258,-273,-196,-166,-309},{-190,-244,-148,-200,-246,-206}},{{-185,-161,-167,-276,-213,-282},{-227,-141,-263,-302,-289,-150},{-304,-182,-141,-228,-156,-286},{-244,-195,-226,-197,-217,-141},{-163,-304,-226,-135,-234,-278},{-242,-237,-245,-291,-154,-252},{-216,-271,-304,-200,-243,-243},{-306,-232,-150,-206,-206,-215},{-277,-280,-152,-167,-234,-273},{-306,-267,-282,-206,-158,-202}},{{-171,-154,-154,-263,-191,-167},{-156,-182,-247,-210,-289,-143},{-156,-221,-184,-293,-280,-156},{-200,-304,-204,-239,-252,-224},{-234,-230,-208,-224,-148,-217},{-239,-284,-224,-295,-291,-234},{-289,-269,-280,-154,-221,-291},{-202,-176,-141,-284,-284,-210},{-200,-174,-304,-226,-250,-297},{-299,-239,-230,-189,-163,-174}}},{{{-409,-316,-334,-343,-367,-293},{-313,-337,-316,-406,-190,-302},{-346,-376,-238,-196,-328,-201},{-205,-190,-229,-295,-349,-411},{-388,-316,-373,-241,-292,-201},{-217,-196,-409,-265,-304,-411},{-376,-292,-310,-403,-421,-293},{-199,-415,-223,-367,-274,-210},{-292,-265,-241,-409,-289,-290},{-400,-298,-313,-292,-337,-260}},{{-270,-241,-230,-289,-360,-162},{-311,-284,-171,-287,-159,-298},{-264,-253,-232,-257,-215,-244},{-188,-316,-283,-238,-305,-159},{-390,-313,-370,-382,-220,-249},{-343,-175,-210,-278,-252,-311},{-334,-367,-344,-169,-209,-278},{-246,-187,-179,-278,-281,-195},{-202,-273,-286,-175,-310,-216},{-199,-281,-389,-175,-326,-329}},{{-300,-204,-311,-290,-210,-216},{-270,-290,-282,-197,-259,-263},{-275,-166,-256,-272,-140,-275},{-268,-314,-305,-183,-191,-192},{-174,-281,-169,-256,-157,-160},{-211,-233,-300,-256,-263,-202},{-258,-322,-165,-181,-261,-222},{-337,-206,-172,-296,-229,-210},{-211,-230,-147,-159,-129,-190},{-258,-240,-185,-214,-293,-218}},{{-171,-132,-109,-193,-194,-158},{-142,-123,-224,-186,-163,-163},{-258,-171,-235,-124,-121,-105},{-153,-246,-199,-232,-105,-179},{-173,-205,-196,-151,-115,-129},{-252,-221,-121,-217,-224,-182},{-268,-229,-228,-108,-224,-114},{-235,-167,-249,-117,-216,-143},{-244,-216,-212,-112,-201,-156},{-128,-123,-153,-230,-159,-171}},{{-128,-112,-168,-100,-159,-168},{-217,-126,-120,-209,-132,-171},{-111,-92,-152,-180,-137,-152},{-117,-206,-108,-143,-100,-136},{-123,-179,-112,-122,-146,-216},{-212,-180,-117,-146,-99,-145},{-161,-197,-137,-103,-128,-105},{-117,-165,-156,-156,-109,-214},{-184,-154,-132,-177,-194,-206},{-187,-208,-139,-206,-157,-162}},{{-129,-161,-104,-144,-175,-199},{-174,-99,-224,-202,-229,-177},{-142,-169,-133,-134,-184,-181},{-111,-215,-215,-185,-164,-188},{-148,-111,-117,-113,-173,-250},{-156,-176,-109,-173,-173,-197},{-194,-142,-144,-186,-112,-159},{-94,-205,-126,-180,-191,-165},{-182,-213,-212,-136,-214,-230},{-202,-159,-125,-108,-107,-138}}},{{{-427,-378,-329,-346,-483,-290},{-420,-416,-350,-228,-210,-329},{-340,-252,-455,-326,-420,-332},{-469,-248,-410,-441,-315,-406},{-332,-441,-256,-343,-374,-458},{-374,-298,-224,-360,-270,-318},{-259,-329,-416,-402,-276,-410},{-374,-434,-395,-214,-228,-326},{-455,-476,-364,-444,-284,-241},{-224,-231,-298,-224,-322,-217}},{{-428,-223,-339,-374,-276,-287},{-226,-346,-244,-454,-338,-303},{-438,-247,-386,-261,-377,-242},{-432,-220,-203,-464,-459,-406},{-358,-408,-444,-461,-249,-328},{-247,-350,-305,-394,-407,-444},{-303,-220,-271,-357,-272,-319},{-230,-316,-325,-294,-371,-370},{-230,-418,-366,-311,-351,-354},{-372,-292,-224,-394,-305,-422}},{{-195,-333,-336,-302,-231,-300},{-277,-305,-255,-278,-265,-178},{-425,-240,-258,-381,-351,-270},{-312,-400,-333,-220,-388,-172},{-233,-407,-228,-372,-262,-292},{-202,-259,-210,-325,-274,-311},{-441,-416,-192,-384,-351,-331},{-428,-330,-366,-220,-177,-239},{-378,-376,-207,-363,-254,-231},{-362,-370,-348,-185,-237,-259}},{{-364,-189,-306,-158,-225,-272},{-348,-297,-352,-196,-198,-249},{-167,-242,-329,-178,-169,-213},{-359,-366,-270,-309,-203,-335},{-181,-326,-257,-196,-326,-189},{-270,-313,-254,-269,-157,-299},{-211,-242,-257,-301,-147,-213},{-273,-347,-244,-351,-284,-246},{-310,-208,-211,-153,-174,-225},{-294,-203,-175,-304,-250,-327}},{{-275,-187,-247,-321,-206,-206},{-180,-150,-180,-243,-155,-231},{-332,-293,-226,-243,-169,-164},{-228,-296,-213,-171,-277,-275},{-296,-249,-231,-284,-323,-213},{-315,-266,-233,-139,-323,-298},{-194,-245,-273,-298,-319,-210},{-164,-141,-196,-319,-263,-240},{-187,-233,-268,-249,-192,-164},{-232,-229,-139,-226,-203,-203}},{{-275,-199,-270,-212,-218,-189},{-252,-148,-249,-281,-319,-327},{-277,-180,-289,-295,-334,-194},{-280,-215,-310,-217,-225,-207},{-146,-282,-210,-188,-220,-216},{-148,-231,-303,-276,-332,-312},{-314,-286,-247,-171,-213,-241},{-171,-256,-287,-186,-290,-180},{-238,-296,-261,-259,-227,-167},{-261,-192,-217,-274,-334,-197}}}}; // 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]={15,8,6,15,8,5,15,8,5,16,8,6,16,8,6,16,9,6,17,8,6,16,8,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,18,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,16,8,6,16,8,6,17,9,6,16,8,6}; // number of shipment for each bid 
int SHset[BN][MBSN]={{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14},{15,16,17,18,19,20,21,22},{23,24,25,26,27,28},{29,30,31,32,33,34,35,36,37,38,39,40,41,42,43},{44,45,46,47,48,49,50,51},{52,53,54,55,56},{57,58,59,60,61,62,63,64,65,66,67,68,69,70,71},{72,73,74,75,76,77,78,79},{80,81,82,83,84},{85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100},{101,102,103,104,105,106,107,108},{109,110,111,112,113,114},{115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130},{131,132,133,134,135,136,137,138},{139,140,141,142,143,144},{145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160},{161,162,163,164,165,166,167,168,169},{170,171,172,173,174,175},{176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192},{193,194,195,196,197,198,199,200},{201,202,203,204,205,206},{207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222},{223,224,225,226,227,228,229,230},{231,232,233,234,235,236},{237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253},{254,255,256,257,258,259,260,261,262},{263,264,265,266,267,268},{269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285},{286,287,288,289,290,291,292,293,294},{295,296,297,298,299,300},{301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317},{318,319,320,321,322,323,324,325,326},{327,328,329,330,331,332},{333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349},{350,351,352,353,354,355,356,357,358},{359,360,361,362,363,364},{365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381},{382,383,384,385,386,387,388,389,390},{391,392,393,394,395,396},{397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414},{415,416,417,418,419,420,421,422,423},{424,425,426,427,428,429},{430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447},{448,449,450,451,452,453,454,455,456},{457,458,459,460,461,462},{463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479},{480,481,482,483,484,485,486,487,488},{489,490,491,492,493,494},{495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511},{512,513,514,515,516,517,518,519,520},{521,522,523,524,525,526},{527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543},{544,545,546,547,548,549,550,551,552},{553,554,555,556,557,558},{559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575},{576,577,578,579,580,581,582,583,584},{585,586,587,588,589,590},{591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607},{608,609,610,611,612,613,614,615,616},{617,618,619,620,621,622},{623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638},{639,640,641,642,643,644,645,646},{647,648,649,650,651,652},{653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668},{669,670,671,672,673,674,675,676},{677,678,679,680,681,682},{683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699},{700,701,702,703,704,705,706,707,708},{709,710,711,712,713,714},{715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730},{731,732,733,734,735,736,737,738},{739,740,741,742,743,744}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,2,8,14,20,26,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,1,7,13,19,25,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,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,1,7,13,19,25,31,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,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,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,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,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,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,34,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,0,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,0,6,12,18,24,30,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,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,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,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,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,1,5,9,13,17,21,25,29,0,6,12,18,24,30}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,5,11,17,23,29,35,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,7,13,19,25,31,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,6,12,18,24,30,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,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,4,10,16,22,28,34,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,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,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,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,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,1,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,1,7,13,19,25,31,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,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,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,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,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,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,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,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,4,8,12,16,20,24,28,32,3,9,15,21,27,33}; // set of end times of each shipment 
