int Dev = 30;// 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 = 745;//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]={{{{12640,0,0,0,0,0},{12695,0,0,0,0,0},{11908,0,0,0,0,0},{12867,0,0,0,0,0},{12581,0,0,0,0,0},{12723,0,0,0,0,0},{12501,0,0,0,0,0},{12496,0,0,0,0,0},{12464,0,0,0,0,0},{12352,0,0,0,0,0}},{{12032,0,0,0,0,0},{12532,0,0,0,0,0},{11824,0,0,0,0,0},{12233,0,0,0,0,0},{11884,0,0,0,0,0},{12318,0,0,0,0,0},{12475,0,0,0,0,0},{12283,0,0,0,0,0},{13073,0,0,0,0,0},{12217,0,0,0,0,0}},{{11328,0,0,0,0,0},{11229,0,0,0,0,0},{11705,0,0,0,0,0},{11749,0,0,0,0,0},{11938,0,0,0,0,0},{11654,0,0,0,0,0},{10961,0,0,0,0,0},{11713,0,0,0,0,0},{12155,0,0,0,0,0},{12136,0,0,0,0,0}},{{10217,0,0,0,0,0},{10502,0,0,0,0,0},{10508,0,0,0,0,0},{9939,0,0,0,0,0},{10349,0,0,0,0,0},{10555,0,0,0,0,0},{10366,0,0,0,0,0},{9359,0,0,0,0,0},{10293,0,0,0,0,0},{10436,0,0,0,0,0}},{{9434,0,0,0,0,0},{9145,0,0,0,0,0},{9854,0,0,0,0,0},{9428,0,0,0,0,0},{9702,0,0,0,0,0},{9281,0,0,0,0,0},{9595,0,0,0,0,0},{9233,0,0,0,0,0},{9493,0,0,0,0,0},{9655,0,0,0,0,0}},{{8918,0,0,0,0,0},{9259,0,0,0,0,0},{8951,0,0,0,0,0},{9134,0,0,0,0,0},{9298,0,0,0,0,0},{9125,0,0,0,0,0},{9007,0,0,0,0,0},{9297,0,0,0,0,0},{8896,0,0,0,0,0},{9242,0,0,0,0,0}}},{{{-253,-370,-212,-309,-235,-238},{-335,-309,-341,-247,-262,-306},{-303,-268,-265,-212,-347,-218},{-376,-303,-291,-279,-265,-379},{-338,-232,-229,-332,-238,-268},{-235,-338,-326,-288,-329,-370},{-218,-365,-232,-320,-303,-326},{-306,-226,-244,-344,-341,-223},{-253,-256,-279,-347,-332,-347},{-232,-247,-276,-335,-370,-309}},{{-284,-363,-230,-208,-294,-194},{-293,-335,-216,-260,-291,-337},{-218,-200,-244,-307,-326,-189},{-281,-272,-288,-227,-240,-269},{-258,-366,-330,-255,-200,-225},{-229,-312,-210,-342,-246,-298},{-313,-346,-272,-263,-267,-290},{-325,-343,-258,-269,-288,-272},{-328,-369,-305,-260,-331,-308},{-252,-200,-342,-225,-347,-184}},{{-280,-295,-210,-220,-205,-212},{-220,-182,-226,-269,-188,-177},{-272,-237,-184,-255,-253,-222},{-312,-290,-247,-188,-274,-148},{-315,-177,-189,-179,-188,-146},{-225,-269,-205,-264,-253,-216},{-240,-295,-249,-258,-201,-146},{-185,-307,-240,-260,-186,-218},{-278,-244,-303,-164,-250,-150},{-250,-312,-254,-246,-257,-241}},{{-248,-140,-204,-179,-142,-134},{-203,-148,-161,-191,-167,-205},{-142,-211,-192,-191,-157,-165},{-171,-196,-174,-160,-175,-131},{-140,-194,-200,-132,-208,-182},{-207,-161,-217,-131,-200,-184},{-248,-232,-163,-210,-153,-120},{-138,-193,-161,-132,-119,-144},{-169,-239,-125,-170,-196,-128},{-227,-183,-229,-169,-122,-133}},{{-200,-171,-131,-104,-190,-184},{-125,-194,-156,-182,-182,-132},{-134,-173,-160,-129,-181,-173},{-154,-112,-103,-148,-143,-115},{-160,-119,-132,-176,-160,-132},{-199,-182,-159,-185,-188,-144},{-177,-158,-154,-107,-162,-175},{-156,-159,-190,-171,-191,-169},{-197,-119,-118,-166,-134,-128},{-192,-133,-154,-187,-126,-165}},{{-125,-185,-159,-199,-143,-179},{-116,-129,-166,-162,-135,-202},{-138,-173,-181,-116,-118,-210},{-140,-135,-142,-148,-179,-164},{-143,-106,-190,-136,-161,-129},{-109,-159,-137,-199,-172,-185},{-138,-141,-159,-119,-167,-117},{-191,-172,-139,-139,-201,-215},{-141,-156,-106,-111,-200,-190},{-128,-125,-157,-114,-174,-194}}},{{{-144,-201,-175,-231,-191,-155},{-150,-208,-140,-206,-236,-243},{-119,-123,-144,-179,-164,-166},{-160,-199,-201,-163,-138,-160},{-188,-189,-152,-175,-158,-162},{-208,-189,-170,-150,-197,-233},{-131,-167,-152,-132,-186,-162},{-215,-218,-166,-163,-164,-172},{-146,-122,-164,-215,-162,-229},{-171,-155,-138,-131,-228,-139}},{{-148,-201,-247,-161,-185,-174},{-141,-256,-181,-236,-284,-238},{-238,-260,-253,-186,-222,-257},{-147,-146,-168,-274,-268,-236},{-160,-178,-196,-175,-176,-209},{-196,-203,-207,-190,-298,-309},{-218,-199,-241,-230,-279,-228},{-154,-246,-209,-250,-256,-305},{-257,-215,-230,-217,-240,-221},{-145,-201,-158,-159,-222,-257}},{{-180,-311,-220,-232,-291,-314},{-287,-212,-189,-305,-341,-286},{-247,-217,-293,-284,-241,-337},{-210,-332,-330,-259,-208,-260},{-314,-260,-191,-329,-305,-323},{-301,-242,-288,-197,-341,-345},{-198,-237,-299,-227,-247,-218},{-321,-288,-312,-194,-222,-337},{-225,-232,-270,-286,-332,-334},{-274,-275,-194,-338,-233,-368}},{{-315,-347,-292,-346,-337,-235},{-370,-262,-334,-334,-352,-235},{-327,-268,-271,-250,-382,-364},{-353,-288,-316,-241,-223,-244},{-231,-347,-340,-361,-352,-334},{-275,-256,-328,-244,-301,-292},{-327,-253,-358,-262,-331,-316},{-214,-232,-215,-238,-250,-229},{-361,-379,-364,-226,-352,-340},{-292,-329,-364,-220,-223,-349}},{{-349,-211,-343,-312,-338,-307},{-304,-211,-214,-246,-285,-281},{-316,-337,-379,-360,-353,-296},{-217,-235,-349,-372,-288,-235},{-223,-370,-271,-297,-285,-360},{-319,-337,-250,-222,-312,-336},{-244,-364,-376,-246,-226,-365},{-226,-232,-232,-378,-265,-328},{-316,-334,-256,-237,-338,-307},{-307,-355,-277,-273,-373,-223}},{{-299,-273,-206,-222,-246,-233},{-271,-215,-201,-235,-192,-211},{-202,-301,-320,-214,-197,-216},{-319,-340,-341,-209,-241,-176},{-356,-265,-201,-335,-248,-193},{-296,-318,-339,-203,-220,-278},{-231,-248,-233,-203,-251,-216},{-231,-329,-295,-230,-248,-203},{-316,-195,-290,-259,-223,-293},{-205,-338,-309,-306,-279,-288}}},{{{-299,-230,-421,-257,-339,-418},{-395,-326,-303,-257,-296,-418},{-270,-342,-319,-253,-240,-332},{-313,-418,-303,-424,-293,-336},{-395,-253,-329,-368,-395,-372},{-336,-411,-332,-326,-345,-428},{-316,-329,-313,-326,-392,-299},{-253,-368,-309,-322,-375,-415},{-372,-345,-339,-230,-290,-339},{-349,-240,-243,-326,-401,-405}},{{-256,-399,-332,-257,-400,-223},{-384,-393,-223,-389,-222,-310},{-312,-229,-412,-270,-253,-352},{-312,-299,-335,-380,-323,-235},{-302,-283,-360,-223,-400,-313},{-328,-319,-335,-236,-240,-343},{-410,-328,-290,-232,-342,-244},{-295,-316,-309,-408,-283,-238},{-312,-309,-265,-223,-342,-301},{-390,-345,-383,-301,-283,-316}},{{-274,-351,-344,-234,-212,-319},{-336,-251,-224,-215,-238,-275},{-378,-253,-283,-283,-289,-275},{-283,-340,-314,-302,-342,-213},{-372,-256,-339,-335,-225,-316},{-316,-253,-232,-299,-278,-213},{-218,-233,-204,-305,-252,-242},{-384,-317,-269,-316,-292,-180},{-324,-282,-230,-302,-244,-306},{-319,-245,-316,-329,-244,-270}},{{-202,-214,-296,-194,-233,-169},{-275,-275,-166,-268,-220,-217},{-232,-306,-270,-164,-179,-153},{-310,-202,-194,-291,-251,-177},{-275,-187,-201,-263,-271,-274},{-258,-311,-235,-233,-157,-263},{-285,-211,-211,-192,-186,-274},{-225,-209,-201,-238,-258,-162},{-175,-228,-242,-268,-161,-226},{-242,-289,-216,-273,-237,-230}},{{-184,-181,-254,-223,-227,-225},{-210,-164,-153,-158,-231,-246},{-193,-220,-166,-227,-210,-265},{-200,-193,-265,-200,-185,-233},{-171,-258,-267,-160,-195,-210},{-152,-271,-185,-191,-164,-189},{-226,-181,-229,-258,-210,-208},{-158,-153,-178,-151,-149,-206},{-193,-271,-189,-229,-189,-262},{-273,-162,-153,-202,-166,-235}},{{-200,-166,-264,-273,-216,-158},{-244,-233,-241,-258,-205,-266},{-160,-256,-211,-156,-211,-158},{-206,-208,-205,-156,-185,-220},{-172,-183,-257,-226,-222,-218},{-233,-248,-243,-163,-218,-171},{-220,-218,-224,-265,-216,-189},{-185,-244,-270,-215,-174,-184},{-214,-265,-230,-163,-198,-218},{-248,-158,-186,-265,-207,-292}}},{{{-105,-127,-137,-84,-92,-109},{-124,-99,-95,-91,-112,-113},{-129,-82,-128,-124,-146,-119},{-85,-138,-91,-109,-132,-132},{-96,-76,-131,-83,-85,-166},{-92,-106,-111,-149,-148,-115},{-121,-123,-129,-135,-157,-118},{-76,-105,-88,-122,-112,-100},{-92,-124,-116,-101,-110,-145},{-129,-77,-141,-145,-109,-113}},{{-170,-148,-132,-133,-150,-188},{-112,-175,-105,-133,-134,-197},{-105,-179,-185,-152,-190,-123},{-109,-107,-152,-121,-126,-134},{-155,-175,-135,-146,-129,-128},{-132,-164,-111,-191,-166,-118},{-123,-118,-105,-195,-134,-165},{-97,-151,-163,-112,-145,-124},{-100,-145,-184,-115,-201,-210},{-130,-152,-179,-184,-138,-158}},{{-208,-153,-147,-163,-221,-255},{-189,-227,-203,-220,-172,-210},{-228,-180,-160,-167,-235,-210},{-191,-146,-167,-247,-229,-170},{-214,-216,-240,-180,-200,-196},{-175,-139,-140,-196,-176,-200},{-172,-193,-134,-165,-237,-200},{-124,-130,-136,-247,-157,-170},{-228,-189,-229,-175,-237,-186},{-201,-175,-232,-179,-184,-166}},{{-252,-250,-233,-227,-248,-199},{-144,-250,-146,-171,-233,-150},{-231,-233,-264,-213,-191,-168},{-154,-152,-164,-225,-231,-235},{-193,-175,-154,-152,-164,-177},{-260,-260,-156,-219,-144,-187},{-160,-233,-244,-166,-233,-201},{-187,-142,-195,-146,-213,-162},{-183,-158,-199,-142,-252,-238},{-199,-229,-252,-150,-262,-209}},{{-148,-227,-205,-152,-183,-166},{-262,-150,-140,-252,-193,-239},{-201,-252,-201,-230,-138,-201},{-260,-235,-146,-146,-242,-158},{-238,-187,-199,-176,-172,-228},{-183,-260,-195,-168,-185,-215},{-250,-193,-254,-242,-240,-221},{-152,-254,-169,-193,-187,-226},{-195,-175,-195,-144,-229,-177},{-211,-201,-156,-174,-187,-236}},{{-222,-142,-200,-152,-138,-143},{-204,-213,-212,-126,-147,-121},{-179,-151,-187,-155,-181,-148},{-136,-208,-197,-195,-184,-137},{-156,-208,-182,-179,-125,-187},{-125,-145,-130,-122,-153,-150},{-131,-159,-134,-178,-133,-143},{-152,-171,-117,-197,-110,-131},{-172,-125,-137,-208,-155,-134},{-140,-121,-162,-123,-165,-143}}},{{{-191,-238,-236,-300,-262,-300},{-298,-195,-243,-174,-276,-295},{-168,-219,-269,-264,-286,-238},{-270,-259,-231,-269,-281,-269},{-170,-257,-298,-269,-302,-183},{-238,-219,-183,-243,-236,-298},{-242,-181,-271,-224,-278,-224},{-175,-176,-236,-288,-271,-300},{-263,-283,-295,-178,-200,-290},{-179,-245,-259,-167,-176,-231}},{{-167,-195,-214,-203,-240,-236},{-288,-190,-242,-247,-233,-188},{-214,-259,-207,-273,-215,-181},{-250,-305,-268,-199,-264,-168},{-238,-257,-277,-291,-192,-232},{-202,-217,-303,-233,-160,-208},{-186,-236,-188,-201,-253,-254},{-202,-209,-235,-282,-176,-179},{-176,-276,-226,-277,-163,-181},{-202,-198,-266,-208,-185,-274}},{{-239,-165,-244,-189,-165,-173},{-239,-159,-170,-152,-131,-171},{-170,-219,-182,-162,-204,-146},{-200,-180,-214,-215,-236,-128},{-232,-236,-147,-144,-142,-169},{-191,-245,-222,-197,-174,-202},{-224,-201,-224,-144,-189,-149},{-258,-150,-160,-218,-189,-140},{-224,-184,-182,-146,-232,-230},{-168,-211,-164,-189,-181,-216}},{{-155,-122,-171,-180,-170,-109},{-206,-173,-201,-124,-109,-109},{-175,-127,-196,-111,-121,-116},{-148,-214,-170,-148,-173,-99},{-212,-163,-110,-160,-102,-110},{-215,-214,-192,-152,-138,-160},{-143,-117,-192,-140,-132,-113},{-200,-162,-162,-124,-104,-177},{-141,-177,-129,-159,-137,-102},{-163,-160,-159,-123,-140,-179}},{{-134,-116,-118,-137,-109,-107},{-114,-98,-98,-130,-102,-96},{-134,-149,-135,-84,-124,-96},{-141,-160,-125,-106,-125,-136},{-153,-159,-136,-152,-155,-99},{-144,-93,-151,-127,-150,-133},{-112,-96,-128,-120,-89,-131},{-165,-91,-124,-112,-112,-89},{-108,-158,-139,-129,-131,-86},{-170,-161,-161,-123,-142,-121}},{{-149,-139,-124,-137,-95,-106},{-86,-84,-123,-142,-109,-118},{-90,-154,-113,-150,-101,-152},{-98,-92,-99,-96,-150,-111},{-100,-154,-93,-114,-120,-117},{-111,-102,-117,-90,-94,-147},{-109,-115,-152,-98,-140,-155},{-87,-140,-133,-136,-150,-118},{-140,-87,-83,-112,-117,-146},{-100,-148,-104,-101,-106,-93}}},{{{-213,-274,-332,-202,-293,-234},{-223,-327,-229,-226,-309,-210},{-335,-210,-279,-210,-319,-239},{-202,-317,-301,-309,-255,-247},{-218,-279,-223,-311,-255,-309},{-298,-242,-223,-277,-186,-226},{-218,-242,-274,-306,-343,-332},{-242,-327,-202,-266,-311,-255},{-247,-205,-253,-197,-327,-301},{-327,-266,-325,-295,-271,-223}},{{-229,-250,-231,-311,-278,-189},{-192,-327,-340,-309,-312,-236},{-229,-197,-210,-346,-191,-202},{-205,-215,-301,-263,-307,-218},{-277,-186,-250,-205,-215,-186},{-271,-322,-343,-218,-194,-321},{-253,-325,-325,-263,-283,-238},{-266,-293,-343,-274,-244,-308},{-245,-231,-274,-327,-244,-228},{-293,-277,-245,-340,-254,-267}},{{-326,-223,-176,-283,-211,-193},{-303,-215,-310,-293,-296,-222},{-262,-250,-227,-263,-198,-214},{-236,-200,-280,-298,-318,-210},{-202,-283,-272,-310,-267,-248},{-280,-263,-290,-243,-179,-200},{-332,-293,-302,-246,-201,-231},{-306,-200,-323,-236,-296,-239},{-282,-329,-229,-228,-318,-251},{-332,-230,-310,-315,-203,-236}},{{-183,-200,-222,-212,-177,-159},{-224,-266,-273,-290,-237,-278},{-221,-306,-247,-214,-188,-260},{-171,-204,-300,-189,-211,-289},{-205,-244,-296,-205,-233,-271},{-288,-202,-189,-274,-231,-224},{-198,-202,-226,-274,-255,-179},{-195,-193,-243,-232,-208,-289},{-200,-183,-291,-212,-282,-253},{-236,-275,-171,-285,-220,-278}},{{-172,-208,-276,-254,-208,-224},{-246,-152,-247,-215,-245,-176},{-222,-256,-176,-156,-254,-224},{-189,-276,-234,-232,-252,-250},{-227,-226,-267,-254,-191,-158},{-244,-193,-165,-154,-228,-184},{-196,-226,-278,-154,-208,-156},{-249,-228,-210,-282,-278,-169},{-154,-193,-184,-171,-189,-234},{-207,-167,-215,-204,-247,-204}},{{-156,-217,-167,-267,-174,-180},{-276,-224,-206,-237,-202,-158},{-230,-154,-224,-171,-191,-197},{-178,-282,-200,-182,-256,-195},{-260,-265,-226,-254,-187,-187},{-191,-178,-200,-195,-273,-276},{-154,-230,-232,-191,-267,-282},{-176,-276,-269,-273,-171,-217},{-152,-230,-252,-184,-208,-228},{-267,-267,-213,-221,-265,-276}}},{{{-256,-349,-259,-325,-364,-255},{-283,-238,-289,-289,-391,-323},{-283,-331,-298,-235,-361,-308},{-331,-301,-325,-373,-229,-314},{-259,-259,-313,-352,-295,-382},{-301,-307,-265,-325,-355,-290},{-340,-307,-367,-295,-265,-355},{-355,-274,-346,-310,-262,-234},{-346,-283,-274,-304,-316,-379},{-391,-391,-298,-376,-241,-266}},{{-284,-264,-322,-199,-294,-303},{-255,-298,-344,-240,-310,-252},{-208,-207,-204,-278,-323,-193},{-252,-336,-291,-278,-315,-296},{-208,-273,-333,-330,-270,-180},{-381,-321,-210,-251,-193,-293},{-305,-290,-199,-235,-270,-293},{-343,-227,-218,-207,-294,-193},{-381,-364,-249,-295,-307,-329},{-211,-327,-272,-202,-217,-188}},{{-241,-252,-179,-157,-187,-166},{-196,-295,-174,-161,-165,-232},{-186,-238,-167,-181,-201,-202},{-253,-262,-252,-206,-163,-196},{-317,-199,-197,-261,-165,-246},{-315,-307,-277,-175,-257,-228},{-188,-228,-183,-199,-250,-147},{-228,-185,-282,-287,-265,-216},{-278,-300,-284,-188,-187,-220},{-265,-257,-293,-272,-237,-248}},{{-146,-199,-137,-182,-196,-206},{-239,-201,-150,-182,-148,-209},{-210,-221,-160,-212,-191,-130},{-163,-188,-187,-177,-118,-150},{-149,-147,-210,-212,-153,-147},{-194,-238,-158,-163,-149,-198},{-225,-167,-190,-187,-139,-119},{-173,-193,-180,-155,-133,-169},{-142,-188,-206,-139,-134,-184},{-149,-208,-157,-129,-171,-166}},{{-137,-140,-137,-146,-109,-174},{-142,-200,-139,-199,-157,-157},{-151,-116,-199,-160,-132,-108},{-201,-148,-194,-163,-182,-136},{-203,-160,-185,-146,-143,-160},{-153,-140,-172,-197,-122,-188},{-120,-199,-140,-120,-157,-189},{-145,-119,-137,-172,-176,-116},{-128,-185,-166,-156,-159,-176},{-168,-119,-177,-174,-129,-137}},{{-159,-126,-122,-173,-145,-138},{-194,-127,-211,-168,-187,-176},{-123,-118,-168,-163,-175,-221},{-188,-135,-156,-155,-196,-139},{-186,-180,-186,-134,-173,-195},{-142,-137,-173,-144,-152,-219},{-199,-159,-178,-212,-145,-138},{-176,-151,-190,-128,-149,-159},{-119,-186,-146,-139,-200,-235},{-148,-124,-141,-143,-150,-228}}},{{{-448,-402,-406,-402,-378,-389},{-385,-452,-441,-273,-329,-385},{-406,-360,-389,-385,-262,-262},{-427,-326,-287,-374,-266,-416},{-378,-368,-371,-434,-312,-374},{-343,-357,-343,-427,-315,-294},{-252,-294,-399,-329,-343,-368},{-318,-346,-420,-444,-385,-326},{-329,-389,-413,-318,-357,-262},{-287,-266,-357,-364,-399,-343}},{{-414,-360,-431,-317,-312,-312},{-271,-305,-319,-281,-318,-390},{-435,-247,-431,-274,-384,-254},{-442,-298,-292,-347,-423,-251},{-449,-240,-241,-317,-354,-406},{-379,-250,-342,-364,-374,-245},{-432,-405,-302,-291,-236,-380},{-317,-343,-325,-317,-295,-377},{-445,-439,-363,-311,-390,-364},{-390,-425,-342,-391,-312,-280}},{{-290,-308,-324,-328,-208,-250},{-239,-268,-381,-267,-239,-309},{-387,-373,-303,-375,-348,-264},{-220,-345,-336,-357,-228,-214},{-375,-305,-375,-302,-219,-320},{-271,-271,-282,-296,-256,-270},{-296,-246,-381,-284,-228,-225},{-268,-271,-381,-211,-365,-247},{-391,-363,-213,-258,-282,-356},{-309,-256,-264,-314,-339,-225}},{{-211,-247,-267,-228,-225,-277},{-227,-260,-242,-208,-201,-268},{-200,-300,-298,-261,-304,-215},{-246,-295,-216,-186,-186,-253},{-267,-213,-226,-286,-282,-239},{-265,-258,-326,-176,-274,-198},{-346,-300,-195,-314,-243,-201},{-313,-218,-200,-289,-250,-194},{-302,-295,-231,-211,-240,-234},{-219,-197,-298,-296,-228,-201}},{{-230,-298,-185,-201,-219,-180},{-199,-300,-280,-196,-178,-169},{-273,-259,-247,-217,-231,-256},{-263,-189,-182,-236,-196,-178},{-246,-194,-196,-231,-245,-270},{-220,-199,-178,-185,-171,-199},{-178,-164,-296,-226,-206,-240},{-273,-185,-249,-240,-208,-231},{-306,-222,-249,-291,-282,-199},{-306,-263,-206,-296,-275,-162}},{{-275,-178,-231,-290,-240,-187},{-219,-252,-301,-300,-235,-219},{-284,-266,-179,-305,-244,-239},{-182,-229,-247,-209,-310,-278},{-173,-208,-214,-271,-252,-271},{-273,-222,-277,-193,-208,-295},{-199,-240,-249,-214,-290,-226},{-289,-270,-219,-274,-169,-234},{-171,-240,-184,-190,-271,-177},{-240,-178,-263,-207,-186,-246}}}}; // 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,6,16,8,6,17,9,6,16,9,6,17,9,6,17,9,6,17,8,6,17,8,6,17,8,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,18,9,6,17,9,6,16,9,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,740,741,742,743,744}}; // set of shipments in each bid 
int SHsts[SPN]={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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,1,5,9,13,17,21,25,29,2,8,14,20,26,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,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,0,4,8,12,16,20,24,28,32,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,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,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,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,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,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,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,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,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,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,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,1,5,9,13,17,21,25,29,33,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,4,8,12,16,20,24,28,32,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,33,1,7,13,19,25,31,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,2,8,14,20,26,32,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,1,7,13,19,25,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,2,8,14,20,26,32,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]={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,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,6,10,14,18,22,26,30,34,7,13,19,25,31,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,7,11,15,19,23,27,31,35,5,11,17,23,29,35,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,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,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,5,11,17,23,29,35,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,2,8,14,20,26,32,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,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,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,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,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,3,9,15,21,27,33,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,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,1,7,13,19,25,31,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,2,8,14,20,26,32,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,1,5,9,13,17,21,25,29,33,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,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,4,10,16,22,28,34,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,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,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,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 
