int Dev = 20;// Deviation
extern const int CNN = 2;// 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 = 748;//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]={{{{10742,0,0,0,0,0},{10964,0,0,0,0,0},{11045,0,0,0,0,0},{11234,0,0,0,0,0},{11020,0,0,0,0,0},{10969,0,0,0,0,0},{11088,0,0,0,0,0},{10958,0,0,0,0,0},{11150,0,0,0,0,0},{10925,0,0,0,0,0}},{{11033,0,0,0,0,0},{11025,0,0,0,0,0},{11056,0,0,0,0,0},{11030,0,0,0,0,0},{11271,0,0,0,0,0},{11042,0,0,0,0,0},{10988,0,0,0,0,0},{10805,0,0,0,0,0},{10970,0,0,0,0,0},{11205,0,0,0,0,0}},{{10771,0,0,0,0,0},{11409,0,0,0,0,0},{11061,0,0,0,0,0},{10938,0,0,0,0,0},{11176,0,0,0,0,0},{10784,0,0,0,0,0},{11025,0,0,0,0,0},{11171,0,0,0,0,0},{10949,0,0,0,0,0},{11032,0,0,0,0,0}},{{10681,0,0,0,0,0},{11090,0,0,0,0,0},{11083,0,0,0,0,0},{10807,0,0,0,0,0},{10986,0,0,0,0,0},{11096,0,0,0,0,0},{11114,0,0,0,0,0},{11175,0,0,0,0,0},{11074,0,0,0,0,0},{11107,0,0,0,0,0}},{{11125,0,0,0,0,0},{11038,0,0,0,0,0},{11169,0,0,0,0,0},{11233,0,0,0,0,0},{11408,0,0,0,0,0},{11345,0,0,0,0,0},{11321,0,0,0,0,0},{10721,0,0,0,0,0},{10866,0,0,0,0,0},{10996,0,0,0,0,0}},{{10925,0,0,0,0,0},{10936,0,0,0,0,0},{10978,0,0,0,0,0},{11075,0,0,0,0,0},{11391,0,0,0,0,0},{11094,0,0,0,0,0},{11245,0,0,0,0,0},{11184,0,0,0,0,0},{10744,0,0,0,0,0},{11353,0,0,0,0,0}}},{{{-208,-242,-181,-249,-264,-190},{-208,-206,-246,-255,-202,-188},{-264,-244,-193,-188,-217,-255},{-251,-213,-222,-262,-249,-235},{-267,-213,-206,-224,-195,-228},{-246,-217,-208,-184,-199,-264},{-190,-206,-197,-181,-195,-190},{-179,-251,-224,-202,-235,-204},{-220,-267,-204,-222,-251,-262},{-242,-202,-240,-251,-184,-197}},{{-193,-179,-242,-244,-264,-235},{-220,-197,-240,-246,-193,-213},{-237,-181,-262,-195,-197,-251},{-179,-251,-197,-213,-262,-255},{-188,-204,-233,-206,-255,-211},{-193,-195,-237,-231,-181,-215},{-181,-179,-208,-204,-235,-186},{-181,-242,-211,-213,-269,-231},{-186,-220,-195,-213,-220,-255},{-190,-246,-226,-184,-251,-240}},{{-211,-264,-258,-226,-224,-190},{-233,-208,-255,-255,-186,-262},{-260,-213,-224,-213,-249,-193},{-231,-258,-262,-237,-204,-211},{-215,-204,-251,-264,-215,-231},{-195,-204,-190,-242,-246,-244},{-179,-240,-228,-215,-197,-235},{-206,-251,-211,-197,-206,-222},{-228,-240,-255,-215,-179,-255},{-260,-235,-235,-222,-222,-202}},{{-193,-193,-188,-262,-195,-197},{-269,-206,-206,-242,-199,-186},{-202,-199,-242,-235,-220,-186},{-251,-184,-211,-181,-213,-199},{-242,-262,-179,-242,-188,-269},{-262,-179,-242,-188,-258,-255},{-233,-193,-226,-235,-226,-213},{-255,-186,-231,-258,-226,-262},{-220,-267,-235,-206,-246,-242},{-213,-235,-231,-264,-228,-237}},{{-202,-217,-217,-260,-213,-262},{-204,-233,-260,-251,-217,-217},{-253,-217,-228,-181,-251,-231},{-186,-215,-213,-204,-267,-226},{-202,-249,-193,-224,-179,-199},{-195,-228,-249,-237,-213,-237},{-197,-262,-199,-226,-269,-253},{-193,-188,-211,-222,-179,-215},{-222,-211,-237,-193,-179,-262},{-237,-193,-193,-253,-255,-199}},{{-217,-220,-179,-269,-251,-228},{-190,-267,-240,-264,-211,-253},{-235,-179,-233,-202,-184,-237},{-251,-222,-267,-190,-244,-220},{-260,-233,-204,-224,-258,-226},{-186,-240,-208,-249,-249,-208},{-253,-253,-244,-195,-269,-197},{-267,-237,-255,-222,-202,-260},{-197,-222,-224,-233,-244,-202},{-240,-249,-220,-235,-267,-264}}},{{{-226,-217,-286,-226,-271,-214},{-224,-255,-190,-283,-224,-278},{-271,-245,-207,-252,-286,-207},{-224,-236,-202,-238,-286,-262},{-214,-238,-271,-269,-217,-233},{-198,-207,-257,-233,-271,-236},{-248,-236,-221,-243,-267,-228},{-269,-198,-269,-200,-233,-243},{-200,-248,-231,-221,-202,-286},{-212,-205,-243,-271,-248,-257}},{{-238,-209,-240,-269,-248,-269},{-243,-212,-217,-202,-278,-207},{-205,-271,-274,-252,-233,-248},{-233,-217,-209,-283,-209,-207},{-274,-257,-221,-248,-257,-233},{-243,-233,-250,-224,-212,-281},{-212,-281,-236,-276,-221,-212},{-257,-243,-219,-221,-255,-264},{-214,-195,-278,-221,-264,-233},{-283,-267,-209,-209,-281,-240}},{{-193,-281,-278,-190,-202,-233},{-283,-257,-255,-267,-202,-228},{-219,-198,-250,-205,-200,-202},{-259,-269,-259,-219,-209,-219},{-281,-221,-238,-231,-276,-226},{-262,-248,-240,-271,-198,-214},{-207,-255,-221,-198,-255,-209},{-238,-200,-283,-281,-233,-193},{-221,-205,-236,-245,-252,-259},{-205,-202,-190,-236,-228,-286}},{{-248,-252,-193,-274,-240,-205},{-262,-193,-276,-257,-224,-243},{-264,-278,-255,-264,-267,-276},{-236,-252,-255,-217,-248,-231},{-250,-231,-245,-200,-283,-283},{-233,-209,-221,-243,-212,-281},{-193,-228,-264,-271,-190,-286},{-262,-243,-193,-207,-262,-264},{-255,-269,-226,-212,-252,-250},{-221,-286,-257,-214,-250,-214}},{{-243,-224,-259,-276,-195,-207},{-207,-224,-259,-276,-209,-228},{-264,-271,-276,-209,-264,-264},{-219,-269,-195,-278,-250,-195},{-238,-195,-233,-238,-214,-240},{-193,-212,-276,-248,-243,-217},{-269,-238,-250,-267,-271,-248},{-231,-269,-209,-193,-257,-193},{-255,-205,-271,-269,-228,-255},{-224,-212,-259,-193,-278,-274}},{{-243,-219,-200,-224,-250,-250},{-195,-245,-286,-264,-224,-281},{-257,-214,-276,-238,-264,-231},{-193,-257,-209,-245,-202,-198},{-269,-250,-226,-257,-276,-286},{-221,-228,-262,-248,-283,-190},{-278,-248,-262,-198,-252,-195},{-231,-219,-217,-226,-274,-205},{-264,-214,-257,-286,-190,-195},{-259,-226,-264,-195,-207,-281}}},{{{-246,-240,-235,-224,-300,-295},{-243,-229,-308,-232,-259,-317},{-248,-227,-265,-328,-240,-224},{-292,-240,-328,-295,-319,-317},{-224,-284,-243,-221,-251,-319},{-273,-221,-265,-251,-246,-317},{-328,-259,-221,-284,-289,-319},{-262,-238,-311,-235,-289,-254},{-268,-278,-227,-328,-319,-273},{-240,-221,-262,-325,-224,-238}},{{-278,-328,-300,-227,-224,-246},{-243,-281,-322,-287,-221,-281},{-218,-224,-328,-311,-292,-298},{-221,-238,-246,-238,-322,-328},{-281,-251,-265,-317,-235,-298},{-276,-251,-251,-308,-306,-270},{-270,-221,-240,-262,-311,-292},{-276,-289,-276,-227,-238,-262},{-281,-273,-308,-278,-259,-238},{-240,-303,-227,-270,-273,-317}},{{-229,-262,-232,-218,-317,-292},{-232,-319,-298,-265,-262,-232},{-224,-289,-221,-246,-298,-248},{-243,-276,-278,-259,-325,-221},{-287,-251,-328,-300,-259,-259},{-227,-227,-246,-229,-319,-246},{-270,-238,-308,-276,-287,-328},{-270,-328,-328,-322,-229,-319},{-328,-218,-238,-303,-298,-287},{-221,-229,-257,-278,-221,-298}},{{-238,-238,-278,-240,-240,-221},{-254,-262,-232,-251,-257,-311},{-314,-224,-257,-229,-276,-268},{-238,-227,-251,-224,-311,-281},{-240,-240,-229,-221,-248,-328},{-284,-251,-295,-306,-308,-270},{-238,-238,-229,-292,-306,-268},{-276,-251,-298,-232,-287,-298},{-308,-229,-262,-254,-243,-257},{-322,-273,-227,-221,-265,-287}},{{-298,-265,-246,-287,-257,-292},{-322,-284,-238,-295,-328,-319},{-276,-295,-284,-262,-276,-317},{-240,-276,-254,-292,-295,-308},{-300,-317,-319,-300,-227,-322},{-284,-300,-281,-311,-292,-319},{-281,-246,-292,-317,-281,-328},{-259,-292,-314,-240,-328,-295},{-289,-243,-246,-221,-246,-254},{-257,-240,-229,-314,-317,-273}},{{-322,-270,-218,-306,-298,-259},{-268,-322,-300,-243,-246,-262},{-289,-218,-259,-270,-257,-295},{-317,-248,-218,-322,-259,-311},{-276,-278,-292,-248,-259,-319},{-322,-292,-289,-265,-289,-295},{-259,-218,-298,-322,-224,-314},{-298,-240,-224,-322,-298,-311},{-298,-276,-254,-229,-306,-229},{-311,-298,-284,-259,-270,-284}}},{{{-149,-146,-159,-140,-172,-137},{-171,-177,-126,-165,-180,-166},{-163,-125,-146,-132,-183,-177},{-169,-151,-166,-148,-151,-146},{-126,-182,-176,-162,-137,-179},{-128,-123,-177,-174,-180,-146},{-146,-123,-151,-176,-166,-182},{-139,-156,-151,-183,-172,-149},{-185,-176,-159,-123,-166,-137},{-123,-166,-183,-131,-157,-159}},{{-174,-176,-165,-146,-125,-139},{-126,-169,-151,-157,-183,-126},{-125,-139,-149,-162,-171,-146},{-134,-180,-179,-180,-140,-162},{-156,-152,-185,-168,-146,-157},{-151,-171,-146,-123,-128,-145},{-182,-131,-179,-172,-163,-125},{-185,-146,-143,-168,-128,-174},{-156,-157,-171,-172,-136,-148},{-128,-156,-169,-172,-151,-148}},{{-152,-136,-185,-145,-163,-128},{-171,-156,-143,-134,-177,-128},{-162,-142,-145,-172,-183,-149},{-172,-152,-128,-139,-131,-172},{-136,-139,-180,-128,-148,-179},{-149,-163,-156,-139,-160,-168},{-182,-157,-157,-169,-132,-171},{-177,-132,-129,-162,-156,-185},{-169,-146,-145,-183,-179,-145},{-182,-131,-126,-183,-168,-140}},{{-156,-174,-151,-137,-140,-146},{-126,-162,-128,-123,-185,-166},{-146,-177,-176,-152,-151,-134},{-123,-157,-168,-149,-142,-156},{-159,-183,-139,-160,-182,-129},{-163,-168,-163,-179,-180,-125},{-140,-132,-143,-182,-169,-165},{-160,-165,-145,-129,-160,-180},{-159,-169,-180,-126,-148,-157},{-168,-166,-156,-129,-169,-182}},{{-177,-159,-169,-157,-182,-151},{-183,-131,-134,-139,-183,-145},{-166,-168,-145,-152,-139,-185},{-149,-136,-126,-129,-151,-159},{-166,-180,-174,-151,-159,-160},{-148,-162,-143,-162,-179,-183},{-134,-165,-154,-143,-166,-151},{-149,-165,-152,-176,-154,-123},{-137,-137,-149,-136,-128,-129},{-156,-128,-156,-179,-180,-183}},{{-148,-152,-179,-176,-169,-139},{-154,-146,-148,-149,-183,-126},{-177,-154,-146,-179,-145,-134},{-174,-176,-162,-154,-140,-145},{-163,-136,-129,-132,-132,-151},{-171,-142,-163,-145,-179,-163},{-168,-142,-134,-160,-180,-179},{-177,-166,-143,-126,-132,-165},{-179,-132,-169,-129,-125,-140},{-143,-137,-159,-176,-172,-163}}},{{{-167,-178,-204,-155,-169,-166},{-157,-151,-178,-162,-153,-198},{-202,-155,-151,-186,-149,-191},{-158,-162,-147,-184,-149,-184},{-149,-197,-211,-158,-193,-217},{-193,-180,-180,-211,-151,-206},{-151,-198,-187,-180,-164,-164},{-177,-186,-197,-200,-215,-175},{-158,-177,-149,-151,-157,-197},{-204,-157,-213,-193,-158,-195}},{{-160,-182,-211,-158,-151,-146},{-157,-166,-177,-175,-147,-147},{-200,-186,-211,-206,-200,-197},{-164,-200,-147,-209,-177,-173},{-184,-207,-202,-175,-184,-211},{-184,-209,-169,-153,-146,-167},{-158,-191,-211,-182,-180,-189},{-182,-184,-193,-197,-175,-202},{-171,-217,-204,-187,-180,-191},{-164,-178,-164,-189,-197,-204}},{{-160,-184,-202,-167,-146,-146},{-195,-175,-215,-147,-186,-218},{-213,-175,-209,-171,-207,-206},{-204,-217,-178,-178,-187,-157},{-151,-158,-157,-169,-146,-218},{-149,-211,-146,-217,-160,-155},{-184,-167,-209,-182,-178,-217},{-207,-151,-162,-175,-182,-191},{-184,-187,-178,-175,-166,-157},{-193,-184,-157,-177,-146,-164}},{{-207,-177,-195,-149,-195,-218},{-155,-157,-153,-207,-155,-209},{-182,-162,-182,-160,-160,-147},{-158,-162,-198,-215,-207,-182},{-180,-149,-147,-166,-209,-167},{-153,-157,-178,-202,-158,-193},{-213,-151,-213,-180,-177,-206},{-164,-198,-195,-211,-209,-207},{-175,-158,-166,-155,-167,-146},{-204,-166,-202,-164,-153,-202}},{{-177,-217,-169,-175,-162,-218},{-149,-146,-217,-147,-198,-155},{-215,-182,-207,-204,-162,-213},{-198,-171,-206,-207,-182,-166},{-197,-160,-155,-171,-202,-151},{-215,-167,-169,-155,-177,-195},{-171,-149,-211,-162,-171,-189},{-197,-187,-151,-217,-153,-151},{-191,-187,-211,-175,-160,-209},{-175,-200,-169,-204,-153,-155}},{{-209,-191,-157,-209,-187,-209},{-198,-149,-158,-173,-177,-213},{-178,-184,-211,-177,-189,-155},{-217,-195,-158,-166,-153,-195},{-218,-147,-213,-184,-178,-169},{-157,-202,-184,-187,-195,-157},{-175,-211,-146,-211,-209,-186},{-180,-155,-197,-211,-191,-173},{-147,-178,-198,-211,-187,-166},{-147,-169,-215,-175,-206,-217}}},{{{-284,-294,-218,-228,-282,-277},{-228,-211,-274,-238,-228,-260},{-247,-270,-250,-211,-277,-233},{-233,-245,-216,-240,-262,-228},{-206,-247,-274,-218,-262,-235},{-252,-245,-201,-282,-201,-294},{-289,-247,-262,-198,-245,-230},{-208,-247,-272,-257,-206,-247},{-233,-250,-203,-201,-282,-201},{-208,-287,-252,-240,-240,-243}},{{-245,-230,-243,-284,-250,-274},{-292,-292,-218,-223,-267,-257},{-213,-228,-213,-262,-250,-267},{-213,-279,-243,-225,-238,-284},{-262,-247,-284,-216,-225,-235},{-294,-267,-228,-201,-272,-196},{-250,-287,-235,-198,-223,-218},{-208,-277,-230,-235,-252,-206},{-252,-233,-274,-201,-245,-250},{-208,-218,-245,-294,-216,-284}},{{-216,-225,-216,-289,-223,-255},{-262,-287,-216,-289,-255,-274},{-240,-230,-274,-274,-238,-287},{-265,-206,-240,-289,-228,-238},{-216,-289,-238,-289,-211,-272},{-294,-201,-201,-287,-284,-284},{-196,-272,-208,-252,-279,-201},{-218,-240,-294,-274,-245,-294},{-270,-245,-208,-218,-213,-270},{-265,-211,-287,-270,-211,-228}},{{-257,-206,-223,-211,-240,-265},{-225,-245,-294,-233,-196,-238},{-203,-292,-289,-252,-211,-287},{-252,-279,-201,-206,-277,-274},{-233,-203,-279,-223,-289,-279},{-238,-279,-272,-216,-240,-247},{-289,-201,-243,-213,-201,-279},{-252,-228,-245,-255,-220,-233},{-289,-255,-265,-216,-247,-208},{-294,-228,-279,-250,-292,-228}},{{-230,-243,-274,-252,-201,-218},{-272,-223,-270,-220,-282,-272},{-201,-206,-274,-218,-279,-223},{-252,-262,-289,-230,-279,-272},{-208,-274,-294,-247,-267,-289},{-243,-238,-220,-272,-294,-277},{-198,-247,-267,-274,-294,-196},{-247,-279,-274,-223,-250,-201},{-250,-294,-250,-265,-238,-216},{-213,-277,-220,-206,-252,-282}},{{-235,-225,-230,-260,-260,-225},{-203,-235,-274,-279,-218,-203},{-277,-245,-255,-196,-265,-255},{-252,-225,-208,-274,-270,-262},{-211,-274,-272,-287,-211,-274},{-255,-252,-260,-252,-230,-274},{-292,-206,-198,-208,-213,-223},{-230,-245,-265,-213,-240,-201},{-198,-260,-265,-255,-257,-198},{-289,-201,-201,-211,-230,-292}}},{{{-208,-196,-233,-199,-199,-224},{-233,-231,-217,-273,-194,-252},{-252,-238,-189,-259,-233,-275},{-252,-254,-231,-238,-268,-217},{-249,-238,-268,-210,-270,-189},{-233,-261,-245,-245,-224,-268},{-201,-263,-277,-219,-256,-229},{-201,-199,-236,-252,-275,-192},{-229,-206,-277,-275,-187,-273},{-254,-189,-256,-229,-187,-224}},{{-213,-219,-277,-252,-219,-259},{-233,-201,-275,-245,-224,-208},{-273,-229,-231,-270,-185,-247},{-201,-203,-240,-240,-226,-245},{-236,-192,-254,-270,-252,-277},{-256,-252,-266,-277,-243,-229},{-254,-196,-259,-219,-256,-224},{-185,-187,-263,-194,-199,-203},{-185,-245,-219,-213,-219,-275},{-261,-273,-270,-210,-231,-243}},{{-240,-199,-201,-238,-215,-217},{-252,-259,-203,-206,-231,-273},{-201,-240,-245,-229,-277,-226},{-194,-238,-266,-215,-196,-254},{-252,-240,-206,-243,-268,-189},{-185,-189,-199,-275,-196,-201},{-192,-196,-189,-245,-226,-206},{-224,-268,-224,-268,-213,-231},{-240,-233,-199,-263,-192,-208},{-238,-256,-233,-208,-192,-268}},{{-189,-206,-240,-219,-261,-189},{-245,-219,-263,-231,-273,-256},{-266,-261,-263,-249,-240,-206},{-219,-240,-273,-194,-277,-206},{-203,-219,-245,-185,-215,-249},{-185,-231,-206,-213,-185,-233},{-233,-213,-240,-187,-201,-277},{-266,-261,-210,-208,-213,-245},{-210,-263,-247,-222,-261,-245},{-185,-219,-201,-213,-245,-277}},{{-208,-224,-210,-229,-187,-256},{-199,-233,-189,-185,-203,-254},{-187,-224,-247,-224,-238,-203},{-215,-266,-252,-249,-215,-213},{-259,-229,-245,-263,-263,-247},{-238,-238,-219,-201,-277,-245},{-259,-254,-254,-252,-245,-192},{-203,-203,-243,-213,-233,-231},{-245,-256,-192,-199,-256,-199},{-199,-256,-273,-210,-247,-203}},{{-236,-189,-231,-206,-240,-196},{-219,-222,-213,-199,-187,-196},{-210,-210,-261,-224,-238,-247},{-208,-213,-252,-240,-185,-273},{-277,-245,-275,-243,-263,-252},{-210,-208,-213,-185,-201,-270},{-256,-194,-275,-252,-213,-270},{-233,-263,-231,-249,-273,-256},{-187,-270,-270,-185,-189,-194},{-270,-203,-243,-249,-249,-259}}},{{{-300,-300,-273,-253,-256,-262},{-335,-291,-303,-282,-318,-265},{-291,-282,-335,-300,-256,-326},{-259,-279,-291,-265,-320,-350},{-294,-315,-338,-259,-282,-262},{-247,-256,-323,-312,-244,-294},{-238,-350,-353,-344,-279,-318},{-329,-250,-279,-256,-318,-338},{-347,-353,-306,-303,-347,-235},{-315,-294,-347,-326,-265,-268}},{{-241,-303,-250,-323,-320,-265},{-350,-341,-265,-285,-315,-350},{-270,-265,-329,-238,-235,-282},{-350,-326,-300,-326,-244,-294},{-326,-326,-235,-291,-262,-320},{-353,-344,-350,-268,-247,-250},{-303,-341,-309,-285,-350,-291},{-259,-253,-262,-306,-350,-285},{-306,-312,-241,-262,-276,-341},{-303,-315,-282,-279,-291,-306}},{{-265,-341,-279,-347,-279,-312},{-312,-282,-338,-320,-294,-312},{-279,-329,-315,-297,-338,-256},{-265,-294,-332,-235,-294,-235},{-344,-291,-303,-273,-344,-262},{-265,-332,-279,-329,-309,-253},{-318,-329,-294,-315,-344,-312},{-250,-323,-297,-273,-244,-265},{-288,-250,-247,-315,-323,-291},{-335,-347,-350,-332,-285,-338}},{{-300,-288,-344,-318,-297,-288},{-323,-294,-297,-323,-344,-335},{-241,-306,-291,-312,-273,-256},{-262,-270,-259,-318,-320,-253},{-268,-341,-294,-347,-279,-285},{-294,-276,-347,-341,-315,-262},{-320,-326,-344,-344,-291,-312},{-335,-247,-288,-300,-270,-285},{-344,-300,-235,-320,-332,-276},{-282,-279,-259,-273,-253,-344}},{{-350,-270,-238,-326,-353,-323},{-350,-268,-294,-241,-303,-282},{-241,-241,-312,-279,-350,-265},{-320,-326,-270,-335,-273,-353},{-276,-318,-341,-323,-318,-332},{-285,-335,-294,-320,-262,-297},{-291,-241,-244,-256,-347,-350},{-238,-344,-241,-247,-332,-256},{-241,-262,-350,-282,-318,-318},{-288,-259,-270,-256,-344,-303}},{{-238,-265,-235,-253,-344,-309},{-315,-300,-303,-256,-303,-276},{-247,-282,-320,-353,-279,-247},{-350,-270,-306,-312,-297,-270},{-265,-326,-241,-329,-300,-253},{-300,-353,-262,-259,-250,-291},{-303,-315,-253,-332,-347,-315},{-344,-273,-241,-318,-294,-291},{-256,-309,-341,-285,-259,-285},{-265,-344,-262,-326,-238,-329}}}}; // 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,16,8,5,16,8,6,16,8,6,17,8,6,17,9,6,17,8,6,17,9,6,17,8,6,16,8,6,17,9,6,18,9,6,18,9,6,18,9,6,18,9,6,17,9,6,17,9,6,17,9,6,17,8,6,16,8,6,16,8,6,17,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,746,747}}; // set of shipments in each bid 
int SHsts[SPN]={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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,0,4,8,12,16,20,24,28,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,2,6,10,14,18,22,26,30,1,7,13,19,25,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,0,6,12,18,24,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,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,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,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,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,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,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,34,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,34,0,4,8,12,16,20,24,28,32,1,7,13,19,25,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,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,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,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,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,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,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,0,6,12,18,24,30}; // 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,7,11,15,19,23,27,31,35,5,11,17,23,29,35,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,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,7,11,15,19,23,27,31,35,6,12,18,24,30,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,3,9,15,21,27,33,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,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,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,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,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,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,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,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,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,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,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,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,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,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,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,5,11,17,23,29,35,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}; // set of end times of each shipment 
