int Dev = 10;// 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 = 746;//Number of shipments
extern const int SN = 10;//Number of scenarios at each stage
extern const int MBSN = 17;//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]={{{{12484,0,0,0,0,0},{12425,0,0,0,0,0},{12287,0,0,0,0,0},{12344,0,0,0,0,0},{12411,0,0,0,0,0},{12552,0,0,0,0,0},{12394,0,0,0,0,0},{12409,0,0,0,0,0},{12346,0,0,0,0,0},{12285,0,0,0,0,0}},{{12517,0,0,0,0,0},{12388,0,0,0,0,0},{12263,0,0,0,0,0},{12274,0,0,0,0,0},{12425,0,0,0,0,0},{12401,0,0,0,0,0},{12474,0,0,0,0,0},{12408,0,0,0,0,0},{12375,0,0,0,0,0},{12302,0,0,0,0,0}},{{11606,0,0,0,0,0},{11665,0,0,0,0,0},{11588,0,0,0,0,0},{11589,0,0,0,0,0},{11479,0,0,0,0,0},{11692,0,0,0,0,0},{11607,0,0,0,0,0},{11593,0,0,0,0,0},{11584,0,0,0,0,0},{11595,0,0,0,0,0}},{{10102,0,0,0,0,0},{10247,0,0,0,0,0},{10121,0,0,0,0,0},{10282,0,0,0,0,0},{10213,0,0,0,0,0},{10393,0,0,0,0,0},{10380,0,0,0,0,0},{10274,0,0,0,0,0},{10333,0,0,0,0,0},{10339,0,0,0,0,0}},{{9476,0,0,0,0,0},{9606,0,0,0,0,0},{9580,0,0,0,0,0},{9533,0,0,0,0,0},{9414,0,0,0,0,0},{9505,0,0,0,0,0},{9626,0,0,0,0,0},{9468,0,0,0,0,0},{9356,0,0,0,0,0},{9586,0,0,0,0,0}},{{9284,0,0,0,0,0},{9430,0,0,0,0,0},{9191,0,0,0,0,0},{9104,0,0,0,0,0},{9305,0,0,0,0,0},{9324,0,0,0,0,0},{9225,0,0,0,0,0},{9191,0,0,0,0,0},{9366,0,0,0,0,0},{9286,0,0,0,0,0}}},{{{-320,-312,-320,-270,-309,-306},{-273,-265,-291,-309,-320,-312},{-291,-297,-318,-312,-303,-282},{-270,-291,-297,-285,-265,-303},{-276,-309,-323,-323,-285,-288},{-270,-312,-306,-303,-268,-285},{-315,-270,-306,-300,-318,-306},{-270,-303,-265,-318,-273,-285},{-294,-270,-312,-279,-268,-282},{-276,-291,-323,-306,-323,-268}},{{-319,-297,-300,-301,-291,-267},{-313,-295,-269,-249,-272,-251},{-261,-266,-274,-274,-283,-251},{-287,-280,-291,-263,-270,-249},{-304,-269,-280,-282,-288,-236},{-287,-289,-286,-296,-259,-254},{-278,-312,-266,-247,-286,-246},{-290,-286,-305,-282,-267,-272},{-261,-272,-272,-285,-291,-251},{-307,-295,-277,-301,-251,-262}},{{-238,-235,-256,-224,-201,-190},{-238,-223,-240,-224,-212,-214},{-250,-227,-231,-220,-220,-185},{-250,-230,-228,-208,-210,-216},{-272,-266,-247,-242,-218,-200},{-252,-252,-235,-226,-208,-204},{-268,-218,-254,-215,-212,-218},{-262,-220,-214,-220,-203,-227},{-245,-254,-249,-213,-231,-204},{-245,-223,-252,-217,-223,-190}},{{-191,-176,-166,-167,-155,-171},{-203,-172,-161,-175,-178,-149},{-203,-176,-184,-167,-158,-163},{-209,-193,-181,-157,-172,-150},{-191,-170,-183,-177,-158,-146},{-187,-196,-197,-158,-178,-170},{-181,-172,-163,-158,-168,-162},{-183,-200,-163,-155,-148,-158},{-177,-193,-179,-175,-165,-144},{-199,-180,-168,-182,-158,-150}},{{-169,-158,-160,-151,-140,-132},{-156,-137,-150,-154,-160,-132},{-146,-153,-144,-146,-156,-154},{-154,-145,-153,-156,-148,-132},{-148,-155,-160,-140,-143,-140},{-165,-150,-153,-157,-146,-157},{-156,-140,-143,-159,-141,-138},{-139,-134,-147,-157,-138,-162},{-154,-136,-137,-135,-137,-157},{-140,-161,-137,-146,-153,-156}},{{-153,-134,-151,-168,-147,-159},{-157,-159,-145,-168,-169,-150},{-140,-138,-148,-168,-148,-177},{-144,-137,-151,-148,-156,-157},{-157,-160,-139,-163,-171,-177},{-137,-138,-149,-156,-174,-154},{-134,-138,-148,-142,-147,-175},{-146,-157,-153,-149,-175,-154},{-144,-138,-159,-159,-156,-159},{-157,-140,-140,-148,-177,-174}}},{{{-178,-157,-161,-179,-190,-208},{-165,-159,-164,-179,-166,-193},{-153,-174,-173,-181,-175,-201},{-168,-181,-191,-192,-178,-197},{-163,-155,-159,-179,-186,-206},{-165,-177,-189,-166,-197,-193},{-151,-159,-180,-186,-173,-202},{-155,-181,-186,-179,-166,-210},{-180,-154,-166,-172,-193,-193},{-161,-167,-164,-183,-180,-201}},{{-184,-195,-224,-214,-208,-217},{-218,-193,-224,-208,-247,-243},{-216,-221,-192,-243,-218,-233},{-212,-221,-215,-217,-245,-248},{-184,-219,-211,-221,-215,-255},{-204,-207,-198,-203,-236,-217},{-214,-219,-213,-210,-227,-224},{-194,-197,-228,-221,-234,-240},{-204,-193,-232,-203,-236,-262},{-204,-221,-192,-225,-252,-250}},{{-269,-280,-286,-254,-274,-277},{-269,-275,-267,-265,-299,-311},{-269,-278,-278,-246,-249,-297},{-245,-252,-244,-281,-294,-272},{-242,-237,-257,-286,-258,-258},{-242,-273,-275,-265,-255,-308},{-235,-240,-257,-273,-258,-280},{-227,-265,-286,-265,-263,-266},{-237,-245,-236,-265,-274,-283},{-242,-232,-249,-265,-258,-286}},{{-286,-270,-274,-295,-283,-283},{-289,-282,-271,-280,-322,-283},{-283,-265,-268,-295,-277,-295},{-318,-268,-307,-328,-322,-277},{-283,-273,-301,-271,-298,-307},{-303,-285,-319,-280,-271,-316},{-312,-291,-298,-271,-319,-328},{-275,-279,-304,-325,-283,-298},{-301,-309,-325,-328,-289,-322},{-295,-312,-319,-292,-307,-277}},{{-292,-274,-316,-321,-279,-264},{-304,-301,-331,-318,-306,-296},{-295,-307,-316,-312,-297,-261},{-283,-280,-286,-300,-318,-287},{-274,-286,-280,-273,-294,-299},{-295,-286,-289,-306,-315,-307},{-325,-298,-322,-309,-303,-261},{-319,-277,-307,-291,-306,-310},{-325,-292,-289,-279,-282,-270},{-280,-319,-319,-321,-309,-304}},{{-268,-282,-290,-253,-282,-233},{-274,-251,-290,-272,-266,-258},{-282,-282,-274,-251,-259,-243},{-291,-285,-252,-259,-269,-226},{-302,-259,-276,-275,-243,-268},{-299,-271,-260,-285,-271,-268},{-285,-304,-247,-261,-271,-236},{-271,-251,-293,-243,-253,-263},{-305,-293,-293,-259,-248,-253},{-294,-287,-252,-282,-238,-223}}},{{{-316,-332,-355,-336,-355,-349},{-316,-339,-352,-352,-303,-322},{-299,-309,-319,-306,-316,-355},{-342,-306,-316,-329,-329,-326},{-296,-339,-309,-336,-303,-352},{-313,-339,-362,-329,-359,-322},{-332,-316,-332,-362,-336,-349},{-342,-303,-339,-336,-329,-359},{-359,-322,-326,-306,-355,-319},{-309,-306,-296,-303,-299,-309}},{{-358,-335,-290,-327,-323,-310},{-344,-296,-348,-330,-308,-292},{-298,-296,-290,-311,-283,-331},{-335,-309,-287,-289,-320,-316},{-298,-328,-348,-345,-293,-304},{-335,-338,-300,-342,-296,-310},{-341,-332,-300,-339,-314,-322},{-308,-299,-297,-283,-302,-328},{-295,-338,-313,-311,-290,-277},{-298,-345,-300,-286,-283,-286}},{{-298,-302,-283,-253,-273,-265},{-319,-259,-288,-296,-260,-236},{-316,-285,-252,-264,-260,-272},{-271,-262,-274,-294,-289,-278},{-307,-317,-286,-296,-238,-265},{-319,-297,-305,-267,-254,-262},{-304,-285,-308,-275,-246,-252},{-304,-308,-308,-288,-281,-270},{-283,-262,-255,-256,-289,-265},{-292,-305,-291,-283,-281,-231}},{{-242,-219,-213,-233,-204,-228},{-252,-228,-256,-231,-213,-208},{-272,-226,-213,-222,-233,-206},{-252,-255,-246,-224,-211,-199},{-248,-238,-223,-219,-213,-221},{-270,-245,-218,-236,-228,-217},{-232,-267,-246,-252,-226,-226},{-252,-262,-213,-226,-244,-219},{-242,-265,-220,-210,-208,-199},{-262,-241,-261,-249,-244,-241}},{{-200,-204,-197,-223,-189,-210},{-200,-223,-193,-210,-197,-197},{-217,-210,-204,-193,-225,-227},{-215,-189,-220,-227,-191,-227},{-210,-223,-227,-206,-212,-220},{-197,-208,-193,-193,-202,-212},{-232,-212,-218,-220,-195,-195},{-202,-191,-202,-212,-229,-218},{-204,-214,-204,-220,-193,-210},{-219,-225,-208,-206,-191,-197}},{{-200,-218,-219,-239,-227,-234},{-214,-223,-215,-206,-238,-209},{-202,-223,-213,-215,-202,-248},{-223,-229,-196,-213,-235,-202},{-214,-189,-209,-237,-233,-248},{-195,-231,-217,-219,-211,-230},{-208,-225,-207,-237,-205,-223},{-191,-189,-222,-234,-242,-225},{-210,-225,-190,-230,-240,-245},{-218,-206,-207,-206,-235,-243}}},{{{-100,-116,-104,-109,-128,-141},{-116,-108,-103,-108,-127,-133},{-112,-111,-112,-123,-117,-141},{-107,-111,-101,-109,-113,-131},{-102,-99,-121,-129,-111,-122},{-96,-102,-101,-116,-112,-136},{-113,-111,-105,-111,-117,-122},{-98,-105,-115,-128,-122,-128},{-103,-96,-120,-105,-112,-140},{-102,-101,-109,-129,-112,-122}},{{-142,-134,-148,-161,-153,-185},{-126,-152,-151,-163,-175,-155},{-139,-148,-135,-150,-159,-156},{-140,-147,-133,-143,-172,-155},{-135,-127,-161,-150,-174,-155},{-140,-152,-151,-160,-145,-171},{-138,-140,-154,-164,-167,-181},{-144,-137,-148,-170,-177,-180},{-128,-145,-154,-163,-171,-163},{-140,-128,-161,-169,-167,-161}},{{-193,-187,-175,-173,-204,-218},{-187,-184,-175,-194,-178,-178},{-163,-184,-201,-177,-214,-214},{-177,-191,-201,-196,-196,-194},{-158,-171,-188,-175,-208,-182},{-193,-171,-203,-190,-198,-182},{-177,-169,-193,-188,-212,-212},{-173,-162,-167,-184,-206,-178},{-182,-176,-186,-201,-194,-210},{-193,-198,-171,-173,-184,-204}},{{-221,-189,-213,-217,-211,-221},{-223,-223,-217,-219,-215,-189},{-189,-219,-209,-203,-193,-185},{-209,-219,-203,-187,-201,-195},{-185,-211,-223,-203,-191,-187},{-199,-197,-217,-197,-193,-201},{-201,-205,-195,-207,-223,-211},{-187,-209,-197,-211,-209,-183},{-193,-203,-223,-191,-189,-199},{-219,-189,-187,-217,-193,-203}},{{-209,-185,-211,-177,-183,-173},{-187,-209,-177,-191,-197,-191},{-203,-215,-207,-203,-189,-191},{-215,-207,-213,-207,-172,-184},{-213,-197,-177,-185,-178,-191},{-223,-201,-195,-195,-197,-195},{-207,-211,-189,-199,-195,-186},{-187,-209,-181,-183,-197,-184},{-183,-223,-205,-179,-200,-199},{-221,-221,-199,-201,-172,-177}},{{-183,-168,-150,-162,-165,-154},{-195,-189,-160,-171,-165,-162},{-163,-187,-177,-150,-148,-154},{-179,-159,-150,-158,-155,-141},{-163,-163,-182,-157,-147,-156},{-188,-190,-160,-152,-165,-141},{-188,-164,-179,-157,-165,-150},{-184,-187,-174,-163,-139,-146},{-168,-166,-154,-144,-144,-143},{-163,-178,-170,-162,-139,-156}}},{{{-224,-240,-217,-255,-262,-252},{-217,-226,-243,-240,-262,-233},{-254,-224,-259,-262,-243,-226},{-247,-226,-262,-231,-243,-262},{-254,-255,-236,-231,-238,-259},{-228,-257,-214,-250,-233,-250},{-245,-226,-243,-252,-217,-252},{-224,-240,-240,-231,-245,-259},{-210,-248,-231,-217,-219,-255},{-221,-255,-243,-231,-245,-224}},{{-228,-238,-254,-219,-224,-199},{-240,-236,-212,-208,-219,-219},{-238,-228,-258,-243,-242,-219},{-243,-217,-221,-240,-221,-206},{-226,-228,-258,-231,-224,-203},{-233,-238,-242,-249,-240,-203},{-250,-233,-254,-217,-249,-208},{-240,-226,-240,-240,-246,-219},{-248,-255,-247,-226,-203,-212},{-240,-252,-247,-247,-210,-208}},{{-232,-213,-190,-203,-187,-164},{-196,-230,-206,-193,-204,-189},{-217,-226,-220,-211,-193,-189},{-230,-207,-216,-211,-172,-162},{-211,-201,-200,-181,-194,-178},{-237,-219,-220,-203,-176,-196},{-204,-226,-198,-213,-183,-193},{-232,-224,-192,-203,-206,-173},{-217,-215,-210,-189,-181,-166},{-211,-219,-196,-199,-168,-184}},{{-172,-165,-148,-148,-138,-138},{-181,-163,-144,-156,-138,-127},{-158,-182,-143,-138,-144,-148},{-186,-172,-143,-153,-134,-144},{-177,-173,-159,-144,-157,-131},{-165,-173,-151,-152,-141,-137},{-177,-155,-155,-140,-143,-139},{-184,-157,-154,-138,-157,-127},{-158,-177,-163,-156,-147,-135},{-167,-152,-141,-153,-148,-131}},{{-141,-118,-126,-127,-124,-124},{-140,-130,-114,-119,-127,-131},{-136,-131,-129,-117,-123,-123},{-121,-121,-118,-113,-129,-129},{-137,-122,-124,-131,-107,-131},{-125,-137,-119,-127,-115,-117},{-144,-121,-134,-125,-130,-118},{-129,-135,-123,-119,-129,-118},{-120,-123,-134,-123,-118,-120},{-140,-134,-114,-120,-120,-107}},{{-124,-125,-118,-124,-117,-125},{-129,-131,-111,-127,-126,-125},{-125,-107,-108,-112,-120,-113},{-111,-109,-125,-113,-129,-117},{-119,-129,-117,-118,-134,-132},{-120,-123,-109,-131,-116,-136},{-119,-129,-130,-130,-113,-122},{-123,-129,-126,-121,-128,-129},{-124,-114,-129,-123,-120,-132},{-123,-123,-117,-125,-110,-125}}},{{{-253,-242,-255,-279,-263,-266},{-263,-245,-269,-285,-261,-242},{-274,-266,-271,-258,-239,-247},{-277,-253,-255,-258,-269,-245},{-245,-263,-266,-261,-293,-277},{-245,-293,-255,-258,-293,-271},{-250,-258,-253,-255,-263,-271},{-290,-242,-290,-258,-253,-242},{-255,-261,-269,-282,-285,-279},{-282,-247,-285,-274,-285,-285}},{{-255,-274,-253,-279,-259,-259},{-285,-279,-258,-279,-259,-267},{-271,-253,-269,-263,-267,-254},{-239,-285,-258,-271,-236,-267},{-282,-245,-261,-271,-241,-243},{-258,-279,-277,-266,-267,-236},{-245,-271,-242,-255,-249,-269},{-285,-266,-250,-287,-252,-241},{-258,-261,-242,-263,-259,-251},{-253,-287,-253,-255,-270,-241}},{{-251,-230,-267,-258,-240,-222},{-241,-250,-265,-241,-252,-246},{-262,-271,-237,-223,-238,-219},{-269,-245,-239,-255,-270,-241},{-285,-278,-227,-223,-230,-227},{-259,-230,-247,-268,-220,-260},{-277,-261,-260,-231,-233,-234},{-280,-253,-255,-228,-240,-222},{-241,-250,-275,-250,-260,-234},{-241,-266,-275,-241,-243,-248}},{{-228,-247,-238,-225,-211,-211},{-228,-219,-210,-207,-246,-220},{-243,-223,-236,-248,-208,-206},{-217,-214,-226,-223,-224,-204},{-217,-228,-245,-225,-208,-211},{-245,-223,-231,-212,-222,-206},{-248,-221,-231,-214,-244,-208},{-243,-212,-226,-225,-213,-208},{-255,-256,-217,-248,-215,-224},{-231,-251,-208,-230,-222,-211}},{{-233,-219,-230,-213,-232,-239},{-229,-230,-210,-204,-232,-232},{-240,-239,-208,-232,-210,-221},{-200,-228,-239,-234,-237,-197},{-198,-219,-210,-232,-206,-217},{-200,-217,-206,-226,-204,-204},{-242,-217,-232,-219,-232,-224},{-229,-230,-234,-202,-195,-232},{-231,-206,-200,-210,-197,-224},{-231,-210,-237,-224,-234,-202}},{{-206,-206,-224,-200,-195,-206},{-219,-237,-197,-226,-219,-202},{-239,-195,-213,-219,-230,-206},{-200,-210,-232,-239,-234,-219},{-228,-202,-197,-219,-217,-221},{-237,-200,-217,-213,-200,-239},{-228,-219,-200,-210,-230,-219},{-197,-204,-195,-204,-210,-219},{-232,-219,-221,-226,-228,-215},{-221,-210,-230,-232,-228,-226}}},{{{-286,-286,-316,-280,-274,-305},{-301,-322,-322,-283,-328,-275},{-316,-319,-277,-277,-271,-290},{-283,-295,-292,-298,-319,-302},{-319,-274,-313,-316,-295,-311},{-319,-316,-307,-325,-325,-302},{-271,-286,-295,-301,-328,-305},{-316,-271,-289,-316,-295,-314},{-283,-316,-289,-283,-310,-320},{-283,-313,-280,-280,-331,-299}},{{-275,-304,-277,-287,-273,-267},{-278,-296,-302,-254,-241,-272},{-284,-258,-272,-259,-276,-244},{-299,-264,-260,-270,-273,-231},{-314,-304,-291,-254,-281,-262},{-311,-316,-283,-284,-284,-231},{-287,-290,-302,-257,-273,-254},{-290,-281,-266,-257,-292,-267},{-314,-316,-258,-300,-284,-283},{-264,-296,-263,-254,-265,-244}},{{-243,-245,-236,-212,-223,-208},{-258,-247,-222,-236,-229,-200},{-236,-221,-208,-223,-212,-202},{-228,-238,-245,-201,-218,-218},{-233,-228,-252,-228,-201,-184},{-248,-242,-247,-203,-206,-182},{-228,-264,-243,-212,-204,-194},{-265,-257,-227,-201,-223,-196},{-246,-254,-211,-243,-197,-200},{-226,-264,-231,-206,-225,-200}},{{-192,-205,-160,-167,-163,-147},{-206,-203,-176,-163,-161,-145},{-192,-186,-169,-182,-176,-163},{-184,-193,-169,-177,-176,-177},{-175,-193,-194,-186,-166,-174},{-190,-190,-196,-172,-179,-161},{-204,-173,-196,-174,-149,-145},{-186,-195,-192,-162,-171,-171},{-196,-182,-194,-155,-151,-166},{-196,-186,-178,-162,-159,-145}},{{-172,-156,-159,-149,-139,-159},{-164,-160,-163,-168,-166,-151},{-162,-145,-151,-165,-156,-139},{-159,-168,-149,-163,-151,-143},{-151,-169,-159,-142,-163,-140},{-172,-162,-162,-162,-140,-151},{-151,-142,-156,-162,-162,-146},{-145,-139,-166,-139,-142,-168},{-142,-159,-163,-160,-140,-163},{-158,-148,-151,-160,-159,-146}},{{-149,-172,-178,-165,-193,-168},{-154,-159,-177,-156,-191,-199},{-166,-151,-175,-158,-159,-183},{-163,-165,-160,-156,-164,-170},{-139,-157,-167,-178,-163,-172},{-160,-162,-177,-168,-166,-185},{-151,-156,-154,-158,-178,-194},{-139,-145,-164,-166,-187,-163},{-169,-159,-160,-168,-191,-170},{-162,-149,-149,-161,-163,-185}}},{{{-374,-322,-329,-371,-336,-346},{-371,-354,-336,-340,-364,-368},{-346,-329,-326,-382,-336,-315},{-318,-371,-336,-378,-364,-322},{-315,-343,-354,-326,-360,-336},{-350,-315,-378,-378,-329,-343},{-350,-343,-322,-364,-350,-322},{-378,-360,-346,-368,-329,-318},{-368,-336,-350,-371,-340,-343},{-374,-350,-357,-329,-315,-357}},{{-355,-357,-339,-351,-315,-293},{-341,-370,-339,-321,-298,-293},{-369,-353,-319,-304,-344,-348},{-317,-329,-373,-334,-341,-335},{-341,-333,-346,-367,-305,-332},{-324,-340,-308,-341,-312,-303},{-369,-357,-315,-357,-302,-335},{-358,-329,-342,-337,-318,-290},{-362,-367,-325,-311,-295,-325},{-331,-312,-363,-307,-341,-338}},{{-318,-293,-327,-290,-282,-264},{-299,-333,-303,-281,-256,-297},{-331,-330,-297,-322,-259,-289},{-318,-314,-321,-278,-256,-284},{-321,-339,-279,-264,-282,-259},{-296,-302,-306,-281,-308,-300},{-331,-311,-309,-311,-271,-267},{-321,-290,-327,-302,-259,-270},{-340,-317,-330,-305,-305,-253},{-324,-320,-318,-311,-288,-303}},{{-259,-245,-242,-251,-240,-234},{-267,-237,-244,-259,-262,-246},{-256,-242,-244,-246,-238,-246},{-254,-242,-231,-256,-247,-253},{-262,-281,-254,-271,-235,-227},{-248,-266,-270,-264,-260,-261},{-275,-250,-272,-274,-240,-239},{-286,-276,-278,-243,-262,-225},{-256,-266,-239,-254,-228,-246},{-262,-281,-262,-246,-250,-222}},{{-232,-222,-229,-236,-247,-233},{-220,-254,-247,-229,-222,-247},{-261,-238,-219,-208,-243,-213},{-235,-249,-213,-229,-245,-254},{-246,-238,-231,-252,-213,-245},{-239,-222,-236,-240,-233,-252},{-254,-219,-240,-247,-226,-229},{-235,-243,-254,-231,-236,-213},{-246,-213,-231,-217,-240,-249},{-213,-233,-247,-249,-215,-252}},{{-217,-233,-252,-245,-235,-268},{-249,-215,-252,-233,-237,-253},{-249,-249,-240,-226,-235,-221},{-213,-219,-221,-236,-218,-266},{-236,-249,-217,-259,-223,-224},{-229,-210,-235,-252,-230,-248},{-213,-231,-235,-217,-232,-261},{-238,-243,-245,-250,-223,-239},{-247,-245,-233,-257,-235,-224},{-243,-222,-242,-262,-232,-251}}}}; // 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,6,15,8,5,15,8,5,17,8,6,16,8,6,16,9,6,17,9,6,17,9,6,17,9,6,16,9,6,17,9,6,17,8,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,8,6,17,9,6,16,8,6,16,9,6,16,9,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,745}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,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,1,5,9,13,17,21,25,29,2,8,14,20,26,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,2,8,14,20,26,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,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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,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,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,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,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,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,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,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,0,6,12,18,24,30,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,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,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,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,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,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,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,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,0,4,8,12,16,20,24,28,32,2,8,14,20,26,32}; // 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,6,10,14,18,22,26,30,34,5,11,17,23,29,35,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,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,7,13,19,25,31,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,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,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,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,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,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,4,10,16,22,28,34,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,3,7,11,15,19,23,27,31,35,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,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,1,7,13,19,25,31,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,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,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,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,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,4,10,16,22,28,34,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,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,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,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}; // set of end times of each shipment 
