int Dev = 30;// Deviation
extern const int CNN = 3;// 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 = 351;//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]={{{{12947,0,0,0,0,0},{12458,0,0,0,0,0},{11913,0,0,0,0,0},{12693,0,0,0,0,0},{12438,0,0,0,0,0},{12811,0,0,0,0,0},{12448,0,0,0,0,0},{12630,0,0,0,0,0},{11961,0,0,0,0,0},{12544,0,0,0,0,0},{11979,0,0,0,0,0},{12145,0,0,0,0,0},{12197,0,0,0,0,0},{12527,0,0,0,0,0},{12559,0,0,0,0,0},{12336,0,0,0,0,0},{12717,0,0,0,0,0},{12411,0,0,0,0,0},{12322,0,0,0,0,0},{12468,0,0,0,0,0}},{{11549,0,0,0,0,0},{12577,0,0,0,0,0},{12863,0,0,0,0,0},{12218,0,0,0,0,0},{12564,0,0,0,0,0},{12639,0,0,0,0,0},{12377,0,0,0,0,0},{12625,0,0,0,0,0},{11849,0,0,0,0,0},{12498,0,0,0,0,0},{12654,0,0,0,0,0},{12718,0,0,0,0,0},{12483,0,0,0,0,0},{12519,0,0,0,0,0},{11993,0,0,0,0,0},{12352,0,0,0,0,0},{12320,0,0,0,0,0},{12692,0,0,0,0,0},{12469,0,0,0,0,0},{12786,0,0,0,0,0}},{{11521,0,0,0,0,0},{11433,0,0,0,0,0},{11937,0,0,0,0,0},{11915,0,0,0,0,0},{11829,0,0,0,0,0},{11573,0,0,0,0,0},{11243,0,0,0,0,0},{11948,0,0,0,0,0},{11066,0,0,0,0,0},{11344,0,0,0,0,0},{11448,0,0,0,0,0},{11437,0,0,0,0,0},{11849,0,0,0,0,0},{11274,0,0,0,0,0},{11373,0,0,0,0,0},{11558,0,0,0,0,0},{11281,0,0,0,0,0},{11355,0,0,0,0,0},{11516,0,0,0,0,0},{11208,0,0,0,0,0}}},{{{-344,-247,-353,-362,-353,-273},{-315,-256,-309,-306,-259,-329},{-294,-309,-312,-229,-285,-229},{-247,-247,-312,-303,-247,-312},{-368,-370,-220,-294,-329,-347},{-326,-344,-344,-218,-373,-320},{-206,-226,-376,-285,-259,-253},{-318,-338,-288,-276,-356,-288},{-379,-256,-315,-235,-212,-256},{-297,-376,-362,-226,-232,-373},{-226,-259,-235,-373,-209,-238},{-262,-265,-229,-256,-356,-206},{-218,-318,-365,-323,-241,-285},{-332,-262,-318,-244,-338,-318},{-285,-335,-356,-209,-329,-235},{-353,-218,-362,-259,-320,-297},{-368,-288,-356,-288,-212,-344},{-291,-341,-320,-350,-373,-332},{-215,-344,-300,-212,-320,-265},{-347,-318,-320,-338,-265,-229}},{{-203,-232,-196,-269,-267,-262},{-334,-255,-280,-288,-259,-254},{-232,-369,-358,-312,-280,-319},{-215,-260,-311,-266,-232,-280},{-278,-235,-255,-301,-259,-231},{-255,-243,-283,-241,-344,-287},{-331,-286,-249,-326,-248,-329},{-371,-203,-277,-214,-310,-192},{-281,-214,-252,-296,-264,-212},{-244,-292,-241,-356,-208,-194},{-229,-369,-286,-285,-214,-293},{-276,-280,-283,-315,-339,-243},{-241,-326,-353,-230,-259,-256},{-218,-340,-283,-296,-342,-197},{-351,-349,-249,-271,-294,-186},{-246,-286,-210,-236,-267,-241},{-351,-275,-266,-236,-339,-308},{-310,-226,-269,-200,-195,-207},{-325,-343,-347,-288,-283,-319},{-223,-235,-230,-290,-275,-321}},{{-255,-269,-221,-172,-160,-179},{-260,-302,-228,-244,-210,-198},{-260,-286,-189,-255,-150,-177},{-298,-225,-214,-226,-165,-212},{-292,-225,-254,-242,-205,-253},{-320,-302,-287,-289,-227,-200},{-205,-223,-301,-228,-199,-255},{-208,-315,-179,-237,-199,-243},{-182,-215,-189,-255,-278,-247},{-240,-293,-182,-184,-186,-214},{-310,-218,-247,-190,-231,-200},{-192,-213,-163,-170,-199,-159},{-228,-312,-179,-184,-240,-161},{-198,-211,-226,-251,-278,-225},{-208,-244,-189,-208,-212,-198},{-218,-244,-221,-177,-190,-225},{-268,-283,-200,-202,-238,-220},{-255,-227,-291,-267,-154,-183},{-265,-179,-270,-197,-203,-157},{-178,-179,-177,-260,-257,-218}}},{{{-186,-215,-226,-175,-199,-239},{-166,-186,-189,-125,-221,-206},{-200,-130,-187,-145,-191,-155},{-139,-177,-220,-184,-171,-151},{-200,-218,-224,-134,-140,-214},{-148,-206,-172,-202,-140,-181},{-176,-142,-220,-174,-213,-206},{-119,-208,-166,-200,-213,-199},{-203,-125,-206,-193,-217,-155},{-158,-191,-203,-134,-195,-233},{-156,-189,-163,-163,-149,-222},{-203,-135,-163,-208,-199,-170},{-193,-130,-178,-132,-221,-139},{-133,-216,-186,-125,-197,-145},{-193,-135,-198,-184,-239,-178},{-138,-186,-228,-154,-221,-139},{-146,-211,-182,-181,-236,-220},{-166,-134,-154,-129,-177,-227},{-168,-215,-206,-156,-215,-159},{-139,-123,-136,-193,-162,-222}},{{-170,-246,-190,-161,-185,-276},{-232,-172,-234,-281,-282,-200},{-200,-174,-234,-228,-192,-267},{-180,-160,-164,-223,-195,-171},{-204,-158,-219,-168,-179,-245},{-162,-189,-162,-272,-256,-295},{-255,-248,-164,-221,-252,-181},{-230,-254,-202,-256,-273,-271},{-248,-172,-258,-225,-167,-198},{-210,-162,-277,-219,-215,-283},{-246,-174,-260,-170,-215,-305},{-190,-191,-239,-274,-268,-240},{-190,-250,-271,-177,-220,-271},{-242,-191,-219,-281,-282,-183},{-178,-195,-173,-206,-174,-188},{-154,-182,-175,-186,-254,-281},{-210,-148,-158,-243,-250,-264},{-249,-146,-181,-201,-247,-200},{-158,-238,-170,-254,-298,-169},{-251,-201,-219,-197,-190,-205}},{{-175,-280,-265,-278,-302,-263},{-282,-186,-312,-281,-307,-218},{-247,-288,-231,-265,-241,-362},{-287,-286,-191,-251,-327,-260},{-217,-278,-317,-289,-258,-266},{-215,-278,-191,-251,-263,-235},{-198,-207,-225,-256,-266,-229},{-230,-324,-228,-313,-277,-286},{-249,-288,-189,-302,-194,-306},{-301,-240,-283,-262,-222,-241},{-284,-301,-341,-310,-357,-235},{-190,-181,-220,-335,-349,-306},{-240,-255,-322,-278,-319,-362},{-306,-263,-225,-286,-227,-232},{-190,-293,-280,-262,-355,-277},{-215,-301,-194,-238,-263,-209},{-200,-268,-231,-340,-352,-229},{-289,-212,-191,-202,-244,-300},{-259,-222,-286,-227,-258,-362},{-294,-275,-225,-235,-274,-328}}},{{{-421,-401,-378,-299,-345,-313},{-392,-388,-372,-260,-365,-253},{-319,-237,-283,-342,-382,-263},{-352,-316,-408,-326,-385,-408},{-401,-345,-362,-234,-293,-421},{-428,-415,-250,-342,-280,-408},{-230,-355,-299,-424,-237,-385},{-293,-395,-411,-250,-329,-415},{-398,-243,-415,-253,-339,-309},{-306,-240,-372,-411,-365,-290},{-306,-349,-395,-418,-234,-316},{-336,-250,-352,-270,-352,-349},{-293,-309,-276,-293,-368,-428},{-319,-339,-247,-286,-424,-286},{-303,-352,-378,-283,-362,-372},{-250,-270,-306,-286,-273,-286},{-398,-257,-345,-280,-411,-303},{-263,-266,-408,-332,-273,-355},{-316,-408,-299,-392,-395,-296},{-247,-296,-326,-342,-401,-375}},{{-328,-287,-239,-267,-243,-286},{-361,-406,-223,-374,-311,-376},{-403,-409,-316,-371,-342,-355},{-374,-242,-367,-289,-357,-358},{-272,-390,-408,-336,-385,-343},{-298,-312,-265,-311,-354,-217},{-331,-267,-303,-383,-228,-283},{-348,-419,-376,-308,-234,-286},{-341,-248,-223,-283,-317,-220},{-371,-406,-335,-320,-286,-250},{-272,-357,-268,-383,-265,-268},{-400,-357,-284,-374,-225,-277},{-272,-399,-415,-323,-333,-370},{-426,-348,-293,-349,-268,-283},{-230,-248,-274,-289,-394,-379},{-394,-270,-341,-399,-382,-214},{-338,-225,-249,-330,-253,-376},{-410,-402,-383,-383,-265,-295},{-308,-399,-303,-226,-305,-250},{-302,-396,-408,-320,-290,-334}},{{-378,-245,-216,-234,-276,-247},{-348,-285,-269,-313,-273,-314},{-242,-351,-339,-193,-331,-275},{-260,-348,-230,-283,-313,-234},{-206,-256,-358,-212,-294,-229},{-381,-357,-316,-209,-209,-285},{-345,-233,-244,-351,-193,-324},{-339,-320,-227,-286,-217,-296},{-236,-276,-336,-231,-318,-265},{-209,-274,-218,-324,-186,-198},{-271,-239,-294,-190,-302,-231},{-381,-325,-227,-248,-228,-206},{-381,-251,-311,-343,-215,-195},{-260,-230,-241,-209,-323,-278},{-277,-311,-314,-220,-323,-334},{-360,-331,-358,-242,-299,-306},{-313,-369,-252,-199,-236,-216},{-307,-228,-235,-201,-196,-288},{-378,-225,-213,-302,-215,-218},{-310,-268,-358,-269,-199,-180}}},{{{-94,-81,-83,-124,-111,-127},{-113,-94,-87,-109,-139,-105},{-87,-96,-121,-138,-149,-156},{-113,-84,-80,-125,-121,-110},{-104,-103,-130,-94,-120,-140},{-79,-118,-109,-131,-112,-146},{-136,-89,-118,-95,-123,-101},{-104,-80,-142,-149,-151,-136},{-84,-102,-127,-90,-127,-110},{-111,-110,-142,-92,-96,-143},{-102,-106,-114,-89,-100,-160},{-134,-104,-92,-108,-150,-93},{-121,-118,-138,-104,-111,-114},{-104,-95,-115,-146,-134,-161},{-107,-113,-130,-92,-151,-101},{-79,-91,-123,-137,-89,-133},{-113,-127,-125,-144,-115,-118},{-82,-130,-100,-115,-94,-145},{-99,-75,-105,-140,-112,-101},{-97,-92,-121,-119,-111,-145}},{{-135,-155,-173,-178,-116,-131},{-163,-117,-178,-192,-158,-183},{-157,-155,-155,-188,-127,-160},{-170,-106,-149,-189,-121,-183},{-163,-134,-189,-141,-175,-200},{-111,-145,-182,-202,-167,-128},{-142,-151,-107,-150,-114,-148},{-167,-121,-147,-195,-196,-193},{-174,-161,-136,-175,-119,-176},{-108,-169,-169,-194,-201,-124},{-115,-157,-121,-164,-158,-134},{-128,-107,-169,-170,-116,-134},{-142,-99,-188,-127,-209,-197},{-120,-131,-126,-164,-196,-148},{-122,-147,-112,-150,-145,-136},{-163,-102,-139,-135,-193,-190},{-150,-179,-107,-113,-137,-126},{-174,-183,-189,-200,-137,-118},{-131,-151,-135,-202,-158,-210},{-116,-161,-185,-121,-204,-165}},{{-128,-144,-145,-224,-225,-251},{-131,-153,-162,-154,-200,-244},{-219,-200,-169,-217,-184,-182},{-152,-234,-234,-243,-151,-204},{-145,-203,-206,-156,-194,-141},{-128,-182,-169,-152,-165,-178},{-200,-230,-218,-241,-223,-147},{-214,-146,-221,-228,-239,-154},{-152,-133,-182,-190,-141,-166},{-150,-135,-143,-205,-153,-172},{-217,-151,-180,-182,-237,-170},{-191,-198,-205,-150,-151,-172},{-161,-221,-242,-144,-233,-242},{-182,-211,-153,-150,-159,-162},{-133,-157,-173,-148,-143,-186},{-145,-191,-145,-171,-180,-251},{-122,-196,-201,-137,-247,-234},{-124,-232,-232,-150,-161,-188},{-149,-169,-153,-188,-231,-178},{-182,-176,-223,-238,-169,-226}}},{{{-252,-240,-209,-250,-300,-276},{-233,-240,-262,-209,-286,-283},{-172,-183,-200,-174,-243,-231},{-256,-224,-219,-281,-178,-300},{-214,-212,-212,-183,-262,-214},{-163,-221,-200,-200,-221,-169},{-203,-278,-250,-226,-278,-217},{-238,-171,-188,-195,-305,-286},{-177,-174,-305,-186,-300,-188},{-170,-231,-219,-271,-243,-302},{-291,-238,-212,-236,-240,-283},{-224,-181,-290,-305,-236,-219},{-242,-169,-255,-278,-250,-205},{-184,-255,-188,-240,-264,-248},{-191,-195,-257,-193,-274,-202},{-261,-288,-198,-257,-288,-286},{-303,-209,-302,-257,-178,-281},{-196,-195,-295,-219,-174,-212},{-175,-302,-224,-243,-281,-195},{-175,-214,-248,-212,-283,-262}},{{-286,-190,-195,-268,-158,-181},{-264,-186,-204,-300,-201,-219},{-248,-281,-209,-194,-237,-159},{-226,-228,-249,-252,-276,-203},{-219,-240,-193,-206,-233,-197},{-195,-271,-216,-162,-287,-285},{-186,-167,-263,-178,-258,-168},{-240,-214,-298,-268,-240,-168},{-188,-188,-226,-289,-172,-274},{-183,-252,-270,-185,-201,-181},{-255,-293,-212,-268,-212,-201},{-181,-295,-251,-182,-158,-261},{-176,-226,-186,-199,-262,-217},{-178,-307,-172,-213,-181,-168},{-281,-169,-296,-206,-210,-278},{-167,-226,-183,-217,-264,-276},{-271,-233,-204,-187,-244,-267},{-245,-302,-251,-173,-221,-256},{-217,-193,-221,-243,-185,-203},{-231,-231,-296,-189,-167,-245}},{{-271,-261,-164,-183,-237,-202},{-260,-205,-196,-195,-133,-184},{-249,-217,-263,-172,-209,-209},{-209,-173,-218,-234,-241,-166},{-211,-199,-246,-201,-198,-234},{-252,-224,-176,-220,-159,-158},{-198,-217,-234,-154,-140,-175},{-262,-253,-226,-213,-194,-173},{-277,-255,-198,-185,-213,-178},{-198,-184,-141,-213,-194,-223},{-181,-205,-200,-238,-170,-135},{-189,-242,-190,-216,-189,-227},{-183,-155,-244,-230,-204,-203},{-264,-236,-250,-232,-155,-230},{-178,-251,-226,-142,-217,-153},{-198,-263,-261,-138,-131,-200},{-150,-236,-210,-195,-230,-232},{-153,-148,-252,-183,-159,-212},{-247,-265,-216,-142,-142,-153},{-153,-249,-204,-174,-223,-155}}},{{{-263,-343,-340,-200,-314,-319},{-285,-343,-263,-231,-306,-226},{-210,-200,-263,-261,-245,-317},{-295,-298,-327,-192,-245,-261},{-261,-309,-327,-245,-231,-226},{-295,-285,-229,-293,-250,-290},{-215,-239,-319,-263,-309,-340},{-314,-258,-266,-266,-274,-213},{-192,-285,-253,-223,-218,-303},{-274,-346,-221,-213,-322,-245},{-263,-298,-266,-258,-274,-306},{-231,-194,-205,-303,-298,-255},{-245,-271,-306,-293,-250,-303},{-205,-319,-250,-207,-295,-250},{-282,-221,-317,-332,-186,-271},{-317,-239,-298,-194,-279,-301},{-229,-332,-338,-215,-231,-309},{-295,-189,-205,-245,-253,-247},{-189,-271,-234,-194,-200,-192},{-266,-258,-301,-226,-293,-311}},{{-231,-186,-263,-215,-202,-267},{-266,-226,-205,-186,-304,-303},{-340,-226,-271,-186,-293,-329},{-261,-237,-207,-245,-225,-303},{-317,-303,-314,-290,-314,-326},{-314,-277,-205,-340,-291,-290},{-309,-274,-242,-197,-278,-272},{-247,-186,-285,-314,-259,-285},{-237,-218,-274,-207,-338,-267},{-250,-189,-306,-277,-272,-205},{-327,-250,-319,-314,-220,-290},{-311,-290,-287,-306,-301,-181},{-277,-189,-213,-293,-309,-218},{-258,-192,-269,-274,-228,-225},{-189,-258,-215,-258,-236,-311},{-239,-301,-218,-277,-325,-321},{-279,-303,-200,-189,-275,-306},{-255,-303,-229,-317,-320,-319},{-277,-202,-200,-213,-241,-189},{-330,-277,-242,-207,-196,-251}},{{-264,-273,-262,-320,-225,-231},{-236,-291,-267,-206,-294,-236},{-311,-288,-239,-223,-272,-229},{-313,-321,-300,-243,-252,-243},{-280,-263,-312,-303,-296,-190},{-295,-202,-290,-238,-206,-200},{-210,-271,-227,-315,-255,-181},{-218,-266,-305,-196,-282,-205},{-223,-187,-270,-241,-216,-188},{-272,-278,-310,-201,-176,-253},{-282,-197,-234,-196,-309,-258},{-303,-296,-270,-308,-230,-217},{-184,-311,-285,-176,-228,-263},{-295,-268,-257,-221,-191,-304},{-298,-245,-237,-223,-211,-207},{-272,-293,-320,-255,-245,-234},{-306,-240,-186,-184,-282,-313},{-313,-271,-186,-191,-260,-207},{-311,-293,-237,-188,-194,-243},{-186,-210,-179,-243,-196,-241}}},{{{-376,-238,-250,-334,-286,-385},{-343,-298,-265,-376,-295,-343},{-211,-268,-298,-346,-283,-382},{-280,-307,-337,-385,-376,-252},{-337,-277,-262,-229,-322,-287},{-310,-358,-247,-319,-349,-376},{-319,-298,-376,-301,-319,-299},{-211,-220,-262,-340,-352,-332},{-328,-319,-217,-373,-247,-210},{-334,-367,-217,-268,-232,-237},{-271,-355,-232,-244,-277,-255},{-337,-214,-355,-235,-223,-352},{-358,-280,-322,-238,-250,-222},{-361,-367,-268,-388,-238,-343},{-349,-241,-391,-265,-322,-263},{-250,-391,-355,-262,-256,-355},{-325,-295,-355,-358,-274,-287},{-325,-370,-382,-388,-271,-275},{-334,-346,-346,-259,-367,-243},{-211,-223,-289,-292,-367,-249}},{{-316,-290,-322,-210,-286,-278},{-223,-344,-280,-355,-286,-290},{-246,-316,-232,-347,-294,-188},{-296,-344,-238,-347,-201,-332},{-211,-310,-286,-232,-310,-193},{-293,-333,-202,-298,-220,-290},{-287,-273,-199,-298,-249,-326},{-217,-204,-277,-284,-252,-314},{-293,-339,-252,-292,-310,-278},{-302,-347,-286,-319,-260,-252},{-223,-307,-361,-199,-223,-190},{-369,-356,-204,-341,-207,-180},{-220,-207,-274,-276,-318,-293},{-296,-238,-325,-303,-284,-265},{-234,-238,-258,-240,-249,-332},{-316,-270,-305,-216,-212,-326},{-261,-221,-269,-311,-334,-262},{-272,-307,-244,-328,-342,-203},{-305,-327,-218,-268,-186,-298},{-296,-316,-277,-325,-339,-321}},{{-233,-226,-199,-285,-276,-149},{-213,-235,-279,-194,-191,-168},{-300,-252,-229,-201,-167,-152},{-290,-206,-259,-217,-237,-252},{-221,-178,-234,-274,-257,-198},{-300,-214,-284,-179,-195,-182},{-186,-170,-206,-245,-212,-172},{-250,-218,-289,-183,-250,-190},{-191,-271,-195,-170,-187,-168},{-228,-305,-202,-261,-271,-188},{-211,-259,-204,-192,-269,-246},{-196,-254,-160,-241,-267,-208},{-231,-240,-229,-228,-184,-180},{-213,-233,-185,-155,-157,-248},{-176,-305,-227,-234,-151,-214},{-320,-233,-220,-170,-257,-164},{-176,-192,-160,-223,-212,-160},{-211,-305,-263,-214,-170,-222},{-280,-206,-247,-259,-240,-180},{-196,-286,-192,-190,-273,-202}}},{{{-259,-290,-336,-276,-378,-284},{-392,-336,-259,-280,-284,-276},{-315,-343,-350,-332,-452,-395},{-270,-452,-360,-371,-318,-371},{-308,-326,-312,-374,-416,-287},{-315,-438,-455,-290,-389,-357},{-315,-301,-304,-444,-294,-413},{-340,-252,-357,-452,-332,-382},{-389,-374,-336,-280,-427,-308},{-389,-416,-399,-357,-354,-259},{-326,-298,-315,-399,-273,-298},{-406,-332,-259,-395,-399,-455},{-434,-273,-280,-413,-259,-385},{-406,-444,-357,-301,-287,-392},{-322,-368,-448,-430,-245,-374},{-336,-298,-455,-298,-256,-420},{-329,-357,-262,-259,-374,-290},{-312,-294,-448,-248,-378,-438},{-382,-452,-284,-424,-270,-402},{-284,-395,-378,-399,-434,-434}},{{-358,-247,-441,-384,-335,-245},{-271,-405,-319,-294,-230,-303},{-345,-257,-247,-344,-407,-364},{-324,-367,-393,-234,-298,-370},{-418,-436,-254,-234,-335,-325},{-414,-394,-339,-371,-426,-245},{-351,-429,-424,-291,-397,-364},{-292,-254,-315,-421,-397,-351},{-404,-250,-247,-367,-328,-251},{-362,-333,-417,-287,-358,-370},{-331,-412,-322,-424,-407,-386},{-438,-350,-336,-307,-348,-399},{-303,-322,-261,-434,-328,-364},{-345,-405,-424,-257,-400,-386},{-358,-244,-417,-297,-377,-402},{-303,-377,-376,-314,-403,-280},{-345,-370,-285,-391,-344,-338},{-251,-405,-400,-354,-348,-277},{-393,-412,-376,-401,-351,-380},{-393,-360,-383,-301,-397,-377}},{{-328,-274,-270,-340,-282,-234},{-299,-280,-216,-229,-316,-236},{-394,-367,-222,-349,-245,-325},{-315,-256,-264,-308,-211,-359},{-391,-370,-243,-375,-231,-228},{-331,-253,-354,-223,-365,-284},{-343,-299,-297,-205,-231,-359},{-343,-243,-330,-369,-353,-211},{-258,-231,-270,-360,-308,-306},{-400,-314,-333,-355,-362,-267},{-249,-216,-249,-270,-251,-339},{-324,-323,-390,-275,-296,-267},{-353,-333,-255,-375,-228,-328},{-261,-342,-255,-226,-262,-348},{-324,-314,-327,-272,-322,-284},{-280,-283,-237,-337,-245,-328},{-293,-274,-240,-275,-359,-200},{-406,-363,-390,-363,-259,-297},{-324,-339,-387,-366,-239,-314},{-302,-240,-369,-296,-279,-272}}}}; // 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,4,3,6,3,2,6,3,2,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,7,4,3,9,5,3,8,4,3,8,5,3,8,4,3,8,5,3,9,4,3,8,4,3,8,4,3,7,4,3,8,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,350}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,0,4,8,12,0,6,12,1,3,5,7,9,11,1,5,9,2,8,2,4,6,8,10,12,1,5,9,1,7,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,1,3,5,7,9,11,13,0,4,8,12,1,7,13,0,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,0,6,12,2,4,6,8,10,12,14,0,4,8,12,1,7,13,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,2,6,10,14,0,6,12,0,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,16,1,7,13,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,16,1,7,13,0,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,2,6,10,14,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,2,4,6,8,10,12,14,2,6,10,14,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,2,6,10,14,0,6,12,1,3,5,7,9,11,13,0,4,8,12,1,7,13}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,5,9,13,17,5,11,17,6,8,10,12,14,16,6,10,14,7,13,7,9,11,13,15,17,6,10,14,6,12,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,4,6,8,10,12,14,16,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,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,3,9,15,2,4,6,8,10,12,14,16,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,4,8,12,16,2,8,14,1,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,2,8,14,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,17,2,8,14,1,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,4,6,8,10,12,14,16,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,4,10,16,3,5,7,9,11,13,15,17,5,9,13,17,3,9,15,4,6,8,10,12,14,16,3,7,11,15,4,10,16}; // set of end times of each shipment 
