int Dev = 20;// 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 = 352;//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]={{{{12433,0,0,0,0,0},{11791,0,0,0,0,0},{12222,0,0,0,0,0},{12953,0,0,0,0,0},{12537,0,0,0,0,0},{12332,0,0,0,0,0},{12589,0,0,0,0,0},{12389,0,0,0,0,0},{12079,0,0,0,0,0},{12527,0,0,0,0,0},{12719,0,0,0,0,0},{12395,0,0,0,0,0},{12831,0,0,0,0,0},{12226,0,0,0,0,0},{12541,0,0,0,0,0},{12112,0,0,0,0,0},{12174,0,0,0,0,0},{12487,0,0,0,0,0},{12429,0,0,0,0,0},{12263,0,0,0,0,0}},{{12005,0,0,0,0,0},{12405,0,0,0,0,0},{12583,0,0,0,0,0},{12117,0,0,0,0,0},{12532,0,0,0,0,0},{12420,0,0,0,0,0},{12271,0,0,0,0,0},{12308,0,0,0,0,0},{12600,0,0,0,0,0},{12821,0,0,0,0,0},{12559,0,0,0,0,0},{11908,0,0,0,0,0},{12409,0,0,0,0,0},{12389,0,0,0,0,0},{12065,0,0,0,0,0},{12460,0,0,0,0,0},{12388,0,0,0,0,0},{12206,0,0,0,0,0},{12388,0,0,0,0,0},{12689,0,0,0,0,0}},{{11431,0,0,0,0,0},{11837,0,0,0,0,0},{11558,0,0,0,0,0},{11270,0,0,0,0,0},{11426,0,0,0,0,0},{11673,0,0,0,0,0},{11859,0,0,0,0,0},{11838,0,0,0,0,0},{11615,0,0,0,0,0},{11626,0,0,0,0,0},{11636,0,0,0,0,0},{11522,0,0,0,0,0},{11223,0,0,0,0,0},{11742,0,0,0,0,0},{11073,0,0,0,0,0},{11657,0,0,0,0,0},{11549,0,0,0,0,0},{11068,0,0,0,0,0},{11704,0,0,0,0,0},{11715,0,0,0,0,0}}},{{{-300,-306,-326,-329,-306,-270},{-282,-285,-282,-265,-291,-303},{-335,-309,-312,-312,-312,-253},{-270,-323,-250,-341,-288,-312},{-353,-306,-347,-338,-350,-297},{-238,-238,-326,-329,-282,-341},{-285,-288,-250,-326,-285,-350},{-347,-350,-297,-288,-288,-353},{-276,-291,-241,-268,-306,-262},{-235,-329,-300,-291,-285,-250},{-259,-285,-279,-335,-285,-344},{-309,-273,-270,-303,-238,-306},{-259,-306,-335,-350,-350,-276},{-235,-256,-312,-303,-338,-285},{-288,-329,-259,-238,-312,-247},{-350,-350,-256,-344,-262,-273},{-265,-253,-309,-235,-238,-288},{-285,-291,-294,-294,-306,-353},{-244,-297,-344,-326,-335,-256},{-338,-276,-318,-350,-309,-250}},{{-278,-289,-244,-225,-272,-231},{-299,-283,-269,-258,-216,-277},{-287,-309,-294,-312,-312,-293},{-270,-283,-252,-285,-214,-243},{-249,-320,-325,-269,-288,-311},{-235,-306,-258,-271,-288,-280},{-296,-269,-232,-299,-248,-300},{-273,-329,-297,-247,-278,-290},{-342,-232,-241,-252,-320,-249},{-299,-255,-255,-321,-312,-223},{-304,-243,-297,-307,-312,-311},{-264,-323,-336,-299,-214,-233},{-273,-260,-286,-326,-275,-293},{-331,-243,-224,-247,-254,-277},{-235,-300,-272,-269,-280,-267},{-345,-277,-227,-296,-230,-251},{-232,-229,-294,-293,-310,-223},{-299,-320,-241,-282,-291,-300},{-244,-283,-277,-307,-264,-287},{-264,-246,-280,-293,-320,-287}},{{-232,-203,-203,-262,-184,-173},{-265,-213,-221,-251,-208,-231},{-208,-244,-259,-197,-175,-235},{-282,-273,-189,-186,-240,-206},{-270,-201,-268,-190,-242,-169},{-288,-266,-193,-184,-203,-187},{-265,-276,-226,-224,-227,-245},{-232,-232,-200,-179,-205,-247},{-292,-215,-189,-231,-233,-165},{-280,-244,-210,-222,-255,-202},{-238,-218,-231,-267,-233,-206},{-235,-278,-189,-258,-186,-183},{-288,-278,-245,-240,-182,-229},{-228,-208,-217,-190,-229,-216},{-275,-223,-221,-253,-184,-190},{-242,-218,-228,-211,-193,-206},{-280,-237,-228,-262,-171,-245},{-200,-198,-280,-208,-182,-206},{-240,-196,-189,-235,-171,-229},{-262,-247,-186,-264,-193,-218}}},{{{-139,-174,-144,-156,-175,-195},{-202,-157,-142,-150,-186,-189},{-139,-179,-177,-161,-175,-204},{-190,-159,-184,-211,-180,-220},{-150,-159,-164,-156,-219,-176},{-134,-179,-163,-186,-147,-201},{-193,-186,-203,-184,-169,-206},{-186,-137,-154,-215,-197,-199},{-188,-137,-194,-163,-210,-166},{-134,-147,-177,-166,-208,-193},{-175,-166,-173,-199,-188,-183},{-143,-177,-196,-165,-173,-185},{-192,-199,-152,-200,-166,-204},{-173,-157,-164,-193,-190,-193},{-146,-194,-206,-208,-190,-222},{-138,-184,-205,-166,-151,-195},{-176,-171,-144,-179,-190,-229},{-175,-179,-178,-211,-171,-208},{-202,-166,-210,-166,-167,-212},{-170,-161,-184,-149,-169,-193}},{{-194,-223,-211,-252,-185,-248},{-200,-221,-200,-239,-188,-262},{-168,-223,-173,-259,-185,-248},{-210,-240,-200,-203,-236,-238},{-190,-195,-179,-219,-222,-202},{-180,-226,-215,-206,-222,-209},{-210,-189,-179,-183,-238,-236},{-170,-219,-192,-230,-266,-202},{-160,-182,-204,-228,-243,-283},{-218,-180,-234,-261,-245,-269},{-180,-164,-230,-201,-266,-267},{-212,-164,-249,-192,-273,-262},{-174,-228,-190,-206,-190,-214},{-194,-230,-183,-183,-275,-195},{-210,-230,-196,-177,-234,-267},{-228,-230,-245,-214,-236,-255},{-182,-226,-198,-223,-222,-224},{-164,-221,-230,-223,-234,-255},{-188,-236,-209,-236,-252,-212},{-176,-240,-256,-261,-273,-209}},{{-242,-222,-288,-270,-302,-300},{-269,-224,-217,-230,-327,-340},{-282,-270,-304,-256,-235,-294},{-203,-291,-238,-275,-274,-246},{-287,-240,-293,-324,-241,-286},{-296,-219,-278,-262,-235,-308},{-279,-245,-231,-313,-288,-241},{-289,-298,-270,-313,-258,-255},{-291,-278,-228,-243,-299,-275},{-235,-301,-291,-278,-310,-252},{-294,-224,-299,-262,-316,-280},{-232,-280,-246,-256,-277,-260},{-282,-240,-265,-235,-241,-275},{-274,-301,-225,-308,-269,-272},{-242,-296,-252,-251,-258,-246},{-252,-242,-228,-302,-299,-286},{-225,-219,-217,-251,-222,-277},{-212,-222,-236,-240,-241,-306},{-294,-252,-283,-321,-252,-269},{-212,-230,-293,-248,-324,-226}}},{{{-375,-345,-322,-362,-286,-296},{-306,-266,-309,-276,-316,-362},{-329,-306,-296,-375,-385,-336},{-392,-299,-378,-388,-385,-332},{-286,-266,-382,-378,-352,-365},{-280,-270,-355,-303,-286,-359},{-339,-339,-319,-290,-329,-378},{-280,-266,-309,-322,-276,-368},{-280,-273,-329,-273,-375,-339},{-322,-329,-388,-342,-345,-313},{-303,-299,-283,-385,-273,-385},{-339,-388,-339,-345,-339,-362},{-382,-286,-345,-309,-385,-313},{-266,-326,-388,-309,-349,-290},{-266,-375,-385,-385,-326,-303},{-270,-359,-286,-342,-329,-270},{-355,-342,-352,-306,-326,-306},{-395,-273,-286,-309,-306,-359},{-388,-392,-345,-362,-270,-342},{-280,-345,-293,-332,-385,-362}},{{-282,-357,-262,-257,-345,-331},{-285,-383,-262,-377,-302,-304},{-361,-345,-351,-257,-320,-271},{-318,-332,-325,-283,-296,-280},{-292,-309,-325,-352,-326,-355},{-335,-335,-316,-361,-357,-307},{-354,-270,-287,-314,-342,-268},{-272,-283,-274,-355,-354,-244},{-305,-332,-316,-283,-354,-286},{-387,-367,-325,-342,-305,-301},{-394,-309,-354,-305,-333,-304},{-305,-309,-319,-283,-305,-250},{-338,-274,-364,-298,-271,-271},{-325,-267,-316,-374,-302,-340},{-341,-316,-274,-339,-367,-253},{-344,-261,-281,-292,-293,-259},{-331,-290,-297,-311,-246,-283},{-298,-380,-345,-254,-277,-343},{-358,-306,-290,-257,-286,-361},{-384,-338,-322,-364,-339,-325}},{{-242,-291,-305,-288,-215,-285},{-289,-302,-294,-321,-228,-308},{-280,-323,-235,-294,-260,-226},{-298,-262,-328,-288,-294,-265},{-239,-253,-235,-218,-223,-293},{-236,-323,-252,-310,-278,-272},{-348,-331,-280,-280,-294,-270},{-304,-331,-302,-275,-305,-283},{-239,-230,-277,-228,-307,-262},{-236,-268,-286,-275,-289,-226},{-345,-282,-316,-299,-257,-247},{-251,-274,-302,-277,-246,-242},{-327,-245,-255,-269,-238,-206},{-316,-265,-235,-321,-286,-303},{-274,-325,-260,-296,-262,-206},{-348,-340,-330,-307,-302,-262},{-327,-265,-325,-223,-223,-296},{-301,-242,-314,-310,-257,-257},{-289,-265,-305,-231,-278,-272},{-345,-334,-316,-321,-228,-213}}},{{{-102,-126,-102,-122,-101,-118},{-96,-112,-96,-98,-116,-138},{-101,-93,-109,-133,-143,-120},{-104,-96,-115,-126,-128,-148},{-92,-99,-128,-135,-99,-132},{-113,-102,-129,-123,-123,-136},{-116,-125,-91,-96,-122,-133},{-104,-87,-94,-117,-124,-146},{-103,-99,-120,-139,-100,-143},{-117,-101,-91,-105,-105,-154},{-94,-90,-127,-128,-137,-129},{-93,-118,-103,-125,-124,-152},{-91,-117,-110,-95,-139,-104},{-117,-112,-127,-113,-117,-142},{-124,-88,-111,-105,-139,-127},{-112,-99,-130,-119,-99,-124},{-84,-99,-132,-111,-110,-113},{-113,-127,-111,-119,-99,-150},{-90,-86,-122,-95,-116,-120},{-104,-108,-112,-103,-122,-109}},{{-150,-123,-118,-161,-140,-158},{-132,-123,-130,-183,-145,-134},{-127,-134,-178,-172,-185,-141},{-159,-127,-123,-175,-140,-192},{-138,-134,-120,-166,-132,-175},{-111,-162,-132,-180,-145,-144},{-131,-154,-149,-143,-138,-143},{-130,-117,-149,-167,-134,-192},{-151,-138,-123,-127,-134,-190},{-161,-114,-170,-183,-192,-176},{-134,-116,-135,-184,-135,-146},{-158,-158,-123,-130,-163,-180},{-135,-159,-172,-149,-134,-190},{-135,-155,-130,-143,-158,-155},{-111,-168,-127,-144,-135,-139},{-158,-130,-138,-135,-155,-178},{-120,-152,-158,-180,-153,-148},{-127,-168,-167,-157,-185,-139},{-124,-166,-147,-183,-155,-168},{-116,-145,-121,-144,-188,-141}},{{-178,-207,-173,-169,-157,-236},{-180,-178,-223,-175,-235,-174},{-198,-209,-192,-163,-233,-202},{-161,-167,-175,-192,-204,-162},{-163,-166,-203,-211,-190,-180},{-182,-171,-169,-226,-176,-170},{-156,-167,-210,-200,-221,-170},{-184,-180,-175,-194,-220,-188},{-156,-185,-167,-175,-214,-162},{-168,-211,-160,-213,-182,-188},{-178,-178,-203,-184,-182,-230},{-149,-178,-188,-192,-225,-218},{-152,-187,-193,-192,-218,-160},{-200,-155,-184,-182,-231,-192},{-164,-169,-188,-213,-178,-200},{-147,-182,-210,-222,-176,-206},{-168,-191,-216,-156,-233,-226},{-149,-151,-180,-162,-186,-196},{-145,-169,-192,-205,-221,-218},{-168,-173,-206,-175,-188,-212}}},{{{-205,-209,-257,-200,-278,-221},{-224,-198,-214,-255,-205,-250},{-247,-240,-262,-214,-195,-224},{-263,-257,-193,-243,-214,-202},{-235,-228,-286,-238,-207,-226},{-212,-248,-269,-236,-224,-212},{-263,-262,-286,-224,-209,-190},{-249,-198,-281,-212,-269,-193},{-256,-252,-259,-221,-190,-190},{-238,-219,-228,-209,-259,-262},{-242,-264,-214,-228,-281,-278},{-221,-212,-200,-276,-205,-238},{-270,-267,-224,-271,-259,-267},{-189,-219,-259,-262,-243,-236},{-259,-283,-259,-278,-233,-224},{-193,-281,-238,-233,-212,-262},{-212,-276,-226,-217,-236,-202},{-221,-250,-212,-231,-281,-262},{-268,-202,-195,-200,-271,-209},{-224,-238,-231,-257,-262,-236}},{{-214,-274,-207,-252,-181,-221},{-233,-269,-212,-243,-215,-179},{-274,-236,-195,-196,-224,-232},{-269,-238,-256,-256,-208,-225},{-264,-269,-258,-210,-181,-219},{-259,-238,-258,-215,-264,-250},{-240,-252,-193,-259,-264,-201},{-195,-233,-258,-256,-237,-256},{-219,-274,-193,-215,-219,-228},{-259,-238,-223,-266,-203,-261},{-286,-274,-226,-254,-199,-239},{-231,-205,-244,-210,-194,-232},{-195,-214,-273,-203,-208,-225},{-207,-250,-209,-229,-224,-261},{-205,-238,-249,-263,-197,-210},{-250,-248,-275,-243,-258,-261},{-278,-271,-261,-252,-210,-194},{-207,-224,-233,-192,-228,-245},{-255,-207,-223,-252,-235,-203},{-262,-224,-214,-263,-258,-192}},{{-237,-215,-162,-228,-180,-182},{-191,-167,-234,-183,-193,-209},{-211,-194,-172,-211,-163,-211},{-202,-182,-214,-197,-172,-164},{-219,-209,-240,-177,-213,-151},{-245,-217,-170,-174,-172,-187},{-172,-203,-216,-207,-151,-176},{-230,-234,-176,-181,-187,-212},{-211,-213,-240,-193,-217,-164},{-254,-173,-198,-170,-187,-184},{-243,-251,-222,-174,-194,-200},{-176,-190,-216,-230,-153,-214},{-249,-169,-182,-195,-196,-169},{-172,-238,-240,-209,-165,-160},{-174,-201,-218,-195,-174,-146},{-247,-186,-218,-193,-209,-211},{-215,-188,-206,-177,-223,-196},{-247,-213,-212,-179,-151,-191},{-254,-249,-232,-164,-215,-149},{-211,-192,-194,-230,-208,-171}}},{{{-237,-245,-314,-263,-290,-314},{-231,-229,-277,-271,-287,-245},{-223,-213,-271,-242,-247,-218},{-218,-231,-239,-309,-261,-285},{-287,-319,-247,-250,-269,-218},{-258,-253,-255,-274,-271,-250},{-306,-287,-226,-314,-298,-295},{-229,-239,-314,-221,-306,-263},{-311,-229,-279,-237,-295,-285},{-319,-306,-274,-306,-255,-290},{-261,-282,-279,-221,-253,-250},{-263,-279,-266,-282,-290,-319},{-242,-229,-245,-215,-223,-247},{-237,-247,-293,-218,-309,-279},{-306,-314,-247,-303,-258,-226},{-221,-290,-242,-239,-269,-255},{-237,-229,-306,-301,-279,-221},{-229,-215,-287,-314,-303,-245},{-311,-285,-306,-287,-215,-314},{-229,-223,-226,-237,-221,-285}},{{-279,-250,-263,-285,-280,-241},{-242,-263,-295,-293,-238,-262},{-319,-245,-247,-234,-296,-287},{-298,-231,-226,-287,-246,-238},{-253,-245,-319,-234,-278,-272},{-255,-245,-221,-261,-212,-269},{-319,-245,-311,-314,-228,-303},{-253,-287,-263,-269,-259,-280},{-290,-253,-271,-319,-212,-246},{-261,-239,-306,-309,-254,-272},{-287,-237,-242,-317,-212,-236},{-223,-266,-279,-250,-249,-233},{-250,-314,-223,-303,-212,-233},{-266,-295,-293,-250,-265,-241},{-215,-218,-306,-298,-233,-277},{-226,-295,-295,-218,-265,-285},{-303,-287,-309,-258,-257,-303},{-274,-242,-250,-213,-309,-254},{-247,-309,-213,-274,-225,-285},{-274,-263,-213,-309,-236,-303}},{{-251,-228,-285,-246,-218,-260},{-241,-240,-222,-216,-274,-284},{-308,-250,-302,-213,-228,-193},{-231,-243,-282,-208,-294,-236},{-306,-256,-275,-213,-230,-287},{-311,-273,-249,-223,-213,-277},{-298,-240,-297,-236,-240,-277},{-280,-299,-290,-216,-225,-265},{-287,-299,-292,-228,-203,-217},{-251,-299,-270,-270,-216,-277},{-228,-291,-237,-201,-218,-205},{-233,-286,-239,-263,-252,-272},{-236,-304,-239,-258,-277,-217},{-241,-256,-267,-258,-287,-287},{-249,-230,-302,-218,-238,-258},{-298,-301,-212,-236,-213,-212},{-287,-283,-244,-275,-262,-202},{-236,-243,-217,-226,-228,-284},{-262,-301,-227,-246,-287,-263},{-311,-228,-219,-231,-208,-193}}},{{{-247,-304,-244,-274,-319,-237},{-265,-277,-295,-241,-313,-317},{-358,-337,-310,-268,-250,-243},{-340,-346,-319,-358,-355,-281},{-283,-361,-268,-289,-322,-266},{-331,-256,-280,-343,-325,-329},{-271,-250,-298,-298,-253,-329},{-358,-346,-241,-271,-316,-352},{-322,-328,-307,-295,-346,-284},{-340,-316,-334,-343,-253,-287},{-355,-277,-340,-262,-268,-337},{-316,-241,-358,-334,-280,-317},{-259,-361,-337,-361,-346,-352},{-307,-259,-274,-349,-292,-255},{-361,-307,-289,-280,-259,-284},{-244,-349,-325,-349,-250,-343},{-343,-277,-340,-268,-280,-296},{-256,-244,-352,-319,-256,-255},{-253,-271,-361,-241,-310,-317},{-259,-352,-262,-319,-295,-323}},{{-249,-247,-269,-300,-262,-296},{-328,-298,-283,-284,-246,-262},{-334,-250,-288,-257,-231,-306},{-270,-253,-288,-246,-318,-296},{-346,-244,-300,-292,-252,-239},{-237,-313,-258,-265,-238,-249},{-264,-336,-274,-254,-217,-267},{-258,-264,-302,-265,-284,-208},{-322,-324,-319,-311,-307,-290},{-261,-290,-274,-248,-220,-270},{-302,-281,-272,-243,-228,-301},{-311,-270,-235,-262,-313,-211},{-314,-327,-288,-246,-278,-303},{-305,-258,-322,-221,-257,-301},{-293,-238,-288,-319,-212,-265},{-334,-250,-244,-295,-217,-257},{-293,-264,-316,-257,-315,-303},{-240,-298,-227,-308,-233,-221},{-352,-244,-294,-319,-286,-270},{-272,-296,-288,-284,-212,-213}},{{-241,-218,-185,-217,-199,-242},{-298,-252,-234,-241,-242,-204},{-218,-242,-204,-208,-193,-222},{-216,-214,-220,-263,-195,-192},{-223,-238,-231,-194,-233,-194},{-278,-262,-245,-217,-187,-234},{-290,-288,-197,-223,-218,-222},{-293,-257,-208,-256,-212,-194},{-270,-283,-261,-208,-223,-222},{-248,-264,-275,-194,-172,-174},{-238,-202,-185,-181,-218,-208},{-275,-240,-213,-236,-197,-174},{-198,-221,-202,-254,-178,-234},{-275,-259,-183,-221,-220,-230},{-223,-204,-204,-250,-180,-174},{-250,-250,-185,-208,-229,-202},{-293,-247,-240,-256,-204,-186},{-226,-204,-250,-199,-195,-194},{-263,-204,-245,-214,-229,-242},{-275,-247,-236,-223,-225,-198}}},{{{-416,-392,-336,-360,-392,-402},{-368,-294,-298,-368,-280,-364},{-371,-357,-385,-343,-298,-312},{-350,-385,-350,-385,-382,-368},{-304,-287,-364,-322,-354,-378},{-399,-378,-399,-332,-368,-287},{-346,-406,-308,-326,-413,-329},{-298,-374,-326,-360,-389,-280},{-294,-287,-413,-322,-287,-315},{-301,-385,-298,-378,-346,-354},{-402,-378,-308,-420,-413,-402},{-357,-326,-290,-312,-354,-294},{-357,-326,-346,-416,-340,-406},{-294,-364,-378,-290,-406,-312},{-318,-406,-298,-304,-294,-378},{-280,-315,-357,-322,-301,-329},{-312,-280,-389,-410,-346,-378},{-301,-410,-343,-416,-301,-392},{-290,-336,-343,-326,-322,-343},{-350,-346,-350,-326,-350,-340}},{{-362,-281,-349,-284,-272,-351},{-310,-412,-332,-271,-380,-383},{-341,-302,-363,-344,-390,-287},{-278,-398,-278,-331,-276,-283},{-365,-377,-380,-267,-318,-357},{-358,-367,-366,-271,-384,-386},{-324,-329,-322,-304,-338,-341},{-418,-292,-376,-287,-367,-277},{-324,-364,-393,-291,-387,-354},{-362,-360,-403,-294,-312,-341},{-278,-388,-325,-351,-354,-296},{-306,-274,-271,-341,-298,-296},{-296,-329,-380,-374,-387,-364},{-383,-377,-319,-341,-367,-312},{-345,-316,-298,-271,-328,-332},{-383,-388,-383,-347,-305,-280},{-306,-305,-403,-337,-298,-283},{-278,-360,-356,-351,-289,-274},{-355,-309,-285,-297,-305,-348},{-383,-357,-278,-364,-358,-341}},{{-268,-336,-312,-302,-311,-281},{-372,-296,-267,-331,-265,-278},{-362,-351,-249,-308,-254,-317},{-284,-345,-291,-261,-231,-234},{-372,-265,-264,-319,-271,-261},{-362,-326,-270,-334,-299,-264},{-306,-360,-324,-272,-228,-231},{-334,-277,-252,-293,-251,-297},{-378,-296,-309,-319,-291,-250},{-369,-271,-258,-290,-285,-295},{-274,-351,-309,-281,-231,-325},{-284,-330,-342,-343,-256,-286},{-265,-286,-264,-255,-308,-225},{-280,-274,-351,-325,-248,-289},{-265,-246,-249,-305,-308,-236},{-328,-246,-318,-270,-274,-222},{-350,-280,-255,-261,-302,-234},{-350,-249,-252,-314,-294,-278},{-274,-323,-321,-349,-245,-225},{-334,-333,-342,-328,-282,-314}}}}; // 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,2,7,3,3,7,3,2,7,4,3,8,4,3,8,4,3,8,4,3,7,4,3,8,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,4,3,9,5,3,8,5,3,8,4,3,8,4,3,7,4,3,8,4,3,8,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,348},{349,350,351}}; // set of shipments in each bid 
int SHsts[SPN]={0,2,4,6,8,10,12,0,4,8,12,2,8,0,2,4,6,8,10,12,2,6,10,0,6,12,0,2,4,6,8,10,12,1,5,9,2,8,1,3,5,7,9,11,13,1,5,9,13,2,8,14,0,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,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,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,0,6,12,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,16,1,5,9,13,2,8,14,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,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,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,16,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,1,5,9,13,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,0,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,1,7,13,0,2,4,6,8,10,12,14,1,5,9,13,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={5,7,9,11,13,15,17,5,9,13,17,7,13,5,7,9,11,13,15,17,7,11,15,5,11,17,5,7,9,11,13,15,17,6,10,14,7,13,4,6,8,10,12,14,16,4,8,12,16,5,11,17,3,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,5,11,17,2,4,6,8,10,12,14,16,2,6,10,14,3,9,15,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,2,8,14,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,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,2,4,6,8,10,12,14,16,2,6,10,14,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,3,9,15,2,4,6,8,10,12,14,16,1,5,9,13,17,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,3,7,11,15,4,10,16,4,6,8,10,12,14,16,2,6,10,14,4,10,16,3,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,4,10,16,3,5,7,9,11,13,15,17,4,8,12,16,3,9,15}; // set of end times of each shipment 
