int Dev = 20;// Deviation
extern const int CNN = 5;// 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 = 744;//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]={{{{12272,0,0,0,0,0},{12959,0,0,0,0,0},{12379,0,0,0,0,0},{12686,0,0,0,0,0},{12281,0,0,0,0,0},{12276,0,0,0,0,0},{11932,0,0,0,0,0},{12349,0,0,0,0,0},{12194,0,0,0,0,0},{12475,0,0,0,0,0}},{{12250,0,0,0,0,0},{12579,0,0,0,0,0},{12476,0,0,0,0,0},{12482,0,0,0,0,0},{12517,0,0,0,0,0},{12248,0,0,0,0,0},{12385,0,0,0,0,0},{12260,0,0,0,0,0},{12500,0,0,0,0,0},{12076,0,0,0,0,0}},{{11765,0,0,0,0,0},{11332,0,0,0,0,0},{11623,0,0,0,0,0},{11376,0,0,0,0,0},{11178,0,0,0,0,0},{11503,0,0,0,0,0},{11041,0,0,0,0,0},{11647,0,0,0,0,0},{11605,0,0,0,0,0},{11291,0,0,0,0,0}},{{10472,0,0,0,0,0},{10383,0,0,0,0,0},{10418,0,0,0,0,0},{10461,0,0,0,0,0},{10258,0,0,0,0,0},{10350,0,0,0,0,0},{10155,0,0,0,0,0},{10141,0,0,0,0,0},{10404,0,0,0,0,0},{10454,0,0,0,0,0}},{{9501,0,0,0,0,0},{9549,0,0,0,0,0},{9662,0,0,0,0,0},{9415,0,0,0,0,0},{9652,0,0,0,0,0},{9240,0,0,0,0,0},{9533,0,0,0,0,0},{9288,0,0,0,0,0},{9392,0,0,0,0,0},{9467,0,0,0,0,0}},{{9365,0,0,0,0,0},{9222,0,0,0,0,0},{9464,0,0,0,0,0},{9091,0,0,0,0,0},{9049,0,0,0,0,0},{9354,0,0,0,0,0},{9206,0,0,0,0,0},{9376,0,0,0,0,0},{9160,0,0,0,0,0},{9501,0,0,0,0,0}}},{{{-235,-297,-323,-332,-329,-350},{-320,-350,-244,-350,-341,-350},{-303,-244,-276,-318,-315,-344},{-270,-320,-250,-318,-250,-347},{-244,-282,-294,-315,-344,-288},{-309,-303,-338,-270,-338,-253},{-288,-288,-265,-315,-291,-318},{-244,-338,-347,-350,-250,-291},{-309,-323,-273,-273,-341,-268},{-353,-247,-318,-276,-312,-238}},{{-328,-317,-305,-307,-219,-233},{-270,-240,-311,-258,-235,-231},{-281,-303,-258,-263,-283,-277},{-290,-309,-288,-299,-227,-295},{-244,-340,-333,-271,-235,-212},{-299,-240,-252,-230,-219,-306},{-316,-326,-308,-274,-280,-243},{-287,-286,-255,-227,-312,-228},{-299,-266,-308,-288,-275,-259},{-244,-292,-302,-219,-219,-249}},{{-275,-264,-214,-253,-208,-202},{-285,-257,-252,-199,-231,-173},{-215,-266,-273,-211,-214,-241},{-270,-237,-273,-197,-235,-190},{-252,-201,-191,-233,-220,-218},{-258,-259,-245,-193,-210,-227},{-235,-201,-242,-222,-223,-175},{-285,-215,-254,-231,-205,-225},{-210,-261,-193,-244,-220,-237},{-220,-276,-186,-186,-220,-169}},{{-223,-209,-172,-165,-198,-176},{-165,-211,-168,-150,-135,-141},{-169,-174,-215,-184,-148,-160},{-165,-187,-197,-179,-132,-163},{-225,-176,-215,-203,-139,-144},{-167,-223,-156,-194,-132,-186},{-223,-198,-156,-158,-198,-157},{-236,-176,-188,-182,-162,-138},{-189,-153,-195,-186,-134,-157},{-183,-176,-149,-169,-148,-168}},{{-159,-150,-176,-141,-166,-140},{-152,-165,-162,-135,-169,-172},{-156,-177,-171,-168,-146,-140},{-179,-133,-169,-141,-150,-176},{-143,-179,-175,-137,-135,-162},{-145,-136,-169,-143,-147,-118},{-182,-173,-122,-132,-135,-125},{-177,-124,-176,-146,-165,-123},{-129,-152,-144,-125,-171,-171},{-169,-121,-128,-171,-144,-138}},{{-162,-151,-160,-172,-187,-135},{-129,-171,-177,-176,-182,-179},{-150,-156,-151,-148,-192,-182},{-157,-128,-159,-132,-184,-155},{-147,-157,-162,-126,-156,-177},{-138,-134,-133,-154,-167,-140},{-118,-135,-121,-149,-151,-162},{-151,-118,-145,-136,-153,-195},{-160,-121,-134,-145,-179,-159},{-150,-131,-175,-162,-130,-147}}},{{{-180,-144,-187,-147,-178,-225},{-186,-147,-150,-206,-191,-227},{-161,-174,-187,-154,-184,-176},{-190,-145,-140,-149,-213,-227},{-168,-188,-193,-190,-213,-229},{-138,-161,-189,-154,-201,-157},{-180,-196,-142,-156,-182,-164},{-150,-198,-194,-170,-215,-212},{-144,-142,-156,-177,-155,-170},{-190,-144,-208,-184,-155,-229}},{{-192,-180,-222,-190,-185,-205},{-232,-176,-243,-190,-238,-245},{-162,-180,-196,-223,-231,-209},{-228,-191,-219,-239,-185,-269},{-178,-201,-226,-179,-263,-269},{-176,-232,-234,-206,-192,-269},{-176,-234,-230,-214,-197,-202},{-196,-205,-230,-234,-202,-205},{-178,-199,-170,-232,-213,-245},{-166,-197,-215,-203,-199,-264}},{{-284,-217,-265,-292,-305,-294},{-207,-222,-283,-216,-271,-291},{-264,-242,-267,-319,-302,-289},{-291,-214,-307,-243,-271,-286},{-212,-275,-220,-284,-222,-272},{-210,-258,-257,-273,-238,-317},{-210,-222,-236,-254,-238,-238},{-252,-224,-262,-294,-247,-291},{-257,-245,-244,-219,-238,-275},{-269,-232,-233,-240,-324,-334}},{{-272,-320,-322,-271,-355,-283},{-237,-335,-283,-316,-325,-268},{-237,-247,-319,-250,-286,-319},{-315,-265,-325,-286,-337,-241},{-277,-353,-310,-316,-343,-277},{-234,-262,-292,-307,-346,-259},{-301,-288,-286,-262,-310,-310},{-327,-279,-250,-250,-259,-325},{-289,-288,-274,-253,-322,-277},{-272,-353,-316,-346,-301,-328}},{{-337,-361,-277,-330,-291,-278},{-337,-280,-283,-276,-309,-244},{-337,-349,-346,-285,-276,-290},{-301,-262,-253,-252,-273,-267},{-361,-292,-277,-345,-259,-290},{-283,-334,-331,-249,-279,-296},{-340,-247,-346,-282,-288,-325},{-301,-259,-349,-288,-268,-293},{-262,-283,-256,-270,-338,-316},{-289,-265,-337,-255,-282,-313}},{{-296,-326,-309,-261,-212,-263},{-242,-326,-263,-290,-289,-233},{-288,-276,-279,-290,-220,-285},{-248,-240,-260,-304,-223,-283},{-285,-243,-268,-259,-284,-273},{-325,-304,-301,-272,-266,-295},{-288,-299,-236,-272,-264,-198},{-336,-285,-236,-298,-218,-208},{-237,-262,-220,-288,-230,-265},{-274,-271,-252,-216,-297,-253}}},{{{-329,-336,-339,-355,-392,-306},{-266,-355,-273,-395,-375,-296},{-368,-270,-309,-355,-349,-280},{-329,-339,-332,-339,-339,-296},{-388,-299,-352,-355,-276,-349},{-372,-296,-359,-388,-332,-276},{-313,-392,-293,-382,-263,-283},{-270,-368,-280,-368,-355,-263},{-263,-368,-329,-332,-365,-276},{-266,-299,-382,-286,-395,-342}},{{-318,-332,-376,-371,-253,-277},{-302,-348,-332,-305,-286,-316},{-321,-380,-373,-261,-265,-343},{-390,-364,-367,-286,-262,-298},{-351,-338,-332,-261,-253,-292},{-315,-261,-348,-292,-293,-247},{-312,-370,-306,-286,-277,-253},{-289,-270,-345,-333,-259,-343},{-374,-380,-262,-295,-259,-352},{-358,-325,-303,-254,-265,-259}},{{-351,-300,-269,-316,-241,-308},{-354,-274,-305,-277,-302,-211},{-295,-236,-283,-275,-215,-288},{-322,-242,-314,-239,-241,-224},{-251,-279,-246,-316,-215,-231},{-319,-251,-302,-220,-292,-272},{-254,-245,-302,-324,-294,-257},{-345,-230,-272,-283,-284,-290},{-342,-325,-235,-261,-246,-303},{-266,-288,-266,-318,-268,-254}},{{-215,-236,-275,-254,-211,-201},{-262,-204,-220,-222,-222,-182},{-288,-214,-284,-240,-267,-221},{-285,-233,-275,-266,-253,-204},{-265,-224,-218,-247,-206,-175},{-218,-248,-246,-259,-188,-245},{-265,-194,-225,-194,-186,-186},{-260,-260,-244,-203,-179,-191},{-270,-267,-239,-189,-199,-252},{-292,-284,-218,-201,-249,-254}},{{-232,-227,-176,-204,-170,-204},{-221,-252,-252,-237,-223,-248},{-184,-195,-202,-191,-231,-172},{-174,-212,-212,-187,-214,-200},{-258,-231,-246,-206,-227,-212},{-247,-227,-172,-229,-176,-204},{-232,-231,-191,-225,-250,-223},{-237,-229,-174,-168,-223,-195},{-234,-252,-202,-200,-206,-218},{-187,-208,-218,-195,-241,-214}},{{-210,-191,-230,-191,-211,-259},{-248,-168,-203,-232,-207,-230},{-227,-225,-228,-252,-180,-223},{-216,-231,-245,-204,-183,-200},{-227,-241,-177,-191,-257,-189},{-231,-210,-245,-252,-246,-191},{-187,-237,-238,-195,-260,-268},{-202,-231,-215,-221,-220,-218},{-248,-170,-200,-178,-224,-266},{-210,-246,-224,-237,-187,-209}}},{{{-108,-122,-105,-138,-122,-147},{-111,-98,-108,-122,-112,-148},{-86,-123,-106,-118,-138,-108},{-88,-117,-109,-121,-144,-132},{-97,-95,-109,-97,-98,-125},{-119,-118,-104,-129,-124,-140},{-99,-113,-96,-126,-99,-113},{-106,-113,-129,-99,-98,-148},{-116,-121,-99,-130,-140,-151},{-85,-123,-129,-113,-121,-140}},{{-138,-169,-133,-127,-132,-193},{-122,-118,-152,-167,-159,-143},{-132,-157,-164,-175,-145,-197},{-161,-131,-139,-144,-187,-146},{-158,-140,-164,-167,-155,-150},{-139,-127,-172,-186,-190,-146},{-138,-135,-169,-138,-175,-183},{-140,-137,-160,-163,-138,-176},{-159,-137,-175,-138,-169,-198},{-122,-158,-124,-157,-150,-134}},{{-142,-193,-175,-222,-206,-208},{-196,-200,-210,-177,-167,-212},{-163,-184,-179,-217,-231,-172},{-152,-203,-160,-213,-200,-182},{-193,-153,-156,-163,-204,-214},{-172,-203,-177,-177,-198,-236},{-177,-178,-167,-192,-169,-206},{-180,-191,-190,-158,-169,-190},{-154,-196,-218,-196,-165,-230},{-149,-144,-179,-158,-206,-184}},{{-195,-219,-244,-221,-185,-187},{-175,-219,-221,-175,-209,-201},{-219,-217,-173,-217,-203,-211},{-187,-221,-164,-229,-177,-175},{-201,-171,-166,-168,-227,-162},{-173,-233,-240,-207,-201,-213},{-240,-191,-209,-168,-189,-187},{-209,-219,-168,-164,-227,-240},{-244,-223,-213,-233,-175,-233},{-227,-244,-168,-168,-187,-177}},{{-209,-233,-175,-230,-170,-166},{-162,-235,-185,-215,-215,-219},{-201,-189,-173,-156,-191,-186},{-195,-217,-215,-177,-166,-177},{-223,-197,-213,-218,-170,-197},{-171,-191,-169,-174,-212,-151},{-191,-175,-223,-189,-151,-177},{-221,-240,-179,-181,-153,-204},{-225,-177,-197,-222,-178,-188},{-189,-213,-229,-189,-172,-204}},{{-170,-180,-142,-150,-168,-165},{-188,-161,-169,-165,-129,-119},{-204,-173,-134,-171,-125,-171},{-152,-151,-135,-189,-133,-146},{-159,-183,-182,-141,-124,-157},{-145,-164,-142,-178,-130,-160},{-143,-202,-195,-190,-176,-144},{-211,-142,-180,-144,-130,-150},{-147,-175,-142,-173,-132,-150},{-215,-142,-172,-149,-129,-168}}},{{{-186,-259,-214,-245,-217,-200},{-235,-262,-228,-278,-274,-281},{-249,-240,-281,-219,-226,-262},{-217,-257,-259,-190,-278,-278},{-252,-238,-259,-278,-224,-209},{-205,-195,-281,-243,-236,-240},{-226,-200,-212,-278,-193,-190},{-238,-259,-214,-200,-198,-267},{-268,-267,-214,-278,-219,-205},{-268,-252,-193,-231,-200,-221}},{{-269,-233,-193,-238,-221,-186},{-283,-224,-282,-189,-260,-248},{-250,-262,-228,-196,-190,-239},{-209,-238,-219,-194,-267,-197},{-257,-214,-226,-273,-269,-183},{-209,-248,-261,-270,-217,-225},{-248,-217,-242,-266,-206,-245},{-221,-274,-270,-217,-185,-179},{-259,-283,-268,-229,-201,-228},{-267,-207,-237,-259,-203,-234}},{{-198,-240,-218,-220,-178,-182},{-194,-186,-170,-191,-157,-193},{-185,-186,-174,-226,-196,-202},{-196,-190,-178,-195,-180,-146},{-189,-190,-200,-164,-183,-153},{-211,-169,-216,-189,-161,-212},{-254,-178,-176,-160,-221,-146},{-252,-230,-196,-179,-219,-212},{-258,-194,-170,-170,-209,-158},{-198,-188,-212,-230,-183,-151}},{{-200,-170,-174,-124,-170,-124},{-206,-173,-177,-167,-147,-164},{-205,-190,-160,-169,-160,-146},{-138,-180,-138,-174,-143,-132},{-194,-152,-159,-142,-134,-126},{-169,-155,-181,-146,-153,-126},{-194,-165,-148,-123,-163,-115},{-148,-180,-182,-174,-118,-141},{-174,-135,-127,-167,-117,-132},{-153,-153,-146,-160,-145,-116}},{{-137,-147,-104,-121,-100,-95},{-157,-134,-123,-121,-120,-109},{-142,-149,-145,-118,-142,-120},{-157,-147,-102,-99,-129,-136},{-142,-117,-143,-139,-129,-96},{-112,-113,-130,-124,-99,-120},{-136,-134,-100,-101,-95,-107},{-142,-118,-100,-127,-124,-118},{-140,-144,-99,-105,-109,-101},{-152,-125,-99,-143,-121,-111}},{{-130,-114,-131,-102,-107,-110},{-126,-113,-126,-117,-135,-112},{-101,-107,-119,-108,-137,-116},{-111,-121,-129,-143,-105,-101},{-119,-126,-100,-107,-137,-149},{-129,-131,-98,-143,-117,-131},{-124,-100,-113,-104,-127,-108},{-123,-136,-112,-115,-134,-129},{-120,-114,-130,-142,-132,-111},{-118,-118,-100,-143,-140,-131}}},{{{-237,-290,-250,-231,-242,-293},{-274,-290,-234,-314,-309,-301},{-317,-293,-215,-213,-218,-319},{-266,-245,-301,-301,-282,-271},{-223,-213,-293,-309,-261,-229},{-311,-213,-298,-258,-215,-263},{-237,-215,-226,-221,-295,-317},{-221,-277,-237,-293,-298,-229},{-290,-239,-274,-306,-231,-263},{-277,-303,-287,-245,-226,-317}},{{-253,-242,-287,-309,-249,-275},{-290,-271,-287,-218,-254,-236},{-266,-301,-290,-215,-265,-215},{-277,-295,-231,-271,-304,-233},{-314,-317,-247,-234,-233,-225},{-314,-293,-213,-221,-210,-238},{-317,-309,-269,-287,-270,-243},{-218,-306,-234,-287,-252,-225},{-266,-271,-314,-301,-259,-256},{-242,-311,-229,-245,-228,-256}},{{-293,-218,-285,-198,-196,-231},{-246,-245,-224,-203,-225,-212},{-220,-288,-202,-293,-223,-258},{-293,-250,-242,-278,-245,-212},{-303,-238,-209,-270,-233,-246},{-287,-276,-267,-246,-220,-222},{-259,-220,-277,-198,-213,-227},{-298,-205,-217,-268,-255,-222},{-254,-218,-267,-273,-240,-268},{-306,-293,-280,-263,-274,-202}},{{-257,-247,-266,-214,-249,-206},{-228,-193,-226,-191,-264,-260},{-217,-226,-252,-202,-179,-237},{-243,-235,-229,-271,-237,-197},{-252,-256,-213,-214,-258,-217},{-240,-188,-229,-228,-237,-244},{-286,-280,-273,-196,-231,-269},{-243,-216,-192,-191,-260,-195},{-243,-261,-243,-269,-253,-188},{-236,-275,-194,-216,-260,-231}},{{-196,-174,-213,-189,-256,-174},{-244,-197,-187,-187,-210,-176},{-231,-250,-232,-237,-243,-204},{-255,-252,-256,-174,-245,-258},{-209,-174,-184,-187,-243,-228},{-257,-210,-239,-182,-206,-184},{-202,-215,-200,-258,-247,-241},{-180,-228,-195,-206,-237,-237},{-249,-247,-184,-210,-184,-247},{-235,-228,-258,-191,-193,-226}},{{-224,-252,-213,-226,-221,-239},{-187,-187,-226,-252,-213,-221},{-226,-206,-226,-213,-187,-206},{-217,-191,-237,-187,-197,-215},{-226,-195,-176,-178,-193,-195},{-193,-221,-252,-213,-200,-191},{-245,-213,-193,-243,-252,-184},{-204,-200,-208,-180,-208,-193},{-184,-254,-256,-191,-202,-226},{-254,-217,-195,-252,-213,-252}}},{{{-316,-361,-289,-301,-328,-246},{-358,-253,-328,-265,-322,-337},{-313,-307,-262,-271,-289,-329},{-280,-244,-340,-247,-322,-340},{-343,-247,-265,-250,-331,-284},{-280,-250,-352,-343,-244,-269},{-271,-352,-325,-310,-277,-246},{-361,-244,-304,-256,-322,-326},{-247,-322,-271,-292,-253,-269},{-340,-259,-271,-340,-310,-355}},{{-252,-281,-325,-284,-223,-252},{-325,-313,-308,-303,-217,-229},{-261,-298,-333,-259,-313,-211},{-258,-232,-297,-273,-223,-303},{-275,-344,-300,-243,-292,-229},{-243,-301,-227,-259,-289,-306},{-293,-250,-328,-257,-299,-221},{-346,-296,-241,-295,-273,-288},{-261,-287,-302,-243,-284,-272},{-314,-307,-272,-281,-307,-242}},{{-206,-199,-266,-219,-246,-178},{-278,-274,-197,-230,-240,-172},{-253,-235,-273,-183,-220,-192},{-290,-211,-245,-212,-187,-174},{-253,-240,-263,-256,-254,-216},{-238,-238,-266,-250,-172,-198},{-203,-194,-250,-199,-237,-192},{-233,-223,-268,-239,-233,-170},{-260,-202,-273,-190,-244,-206},{-268,-202,-192,-199,-248,-166}},{{-161,-154,-212,-165,-136,-169},{-196,-180,-198,-151,-198,-182},{-190,-203,-142,-189,-156,-185},{-198,-214,-155,-167,-149,-151},{-213,-158,-180,-170,-161,-135},{-194,-218,-178,-198,-199,-147},{-178,-206,-166,-155,-148,-135},{-173,-154,-199,-179,-184,-172},{-196,-208,-196,-157,-183,-159},{-233,-186,-167,-141,-171,-182}},{{-176,-157,-172,-169,-180,-168},{-137,-145,-179,-132,-169,-140},{-148,-154,-128,-174,-146,-149},{-148,-160,-165,-145,-159,-159},{-131,-162,-168,-156,-131,-123},{-186,-166,-140,-123,-151,-172},{-125,-148,-171,-149,-137,-160},{-142,-128,-128,-143,-185,-151},{-148,-129,-154,-145,-140,-132},{-137,-182,-182,-134,-136,-123}},{{-132,-175,-157,-161,-196,-167},{-163,-180,-154,-163,-161,-170},{-140,-191,-146,-148,-152,-212},{-174,-156,-170,-146,-177,-190},{-176,-146,-170,-160,-191,-217},{-185,-135,-139,-139,-142,-183},{-174,-176,-175,-151,-152,-185},{-179,-145,-193,-197,-180,-188},{-180,-186,-175,-200,-178,-152},{-142,-167,-173,-188,-175,-205}}},{{{-294,-280,-290,-413,-284,-280},{-368,-298,-410,-287,-322,-410},{-413,-329,-318,-371,-389,-290},{-402,-392,-364,-385,-406,-315},{-290,-350,-287,-284,-382,-392},{-298,-340,-360,-346,-336,-332},{-360,-294,-322,-378,-340,-290},{-280,-284,-399,-308,-410,-368},{-290,-413,-301,-368,-385,-308},{-287,-308,-284,-350,-406,-410}},{{-345,-412,-308,-301,-285,-325},{-386,-412,-342,-397,-335,-351},{-383,-384,-302,-301,-390,-345},{-348,-319,-390,-321,-292,-377},{-404,-346,-278,-384,-367,-351},{-338,-292,-397,-401,-364,-341},{-334,-292,-329,-291,-295,-335},{-345,-309,-288,-324,-390,-377},{-365,-292,-315,-304,-298,-312},{-407,-357,-342,-327,-292,-332}},{{-290,-305,-327,-284,-331,-253},{-315,-305,-351,-243,-237,-272},{-299,-253,-309,-293,-319,-300},{-328,-296,-240,-316,-274,-292},{-280,-323,-300,-290,-251,-253},{-258,-351,-288,-302,-271,-231},{-328,-305,-249,-331,-299,-264},{-287,-249,-342,-267,-294,-322},{-356,-290,-315,-284,-328,-264},{-252,-348,-258,-249,-271,-289}},{{-292,-210,-254,-296,-198,-215},{-302,-300,-221,-289,-240,-284},{-230,-268,-285,-301,-230,-234},{-308,-310,-265,-269,-270,-227},{-302,-221,-298,-238,-208,-249},{-230,-279,-236,-221,-274,-251},{-243,-268,-224,-286,-216,-206},{-243,-260,-272,-233,-233,-263},{-308,-239,-229,-233,-282,-251},{-308,-229,-231,-294,-208,-241}},{{-225,-263,-187,-243,-259,-194},{-230,-259,-199,-201,-219,-226},{-228,-238,-233,-249,-236,-254},{-265,-208,-243,-240,-201,-210},{-254,-231,-263,-213,-208,-268},{-230,-249,-233,-192,-208,-261},{-282,-266,-210,-259,-236,-199},{-218,-226,-192,-203,-224,-263},{-192,-261,-268,-256,-210,-222},{-218,-268,-236,-233,-222,-243}},{{-229,-254,-263,-190,-247,-224},{-215,-203,-205,-214,-257,-246},{-268,-263,-261,-269,-264,-268},{-270,-240,-231,-224,-257,-244},{-203,-254,-189,-221,-225,-231},{-219,-277,-242,-283,-261,-207},{-263,-192,-228,-195,-237,-244},{-229,-277,-266,-278,-283,-276},{-217,-277,-203,-245,-271,-209},{-270,-247,-249,-257,-264,-285}}}}; // 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,5,16,8,6,15,8,5,16,8,6,16,9,6,17,9,6,17,9,6,16,9,6,16,8,6,16,8,6,17,9,6,16,8,6,18,9,6,18,9,6,17,9,6,17,9,6,18,9,6,18,9,6,17,8,6,16,8,6,17,8,6,16,9,6,17,8,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}}; // set of shipments in each bid 
int SHsts[SPN]={2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,1,7,13,19,25,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,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,1,7,13,19,25,31,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,0,6,12,18,24,30,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,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,0,6,12,18,24,30,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,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,0,6,12,18,24,30,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,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,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,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,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,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,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,1,7,13,19,25,31,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,2,8,14,20,26,32,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,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,0,6,12,18,24,30,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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,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,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,2,8,14,20,26,32}; // set of start times of each shipment 
int SHets[SPN]={7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,6,12,18,24,30,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,5,11,17,23,29,35,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,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,4,10,16,22,28,34,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,3,9,15,21,27,33,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,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,2,8,14,20,26,32,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,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,2,8,14,20,26,32,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,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,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,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,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,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,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,2,8,14,20,26,32,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,3,9,15,21,27,33,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,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,2,8,14,20,26,32,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,3,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,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,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,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,5,11,17,23,29,35}; // set of end times of each shipment 
