int Dev = 40;// 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 = 350;//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]={{{{11417,0,0,0,0,0},{13060,0,0,0,0,0},{12030,0,0,0,0,0},{12474,0,0,0,0,0},{11958,0,0,0,0,0},{11998,0,0,0,0,0},{12939,0,0,0,0,0},{12262,0,0,0,0,0},{12908,0,0,0,0,0},{13181,0,0,0,0,0},{12527,0,0,0,0,0},{12042,0,0,0,0,0},{11593,0,0,0,0,0},{12288,0,0,0,0,0},{12435,0,0,0,0,0},{12823,0,0,0,0,0},{12083,0,0,0,0,0},{11838,0,0,0,0,0},{11892,0,0,0,0,0},{12639,0,0,0,0,0}},{{12145,0,0,0,0,0},{12124,0,0,0,0,0},{12208,0,0,0,0,0},{12523,0,0,0,0,0},{12648,0,0,0,0,0},{12895,0,0,0,0,0},{12656,0,0,0,0,0},{12409,0,0,0,0,0},{11943,0,0,0,0,0},{11872,0,0,0,0,0},{12045,0,0,0,0,0},{12537,0,0,0,0,0},{12010,0,0,0,0,0},{13197,0,0,0,0,0},{12467,0,0,0,0,0},{12027,0,0,0,0,0},{13419,0,0,0,0,0},{12027,0,0,0,0,0},{12794,0,0,0,0,0},{12844,0,0,0,0,0}},{{11397,0,0,0,0,0},{11709,0,0,0,0,0},{11512,0,0,0,0,0},{11894,0,0,0,0,0},{11638,0,0,0,0,0},{11816,0,0,0,0,0},{11454,0,0,0,0,0},{11260,0,0,0,0,0},{12310,0,0,0,0,0},{11358,0,0,0,0,0},{11399,0,0,0,0,0},{11902,0,0,0,0,0},{11395,0,0,0,0,0},{11442,0,0,0,0,0},{12564,0,0,0,0,0},{11373,0,0,0,0,0},{11247,0,0,0,0,0},{11505,0,0,0,0,0},{11572,0,0,0,0,0},{11095,0,0,0,0,0}}},{{{-320,-209,-176,-303,-200,-194},{-232,-276,-394,-247,-235,-406},{-176,-256,-406,-341,-226,-376},{-244,-276,-191,-276,-226,-276},{-385,-191,-244,-338,-359,-288},{-368,-253,-315,-344,-370,-232},{-320,-365,-215,-303,-341,-400},{-291,-191,-200,-303,-279,-197},{-341,-359,-373,-344,-279,-350},{-370,-235,-300,-391,-362,-409},{-291,-368,-226,-391,-362,-370},{-270,-344,-226,-315,-179,-291},{-262,-406,-376,-253,-291,-376},{-365,-197,-306,-332,-320,-203},{-229,-303,-326,-256,-288,-288},{-359,-347,-309,-285,-270,-285},{-335,-303,-250,-341,-312,-309},{-323,-250,-241,-323,-318,-406},{-270,-238,-373,-226,-409,-300},{-188,-403,-329,-250,-232,-403}},{{-194,-355,-174,-384,-280,-220},{-400,-329,-179,-318,-251,-363},{-319,-174,-221,-288,-296,-205},{-406,-346,-249,-258,-198,-298},{-342,-255,-347,-247,-179,-192},{-336,-312,-277,-279,-350,-319},{-200,-355,-238,-296,-216,-347},{-316,-320,-174,-233,-294,-303},{-241,-200,-378,-312,-283,-179},{-336,-346,-207,-227,-286,-215},{-319,-280,-258,-381,-358,-319},{-374,-232,-344,-285,-374,-249},{-299,-263,-255,-326,-328,-161},{-374,-217,-316,-293,-198,-334},{-244,-383,-370,-164,-347,-326},{-397,-372,-300,-192,-302,-282},{-360,-246,-258,-340,-256,-161},{-238,-277,-339,-381,-163,-166},{-226,-243,-325,-381,-219,-267},{-403,-375,-190,-326,-272,-197}},{{-182,-177,-317,-246,-280,-181},{-167,-242,-219,-284,-233,-225},{-182,-162,-266,-264,-218,-210},{-315,-196,-291,-293,-210,-154},{-162,-315,-193,-175,-248,-181},{-305,-332,-277,-186,-160,-163},{-320,-261,-282,-150,-203,-268},{-215,-293,-196,-291,-257,-152},{-242,-203,-193,-302,-238,-272},{-315,-288,-238,-146,-171,-233},{-315,-198,-233,-314,-212,-177},{-152,-223,-226,-197,-131,-175},{-292,-179,-242,-258,-154,-288},{-272,-336,-172,-159,-193,-161},{-280,-254,-277,-141,-205,-282},{-195,-196,-151,-311,-175,-177},{-158,-336,-256,-146,-158,-253},{-165,-150,-212,-215,-152,-185},{-178,-339,-214,-206,-143,-171},{-252,-225,-235,-177,-235,-187}}},{{{-133,-135,-231,-140,-147,-206},{-202,-112,-161,-231,-199,-162},{-173,-103,-133,-202,-204,-139},{-108,-204,-182,-140,-217,-195},{-133,-218,-184,-192,-136,-153},{-213,-171,-124,-113,-166,-118},{-134,-150,-217,-152,-208,-138},{-128,-120,-161,-163,-247,-252},{-123,-157,-193,-199,-202,-187},{-195,-169,-184,-154,-208,-202},{-133,-117,-152,-222,-250,-244},{-133,-106,-238,-129,-213,-244},{-203,-169,-170,-118,-112,-191},{-190,-179,-135,-150,-237,-218},{-146,-191,-119,-170,-199,-197},{-161,-140,-150,-177,-188,-260},{-178,-110,-168,-240,-153,-231},{-101,-142,-130,-122,-121,-181},{-116,-179,-236,-195,-123,-260},{-128,-183,-231,-247,-241,-159}},{{-214,-178,-160,-254,-179,-248},{-164,-152,-181,-254,-179,-205},{-137,-197,-158,-221,-211,-174},{-210,-215,-277,-278,-208,-293},{-242,-281,-147,-290,-266,-326},{-172,-125,-179,-150,-268,-233},{-141,-223,-145,-190,-211,-217},{-218,-180,-271,-254,-144,-152},{-202,-260,-275,-232,-204,-243},{-200,-182,-202,-137,-165,-326},{-259,-197,-245,-190,-176,-331},{-208,-238,-264,-254,-147,-212},{-119,-197,-230,-270,-321,-176},{-240,-156,-138,-217,-190,-319},{-261,-252,-147,-199,-298,-202},{-150,-226,-245,-183,-202,-162},{-267,-193,-260,-139,-234,-221},{-275,-172,-132,-250,-151,-228},{-119,-275,-204,-172,-197,-228},{-257,-135,-236,-248,-147,-248}},{{-161,-214,-335,-362,-183,-365},{-217,-283,-259,-319,-379,-218},{-291,-168,-354,-251,-266,-201},{-284,-171,-181,-308,-363,-283},{-227,-273,-309,-216,-291,-368},{-249,-176,-325,-181,-382,-354},{-225,-270,-367,-340,-258,-198},{-195,-316,-231,-243,-169,-393},{-207,-278,-204,-162,-233,-396},{-341,-173,-162,-216,-197,-291},{-272,-306,-225,-286,-227,-388},{-289,-309,-249,-248,-355,-359},{-195,-291,-157,-370,-197,-388},{-173,-314,-338,-338,-194,-263},{-161,-153,-354,-227,-316,-311},{-153,-166,-293,-348,-355,-311},{-262,-278,-296,-178,-271,-201},{-346,-344,-217,-375,-310,-334},{-148,-306,-265,-256,-235,-314},{-188,-168,-301,-316,-180,-255}}},{{{-230,-355,-283,-257,-227,-415},{-247,-415,-290,-457,-329,-211},{-428,-240,-313,-211,-398,-385},{-395,-211,-273,-398,-359,-230},{-368,-359,-326,-263,-240,-270},{-299,-345,-296,-280,-411,-204},{-214,-345,-405,-355,-227,-428},{-454,-342,-220,-332,-240,-309},{-217,-444,-303,-319,-286,-283},{-355,-322,-385,-220,-398,-290},{-454,-428,-418,-217,-207,-306},{-329,-454,-227,-240,-372,-378},{-214,-260,-237,-290,-388,-201},{-431,-309,-431,-309,-326,-207},{-270,-362,-388,-290,-418,-253},{-299,-299,-428,-332,-270,-224},{-444,-332,-214,-418,-214,-227},{-243,-388,-243,-224,-405,-322},{-280,-207,-322,-388,-260,-230},{-313,-388,-451,-240,-240,-457}},{{-282,-299,-214,-330,-296,-223},{-197,-213,-236,-283,-351,-379},{-318,-332,-443,-377,-385,-238},{-433,-203,-297,-408,-290,-352},{-394,-386,-217,-220,-342,-238},{-387,-332,-421,-414,-203,-289},{-207,-303,-313,-236,-290,-241},{-453,-193,-239,-392,-200,-352},{-226,-306,-214,-273,-219,-400},{-344,-348,-252,-257,-213,-196},{-233,-438,-220,-245,-222,-265},{-361,-419,-367,-367,-200,-361},{-338,-390,-345,-342,-268,-250},{-344,-393,-281,-345,-271,-367},{-223,-261,-207,-399,-240,-358},{-295,-383,-322,-327,-280,-319},{-446,-377,-399,-389,-382,-181},{-364,-267,-370,-392,-397,-394},{-312,-309,-412,-380,-400,-283},{-413,-386,-370,-352,-262,-277}},{{-345,-397,-274,-256,-329,-278},{-392,-317,-333,-171,-278,-211},{-354,-268,-286,-256,-233,-285},{-271,-181,-347,-280,-231,-260},{-257,-184,-277,-228,-212,-272},{-381,-320,-314,-305,-209,-188},{-381,-346,-392,-207,-321,-357},{-386,-173,-319,-174,-360,-247},{-189,-363,-280,-348,-284,-252},{-348,-397,-258,-245,-318,-198},{-245,-233,-202,-248,-289,-290},{-248,-374,-361,-351,-302,-298},{-304,-181,-386,-196,-215,-337},{-345,-259,-316,-269,-284,-195},{-245,-360,-305,-356,-358,-298},{-254,-213,-202,-248,-355,-182},{-336,-294,-218,-226,-260,-265},{-386,-291,-246,-250,-331,-162},{-336,-228,-274,-310,-284,-208},{-206,-256,-330,-294,-180,-244}}},{{{-63,-119,-147,-116,-79,-155},{-101,-89,-108,-106,-77,-165},{-97,-125,-67,-118,-76,-116},{-122,-78,-157,-146,-137,-166},{-82,-76,-94,-76,-142,-104},{-105,-95,-142,-92,-126,-156},{-120,-77,-106,-110,-148,-143},{-98,-120,-111,-91,-150,-168},{-78,-104,-74,-124,-157,-177},{-122,-113,-148,-112,-73,-157},{-128,-134,-123,-163,-148,-87},{-68,-116,-90,-158,-156,-104},{-96,-94,-83,-70,-105,-125},{-69,-138,-140,-147,-73,-91},{-72,-66,-93,-99,-154,-132},{-77,-70,-102,-111,-168,-77},{-94,-123,-99,-105,-83,-95},{-86,-120,-113,-99,-146,-146},{-82,-142,-138,-85,-124,-95},{-77,-111,-132,-138,-117,-104}},{{-189,-158,-130,-113,-129,-192},{-81,-111,-181,-194,-101,-208},{-182,-133,-169,-177,-114,-217},{-166,-134,-160,-130,-121,-160},{-103,-175,-157,-203,-155,-227},{-117,-87,-166,-153,-187,-138},{-186,-168,-195,-174,-198,-213},{-92,-104,-102,-177,-122,-139},{-139,-188,-179,-135,-190,-163},{-122,-123,-145,-119,-151,-141},{-139,-190,-118,-136,-171,-104},{-100,-196,-145,-212,-142,-168},{-182,-89,-182,-112,-150,-108},{-188,-164,-175,-107,-187,-131},{-155,-96,-154,-119,-179,-131},{-139,-121,-92,-177,-142,-222},{-117,-118,-148,-184,-163,-163},{-103,-97,-127,-95,-140,-166},{-119,-189,-102,-164,-106,-213},{-155,-147,-117,-160,-155,-232}},{{-163,-207,-154,-142,-120,-166},{-206,-176,-162,-226,-133,-238},{-161,-140,-253,-165,-202,-251},{-124,-220,-177,-215,-235,-176},{-128,-196,-140,-118,-206,-194},{-172,-200,-117,-167,-204,-160},{-131,-162,-208,-251,-198,-152},{-201,-187,-141,-154,-255,-139},{-180,-227,-255,-207,-251,-259},{-121,-238,-179,-163,-133,-208},{-161,-196,-160,-131,-208,-208},{-241,-236,-151,-211,-208,-248},{-170,-205,-156,-245,-241,-137},{-110,-203,-121,-228,-259,-196},{-210,-126,-218,-245,-259,-156},{-159,-184,-145,-169,-135,-202},{-136,-229,-240,-125,-192,-150},{-231,-252,-160,-215,-220,-269},{-206,-198,-223,-180,-133,-143},{-138,-232,-244,-205,-125,-156}}},{{{-198,-157,-267,-248,-164,-274},{-156,-331,-186,-274,-333,-326},{-315,-307,-271,-145,-314,-276},{-275,-195,-267,-319,-188,-252},{-289,-190,-217,-178,-224,-278},{-161,-328,-255,-174,-176,-155},{-270,-224,-174,-214,-309,-238},{-256,-295,-255,-257,-217,-333},{-147,-317,-257,-283,-264,-290},{-322,-305,-219,-183,-276,-290},{-198,-152,-162,-264,-212,-174},{-270,-186,-167,-188,-248,-257},{-165,-300,-162,-145,-250,-159},{-254,-236,-290,-267,-195,-257},{-319,-207,-200,-333,-328,-307},{-142,-317,-240,-169,-274,-300},{-256,-195,-321,-217,-228,-219},{-326,-288,-326,-190,-236,-243},{-254,-152,-236,-333,-176,-188},{-324,-309,-212,-233,-281,-157}},{{-181,-231,-153,-266,-264,-228},{-314,-293,-306,-194,-201,-183},{-302,-226,-275,-303,-269,-206},{-274,-333,-261,-171,-149,-201},{-326,-195,-179,-243,-305,-290},{-333,-240,-273,-263,-262,-214},{-269,-176,-202,-210,-255,-161},{-262,-209,-329,-273,-294,-285},{-176,-155,-249,-273,-183,-210},{-240,-228,-254,-263,-253,-212},{-190,-288,-306,-249,-172,-267},{-193,-233,-169,-261,-246,-183},{-324,-231,-176,-176,-276,-301},{-326,-314,-167,-307,-314,-228},{-159,-167,-322,-298,-298,-188},{-314,-155,-172,-229,-271,-245},{-286,-326,-261,-247,-278,-305},{-209,-236,-230,-282,-165,-179},{-276,-169,-240,-238,-228,-276},{-181,-171,-160,-187,-249,-152}},{{-239,-140,-267,-201,-125,-113},{-228,-142,-244,-168,-256,-218},{-247,-173,-236,-187,-247,-149},{-277,-155,-250,-162,-170,-146},{-217,-286,-220,-261,-131,-234},{-269,-286,-194,-119,-135,-151},{-163,-207,-135,-142,-122,-146},{-140,-203,-121,-242,-241,-164},{-269,-234,-188,-197,-125,-223},{-142,-226,-226,-261,-127,-113},{-202,-240,-248,-236,-193,-135},{-181,-186,-200,-148,-138,-113},{-213,-222,-200,-228,-135,-185},{-262,-186,-156,-257,-196,-119},{-237,-161,-232,-252,-187,-200},{-135,-222,-164,-150,-135,-187},{-260,-196,-208,-265,-178,-221},{-185,-125,-170,-117,-198,-124},{-163,-209,-212,-166,-239,-167},{-161,-165,-214,-220,-215,-139}}},{{{-277,-266,-309,-186,-184,-309},{-306,-330,-239,-181,-314,-335},{-314,-263,-184,-311,-359,-160},{-293,-234,-231,-221,-255,-343},{-213,-165,-250,-239,-317,-277},{-317,-327,-162,-287,-170,-210},{-170,-239,-359,-338,-229,-319},{-293,-332,-234,-234,-200,-173},{-200,-354,-226,-287,-186,-194},{-277,-205,-372,-160,-354,-285},{-202,-194,-277,-298,-160,-277},{-197,-327,-285,-346,-255,-186},{-215,-354,-202,-359,-176,-301},{-194,-194,-346,-226,-370,-271},{-330,-290,-218,-325,-348,-362},{-255,-176,-327,-200,-279,-330},{-364,-194,-370,-277,-362,-245},{-258,-359,-263,-290,-261,-165},{-367,-327,-237,-311,-245,-274},{-210,-332,-245,-168,-242,-309}},{{-346,-364,-303,-354,-335,-158},{-247,-197,-218,-282,-335,-194},{-197,-258,-162,-237,-312,-163},{-197,-200,-245,-372,-168,-231},{-306,-340,-242,-215,-262,-249},{-351,-348,-367,-255,-189,-233},{-197,-309,-215,-327,-291,-329},{-263,-269,-314,-287,-231,-280},{-210,-223,-213,-162,-314,-316},{-317,-332,-223,-197,-267,-277},{-162,-189,-332,-237,-341,-313},{-202,-319,-160,-231,-330,-197},{-372,-325,-192,-205,-160,-161},{-303,-269,-370,-332,-202,-264},{-362,-309,-319,-285,-341,-161},{-364,-319,-197,-192,-259,-186},{-218,-356,-367,-170,-244,-363},{-340,-271,-207,-303,-328,-275},{-207,-277,-311,-245,-314,-262},{-192,-215,-295,-247,-328,-308}},{{-176,-215,-280,-285,-225,-301},{-223,-288,-186,-201,-211,-234},{-360,-329,-184,-196,-296,-236},{-176,-250,-192,-174,-341,-157},{-344,-268,-330,-280,-328,-188},{-295,-167,-310,-218,-225,-330},{-181,-162,-260,-253,-336,-169},{-225,-213,-300,-278,-245,-159},{-350,-336,-154,-317,-189,-330},{-249,-293,-232,-295,-309,-316},{-179,-293,-202,-312,-311,-294},{-344,-354,-348,-243,-169,-174},{-194,-164,-239,-322,-240,-313},{-285,-215,-247,-196,-186,-231},{-344,-172,-325,-305,-343,-202},{-357,-225,-275,-337,-284,-304},{-254,-225,-318,-208,-174,-157},{-243,-324,-260,-275,-233,-183},{-324,-170,-343,-288,-304,-183},{-192,-170,-282,-340,-265,-186}}},{{{-283,-271,-193,-232,-406,-186},{-319,-289,-292,-337,-313,-367},{-190,-220,-376,-379,-307,-293},{-205,-307,-412,-412,-382,-340},{-247,-193,-217,-400,-247,-201},{-388,-253,-415,-388,-220,-234},{-295,-352,-292,-352,-325,-184},{-301,-229,-250,-415,-196,-340},{-346,-349,-409,-226,-286,-394},{-403,-247,-349,-376,-193,-255},{-316,-184,-406,-358,-181,-281},{-217,-286,-412,-319,-232,-290},{-262,-256,-235,-256,-397,-231},{-316,-421,-238,-193,-394,-269},{-355,-196,-349,-253,-220,-323},{-406,-352,-223,-316,-400,-379},{-286,-223,-238,-316,-190,-198},{-229,-418,-280,-214,-346,-252},{-256,-190,-310,-220,-229,-246},{-304,-328,-283,-184,-307,-367}},{{-384,-399,-249,-177,-209,-193},{-258,-293,-235,-306,-233,-311},{-340,-232,-314,-246,-170,-221},{-331,-310,-322,-377,-278,-211},{-316,-359,-381,-374,-307,-203},{-261,-296,-171,-270,-284,-360},{-255,-316,-392,-259,-358,-334},{-246,-362,-255,-191,-313,-267},{-296,-310,-252,-191,-254,-190},{-357,-284,-297,-292,-238,-254},{-234,-261,-174,-243,-321,-208},{-322,-195,-367,-175,-241,-324},{-328,-367,-336,-235,-268,-154},{-390,-181,-263,-281,-315,-157},{-407,-364,-342,-281,-252,-185},{-381,-296,-171,-363,-170,-352},{-363,-382,-238,-369,-352,-198},{-325,-198,-353,-186,-305,-198},{-387,-207,-235,-374,-238,-195},{-401,-327,-339,-278,-262,-283}},{{-218,-161,-256,-274,-134,-204},{-260,-245,-254,-141,-182,-156},{-258,-146,-307,-267,-146,-186},{-285,-281,-298,-287,-235,-230},{-315,-166,-176,-190,-248,-176},{-238,-166,-318,-278,-237,-240},{-283,-149,-252,-197,-199,-198},{-206,-149,-259,-292,-151,-164},{-231,-295,-222,-290,-231,-139},{-216,-235,-234,-159,-250,-156},{-335,-173,-211,-250,-161,-152},{-211,-223,-195,-170,-157,-200},{-310,-300,-190,-177,-208,-186},{-211,-331,-250,-254,-278,-216},{-236,-185,-316,-256,-257,-283},{-280,-211,-190,-232,-295,-277},{-179,-247,-268,-199,-218,-271},{-322,-276,-192,-248,-288,-188},{-268,-310,-245,-301,-167,-236},{-332,-242,-218,-141,-233,-162}}},{{{-448,-427,-473,-332,-259,-228},{-448,-469,-382,-378,-304,-399},{-298,-245,-343,-231,-368,-252},{-350,-455,-420,-214,-312,-385},{-304,-469,-444,-458,-430,-290},{-420,-245,-406,-389,-248,-332},{-448,-490,-220,-413,-402,-462},{-357,-241,-318,-469,-424,-476},{-217,-315,-487,-434,-287,-480},{-399,-392,-392,-315,-374,-364},{-476,-458,-392,-294,-448,-224},{-220,-402,-262,-354,-452,-304},{-374,-284,-332,-402,-368,-318},{-427,-420,-234,-224,-262,-287},{-245,-228,-466,-294,-336,-294},{-326,-413,-368,-438,-322,-483},{-252,-308,-287,-483,-336,-340},{-217,-231,-224,-228,-332,-469},{-270,-483,-231,-357,-298,-424},{-441,-304,-392,-466,-231,-248}},{{-348,-271,-434,-357,-295,-251},{-463,-480,-427,-234,-210,-200},{-425,-226,-400,-391,-380,-267},{-258,-346,-288,-284,-384,-242},{-230,-309,-220,-314,-243,-309},{-414,-449,-386,-314,-249,-219},{-421,-384,-447,-397,-256,-393},{-459,-480,-332,-264,-262,-258},{-348,-271,-397,-441,-436,-232},{-425,-425,-342,-230,-216,-209},{-230,-230,-312,-304,-443,-245},{-240,-346,-431,-230,-295,-428},{-341,-312,-220,-264,-276,-309},{-452,-326,-468,-230,-387,-406},{-338,-298,-224,-230,-361,-261},{-299,-220,-227,-240,-203,-370},{-397,-466,-241,-307,-380,-303},{-449,-237,-214,-391,-230,-232},{-212,-473,-417,-404,-394,-370},{-425,-418,-461,-404,-253,-248}},{{-268,-305,-393,-316,-200,-267},{-365,-320,-348,-287,-339,-325},{-205,-425,-312,-319,-225,-189},{-372,-416,-375,-196,-333,-370},{-391,-416,-303,-220,-296,-284},{-217,-246,-387,-331,-396,-236},{-321,-216,-309,-261,-373,-172},{-381,-290,-279,-275,-396,-200},{-428,-256,-282,-275,-351,-373},{-243,-388,-270,-308,-308,-225},{-239,-400,-225,-205,-259,-220},{-441,-323,-390,-387,-251,-214},{-198,-410,-297,-217,-191,-272},{-321,-265,-246,-372,-217,-247},{-290,-357,-378,-226,-353,-370},{-293,-253,-417,-255,-288,-328},{-217,-225,-330,-293,-333,-339},{-208,-422,-195,-196,-248,-267},{-202,-317,-264,-255,-382,-359},{-365,-271,-294,-355,-254,-350}}}}; // 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]={7,3,3,6,3,2,6,3,2,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,9,5,3,9,5,3,9,5,3,8,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,7,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,348,349}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,2,6,10,0,6,12,1,3,5,7,9,11,2,6,10,1,7,2,4,6,8,10,12,2,6,10,1,7,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,2,8,14,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,0,4,8,12,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,1,5,9,13,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,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,0,6,12,0,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,0,4,8,12,16,2,8,14,0,2,4,6,8,10,12,14,16,0,4,8,12,16,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,2,8,14,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,2,8,14,2,4,6,8,10,12,14,1,5,9,13,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12,2,4,6,8,10,12,14,0,4,8,12,2,8,14}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,7,11,15,5,11,17,6,8,10,12,14,16,7,11,15,6,12,7,9,11,13,15,17,7,11,15,6,12,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,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,3,9,15,4,6,8,10,12,14,16,4,8,12,16,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,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,3,7,11,15,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,3,7,11,15,4,10,16,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,1,7,13,1,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,1,5,9,13,17,3,9,15,1,3,5,7,9,11,13,15,17,1,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,2,4,6,8,10,12,14,16,3,7,11,15,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,4,10,16,5,7,9,11,13,15,17,4,8,12,16,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15,5,7,9,11,13,15,17,3,7,11,15,5,11,17}; // set of end times of each shipment 
