int Dev = 30;// Deviation
extern const int CNN = 4;// 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]={{{{11139,0,0,0,0,0},{10977,0,0,0,0,0},{10806,0,0,0,0,0},{10911,0,0,0,0,0},{11351,0,0,0,0,0},{11311,0,0,0,0,0},{10709,0,0,0,0,0},{10726,0,0,0,0,0},{11400,0,0,0,0,0},{11030,0,0,0,0,0}},{{11309,0,0,0,0,0},{10436,0,0,0,0,0},{10792,0,0,0,0,0},{11266,0,0,0,0,0},{11000,0,0,0,0,0},{10944,0,0,0,0,0},{10958,0,0,0,0,0},{11676,0,0,0,0,0},{10995,0,0,0,0,0},{10962,0,0,0,0,0}},{{10962,0,0,0,0,0},{11149,0,0,0,0,0},{11287,0,0,0,0,0},{10478,0,0,0,0,0},{11284,0,0,0,0,0},{11170,0,0,0,0,0},{11360,0,0,0,0,0},{11102,0,0,0,0,0},{11149,0,0,0,0,0},{11301,0,0,0,0,0}},{{11362,0,0,0,0,0},{10834,0,0,0,0,0},{11100,0,0,0,0,0},{11018,0,0,0,0,0},{10711,0,0,0,0,0},{11085,0,0,0,0,0},{10862,0,0,0,0,0},{10984,0,0,0,0,0},{11127,0,0,0,0,0},{10798,0,0,0,0,0}},{{11198,0,0,0,0,0},{11311,0,0,0,0,0},{10871,0,0,0,0,0},{11023,0,0,0,0,0},{10980,0,0,0,0,0},{11182,0,0,0,0,0},{11124,0,0,0,0,0},{11131,0,0,0,0,0},{11143,0,0,0,0,0},{11218,0,0,0,0,0}},{{10861,0,0,0,0,0},{11267,0,0,0,0,0},{10754,0,0,0,0,0},{10842,0,0,0,0,0},{10831,0,0,0,0,0},{11202,0,0,0,0,0},{11361,0,0,0,0,0},{11074,0,0,0,0,0},{10711,0,0,0,0,0},{10801,0,0,0,0,0}}},{{{-276,-204,-289,-199,-170,-199},{-249,-237,-172,-159,-177,-262},{-249,-199,-195,-222,-280,-204},{-195,-220,-188,-260,-244,-159},{-262,-186,-242,-157,-164,-217},{-190,-157,-224,-213,-190,-206},{-242,-262,-199,-271,-177,-224},{-184,-278,-170,-240,-159,-278},{-269,-177,-249,-159,-188,-264},{-204,-217,-172,-249,-193,-271}},{{-195,-280,-197,-282,-211,-291},{-291,-168,-202,-284,-222,-177},{-280,-184,-202,-269,-287,-188},{-289,-276,-284,-226,-186,-208},{-197,-159,-271,-208,-193,-273},{-251,-213,-197,-220,-159,-157},{-186,-228,-244,-262,-237,-217},{-164,-251,-202,-166,-260,-276},{-217,-197,-170,-168,-215,-222},{-276,-237,-262,-206,-262,-211}},{{-208,-242,-211,-251,-249,-213},{-220,-199,-260,-215,-244,-253},{-231,-284,-260,-233,-262,-184},{-159,-240,-208,-235,-204,-190},{-289,-278,-258,-276,-175,-224},{-251,-204,-280,-204,-280,-220},{-280,-175,-280,-280,-172,-220},{-282,-258,-179,-264,-271,-284},{-255,-213,-231,-164,-267,-264},{-235,-244,-240,-228,-273,-197}},{{-197,-246,-220,-179,-255,-267},{-264,-244,-271,-184,-284,-197},{-208,-291,-260,-172,-249,-291},{-269,-291,-161,-195,-168,-228},{-273,-215,-166,-213,-166,-197},{-217,-246,-213,-208,-249,-157},{-159,-244,-217,-208,-222,-253},{-197,-228,-280,-224,-289,-188},{-204,-172,-273,-220,-197,-184},{-195,-226,-273,-170,-204,-276}},{{-237,-264,-186,-287,-220,-282},{-204,-233,-280,-193,-291,-267},{-264,-269,-161,-224,-204,-280},{-242,-211,-168,-282,-262,-217},{-179,-280,-276,-264,-213,-291},{-287,-159,-161,-186,-260,-184},{-224,-204,-181,-202,-267,-204},{-280,-177,-253,-242,-240,-204},{-278,-184,-175,-282,-235,-186},{-190,-284,-271,-240,-240,-246}},{{-188,-251,-211,-184,-284,-177},{-291,-240,-244,-251,-175,-157},{-249,-255,-184,-220,-161,-258},{-280,-244,-269,-264,-157,-222},{-246,-235,-206,-224,-215,-246},{-228,-280,-166,-258,-184,-282},{-177,-249,-260,-208,-159,-291},{-251,-161,-208,-237,-289,-271},{-226,-280,-199,-172,-181,-228},{-184,-211,-273,-168,-282,-267}}},{{{-224,-283,-267,-259,-221,-228},{-198,-188,-257,-214,-250,-305},{-295,-221,-264,-190,-226,-207},{-214,-262,-167,-250,-276,-169},{-174,-278,-305,-264,-281,-298},{-202,-298,-307,-262,-302,-238},{-276,-174,-198,-171,-200,-295},{-178,-271,-298,-167,-195,-212},{-198,-278,-209,-257,-281,-231},{-281,-307,-305,-245,-300,-200}},{{-295,-281,-243,-274,-278,-167},{-219,-259,-288,-231,-169,-283},{-169,-171,-262,-286,-281,-243},{-269,-171,-248,-293,-264,-214},{-200,-224,-233,-298,-255,-169},{-188,-248,-217,-300,-302,-298},{-221,-190,-243,-169,-169,-233},{-269,-245,-252,-267,-176,-283},{-257,-307,-255,-176,-207,-267},{-278,-267,-217,-214,-271,-231}},{{-269,-288,-307,-283,-214,-228},{-214,-295,-195,-267,-274,-169},{-188,-293,-290,-278,-183,-219},{-240,-186,-176,-209,-302,-238},{-252,-307,-300,-188,-298,-212},{-221,-205,-278,-236,-302,-271},{-198,-190,-271,-219,-286,-238},{-269,-269,-295,-305,-183,-205},{-283,-307,-169,-233,-281,-200},{-181,-262,-274,-267,-212,-259}},{{-221,-193,-193,-167,-169,-255},{-281,-307,-250,-276,-302,-212},{-309,-271,-290,-171,-181,-309},{-252,-169,-288,-231,-295,-264},{-195,-186,-198,-233,-252,-269},{-255,-264,-295,-257,-305,-307},{-167,-286,-257,-217,-262,-188},{-288,-300,-171,-214,-267,-205},{-271,-228,-167,-200,-267,-264},{-243,-183,-200,-228,-278,-305}},{{-302,-278,-200,-231,-276,-214},{-305,-188,-188,-178,-186,-250},{-267,-298,-212,-186,-171,-293},{-245,-255,-209,-243,-190,-214},{-257,-309,-207,-183,-233,-219},{-245,-245,-186,-171,-309,-309},{-236,-212,-257,-276,-209,-205},{-236,-167,-176,-276,-259,-283},{-271,-290,-190,-240,-183,-190},{-267,-224,-207,-214,-309,-278}},{{-302,-255,-238,-214,-276,-171},{-305,-252,-264,-286,-224,-307},{-262,-262,-198,-171,-298,-274},{-171,-178,-269,-190,-202,-238},{-264,-169,-233,-198,-243,-264},{-298,-231,-283,-221,-195,-219},{-236,-288,-276,-298,-193,-186},{-202,-174,-181,-171,-188,-195},{-190,-214,-295,-248,-207,-209},{-202,-274,-195,-212,-183,-264}}},{{{-240,-197,-292,-216,-339,-314},{-268,-355,-243,-248,-224,-262},{-308,-232,-224,-300,-259,-270},{-270,-284,-270,-289,-325,-207},{-300,-205,-281,-213,-295,-328},{-344,-221,-191,-254,-300,-308},{-251,-254,-352,-194,-339,-227},{-336,-287,-221,-349,-227,-325},{-194,-238,-278,-243,-319,-303},{-344,-276,-210,-224,-317,-246}},{{-276,-227,-344,-251,-257,-344},{-259,-292,-232,-235,-248,-216},{-240,-330,-194,-328,-205,-306},{-210,-216,-284,-333,-202,-336},{-308,-284,-344,-262,-284,-257},{-281,-311,-238,-207,-216,-270},{-317,-246,-216,-270,-221,-336},{-330,-224,-344,-341,-306,-336},{-314,-254,-352,-243,-207,-202},{-194,-347,-322,-336,-273,-197}},{{-254,-197,-289,-355,-268,-273},{-322,-240,-257,-202,-308,-213},{-333,-289,-308,-251,-205,-251},{-349,-300,-281,-221,-218,-347},{-221,-276,-246,-224,-278,-300},{-295,-240,-276,-262,-268,-199},{-229,-306,-273,-330,-254,-268},{-213,-352,-306,-216,-235,-347},{-205,-311,-341,-352,-281,-262},{-207,-314,-221,-322,-199,-278}},{{-336,-300,-202,-218,-254,-347},{-240,-227,-191,-229,-270,-199},{-278,-254,-224,-229,-319,-262},{-295,-339,-232,-292,-224,-341},{-298,-259,-306,-224,-319,-202},{-205,-349,-303,-246,-238,-216},{-191,-276,-328,-268,-292,-273},{-218,-191,-238,-347,-205,-344},{-273,-281,-349,-257,-251,-317},{-311,-232,-210,-243,-330,-238}},{{-308,-227,-205,-311,-268,-352},{-314,-194,-339,-227,-278,-336},{-268,-218,-281,-191,-259,-207},{-303,-257,-197,-276,-199,-273},{-229,-341,-235,-303,-227,-213},{-262,-311,-265,-336,-248,-287},{-347,-308,-347,-276,-336,-191},{-325,-216,-349,-336,-229,-281},{-314,-333,-216,-276,-322,-199},{-216,-325,-207,-339,-289,-314}},{{-205,-311,-197,-317,-197,-257},{-262,-257,-287,-339,-207,-311},{-202,-210,-289,-330,-194,-221},{-191,-254,-232,-341,-319,-238},{-191,-248,-328,-295,-238,-205},{-197,-224,-229,-295,-281,-270},{-328,-224,-319,-322,-325,-281},{-232,-333,-218,-257,-262,-276},{-336,-265,-232,-218,-259,-235},{-259,-284,-207,-287,-349,-251}}},{{{-199,-199,-145,-172,-136,-165},{-140,-199,-182,-117,-179,-192},{-131,-119,-129,-129,-152,-196},{-114,-186,-128,-156,-134,-152},{-180,-143,-177,-176,-159,-108},{-182,-125,-139,-197,-186,-126},{-140,-139,-139,-112,-148,-152},{-139,-180,-145,-119,-191,-166},{-152,-168,-162,-180,-149,-139},{-168,-134,-179,-191,-143,-131}},{{-123,-156,-132,-166,-197,-160},{-185,-129,-151,-157,-108,-183},{-166,-188,-120,-123,-160,-139},{-122,-139,-156,-132,-200,-180},{-168,-162,-174,-116,-199,-163},{-191,-165,-189,-172,-168,-199},{-140,-139,-125,-180,-197,-148},{-129,-128,-182,-183,-172,-112},{-200,-179,-159,-196,-172,-120},{-116,-192,-143,-123,-114,-117}},{{-111,-160,-176,-132,-185,-134},{-152,-200,-112,-116,-108,-188},{-194,-192,-166,-194,-191,-196},{-169,-122,-125,-196,-156,-149},{-136,-108,-156,-109,-134,-132},{-188,-185,-126,-117,-134,-116},{-163,-196,-143,-154,-154,-125},{-111,-154,-128,-109,-128,-117},{-156,-149,-156,-126,-182,-165},{-176,-171,-182,-197,-131,-145}},{{-189,-186,-119,-156,-165,-136},{-111,-148,-174,-186,-131,-162},{-123,-145,-145,-180,-154,-122},{-183,-140,-119,-119,-185,-172},{-159,-199,-125,-149,-137,-111},{-168,-157,-128,-116,-159,-157},{-191,-165,-120,-123,-108,-131},{-176,-140,-132,-137,-145,-180},{-149,-119,-172,-117,-137,-172},{-160,-111,-132,-136,-185,-183}},{{-160,-146,-146,-109,-114,-159},{-117,-109,-171,-200,-165,-116},{-152,-129,-192,-159,-177,-112},{-142,-112,-126,-137,-137,-111},{-120,-122,-136,-117,-128,-109},{-189,-182,-176,-140,-116,-168},{-162,-192,-116,-192,-119,-166},{-139,-136,-145,-162,-142,-188},{-166,-128,-163,-163,-129,-157},{-112,-117,-149,-199,-122,-171}},{{-197,-109,-126,-199,-119,-174},{-111,-192,-134,-109,-188,-160},{-122,-131,-165,-188,-143,-186},{-140,-151,-196,-171,-139,-111},{-171,-183,-136,-183,-180,-169},{-182,-168,-194,-176,-139,-120},{-152,-154,-186,-143,-199,-131},{-192,-188,-169,-177,-182,-137},{-197,-192,-126,-160,-185,-194},{-146,-123,-188,-142,-131,-179}}},{{{-218,-180,-129,-237,-204,-151},{-182,-147,-204,-160,-191,-186},{-213,-166,-142,-180,-135,-129},{-153,-167,-197,-131,-191,-186},{-158,-204,-202,-197,-198,-220},{-198,-144,-189,-197,-198,-133},{-200,-138,-153,-136,-193,-167},{-193,-237,-129,-153,-169,-129},{-226,-187,-135,-160,-229,-131},{-146,-215,-138,-131,-177,-228}},{{-160,-142,-193,-158,-140,-202},{-129,-146,-211,-187,-217,-131},{-213,-136,-215,-184,-202,-218},{-184,-173,-195,-193,-142,-164},{-222,-136,-149,-215,-233,-138},{-129,-133,-209,-202,-155,-155},{-153,-193,-144,-175,-162,-198},{-166,-213,-180,-224,-178,-169},{-213,-209,-149,-217,-147,-171},{-160,-177,-186,-136,-231,-149}},{{-222,-191,-164,-175,-135,-184},{-135,-157,-220,-202,-136,-198},{-187,-175,-184,-220,-229,-153},{-202,-140,-173,-164,-160,-160},{-135,-193,-184,-198,-207,-131},{-153,-200,-209,-198,-158,-167},{-226,-206,-162,-162,-151,-162},{-189,-237,-140,-175,-164,-204},{-224,-215,-146,-189,-217,-202},{-166,-209,-129,-222,-131,-197}},{{-220,-177,-222,-193,-235,-138},{-157,-184,-157,-204,-138,-160},{-228,-167,-147,-160,-180,-178},{-155,-142,-127,-200,-229,-195},{-235,-195,-175,-138,-166,-200},{-164,-195,-224,-206,-193,-177},{-169,-136,-135,-202,-160,-162},{-166,-231,-224,-164,-217,-213},{-209,-204,-229,-173,-149,-189},{-146,-220,-197,-202,-127,-140}},{{-151,-173,-157,-164,-182,-226},{-189,-224,-157,-155,-224,-202},{-151,-177,-164,-187,-149,-182},{-140,-200,-135,-184,-198,-211},{-166,-169,-136,-198,-164,-235},{-226,-218,-133,-131,-158,-189},{-171,-167,-237,-229,-211,-171},{-233,-200,-164,-131,-207,-224},{-151,-162,-233,-220,-207,-207},{-211,-187,-218,-146,-200,-206}},{{-164,-231,-140,-155,-211,-195},{-135,-204,-140,-127,-228,-136},{-173,-149,-180,-226,-180,-209},{-204,-129,-127,-226,-147,-220},{-202,-213,-213,-129,-166,-140},{-195,-177,-235,-127,-213,-166},{-175,-171,-187,-177,-167,-215},{-178,-127,-224,-187,-235,-222},{-157,-169,-149,-189,-237,-147},{-211,-180,-136,-235,-138,-206}}},{{{-196,-267,-270,-189,-304,-292},{-252,-238,-243,-223,-299,-270},{-238,-289,-270,-289,-172,-211},{-181,-230,-265,-255,-172,-284},{-250,-213,-314,-270,-270,-189},{-274,-255,-274,-233,-316,-245},{-309,-277,-174,-257,-245,-316},{-260,-218,-250,-267,-206,-306},{-282,-172,-228,-277,-287,-294},{-176,-218,-260,-203,-277,-255}},{{-316,-184,-196,-208,-245,-294},{-274,-172,-289,-220,-267,-189},{-189,-225,-203,-186,-223,-174},{-279,-294,-262,-240,-247,-279},{-203,-247,-289,-225,-233,-220},{-250,-218,-230,-252,-277,-252},{-228,-292,-198,-306,-299,-252},{-186,-201,-260,-179,-270,-309},{-289,-279,-279,-196,-213,-294},{-230,-208,-250,-216,-284,-243}},{{-282,-201,-240,-203,-196,-220},{-277,-211,-304,-314,-194,-194},{-198,-270,-287,-223,-196,-262},{-174,-186,-223,-228,-260,-289},{-211,-218,-179,-257,-306,-191},{-213,-186,-243,-294,-316,-194},{-228,-228,-228,-260,-184,-282},{-255,-270,-240,-255,-186,-174},{-228,-279,-282,-270,-181,-228},{-287,-228,-265,-270,-228,-316}},{{-203,-282,-250,-267,-296,-309},{-272,-247,-260,-247,-282,-252},{-267,-230,-201,-240,-257,-225},{-279,-194,-181,-186,-225,-270},{-223,-228,-265,-257,-189,-240},{-272,-216,-252,-267,-279,-225},{-294,-230,-198,-260,-262,-174},{-174,-233,-260,-240,-194,-235},{-252,-304,-186,-184,-184,-311},{-216,-194,-255,-299,-257,-228}},{{-198,-203,-191,-311,-235,-201},{-201,-274,-198,-294,-314,-238},{-299,-316,-203,-314,-191,-292},{-294,-267,-225,-228,-306,-245},{-311,-179,-260,-299,-235,-289},{-240,-296,-211,-174,-179,-260},{-274,-189,-216,-296,-277,-252},{-201,-184,-233,-316,-235,-284},{-194,-220,-238,-216,-174,-287},{-179,-223,-208,-233,-172,-176}},{{-282,-218,-247,-172,-196,-272},{-311,-287,-318,-243,-247,-225},{-176,-301,-267,-216,-296,-235},{-245,-240,-262,-238,-240,-172},{-174,-287,-262,-176,-216,-208},{-206,-218,-311,-201,-262,-228},{-186,-218,-316,-318,-220,-189},{-301,-252,-201,-228,-279,-181},{-289,-243,-191,-311,-228,-208},{-252,-240,-184,-255,-235,-284}}},{{{-291,-298,-189,-282,-164,-270},{-164,-203,-192,-185,-210,-252},{-277,-296,-217,-171,-166,-166},{-284,-273,-289,-247,-231,-208},{-185,-222,-238,-296,-293,-293},{-192,-185,-215,-226,-268,-231},{-300,-254,-162,-229,-189,-189},{-291,-206,-169,-210,-166,-252},{-254,-252,-273,-187,-282,-189},{-173,-270,-229,-284,-238,-236}},{{-298,-273,-229,-206,-259,-178},{-187,-187,-182,-229,-203,-176},{-252,-296,-268,-185,-210,-252},{-256,-192,-236,-178,-215,-261},{-222,-296,-164,-208,-277,-240},{-215,-233,-280,-173,-243,-185},{-164,-226,-185,-222,-247,-222},{-298,-277,-266,-266,-256,-178},{-180,-226,-254,-189,-203,-194},{-252,-256,-162,-189,-296,-166}},{{-233,-189,-213,-203,-222,-300},{-289,-266,-289,-259,-182,-286},{-238,-268,-210,-215,-261,-199},{-178,-296,-182,-171,-162,-270},{-275,-261,-293,-280,-233,-194},{-213,-252,-249,-213,-298,-162},{-215,-254,-286,-217,-203,-254},{-236,-298,-247,-231,-189,-254},{-256,-182,-231,-210,-277,-162},{-194,-226,-199,-266,-289,-268}},{{-178,-277,-249,-270,-293,-275},{-192,-215,-182,-194,-176,-192},{-286,-259,-173,-201,-298,-222},{-256,-173,-268,-180,-256,-293},{-296,-201,-296,-240,-300,-180},{-236,-169,-245,-259,-284,-203},{-296,-277,-162,-282,-298,-219},{-213,-243,-194,-291,-206,-247},{-291,-173,-171,-219,-277,-199},{-240,-249,-252,-233,-222,-219}},{{-189,-280,-280,-275,-254,-300},{-173,-240,-243,-245,-249,-243},{-210,-176,-243,-229,-233,-169},{-229,-178,-213,-196,-259,-273},{-240,-199,-224,-263,-192,-236},{-300,-215,-300,-233,-293,-270},{-273,-293,-247,-176,-240,-178},{-275,-219,-268,-277,-224,-199},{-282,-208,-259,-247,-296,-219},{-252,-226,-203,-280,-291,-293}},{{-178,-201,-229,-206,-199,-291},{-187,-268,-243,-182,-240,-182},{-273,-180,-164,-300,-169,-256},{-247,-162,-275,-192,-187,-266},{-203,-243,-300,-176,-217,-176},{-270,-270,-187,-231,-219,-247},{-210,-291,-213,-164,-229,-189},{-208,-196,-268,-268,-222,-206},{-185,-192,-196,-229,-298,-166},{-166,-194,-229,-252,-164,-173}}},{{{-265,-273,-229,-268,-320,-220},{-338,-312,-212,-370,-379,-288},{-323,-247,-373,-309,-323,-303},{-229,-370,-373,-285,-226,-365},{-253,-370,-229,-312,-250,-332},{-276,-359,-344,-376,-368,-253},{-209,-344,-256,-347,-209,-320},{-350,-218,-223,-309,-288,-212},{-344,-373,-365,-350,-306,-332},{-268,-235,-320,-300,-323,-223}},{{-347,-341,-276,-226,-288,-323},{-244,-303,-279,-376,-241,-209},{-306,-223,-212,-297,-279,-323},{-273,-362,-344,-303,-350,-206},{-250,-353,-306,-244,-282,-247},{-379,-291,-329,-268,-253,-276},{-259,-300,-356,-376,-294,-373},{-347,-315,-323,-373,-344,-300},{-326,-365,-323,-273,-285,-265},{-268,-268,-359,-276,-376,-218}},{{-250,-362,-218,-256,-238,-368},{-370,-368,-253,-270,-276,-276},{-209,-235,-297,-220,-329,-347},{-270,-250,-226,-362,-223,-309},{-368,-300,-338,-332,-279,-344},{-379,-362,-282,-218,-344,-309},{-350,-326,-344,-273,-382,-373},{-218,-373,-270,-238,-235,-344},{-297,-241,-294,-253,-309,-223},{-306,-309,-344,-247,-320,-270}},{{-323,-306,-288,-365,-220,-356},{-291,-215,-318,-356,-297,-306},{-347,-259,-320,-306,-268,-244},{-215,-300,-279,-270,-370,-323},{-359,-209,-212,-223,-268,-365},{-265,-215,-315,-285,-318,-206},{-353,-365,-332,-206,-318,-226},{-356,-223,-306,-206,-276,-368},{-326,-256,-356,-332,-350,-362},{-206,-235,-270,-265,-368,-306}},{{-376,-212,-356,-223,-320,-259},{-376,-232,-329,-376,-268,-338},{-241,-256,-297,-362,-356,-300},{-341,-303,-379,-329,-344,-338},{-223,-353,-215,-315,-335,-353},{-268,-315,-376,-256,-244,-315},{-259,-309,-215,-382,-215,-218},{-350,-229,-226,-232,-232,-347},{-312,-226,-315,-265,-359,-376},{-370,-229,-312,-276,-238,-359}},{{-344,-253,-294,-303,-365,-356},{-282,-350,-229,-288,-312,-350},{-250,-382,-247,-238,-238,-276},{-238,-335,-273,-338,-347,-365},{-332,-332,-326,-218,-379,-273},{-332,-279,-326,-303,-353,-326},{-306,-332,-285,-359,-344,-315},{-329,-329,-341,-288,-294,-359},{-312,-241,-232,-344,-250,-300},{-306,-335,-362,-247,-297,-259}}}}; // supply (positive for supply and negative for demand) under different scenarios 
int iniv[I]={1841,192,221,150,198,208,315,198,294}; // initial inventory 
int ubiv[I]={2104,384,442,300,396,416,630,396,588}; // 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.32,8.46,5.6,4.24,2.89,1.51,4.53,7.74}; // 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.11,7.69,5.09,3.85,2.63,1.37,4.12,7.04}}; // 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.69,9.69,9.69,8.48,8.48,8.48,7.27,7.27,7.27,6.15,6.15,6.15,5.38,5.38,5.38,4.61,4.61,4.61,4.07,4.07,4.07,3.56,3.56,3.56,3.05,3.05,3.05,3.08,3.08,3.08,2.7,2.7,2.7,2.31,2.31,2.31,2.1,2.1,2.1,1.84,1.84,1.84,1.58,1.58,1.58,1.1,1.1,1.1,0.96,0.96,0.96,0.82,0.82,0.82,3.3,3.3,3.3,2.88,2.88,2.88,2.47,2.47,2.47,5.63,5.63,5.63,4.93,4.93,4.93,4.22,4.22,4.22}; // 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,6,15,8,5,16,8,6,17,8,6,17,9,6,16,9,6,16,8,6,17,8,6,16,8,6,17,8,6,17,9,6,17,9,6,17,9,6,17,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,9,6,17,8,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,744}}; // 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,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,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,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,1,7,13,19,25,31,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,0,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,2,6,10,14,18,22,26,30,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,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,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,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,34,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,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,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,34,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,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,34,1,7,13,19,25,31,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,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,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,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,1,5,9,13,17,21,25,29,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,7,11,15,19,23,27,31,35,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,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,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,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,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,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,4,8,12,16,20,24,28,32,3,9,15,21,27,33,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,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,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,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,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,1,7,13,19,25,31,1,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,1,7,13,19,25,31,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,3,9,15,21,27,33,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,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,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,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,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,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,5,11,17,23,29,35}; // set of end times of each shipment 
