int Dev = 20;// 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 = 749;//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]={{{{11170,0,0,0,0,0},{10950,0,0,0,0,0},{10955,0,0,0,0,0},{11231,0,0,0,0,0},{11222,0,0,0,0,0},{10981,0,0,0,0,0},{10861,0,0,0,0,0},{11030,0,0,0,0,0},{10833,0,0,0,0,0},{10902,0,0,0,0,0}},{{11091,0,0,0,0,0},{11022,0,0,0,0,0},{11235,0,0,0,0,0},{11102,0,0,0,0,0},{10988,0,0,0,0,0},{10763,0,0,0,0,0},{10944,0,0,0,0,0},{11147,0,0,0,0,0},{10750,0,0,0,0,0},{11227,0,0,0,0,0}},{{11226,0,0,0,0,0},{11327,0,0,0,0,0},{11344,0,0,0,0,0},{11002,0,0,0,0,0},{10841,0,0,0,0,0},{11299,0,0,0,0,0},{11438,0,0,0,0,0},{10854,0,0,0,0,0},{11066,0,0,0,0,0},{11170,0,0,0,0,0}},{{10874,0,0,0,0,0},{11164,0,0,0,0,0},{11246,0,0,0,0,0},{11115,0,0,0,0,0},{11023,0,0,0,0,0},{11268,0,0,0,0,0},{11123,0,0,0,0,0},{10549,0,0,0,0,0},{10873,0,0,0,0,0},{10970,0,0,0,0,0}},{{11083,0,0,0,0,0},{11520,0,0,0,0,0},{10932,0,0,0,0,0},{11061,0,0,0,0,0},{10791,0,0,0,0,0},{11206,0,0,0,0,0},{11017,0,0,0,0,0},{11108,0,0,0,0,0},{11083,0,0,0,0,0},{10916,0,0,0,0,0}},{{10845,0,0,0,0,0},{11463,0,0,0,0,0},{11074,0,0,0,0,0},{11330,0,0,0,0,0},{11215,0,0,0,0,0},{11174,0,0,0,0,0},{10988,0,0,0,0,0},{10887,0,0,0,0,0},{11020,0,0,0,0,0},{11207,0,0,0,0,0}}},{{{-199,-258,-188,-251,-204,-197},{-260,-199,-197,-195,-260,-264},{-181,-181,-217,-249,-251,-202},{-231,-231,-186,-233,-264,-204},{-213,-251,-222,-249,-190,-233},{-188,-206,-181,-199,-258,-195},{-269,-237,-220,-213,-258,-269},{-264,-197,-242,-184,-249,-208},{-269,-246,-237,-213,-262,-181},{-240,-251,-202,-226,-244,-235}},{{-249,-246,-220,-255,-204,-217},{-267,-190,-231,-251,-193,-204},{-253,-240,-255,-242,-199,-202},{-255,-231,-211,-262,-244,-240},{-226,-226,-244,-237,-262,-244},{-237,-199,-202,-226,-215,-233},{-193,-208,-211,-184,-255,-233},{-222,-249,-260,-246,-199,-206},{-244,-204,-211,-206,-186,-186},{-215,-242,-244,-186,-240,-199}},{{-195,-269,-264,-211,-224,-222},{-237,-204,-269,-206,-186,-258},{-262,-244,-190,-184,-213,-195},{-246,-206,-224,-262,-184,-211},{-204,-193,-220,-249,-240,-188},{-208,-197,-237,-190,-186,-246},{-226,-251,-269,-267,-195,-242},{-231,-181,-179,-204,-251,-195},{-240,-211,-258,-222,-195,-267},{-188,-190,-233,-193,-237,-220}},{{-233,-188,-264,-220,-269,-267},{-269,-213,-215,-260,-199,-211},{-233,-208,-231,-208,-235,-226},{-237,-199,-190,-217,-215,-213},{-206,-199,-197,-246,-211,-244},{-260,-208,-179,-222,-237,-262},{-211,-220,-269,-195,-226,-240},{-181,-224,-184,-220,-179,-184},{-204,-260,-195,-253,-255,-264},{-193,-190,-233,-240,-224,-206}},{{-253,-246,-213,-197,-206,-197},{-224,-249,-258,-244,-213,-260},{-242,-213,-217,-269,-233,-202},{-208,-249,-195,-202,-242,-179},{-242,-262,-220,-208,-237,-211},{-260,-190,-226,-260,-244,-220},{-206,-246,-246,-206,-184,-226},{-244,-179,-195,-242,-258,-195},{-222,-260,-237,-204,-258,-258},{-197,-262,-215,-213,-249,-226}},{{-199,-190,-246,-258,-231,-202},{-235,-222,-262,-179,-226,-231},{-199,-179,-269,-226,-242,-208},{-269,-181,-240,-260,-184,-240},{-215,-217,-235,-202,-235,-249},{-184,-260,-213,-253,-269,-199},{-208,-213,-220,-240,-204,-246},{-269,-260,-231,-242,-179,-184},{-220,-240,-260,-246,-226,-260},{-186,-228,-255,-206,-246,-237}}},{{{-278,-209,-209,-226,-274,-286},{-269,-195,-257,-259,-205,-231},{-243,-190,-212,-233,-269,-255},{-231,-278,-219,-267,-231,-274},{-264,-236,-198,-205,-262,-195},{-269,-274,-228,-262,-224,-278},{-231,-214,-228,-264,-262,-231},{-198,-276,-221,-226,-209,-221},{-193,-259,-207,-205,-238,-212},{-252,-269,-207,-283,-193,-198}},{{-200,-202,-276,-205,-245,-286},{-236,-233,-226,-219,-281,-205},{-217,-281,-274,-238,-221,-236},{-255,-250,-221,-278,-264,-193},{-212,-190,-248,-281,-243,-240},{-281,-198,-226,-257,-224,-217},{-283,-264,-221,-243,-190,-214},{-283,-248,-193,-205,-228,-190},{-252,-257,-281,-262,-207,-205},{-262,-221,-243,-231,-214,-262}},{{-217,-250,-255,-195,-219,-262},{-281,-255,-262,-233,-198,-202},{-259,-281,-283,-250,-278,-245},{-248,-252,-231,-219,-248,-243},{-236,-271,-198,-259,-219,-286},{-236,-233,-286,-240,-281,-267},{-209,-198,-278,-207,-276,-267},{-205,-205,-286,-240,-200,-231},{-221,-269,-207,-217,-262,-243},{-209,-252,-276,-274,-238,-193}},{{-257,-286,-224,-267,-198,-217},{-267,-217,-257,-214,-262,-212},{-250,-276,-281,-240,-214,-226},{-231,-195,-236,-243,-221,-190},{-252,-259,-202,-214,-278,-240},{-233,-205,-212,-233,-271,-276},{-259,-245,-217,-202,-224,-243},{-233,-264,-233,-233,-212,-271},{-269,-252,-240,-278,-217,-205},{-278,-252,-255,-286,-195,-240}},{{-212,-190,-264,-243,-281,-240},{-243,-278,-267,-245,-274,-214},{-283,-267,-281,-221,-286,-224},{-274,-248,-195,-231,-193,-212},{-238,-193,-286,-233,-212,-243},{-264,-202,-198,-224,-271,-286},{-257,-224,-209,-233,-240,-281},{-217,-195,-243,-255,-226,-231},{-248,-274,-264,-195,-281,-214},{-281,-221,-245,-267,-262,-224}},{{-248,-257,-205,-236,-238,-195},{-281,-200,-274,-250,-195,-248},{-264,-267,-236,-252,-209,-267},{-212,-264,-248,-264,-200,-262},{-202,-274,-257,-214,-267,-252},{-267,-219,-209,-281,-274,-236},{-278,-276,-202,-281,-209,-212},{-193,-252,-228,-214,-195,-245},{-226,-283,-193,-236,-190,-243},{-278,-259,-240,-209,-248,-238}}},{{{-276,-257,-295,-254,-227,-259},{-276,-289,-306,-308,-317,-270},{-251,-300,-248,-243,-227,-317},{-319,-317,-292,-246,-229,-276},{-284,-311,-276,-248,-270,-314},{-262,-303,-278,-268,-328,-246},{-229,-311,-265,-224,-303,-284},{-278,-268,-322,-325,-257,-273},{-265,-232,-287,-298,-227,-248},{-229,-322,-240,-235,-265,-254}},{{-229,-306,-308,-276,-243,-259},{-306,-287,-240,-292,-287,-265},{-298,-306,-243,-235,-306,-257},{-325,-281,-322,-221,-221,-257},{-251,-246,-238,-259,-243,-278},{-229,-238,-300,-284,-289,-257},{-248,-265,-248,-278,-248,-278},{-254,-246,-257,-311,-262,-227},{-317,-278,-273,-317,-224,-251},{-308,-289,-317,-262,-257,-292}},{{-254,-292,-248,-287,-246,-229},{-243,-322,-238,-243,-268,-292},{-265,-314,-314,-287,-311,-289},{-243,-240,-218,-224,-317,-268},{-281,-248,-319,-314,-254,-238},{-314,-328,-268,-257,-317,-276},{-289,-289,-319,-246,-262,-314},{-243,-251,-306,-281,-317,-243},{-232,-289,-259,-259,-248,-238},{-265,-303,-287,-265,-319,-273}},{{-246,-262,-292,-276,-317,-314},{-292,-308,-317,-273,-243,-254},{-289,-254,-281,-254,-298,-251},{-248,-314,-232,-268,-317,-265},{-281,-306,-292,-295,-227,-278},{-248,-300,-224,-265,-273,-328},{-238,-227,-278,-311,-281,-278},{-287,-298,-254,-218,-257,-248},{-232,-259,-240,-221,-314,-303},{-251,-314,-300,-287,-265,-303}},{{-276,-306,-232,-278,-254,-235},{-278,-276,-322,-227,-292,-311},{-246,-319,-232,-251,-224,-259},{-268,-319,-281,-317,-292,-287},{-270,-248,-229,-251,-259,-306},{-314,-221,-224,-227,-319,-306},{-235,-287,-235,-232,-262,-281},{-311,-254,-232,-311,-270,-281},{-314,-257,-248,-218,-322,-308},{-278,-270,-218,-243,-251,-325}},{{-254,-311,-246,-238,-229,-270},{-284,-268,-325,-311,-325,-265},{-240,-328,-325,-317,-238,-254},{-281,-254,-295,-278,-224,-257},{-328,-218,-262,-238,-281,-268},{-254,-325,-243,-270,-240,-295},{-311,-251,-238,-284,-306,-319},{-257,-298,-306,-287,-259,-276},{-276,-328,-224,-278,-248,-240},{-303,-295,-273,-287,-235,-311}}},{{{-171,-148,-157,-128,-169,-165},{-162,-145,-145,-160,-162,-139},{-128,-137,-139,-123,-176,-172},{-165,-148,-182,-129,-169,-176},{-128,-125,-142,-123,-131,-145},{-174,-145,-163,-140,-152,-171},{-157,-123,-152,-136,-148,-123},{-143,-139,-143,-171,-136,-149},{-142,-149,-142,-123,-160,-169},{-176,-123,-151,-179,-131,-137}},{{-139,-171,-182,-151,-180,-137},{-128,-183,-152,-185,-149,-172},{-151,-143,-126,-134,-163,-136},{-176,-168,-165,-168,-166,-137},{-182,-151,-183,-142,-182,-180},{-129,-140,-151,-165,-168,-162},{-168,-145,-123,-152,-137,-139},{-139,-159,-179,-168,-125,-140},{-154,-134,-146,-185,-128,-134},{-182,-125,-142,-151,-136,-131}},{{-146,-151,-159,-165,-177,-182},{-171,-185,-156,-157,-174,-159},{-142,-176,-140,-165,-162,-169},{-157,-183,-148,-152,-128,-148},{-152,-159,-179,-163,-177,-166},{-185,-160,-129,-134,-131,-149},{-180,-125,-136,-182,-145,-142},{-136,-145,-152,-165,-172,-169},{-166,-171,-137,-168,-177,-132},{-162,-176,-136,-151,-159,-160}},{{-132,-143,-140,-142,-154,-172},{-177,-154,-123,-132,-171,-182},{-156,-179,-159,-126,-140,-126},{-134,-185,-129,-162,-183,-182},{-162,-185,-129,-131,-145,-129},{-171,-171,-176,-172,-156,-179},{-152,-154,-174,-171,-143,-165},{-143,-132,-131,-142,-154,-146},{-123,-149,-160,-156,-128,-157},{-162,-160,-140,-128,-126,-177}},{{-162,-149,-140,-129,-163,-134},{-174,-143,-125,-152,-174,-162},{-131,-126,-123,-163,-137,-126},{-154,-180,-160,-151,-166,-146},{-148,-162,-166,-169,-131,-139},{-142,-145,-151,-169,-183,-171},{-169,-177,-125,-169,-182,-128},{-182,-134,-131,-142,-172,-165},{-146,-139,-134,-123,-165,-174},{-159,-177,-139,-157,-139,-162}},{{-179,-177,-177,-166,-166,-165},{-183,-174,-182,-123,-185,-174},{-143,-140,-140,-163,-137,-136},{-179,-183,-134,-163,-177,-149},{-129,-137,-160,-177,-128,-169},{-149,-129,-137,-156,-137,-159},{-160,-145,-172,-154,-165,-152},{-168,-149,-157,-163,-123,-128},{-160,-137,-163,-154,-174,-131},{-140,-128,-129,-163,-123,-134}}},{{{-204,-191,-211,-167,-166,-191},{-157,-175,-149,-198,-198,-177},{-160,-169,-218,-198,-175,-187},{-215,-151,-213,-171,-215,-166},{-157,-209,-169,-167,-218,-167},{-200,-157,-215,-200,-211,-182},{-166,-175,-182,-184,-215,-157},{-153,-218,-182,-164,-204,-178},{-169,-169,-158,-209,-191,-147},{-155,-167,-209,-162,-171,-211}},{{-218,-202,-191,-189,-197,-189},{-198,-157,-184,-169,-157,-206},{-166,-193,-187,-186,-187,-200},{-198,-153,-202,-151,-160,-173},{-171,-177,-200,-157,-178,-151},{-195,-167,-146,-162,-177,-160},{-149,-204,-186,-213,-167,-177},{-200,-162,-211,-202,-213,-171},{-151,-178,-180,-187,-178,-189},{-200,-177,-173,-147,-167,-193}},{{-155,-151,-160,-218,-207,-193},{-158,-173,-204,-178,-207,-153},{-173,-206,-204,-158,-167,-184},{-213,-200,-166,-195,-157,-151},{-155,-162,-178,-186,-151,-173},{-187,-193,-204,-195,-166,-177},{-217,-169,-218,-171,-167,-202},{-217,-149,-186,-215,-147,-184},{-182,-162,-215,-186,-206,-204},{-202,-166,-202,-197,-217,-146}},{{-184,-146,-167,-180,-169,-155},{-191,-153,-207,-160,-215,-206},{-189,-217,-197,-180,-211,-177},{-213,-213,-209,-160,-158,-180},{-162,-209,-215,-149,-217,-187},{-206,-202,-177,-215,-157,-178},{-211,-206,-158,-217,-189,-160},{-186,-169,-198,-146,-149,-146},{-186,-158,-206,-187,-155,-162},{-217,-180,-191,-169,-149,-186}},{{-180,-162,-164,-204,-186,-215},{-146,-175,-153,-175,-184,-193},{-209,-193,-153,-213,-204,-149},{-184,-215,-204,-151,-200,-151},{-178,-157,-158,-171,-175,-209},{-202,-162,-217,-167,-184,-167},{-213,-166,-202,-171,-211,-167},{-198,-206,-211,-200,-146,-209},{-204,-169,-207,-184,-202,-175},{-184,-207,-157,-191,-146,-175}},{{-178,-155,-184,-146,-147,-178},{-158,-189,-175,-167,-218,-187},{-187,-171,-155,-213,-202,-166},{-215,-200,-209,-197,-184,-180},{-200,-169,-207,-151,-206,-200},{-158,-155,-146,-206,-158,-200},{-207,-171,-184,-147,-198,-164},{-202,-213,-147,-202,-198,-151},{-184,-184,-187,-213,-164,-164},{-162,-200,-198,-155,-215,-157}}},{{{-218,-289,-203,-198,-245,-211},{-240,-265,-238,-240,-282,-201},{-196,-208,-289,-279,-294,-243},{-287,-279,-267,-279,-274,-228},{-243,-287,-252,-252,-218,-274},{-216,-252,-272,-201,-203,-287},{-198,-196,-206,-235,-233,-216},{-238,-255,-267,-223,-238,-250},{-208,-211,-289,-250,-284,-279},{-223,-233,-265,-255,-240,-245}},{{-287,-262,-218,-228,-267,-223},{-233,-277,-294,-203,-250,-228},{-225,-223,-262,-247,-274,-279},{-245,-213,-292,-238,-274,-228},{-196,-208,-287,-208,-216,-243},{-208,-294,-225,-203,-206,-238},{-203,-223,-274,-240,-282,-240},{-265,-225,-279,-235,-287,-284},{-260,-260,-257,-211,-228,-213},{-292,-282,-206,-277,-201,-277}},{{-292,-284,-228,-230,-282,-228},{-245,-228,-201,-279,-260,-270},{-292,-252,-233,-267,-206,-196},{-267,-223,-206,-235,-292,-289},{-203,-216,-287,-203,-274,-198},{-218,-282,-274,-201,-262,-203},{-228,-287,-272,-267,-260,-292},{-245,-211,-287,-238,-245,-260},{-250,-196,-279,-267,-218,-218},{-294,-238,-196,-262,-257,-284}},{{-218,-213,-235,-282,-208,-235},{-284,-218,-223,-216,-228,-228},{-228,-282,-274,-257,-245,-289},{-228,-223,-211,-265,-228,-294},{-294,-196,-284,-233,-220,-294},{-196,-260,-267,-274,-289,-250},{-238,-220,-255,-216,-287,-245},{-287,-262,-252,-218,-198,-211},{-252,-213,-257,-238,-211,-257},{-282,-250,-289,-233,-203,-196}},{{-274,-247,-247,-284,-206,-260},{-262,-282,-247,-203,-279,-238},{-292,-203,-262,-218,-196,-203},{-260,-247,-262,-284,-245,-216},{-267,-233,-272,-228,-260,-213},{-260,-233,-274,-223,-284,-250},{-218,-260,-284,-270,-233,-270},{-240,-284,-294,-245,-216,-245},{-252,-213,-257,-211,-206,-220},{-270,-198,-220,-272,-279,-213}},{{-223,-272,-265,-245,-245,-198},{-255,-243,-277,-289,-272,-235},{-289,-218,-252,-243,-213,-203},{-203,-252,-277,-230,-228,-294},{-203,-260,-201,-272,-270,-225},{-252,-228,-228,-208,-279,-252},{-203,-279,-289,-233,-272,-238},{-206,-238,-220,-208,-206,-274},{-198,-265,-218,-270,-255,-208},{-274,-243,-282,-270,-289,-294}}},{{{-275,-217,-196,-224,-252,-245},{-215,-259,-185,-233,-185,-189},{-187,-273,-196,-213,-259,-217},{-275,-199,-229,-224,-203,-236},{-196,-277,-224,-273,-256,-213},{-192,-259,-238,-238,-208,-229},{-268,-231,-238,-215,-199,-243},{-263,-192,-199,-245,-275,-252},{-247,-256,-217,-201,-196,-233},{-226,-226,-219,-187,-194,-249}},{{-208,-206,-196,-219,-213,-208},{-266,-192,-238,-226,-240,-185},{-275,-252,-266,-226,-266,-208},{-192,-199,-217,-233,-208,-236},{-259,-192,-224,-261,-194,-243},{-185,-270,-187,-266,-231,-231},{-261,-226,-261,-273,-259,-266},{-210,-189,-196,-247,-270,-277},{-256,-240,-233,-240,-196,-208},{-259,-196,-259,-273,-208,-275}},{{-270,-249,-268,-233,-199,-252},{-252,-259,-245,-247,-249,-268},{-252,-266,-259,-196,-217,-189},{-275,-256,-238,-238,-229,-243},{-224,-224,-219,-236,-245,-217},{-201,-277,-261,-266,-229,-243},{-224,-273,-268,-208,-203,-187},{-247,-201,-229,-273,-196,-266},{-208,-219,-224,-266,-206,-219},{-256,-245,-254,-213,-249,-236}},{{-222,-185,-236,-210,-219,-243},{-226,-243,-236,-247,-196,-219},{-231,-247,-231,-219,-222,-233},{-268,-249,-215,-261,-217,-189},{-249,-215,-206,-196,-217,-233},{-187,-217,-215,-247,-203,-277},{-256,-273,-233,-273,-222,-219},{-215,-185,-189,-263,-206,-210},{-192,-215,-277,-268,-203,-215},{-185,-247,-189,-217,-187,-213}},{{-256,-196,-270,-263,-226,-229},{-266,-261,-192,-243,-233,-263},{-261,-201,-236,-203,-233,-215},{-240,-215,-189,-263,-208,-189},{-208,-243,-231,-208,-213,-243},{-187,-277,-208,-226,-231,-261},{-259,-196,-208,-247,-245,-201},{-203,-187,-247,-252,-224,-266},{-208,-217,-201,-222,-208,-226},{-219,-226,-238,-199,-224,-243}},{{-194,-254,-243,-226,-210,-236},{-236,-201,-266,-252,-187,-249},{-233,-266,-252,-229,-210,-226},{-217,-277,-203,-259,-226,-206},{-233,-266,-236,-213,-273,-270},{-254,-189,-273,-215,-249,-275},{-192,-208,-224,-259,-208,-201},{-219,-217,-243,-229,-243,-215},{-203,-270,-277,-243,-219,-263},{-201,-199,-224,-192,-277,-259}}},{{{-350,-300,-335,-309,-353,-335},{-238,-268,-235,-350,-250,-353},{-315,-250,-335,-282,-318,-350},{-244,-265,-326,-241,-306,-241},{-341,-329,-335,-250,-347,-353},{-338,-288,-235,-265,-253,-250},{-250,-347,-256,-294,-297,-309},{-318,-285,-250,-256,-291,-335},{-273,-306,-323,-244,-268,-341},{-350,-315,-347,-288,-244,-279}},{{-332,-282,-347,-294,-282,-247},{-326,-332,-332,-244,-265,-238},{-297,-282,-235,-332,-341,-270},{-306,-306,-273,-297,-265,-332},{-309,-297,-318,-294,-341,-276},{-300,-276,-335,-250,-306,-318},{-353,-265,-300,-235,-247,-312},{-250,-323,-323,-332,-338,-262},{-244,-262,-241,-329,-320,-247},{-273,-297,-347,-265,-341,-291}},{{-294,-279,-294,-315,-323,-303},{-282,-347,-312,-294,-285,-332},{-309,-335,-350,-259,-303,-253},{-276,-270,-259,-265,-341,-318},{-323,-276,-279,-279,-241,-279},{-335,-273,-241,-350,-256,-350},{-288,-300,-276,-306,-300,-341},{-294,-276,-241,-300,-306,-253},{-332,-306,-309,-279,-318,-309},{-315,-309,-250,-282,-306,-235}},{{-320,-335,-273,-259,-244,-256},{-247,-344,-353,-288,-279,-335},{-235,-262,-297,-326,-306,-350},{-338,-344,-238,-320,-344,-344},{-268,-262,-309,-244,-350,-306},{-335,-282,-303,-294,-250,-326},{-273,-297,-241,-335,-282,-294},{-256,-300,-344,-329,-332,-270},{-273,-323,-291,-250,-247,-303},{-315,-291,-341,-279,-312,-244}},{{-256,-294,-318,-338,-335,-273},{-347,-338,-329,-312,-268,-326},{-335,-270,-279,-294,-315,-320},{-303,-312,-312,-297,-247,-318},{-244,-253,-329,-291,-297,-247},{-309,-282,-303,-350,-247,-285},{-282,-259,-344,-303,-312,-256},{-279,-309,-270,-338,-309,-265},{-350,-265,-341,-285,-262,-335},{-241,-273,-335,-250,-329,-247}},{{-235,-276,-332,-320,-262,-338},{-335,-285,-262,-300,-347,-276},{-350,-294,-291,-318,-238,-276},{-347,-259,-338,-282,-320,-329},{-329,-315,-273,-294,-350,-285},{-256,-353,-291,-338,-315,-338},{-238,-262,-312,-285,-256,-312},{-341,-235,-247,-353,-347,-270},{-300,-259,-270,-235,-329,-306},{-350,-353,-247,-259,-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]={16,8,5,16,8,5,15,8,5,17,8,6,16,8,6,17,8,6,17,9,6,16,9,6,17,9,6,17,9,6,16,9,6,16,8,6,18,9,6,17,9,6,17,9,6,18,9,6,18,9,6,18,9,6,16,8,6,17,9,6,16,9,6,17,8,6,17,8,6,17,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,748}}; // set of shipments in each bid 
int SHsts[SPN]={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,0,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,4,8,12,16,20,24,28,2,8,14,20,26,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,1,5,9,13,17,21,25,29,0,6,12,18,24,30,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,0,6,12,18,24,30,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,1,5,9,13,17,21,25,29,33,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,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,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,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,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,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,34,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,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,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,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,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,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,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,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,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,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}; // set of start times of each shipment 
int SHets[SPN]={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,7,11,15,19,23,27,31,35,7,13,19,25,31,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,7,13,19,25,31,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,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,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,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,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3,7,11,15,19,23,27,31,35,2,8,14,20,26,32,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,2,6,10,14,18,22,26,30,34,3,9,15,21,27,33,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,1,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,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,2,6,10,14,18,22,26,30,34,2,8,14,20,26,32,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,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,5,11,17,23,29,35,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,3,7,11,15,19,23,27,31,35,5,11,17,23,29,35}; // set of end times of each shipment 
