int Dev = 40;// 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 = 740;//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]={{{{12191,0,0,0,0,0},{12458,0,0,0,0,0},{11828,0,0,0,0,0},{12116,0,0,0,0,0},{12653,0,0,0,0,0},{11937,0,0,0,0,0},{12216,0,0,0,0,0},{12369,0,0,0,0,0},{11992,0,0,0,0,0},{12430,0,0,0,0,0}},{{11804,0,0,0,0,0},{12769,0,0,0,0,0},{12622,0,0,0,0,0},{12404,0,0,0,0,0},{11841,0,0,0,0,0},{13005,0,0,0,0,0},{12810,0,0,0,0,0},{12212,0,0,0,0,0},{12044,0,0,0,0,0},{12080,0,0,0,0,0}},{{11606,0,0,0,0,0},{10958,0,0,0,0,0},{10411,0,0,0,0,0},{12474,0,0,0,0,0},{11361,0,0,0,0,0},{11049,0,0,0,0,0},{11337,0,0,0,0,0},{11719,0,0,0,0,0},{11650,0,0,0,0,0},{11759,0,0,0,0,0}},{{11149,0,0,0,0,0},{10288,0,0,0,0,0},{10718,0,0,0,0,0},{10406,0,0,0,0,0},{10805,0,0,0,0,0},{10132,0,0,0,0,0},{10288,0,0,0,0,0},{10584,0,0,0,0,0},{10376,0,0,0,0,0},{10778,0,0,0,0,0}},{{8918,0,0,0,0,0},{9752,0,0,0,0,0},{8648,0,0,0,0,0},{9616,0,0,0,0,0},{9798,0,0,0,0,0},{9944,0,0,0,0,0},{9609,0,0,0,0,0},{9597,0,0,0,0,0},{9922,0,0,0,0,0},{9149,0,0,0,0,0}},{{9459,0,0,0,0,0},{8900,0,0,0,0,0},{9814,0,0,0,0,0},{9464,0,0,0,0,0},{9089,0,0,0,0,0},{8706,0,0,0,0,0},{8804,0,0,0,0,0},{9468,0,0,0,0,0},{9422,0,0,0,0,0},{9304,0,0,0,0,0}}},{{{-223,-235,-376,-344,-391,-353},{-388,-344,-338,-368,-323,-247},{-309,-385,-306,-326,-391,-197},{-341,-212,-176,-218,-403,-238},{-373,-282,-373,-268,-229,-318},{-185,-212,-291,-338,-268,-209},{-203,-388,-376,-338,-370,-223},{-353,-373,-335,-179,-232,-256},{-309,-323,-212,-191,-223,-212},{-406,-206,-285,-182,-256,-282}},{{-232,-180,-255,-285,-208,-344},{-252,-237,-314,-255,-200,-269},{-374,-235,-255,-236,-328,-300},{-331,-329,-283,-362,-248,-166},{-281,-343,-216,-203,-232,-287},{-334,-329,-291,-362,-278,-313},{-342,-323,-291,-282,-315,-259},{-186,-369,-286,-378,-368,-277},{-406,-177,-347,-227,-174,-163},{-394,-200,-277,-263,-166,-272}},{{-228,-225,-294,-166,-193,-243},{-268,-312,-172,-148,-193,-260},{-150,-273,-198,-172,-201,-124},{-335,-230,-301,-251,-208,-185},{-222,-249,-156,-204,-199,-163},{-198,-172,-175,-287,-173,-288},{-270,-332,-212,-287,-244,-237},{-318,-319,-305,-253,-287,-220},{-292,-317,-144,-291,-210,-132},{-198,-295,-184,-150,-250,-235}},{{-272,-159,-192,-160,-137,-216},{-207,-202,-243,-105,-188,-158},{-148,-123,-245,-229,-127,-109},{-132,-211,-183,-210,-206,-216},{-227,-161,-245,-120,-196,-163},{-264,-131,-208,-132,-132,-126},{-199,-215,-127,-126,-162,-178},{-238,-243,-249,-229,-150,-149},{-140,-249,-206,-157,-99,-110},{-266,-232,-154,-129,-99,-158}},{{-172,-207,-157,-128,-115,-103},{-157,-195,-138,-197,-185,-196},{-214,-121,-98,-176,-146,-90},{-174,-140,-196,-103,-113,-206},{-174,-204,-173,-98,-125,-106},{-145,-112,-126,-122,-185,-185},{-166,-91,-109,-137,-137,-90},{-143,-182,-159,-157,-101,-131},{-197,-112,-156,-137,-154,-206},{-94,-112,-175,-182,-196,-166}},{{-197,-179,-116,-168,-206,-217},{-90,-188,-146,-119,-145,-104},{-112,-122,-92,-166,-214,-219},{-148,-172,-116,-209,-98,-149},{-131,-187,-107,-100,-208,-187},{-126,-147,-130,-182,-175,-190},{-132,-148,-137,-139,-195,-187},{-182,-125,-153,-100,-119,-147},{-193,-165,-156,-142,-156,-115},{-132,-104,-143,-109,-213,-152}}},{{{-210,-132,-114,-118,-248,-117},{-134,-149,-124,-172,-258,-189},{-166,-203,-124,-125,-199,-128},{-148,-233,-147,-204,-241,-172},{-198,-152,-238,-150,-202,-120},{-225,-155,-175,-206,-171,-262},{-183,-198,-210,-165,-173,-250},{-181,-132,-112,-209,-180,-233},{-163,-177,-200,-116,-180,-225},{-178,-135,-142,-184,-120,-265}},{{-127,-195,-288,-243,-247,-278},{-119,-156,-185,-139,-231,-245},{-137,-264,-217,-298,-302,-217},{-176,-273,-277,-155,-295,-176},{-139,-256,-158,-201,-202,-243},{-257,-279,-132,-159,-284,-240},{-198,-133,-153,-274,-289,-174},{-125,-228,-141,-194,-142,-183},{-143,-254,-149,-241,-289,-252},{-267,-244,-236,-166,-202,-290}},{{-321,-311,-296,-275,-169,-391},{-269,-189,-312,-335,-299,-187},{-324,-161,-267,-186,-180,-187},{-279,-242,-259,-359,-330,-393},{-267,-303,-364,-165,-283,-192},{-235,-329,-338,-267,-302,-269},{-264,-176,-231,-351,-330,-249},{-291,-270,-228,-373,-199,-255},{-151,-283,-160,-254,-191,-255},{-193,-337,-210,-167,-313,-201}},{{-246,-356,-188,-259,-316,-349},{-321,-235,-250,-262,-421,-217},{-350,-394,-271,-325,-364,-289},{-361,-176,-396,-349,-367,-265},{-243,-362,-232,-304,-286,-199},{-306,-215,-212,-214,-196,-397},{-202,-365,-229,-319,-331,-226},{-214,-197,-283,-274,-280,-394},{-399,-362,-301,-208,-343,-319},{-324,-365,-316,-208,-367,-355}},{{-340,-190,-289,-186,-347,-226},{-193,-247,-220,-354,-359,-351},{-214,-397,-343,-330,-229,-177},{-418,-391,-220,-390,-247,-334},{-415,-415,-346,-384,-256,-400},{-343,-319,-385,-375,-235,-362},{-292,-304,-247,-291,-223,-313},{-214,-400,-313,-342,-335,-322},{-355,-391,-400,-318,-220,-307},{-253,-367,-379,-282,-241,-188}},{{-348,-293,-374,-317,-297,-330},{-182,-229,-301,-293,-172,-241},{-208,-368,-274,-346,-348,-166},{-254,-368,-339,-219,-241,-283},{-393,-282,-220,-367,-220,-231},{-265,-343,-165,-338,-228,-201},{-171,-193,-358,-319,-333,-236},{-225,-293,-369,-164,-248,-303},{-296,-318,-168,-317,-169,-253},{-399,-268,-317,-351,-189,-303}}},{{{-207,-204,-345,-329,-220,-329},{-217,-411,-438,-329,-293,-201},{-303,-283,-263,-273,-365,-296},{-273,-243,-411,-424,-431,-316},{-392,-355,-408,-392,-408,-451},{-201,-352,-461,-214,-290,-401},{-257,-408,-266,-207,-299,-201},{-457,-296,-296,-434,-253,-434},{-306,-398,-204,-398,-211,-303},{-355,-224,-204,-451,-211,-398}},{{-387,-267,-236,-355,-283,-235},{-433,-396,-357,-320,-357,-325},{-371,-348,-392,-292,-348,-400},{-403,-213,-278,-257,-274,-334},{-253,-435,-233,-229,-271,-229},{-269,-431,-396,-399,-222,-328},{-236,-361,-230,-257,-416,-235},{-246,-203,-389,-311,-253,-397},{-200,-325,-262,-392,-191,-337},{-338,-299,-389,-248,-243,-340}},{{-324,-230,-302,-185,-159,-280},{-345,-210,-333,-185,-186,-252},{-357,-210,-185,-177,-326,-332},{-204,-213,-241,-261,-334,-213},{-224,-374,-291,-248,-231,-159},{-339,-386,-347,-245,-180,-260},{-274,-176,-199,-335,-215,-350},{-186,-323,-182,-242,-254,-352},{-372,-380,-224,-256,-315,-342},{-221,-184,-202,-248,-265,-334}},{{-220,-335,-287,-141,-244,-274},{-285,-180,-275,-199,-300,-153},{-278,-216,-289,-157,-170,-283},{-275,-153,-268,-268,-226,-263},{-275,-267,-268,-203,-190,-296},{-240,-153,-201,-150,-181,-261},{-242,-204,-294,-238,-211,-166},{-202,-241,-166,-166,-213,-241},{-195,-279,-313,-213,-226,-177},{-232,-214,-261,-268,-300,-269}},{{-180,-267,-132,-141,-164,-262},{-187,-206,-258,-168,-143,-174},{-206,-233,-191,-187,-160,-170},{-245,-269,-185,-271,-277,-130},{-254,-143,-290,-191,-235,-141},{-197,-168,-279,-187,-265,-172},{-278,-136,-279,-262,-241,-153},{-208,-269,-126,-216,-256,-235},{-273,-212,-258,-239,-246,-227},{-241,-273,-170,-168,-227,-200}},{{-139,-244,-188,-228,-147,-178},{-214,-183,-211,-141,-271,-234},{-277,-155,-289,-299,-180,-176},{-164,-229,-215,-165,-308,-187},{-164,-244,-247,-184,-227,-256},{-279,-254,-264,-150,-198,-209},{-239,-208,-205,-161,-172,-230},{-294,-229,-247,-169,-244,-288},{-220,-145,-279,-224,-194,-308},{-271,-290,-179,-208,-209,-194}}},{{{-96,-129,-97,-82,-116,-123},{-89,-75,-90,-144,-165,-83},{-63,-117,-75,-91,-146,-116},{-77,-117,-105,-90,-83,-108},{-68,-145,-125,-112,-155,-92},{-135,-72,-133,-85,-87,-179},{-80,-64,-105,-103,-171,-118},{-81,-85,-131,-143,-74,-150},{-78,-98,-138,-119,-84,-138},{-78,-102,-80,-143,-89,-150}},{{-109,-131,-163,-118,-217,-215},{-93,-176,-189,-138,-193,-232},{-162,-131,-152,-188,-124,-165},{-94,-182,-166,-212,-185,-111},{-184,-193,-166,-157,-204,-158},{-131,-183,-124,-133,-140,-213},{-173,-128,-155,-200,-209,-190},{-135,-195,-121,-98,-140,-128},{-100,-165,-203,-188,-122,-195},{-103,-117,-93,-93,-201,-106}},{{-170,-137,-190,-207,-221,-198},{-226,-171,-126,-165,-133,-147},{-164,-248,-113,-228,-208,-208},{-177,-108,-167,-169,-178,-251},{-191,-187,-253,-251,-251,-121},{-217,-117,-216,-266,-139,-246},{-154,-117,-123,-158,-172,-180},{-228,-117,-223,-200,-225,-222},{-210,-128,-216,-201,-127,-242},{-178,-243,-160,-156,-141,-228}},{{-215,-284,-254,-252,-189,-246},{-250,-266,-201,-138,-146,-227},{-205,-122,-185,-256,-156,-231},{-201,-197,-187,-150,-203,-146},{-181,-223,-250,-197,-154,-128},{-205,-134,-199,-181,-250,-191},{-227,-248,-274,-171,-148,-254},{-175,-280,-221,-209,-282,-266},{-122,-231,-238,-211,-164,-148},{-272,-150,-189,-270,-270,-244}},{{-223,-171,-138,-211,-123,-215},{-152,-231,-205,-261,-115,-199},{-154,-175,-136,-117,-176,-173},{-262,-278,-179,-230,-136,-164},{-229,-235,-183,-250,-181,-125},{-203,-242,-193,-224,-221,-226},{-258,-264,-252,-216,-249,-164},{-276,-252,-156,-209,-149,-129},{-207,-260,-203,-232,-119,-215},{-240,-252,-126,-136,-204,-136}},{{-118,-187,-205,-160,-104,-166},{-224,-187,-124,-194,-185,-116},{-227,-206,-222,-206,-107,-200},{-177,-239,-224,-106,-171,-206},{-150,-104,-195,-146,-156,-172},{-220,-183,-199,-157,-139,-110},{-132,-227,-127,-186,-213,-123},{-141,-216,-212,-203,-202,-126},{-218,-140,-134,-136,-210,-146},{-161,-159,-105,-152,-113,-98}}},{{{-168,-226,-326,-300,-283,-271},{-301,-159,-231,-243,-226,-295},{-252,-271,-162,-171,-181,-283},{-219,-319,-309,-326,-245,-245},{-168,-178,-217,-326,-290,-164},{-280,-257,-269,-169,-198,-231},{-156,-293,-293,-233,-155,-309},{-284,-159,-278,-314,-171,-159},{-282,-262,-326,-169,-145,-312},{-217,-290,-178,-221,-167,-312}},{{-250,-176,-228,-194,-292,-177},{-248,-145,-275,-180,-312,-305},{-255,-145,-275,-303,-226,-146},{-178,-290,-289,-296,-151,-144},{-326,-309,-242,-141,-303,-172},{-214,-228,-301,-226,-147,-164},{-269,-309,-179,-247,-307,-150},{-176,-183,-291,-243,-208,-303},{-159,-188,-301,-215,-172,-172},{-257,-193,-143,-208,-307,-236}},{{-264,-180,-127,-199,-208,-236},{-142,-134,-158,-261,-247,-196},{-129,-134,-152,-265,-260,-142},{-301,-215,-261,-154,-204,-243},{-271,-286,-182,-127,-146,-209},{-153,-125,-162,-183,-123,-149},{-185,-232,-129,-222,-208,-130},{-183,-247,-160,-129,-243,-133},{-299,-173,-234,-207,-183,-153},{-264,-148,-178,-242,-180,-232}},{{-134,-201,-173,-204,-200,-161},{-196,-111,-155,-209,-99,-98},{-144,-132,-157,-144,-128,-102},{-229,-158,-214,-122,-124,-148},{-215,-226,-151,-189,-101,-88},{-227,-214,-141,-177,-176,-153},{-237,-182,-105,-207,-91,-161},{-143,-223,-181,-108,-95,-88},{-139,-101,-174,-116,-104,-110},{-155,-178,-165,-144,-181,-153}},{{-149,-103,-122,-105,-119,-100},{-82,-101,-136,-107,-75,-144},{-169,-145,-157,-101,-73,-84},{-153,-92,-174,-137,-108,-117},{-80,-150,-150,-154,-157,-139},{-136,-139,-91,-118,-89,-155},{-165,-130,-92,-164,-117,-126},{-90,-170,-74,-143,-129,-102},{-170,-137,-99,-117,-129,-148},{-156,-76,-74,-165,-125,-138}},{{-74,-108,-159,-89,-98,-86},{-159,-125,-142,-148,-149,-113},{-157,-161,-114,-127,-161,-155},{-157,-159,-119,-73,-126,-97},{-73,-111,-82,-115,-81,-117},{-76,-71,-71,-71,-102,-112},{-89,-88,-73,-93,-99,-139},{-142,-154,-113,-77,-151,-78},{-125,-102,-145,-155,-163,-87},{-157,-111,-150,-109,-138,-79}}},{{{-338,-274,-234,-330,-263,-362},{-325,-340,-170,-258,-223,-295},{-197,-176,-303,-327,-301,-298},{-247,-192,-330,-263,-194,-290},{-165,-197,-367,-372,-231,-332},{-287,-359,-160,-343,-277,-162},{-295,-229,-223,-218,-346,-290},{-197,-176,-194,-317,-207,-189},{-303,-242,-370,-303,-364,-176},{-340,-285,-301,-229,-181,-239}},{{-234,-356,-285,-253,-160,-176},{-327,-258,-165,-295,-320,-329},{-234,-173,-229,-173,-252,-205},{-247,-170,-319,-207,-333,-246},{-242,-354,-271,-194,-220,-174},{-237,-309,-330,-165,-280,-287},{-372,-301,-362,-362,-267,-249},{-231,-279,-338,-298,-225,-342},{-168,-200,-317,-354,-328,-168},{-176,-261,-173,-218,-296,-186}},{{-243,-202,-307,-159,-323,-157},{-197,-172,-232,-285,-274,-248},{-205,-175,-212,-179,-157,-296},{-360,-336,-287,-295,-272,-157},{-269,-190,-239,-268,-284,-229},{-269,-177,-171,-203,-309,-277},{-277,-195,-262,-260,-318,-328},{-225,-213,-234,-340,-316,-333},{-238,-334,-247,-308,-152,-212},{-269,-334,-335,-310,-287,-239}},{{-238,-254,-182,-179,-237,-215},{-159,-204,-189,-189,-208,-314},{-252,-242,-231,-262,-298,-260},{-300,-167,-164,-163,-155,-293},{-190,-179,-300,-304,-267,-309},{-248,-183,-194,-152,-244,-282},{-157,-235,-261,-244,-164,-139},{-300,-275,-187,-315,-188,-251},{-300,-148,-280,-304,-177,-224},{-176,-204,-321,-168,-242,-291}},{{-240,-187,-286,-247,-256,-282},{-284,-213,-234,-302,-158,-265},{-167,-165,-139,-171,-280,-182},{-222,-141,-289,-150,-141,-282},{-286,-243,-130,-208,-143,-245},{-293,-267,-158,-269,-276,-189},{-233,-193,-189,-184,-284,-291},{-242,-139,-273,-286,-148,-271},{-185,-152,-241,-137,-135,-247},{-301,-210,-286,-148,-250,-148}},{{-237,-189,-161,-219,-189,-278},{-250,-202,-254,-163,-193,-152},{-241,-154,-293,-137,-263,-230},{-286,-250,-267,-219,-193,-271},{-156,-304,-291,-132,-243,-282},{-202,-143,-145,-200,-197,-130},{-150,-176,-250,-139,-145,-171},{-145,-154,-204,-165,-174,-273},{-234,-132,-208,-154,-169,-200},{-260,-202,-137,-256,-269,-228}}},{{{-262,-277,-190,-403,-184,-181},{-316,-292,-256,-406,-292,-234},{-373,-220,-361,-196,-217,-186},{-229,-277,-232,-271,-346,-210},{-199,-301,-307,-310,-238,-266},{-214,-289,-220,-184,-187,-385},{-292,-325,-271,-370,-211,-240},{-247,-211,-196,-379,-340,-403},{-346,-325,-343,-253,-214,-281},{-370,-310,-343,-394,-247,-302}},{{-396,-198,-207,-227,-260,-167},{-231,-215,-227,-246,-302,-270},{-293,-342,-347,-366,-310,-185},{-296,-232,-221,-322,-352,-236},{-249,-204,-207,-235,-302,-324},{-302,-364,-361,-371,-170,-308},{-208,-281,-204,-371,-225,-203},{-249,-224,-179,-344,-212,-159},{-331,-307,-353,-352,-233,-244},{-305,-201,-350,-278,-236,-234}},{{-342,-221,-204,-206,-293,-248},{-166,-216,-247,-181,-208,-129},{-290,-190,-167,-270,-167,-200},{-250,-324,-300,-210,-189,-236},{-231,-187,-174,-236,-218,-156},{-151,-190,-229,-152,-189,-176},{-161,-276,-195,-150,-140,-131},{-171,-334,-156,-194,-138,-123},{-258,-269,-185,-144,-257,-228},{-330,-223,-147,-214,-244,-240}},{{-235,-227,-203,-170,-141,-156},{-219,-216,-235,-146,-191,-180},{-225,-197,-215,-222,-174,-164},{-202,-119,-203,-112,-161,-225},{-258,-158,-192,-220,-219,-179},{-262,-186,-125,-232,-194,-206},{-268,-203,-249,-234,-111,-138},{-272,-201,-178,-157,-227,-190},{-167,-257,-164,-198,-186,-147},{-147,-249,-208,-174,-101,-177}},{{-207,-123,-106,-188,-95,-94},{-204,-151,-177,-182,-208,-159},{-114,-208,-140,-132,-179,-152},{-122,-140,-151,-166,-203,-103},{-133,-139,-117,-112,-152,-146},{-106,-156,-214,-108,-97,-149},{-189,-140,-102,-143,-174,-139},{-136,-192,-159,-203,-146,-166},{-128,-177,-196,-196,-165,-202},{-162,-165,-103,-191,-109,-129}},{{-188,-183,-225,-213,-240,-161},{-214,-175,-177,-217,-164,-123},{-154,-183,-211,-129,-147,-129},{-157,-164,-227,-197,-159,-112},{-119,-192,-134,-138,-203,-194},{-157,-108,-167,-178,-229,-192},{-157,-151,-178,-128,-166,-252},{-202,-183,-194,-225,-138,-208},{-172,-175,-102,-175,-131,-232},{-132,-202,-125,-192,-205,-116}}},{{{-329,-262,-252,-466,-473,-399},{-270,-332,-490,-308,-389,-238},{-210,-480,-395,-301,-455,-262},{-294,-389,-326,-413,-241,-298},{-371,-368,-241,-336,-308,-395},{-259,-336,-427,-287,-490,-360},{-315,-298,-483,-270,-304,-441},{-350,-315,-301,-473,-487,-413},{-374,-273,-326,-238,-343,-416},{-480,-452,-378,-458,-256,-354}},{{-320,-226,-342,-277,-374,-431},{-432,-237,-393,-384,-440,-422},{-306,-285,-261,-391,-426,-258},{-317,-360,-458,-220,-302,-438},{-404,-384,-264,-287,-344,-216},{-345,-226,-471,-327,-246,-399},{-268,-477,-451,-277,-371,-277},{-473,-453,-397,-224,-282,-406},{-331,-466,-292,-304,-230,-357},{-278,-271,-441,-424,-433,-428}},{{-208,-249,-399,-223,-348,-345},{-220,-249,-399,-337,-351,-286},{-255,-206,-333,-352,-274,-222},{-416,-339,-282,-357,-262,-336},{-246,-280,-336,-369,-296,-384},{-271,-253,-384,-229,-299,-234},{-365,-410,-279,-190,-288,-370},{-441,-265,-327,-237,-194,-311},{-432,-293,-393,-322,-200,-236},{-359,-373,-207,-334,-399,-378}},{{-305,-310,-347,-289,-282,-315},{-208,-263,-296,-306,-191,-277},{-267,-310,-162,-349,-287,-272},{-289,-221,-157,-349,-336,-186},{-170,-305,-319,-334,-311,-251},{-375,-245,-352,-296,-174,-215},{-289,-237,-321,-279,-191,-229},{-219,-281,-213,-326,-198,-206},{-265,-358,-180,-259,-321,-287},{-167,-363,-203,-256,-149,-294}},{{-273,-187,-159,-291,-146,-166},{-299,-143,-268,-296,-321,-152},{-182,-231,-180,-231,-206,-247},{-258,-155,-146,-171,-296,-141},{-261,-245,-213,-303,-143,-196},{-230,-307,-233,-303,-166,-224},{-265,-210,-215,-185,-224,-303},{-228,-312,-208,-196,-152,-152},{-190,-217,-150,-289,-268,-203},{-325,-182,-215,-162,-159,-162}},{{-217,-185,-151,-236,-295,-172},{-141,-196,-268,-157,-310,-214},{-146,-268,-261,-245,-232,-337},{-231,-229,-198,-209,-148,-229},{-203,-173,-252,-145,-213,-258},{-148,-217,-263,-195,-264,-216},{-215,-215,-200,-269,-261,-229},{-284,-293,-263,-298,-201,-150},{-305,-254,-322,-283,-329,-266},{-231,-192,-326,-190,-148,-330}}}}; // 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,15,8,5,15,8,5,16,8,6,16,8,6,17,8,6,17,9,6,17,8,6,16,9,6,17,8,6,16,9,6,16,8,6,18,9,6,17,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,8,6,17,9,6,17,9,6,16,8,6,16,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}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,0,4,8,12,16,20,24,28,2,8,14,20,26,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,1,7,13,19,25,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,1,5,9,13,17,21,25,29,1,7,13,19,25,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,2,6,10,14,18,22,26,30,2,8,14,20,26,32,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,2,6,10,14,18,22,26,30,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,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,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,1,5,9,13,17,21,25,29,33,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,0,4,8,12,16,20,24,28,32,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,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,1,5,9,13,17,21,25,29,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,1,5,9,13,17,21,25,29,1,7,13,19,25,31}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,7,13,19,25,31,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,6,12,18,24,30,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,6,10,14,18,22,26,30,34,6,12,18,24,30,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,5,9,13,17,21,25,29,33,5,11,17,23,29,35,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,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,3,9,15,21,27,33,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,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,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,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,2,8,14,20,26,32,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,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,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,4,8,12,16,20,24,28,32,3,9,15,21,27,33,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,4,8,12,16,20,24,28,32,4,10,16,22,28,34}; // set of end times of each shipment 
