int Dev = 20;// Deviation
extern const int CNN = 2;// Case Index
extern const int P = 3;// Number of phases
extern const int PT = 6;// Number of periods in a phase
extern const int T = 18;// 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 = 343;//Number of shipments
extern const int SN = 20;//Number of scenarios at each stage
extern const int MBSN = 8;//Number of shipments in a bid
// tree parameters:
double PRO[P][SN]={{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05}}; // the probability of each scenario at each phase 
// timing parameters: 
int PTN[P]={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}}; // set of periods in each phase 
// distribution parameters: 
int sup[I][P][SN][PT]={{{{10755,0,0,0,0,0},{10571,0,0,0,0,0},{11224,0,0,0,0,0},{11304,0,0,0,0,0},{11126,0,0,0,0,0},{11042,0,0,0,0,0},{11404,0,0,0,0,0},{11114,0,0,0,0,0},{11275,0,0,0,0,0},{11221,0,0,0,0,0},{11266,0,0,0,0,0},{11078,0,0,0,0,0},{11084,0,0,0,0,0},{10957,0,0,0,0,0},{10950,0,0,0,0,0},{10927,0,0,0,0,0},{11271,0,0,0,0,0},{10979,0,0,0,0,0},{10867,0,0,0,0,0},{10719,0,0,0,0,0}},{{11235,0,0,0,0,0},{11252,0,0,0,0,0},{11125,0,0,0,0,0},{10723,0,0,0,0,0},{11003,0,0,0,0,0},{11178,0,0,0,0,0},{11259,0,0,0,0,0},{11137,0,0,0,0,0},{11108,0,0,0,0,0},{10708,0,0,0,0,0},{11232,0,0,0,0,0},{11023,0,0,0,0,0},{10726,0,0,0,0,0},{11209,0,0,0,0,0},{11007,0,0,0,0,0},{11165,0,0,0,0,0},{10988,0,0,0,0,0},{10728,0,0,0,0,0},{10949,0,0,0,0,0},{10763,0,0,0,0,0}},{{11162,0,0,0,0,0},{10658,0,0,0,0,0},{10783,0,0,0,0,0},{10942,0,0,0,0,0},{10824,0,0,0,0,0},{11060,0,0,0,0,0},{11084,0,0,0,0,0},{10980,0,0,0,0,0},{11193,0,0,0,0,0},{11186,0,0,0,0,0},{11284,0,0,0,0,0},{10821,0,0,0,0,0},{10995,0,0,0,0,0},{11164,0,0,0,0,0},{11328,0,0,0,0,0},{11150,0,0,0,0,0},{11342,0,0,0,0,0},{10950,0,0,0,0,0},{10969,0,0,0,0,0},{11243,0,0,0,0,0}}},{{{-233,-195,-222,-197,-184,-264},{-222,-202,-181,-215,-231,-217},{-231,-242,-258,-193,-231,-269},{-267,-193,-251,-211,-260,-208},{-269,-251,-226,-215,-244,-217},{-262,-204,-228,-260,-179,-258},{-195,-208,-237,-260,-181,-228},{-184,-231,-264,-220,-228,-244},{-231,-204,-233,-184,-206,-251},{-224,-255,-233,-204,-186,-184},{-199,-199,-193,-242,-253,-255},{-262,-186,-264,-258,-204,-217},{-202,-193,-224,-264,-267,-199},{-204,-204,-240,-233,-184,-226},{-262,-213,-181,-246,-206,-199},{-242,-208,-224,-213,-264,-242},{-220,-267,-193,-244,-231,-186},{-251,-222,-231,-213,-188,-249},{-197,-255,-181,-235,-260,-231},{-255,-193,-186,-244,-179,-220}},{{-237,-267,-235,-211,-202,-186},{-190,-258,-220,-246,-233,-188},{-195,-260,-195,-222,-226,-251},{-179,-199,-193,-179,-213,-211},{-208,-240,-220,-204,-179,-208},{-215,-211,-179,-242,-242,-233},{-246,-262,-215,-253,-188,-181},{-224,-222,-251,-190,-204,-217},{-220,-233,-193,-228,-244,-240},{-235,-206,-235,-258,-215,-215},{-220,-262,-242,-188,-199,-211},{-269,-217,-267,-233,-231,-233},{-186,-199,-190,-215,-260,-179},{-267,-237,-237,-181,-246,-208},{-233,-231,-208,-208,-267,-246},{-224,-186,-204,-269,-211,-202},{-195,-235,-255,-244,-224,-240},{-251,-211,-199,-244,-186,-220},{-255,-224,-228,-228,-188,-233},{-251,-253,-228,-184,-251,-211}},{{-217,-193,-202,-220,-211,-179},{-262,-181,-233,-181,-231,-264},{-186,-269,-242,-226,-204,-224},{-258,-233,-179,-246,-190,-206},{-246,-199,-240,-255,-206,-186},{-224,-267,-195,-235,-255,-240},{-251,-222,-224,-188,-246,-253},{-228,-226,-206,-184,-206,-213},{-226,-186,-193,-264,-195,-262},{-179,-220,-262,-188,-184,-246},{-188,-204,-237,-253,-231,-217},{-204,-244,-258,-264,-213,-179},{-186,-204,-246,-204,-242,-184},{-190,-213,-179,-262,-190,-197},{-217,-186,-267,-264,-204,-249},{-222,-224,-220,-193,-260,-253},{-240,-220,-224,-215,-258,-251},{-242,-208,-186,-181,-199,-240},{-258,-204,-193,-258,-249,-197},{-226,-233,-199,-235,-224,-260}}},{{{-205,-224,-283,-264,-274,-248},{-233,-250,-214,-212,-281,-226},{-252,-209,-240,-224,-190,-274},{-238,-245,-278,-228,-250,-276},{-221,-276,-205,-200,-240,-221},{-276,-238,-219,-243,-207,-233},{-283,-262,-243,-286,-226,-281},{-228,-236,-286,-274,-248,-233},{-283,-250,-271,-238,-231,-236},{-271,-224,-267,-257,-281,-226},{-193,-269,-276,-207,-205,-274},{-278,-212,-195,-252,-262,-274},{-228,-250,-283,-200,-271,-255},{-274,-245,-200,-245,-198,-240},{-202,-200,-198,-243,-207,-231},{-193,-267,-255,-233,-286,-226},{-219,-281,-198,-209,-283,-278},{-243,-248,-209,-252,-233,-248},{-209,-257,-226,-267,-195,-248},{-281,-250,-195,-217,-252,-195}},{{-276,-190,-269,-276,-267,-212},{-224,-286,-271,-281,-190,-257},{-214,-276,-276,-238,-231,-283},{-217,-231,-259,-200,-240,-233},{-219,-212,-267,-231,-236,-233},{-250,-209,-259,-219,-255,-243},{-212,-259,-221,-281,-217,-283},{-236,-264,-252,-245,-250,-217},{-202,-259,-271,-271,-217,-264},{-259,-193,-233,-198,-269,-195},{-221,-214,-252,-219,-274,-255},{-278,-276,-214,-195,-226,-271},{-271,-212,-243,-286,-202,-224},{-212,-267,-281,-250,-224,-278},{-281,-209,-281,-245,-224,-231},{-278,-245,-228,-269,-281,-238},{-243,-269,-205,-264,-269,-264},{-240,-240,-190,-262,-200,-198},{-281,-248,-195,-209,-226,-283},{-224,-212,-207,-195,-219,-283}},{{-267,-259,-252,-276,-257,-202},{-195,-224,-209,-221,-200,-221},{-243,-214,-205,-262,-205,-226},{-205,-267,-271,-226,-198,-221},{-255,-193,-200,-252,-207,-205},{-271,-238,-259,-195,-286,-250},{-214,-264,-262,-207,-190,-264},{-217,-271,-233,-255,-195,-269},{-271,-207,-207,-264,-278,-271},{-209,-276,-214,-271,-255,-236},{-231,-274,-198,-250,-195,-248},{-217,-231,-233,-193,-195,-217},{-233,-233,-267,-276,-214,-231},{-267,-231,-200,-257,-202,-224},{-245,-195,-283,-278,-250,-224},{-271,-257,-248,-207,-262,-243},{-238,-248,-267,-248,-243,-224},{-238,-286,-245,-255,-283,-202},{-283,-257,-240,-231,-245,-274},{-278,-236,-209,-209,-231,-257}}},{{{-281,-262,-276,-298,-229,-259},{-240,-218,-254,-273,-292,-281},{-259,-265,-270,-262,-221,-325},{-246,-273,-278,-254,-238,-306},{-311,-240,-276,-224,-306,-276},{-325,-314,-289,-229,-298,-328},{-254,-292,-306,-325,-268,-246},{-322,-248,-224,-273,-308,-243},{-254,-232,-270,-284,-292,-281},{-322,-314,-287,-218,-328,-273},{-246,-268,-284,-287,-317,-235},{-276,-314,-273,-311,-298,-246},{-273,-308,-259,-317,-218,-325},{-248,-281,-314,-325,-273,-246},{-254,-257,-262,-308,-224,-298},{-322,-265,-308,-262,-232,-262},{-298,-278,-235,-300,-317,-251},{-281,-218,-287,-311,-246,-287},{-235,-262,-240,-221,-227,-265},{-284,-300,-276,-238,-229,-246}},{{-259,-235,-300,-308,-328,-259},{-306,-314,-328,-287,-221,-317},{-254,-295,-292,-276,-254,-221},{-314,-238,-246,-240,-292,-328},{-314,-265,-238,-246,-246,-311},{-270,-311,-292,-273,-328,-295},{-227,-281,-298,-284,-295,-295},{-218,-328,-278,-224,-224,-322},{-218,-265,-300,-328,-281,-308},{-221,-284,-240,-254,-268,-273},{-284,-232,-235,-300,-281,-319},{-218,-224,-265,-243,-248,-298},{-262,-243,-262,-240,-319,-246},{-289,-243,-322,-248,-265,-289},{-298,-278,-232,-292,-314,-268},{-314,-295,-235,-262,-289,-257},{-319,-265,-281,-251,-251,-262},{-235,-284,-273,-257,-227,-259},{-306,-229,-227,-268,-295,-317},{-298,-265,-292,-251,-251,-232}},{{-311,-270,-322,-278,-281,-273},{-270,-232,-268,-300,-298,-238},{-243,-295,-257,-298,-300,-306},{-287,-259,-218,-265,-259,-328},{-317,-254,-227,-221,-314,-322},{-281,-322,-328,-317,-278,-292},{-276,-278,-287,-262,-281,-240},{-306,-218,-246,-221,-308,-229},{-240,-298,-314,-227,-317,-328},{-298,-292,-232,-295,-229,-325},{-292,-289,-259,-246,-311,-317},{-328,-257,-278,-251,-221,-221},{-295,-259,-328,-300,-240,-262},{-328,-319,-270,-259,-238,-319},{-229,-251,-328,-319,-278,-308},{-308,-292,-221,-303,-314,-325},{-251,-251,-295,-328,-322,-322},{-314,-314,-229,-246,-259,-265},{-300,-238,-262,-284,-257,-292},{-284,-259,-278,-278,-328,-232}}},{{{-134,-146,-154,-134,-146,-146},{-126,-156,-125,-132,-139,-136},{-139,-128,-176,-172,-160,-157},{-159,-182,-183,-149,-183,-180},{-139,-140,-177,-148,-156,-172},{-172,-143,-165,-126,-156,-140},{-162,-137,-166,-172,-185,-172},{-183,-145,-145,-168,-152,-126},{-177,-159,-146,-183,-131,-157},{-123,-177,-174,-185,-166,-126},{-179,-137,-163,-162,-174,-151},{-159,-176,-145,-176,-128,-142},{-129,-131,-136,-146,-162,-179},{-156,-152,-136,-145,-154,-140},{-152,-151,-182,-132,-163,-142},{-140,-128,-139,-126,-176,-172},{-139,-142,-128,-139,-176,-180},{-157,-163,-126,-183,-168,-168},{-156,-146,-152,-172,-139,-179},{-136,-134,-136,-145,-154,-182}},{{-166,-123,-162,-169,-145,-140},{-131,-163,-163,-129,-151,-154},{-177,-182,-165,-145,-123,-145},{-136,-140,-163,-157,-128,-128},{-157,-159,-169,-156,-139,-174},{-166,-134,-169,-145,-151,-159},{-136,-182,-185,-137,-168,-136},{-126,-172,-149,-183,-180,-142},{-146,-169,-159,-169,-132,-168},{-146,-177,-171,-126,-169,-180},{-162,-129,-179,-168,-171,-168},{-151,-166,-151,-166,-143,-149},{-176,-146,-125,-174,-123,-169},{-157,-143,-134,-148,-168,-185},{-182,-136,-129,-146,-151,-146},{-165,-128,-132,-171,-180,-136},{-129,-139,-148,-142,-179,-156},{-152,-142,-129,-140,-145,-132},{-132,-156,-149,-136,-148,-151},{-128,-132,-139,-126,-134,-152}},{{-123,-174,-156,-146,-145,-125},{-134,-131,-136,-123,-137,-174},{-182,-129,-176,-143,-143,-162},{-140,-176,-177,-162,-169,-126},{-140,-176,-163,-156,-174,-154},{-149,-129,-137,-177,-125,-185},{-134,-171,-166,-183,-125,-176},{-146,-182,-185,-143,-182,-182},{-176,-128,-139,-172,-154,-149},{-182,-156,-180,-176,-166,-128},{-160,-166,-134,-132,-165,-148},{-140,-169,-132,-149,-156,-132},{-162,-140,-131,-185,-177,-146},{-148,-131,-166,-131,-151,-154},{-183,-172,-182,-148,-174,-148},{-157,-126,-142,-171,-172,-140},{-151,-168,-125,-154,-140,-145},{-129,-182,-140,-183,-176,-177},{-169,-137,-134,-132,-142,-145},{-163,-125,-179,-156,-168,-183}}},{{{-197,-204,-186,-184,-151,-153},{-171,-160,-213,-202,-157,-191},{-198,-187,-173,-155,-155,-211},{-215,-197,-215,-155,-171,-211},{-206,-169,-186,-149,-195,-207},{-171,-218,-147,-218,-149,-184},{-200,-173,-166,-153,-180,-209},{-160,-149,-209,-151,-157,-193},{-169,-178,-215,-202,-184,-160},{-153,-171,-167,-146,-197,-206},{-177,-202,-206,-206,-151,-202},{-155,-162,-175,-189,-158,-184},{-215,-202,-180,-211,-180,-182},{-202,-173,-177,-180,-189,-149},{-167,-209,-211,-211,-184,-151},{-187,-160,-182,-186,-160,-197},{-151,-195,-195,-182,-202,-202},{-186,-200,-149,-217,-180,-189},{-177,-197,-191,-175,-171,-206},{-198,-200,-171,-195,-149,-149}},{{-184,-167,-153,-186,-204,-218},{-147,-200,-218,-200,-180,-186},{-160,-167,-213,-167,-166,-158},{-193,-151,-177,-153,-169,-151},{-178,-215,-171,-186,-202,-186},{-198,-157,-167,-153,-171,-200},{-153,-178,-180,-173,-209,-186},{-147,-167,-215,-191,-200,-209},{-197,-182,-169,-182,-187,-164},{-173,-166,-182,-200,-218,-164},{-151,-197,-169,-213,-195,-189},{-213,-173,-155,-167,-180,-215},{-211,-211,-166,-200,-202,-197},{-191,-184,-149,-157,-158,-153},{-166,-160,-178,-178,-171,-160},{-155,-182,-200,-151,-151,-160},{-151,-155,-155,-147,-158,-191},{-187,-147,-204,-211,-186,-187},{-202,-193,-169,-173,-147,-169},{-155,-204,-202,-173,-213,-186}},{{-180,-164,-187,-189,-184,-182},{-153,-147,-211,-180,-169,-177},{-149,-187,-195,-166,-198,-198},{-171,-178,-195,-184,-209,-197},{-157,-215,-191,-153,-182,-204},{-167,-149,-197,-215,-177,-180},{-178,-204,-175,-198,-167,-160},{-149,-162,-206,-202,-186,-171},{-146,-213,-202,-202,-171,-177},{-167,-209,-169,-211,-218,-158},{-169,-215,-153,-217,-151,-173},{-153,-193,-171,-209,-187,-218},{-193,-215,-191,-187,-153,-151},{-178,-206,-166,-146,-215,-217},{-178,-202,-198,-195,-157,-160},{-209,-158,-184,-178,-162,-209},{-175,-175,-191,-147,-189,-217},{-178,-193,-189,-184,-217,-153},{-217,-160,-211,-187,-153,-149},{-213,-169,-166,-146,-213,-157}}},{{{-225,-270,-208,-228,-257,-265},{-292,-238,-245,-198,-223,-211},{-267,-255,-260,-245,-289,-282},{-238,-252,-238,-230,-230,-196},{-228,-287,-272,-225,-272,-284},{-255,-279,-211,-243,-203,-245},{-220,-211,-257,-267,-265,-262},{-245,-279,-250,-211,-245,-272},{-211,-287,-235,-245,-292,-216},{-220,-277,-277,-211,-208,-292},{-233,-282,-240,-247,-196,-230},{-267,-250,-277,-208,-196,-267},{-274,-289,-238,-228,-230,-196},{-270,-282,-235,-260,-279,-274},{-292,-235,-213,-208,-233,-287},{-218,-267,-218,-279,-274,-211},{-243,-289,-282,-238,-240,-277},{-218,-240,-255,-218,-206,-262},{-223,-233,-225,-265,-274,-250},{-198,-228,-243,-208,-267,-277}},{{-260,-255,-240,-225,-252,-245},{-279,-220,-198,-245,-270,-240},{-294,-201,-208,-250,-282,-228},{-198,-252,-287,-287,-240,-228},{-216,-277,-277,-198,-270,-243},{-260,-230,-218,-277,-240,-284},{-225,-198,-289,-206,-289,-235},{-243,-206,-257,-292,-287,-230},{-196,-196,-216,-274,-255,-250},{-198,-243,-294,-260,-206,-206},{-279,-198,-208,-213,-240,-274},{-240,-294,-228,-218,-292,-287},{-233,-196,-257,-198,-225,-267},{-267,-240,-277,-287,-255,-196},{-287,-292,-223,-211,-211,-198},{-255,-282,-284,-252,-203,-218},{-223,-260,-247,-235,-250,-196},{-272,-284,-247,-262,-294,-255},{-240,-233,-230,-252,-218,-287},{-228,-230,-216,-289,-267,-230}},{{-277,-235,-235,-223,-287,-260},{-240,-279,-270,-277,-245,-294},{-262,-223,-247,-228,-294,-225},{-270,-206,-247,-220,-252,-277},{-279,-223,-198,-220,-238,-208},{-250,-211,-223,-223,-211,-203},{-201,-267,-260,-257,-247,-255},{-228,-284,-255,-284,-211,-287},{-250,-216,-250,-223,-240,-203},{-230,-233,-260,-208,-218,-238},{-287,-220,-279,-243,-233,-292},{-277,-223,-289,-260,-250,-260},{-257,-211,-245,-292,-245,-257},{-250,-223,-250,-230,-277,-289},{-245,-220,-233,-270,-238,-277},{-245,-247,-230,-198,-198,-247},{-257,-267,-218,-233,-240,-228},{-220,-267,-208,-220,-216,-230},{-198,-225,-233,-211,-228,-289},{-279,-252,-262,-274,-230,-294}}},{{{-213,-226,-208,-231,-215,-189},{-252,-206,-238,-268,-194,-217},{-215,-199,-270,-266,-273,-240},{-233,-187,-259,-252,-238,-217},{-196,-203,-219,-208,-249,-263},{-203,-238,-199,-266,-210,-247},{-247,-259,-217,-270,-259,-206},{-243,-194,-263,-208,-268,-249},{-273,-273,-277,-219,-277,-194},{-199,-236,-229,-222,-243,-210},{-233,-270,-270,-268,-236,-261},{-275,-266,-247,-254,-201,-233},{-247,-245,-196,-189,-233,-236},{-249,-245,-256,-245,-187,-231},{-238,-185,-185,-245,-236,-266},{-229,-243,-236,-226,-206,-217},{-238,-192,-229,-194,-245,-219},{-208,-185,-192,-213,-196,-201},{-203,-240,-229,-261,-243,-229},{-206,-243,-219,-224,-275,-215}},{{-192,-268,-226,-245,-219,-210},{-254,-240,-210,-249,-259,-268},{-203,-270,-277,-261,-219,-261},{-243,-189,-256,-229,-270,-226},{-215,-270,-185,-206,-254,-213},{-229,-252,-229,-277,-273,-243},{-217,-245,-222,-201,-261,-210},{-187,-229,-259,-185,-240,-229},{-189,-240,-249,-208,-189,-249},{-222,-215,-238,-249,-231,-233},{-270,-240,-270,-259,-259,-256},{-199,-185,-222,-203,-261,-256},{-233,-252,-236,-236,-189,-222},{-256,-243,-201,-259,-215,-243},{-263,-222,-185,-226,-277,-252},{-277,-254,-206,-266,-266,-217},{-185,-277,-224,-189,-243,-192},{-206,-226,-187,-261,-259,-196},{-259,-224,-192,-270,-247,-196},{-194,-189,-224,-199,-229,-226}},{{-192,-215,-224,-192,-231,-247},{-199,-222,-277,-189,-226,-247},{-219,-208,-192,-210,-222,-226},{-203,-203,-240,-206,-236,-254},{-199,-256,-224,-263,-238,-187},{-219,-266,-206,-217,-208,-233},{-240,-273,-226,-240,-256,-199},{-263,-192,-185,-252,-243,-263},{-261,-268,-236,-189,-256,-219},{-208,-266,-206,-245,-226,-217},{-215,-185,-254,-268,-261,-187},{-194,-231,-192,-226,-199,-240},{-206,-247,-249,-206,-231,-270},{-263,-236,-233,-219,-275,-275},{-196,-261,-254,-192,-245,-275},{-249,-238,-254,-238,-263,-196},{-210,-270,-236,-259,-252,-224},{-185,-268,-236,-201,-254,-203},{-268,-261,-210,-192,-199,-275},{-270,-233,-263,-273,-208,-215}}},{{{-262,-297,-235,-338,-270,-285},{-323,-244,-270,-288,-235,-279},{-238,-312,-276,-276,-344,-291},{-241,-344,-332,-332,-341,-244},{-238,-294,-253,-344,-285,-344},{-256,-235,-335,-335,-268,-235},{-282,-273,-318,-273,-315,-347},{-253,-244,-297,-294,-341,-326},{-347,-250,-347,-291,-273,-276},{-312,-323,-320,-268,-338,-291},{-309,-241,-344,-312,-276,-306},{-247,-244,-312,-235,-312,-256},{-244,-247,-309,-335,-259,-300},{-318,-259,-288,-235,-235,-276},{-323,-320,-318,-335,-315,-270},{-276,-306,-238,-329,-259,-238},{-320,-306,-320,-326,-315,-279},{-312,-318,-320,-329,-309,-294},{-323,-235,-306,-256,-347,-253},{-268,-303,-329,-244,-318,-265}},{{-318,-238,-323,-347,-332,-306},{-253,-291,-320,-270,-250,-297},{-338,-300,-241,-250,-318,-297},{-265,-282,-335,-276,-276,-326},{-335,-235,-285,-335,-320,-300},{-268,-285,-270,-256,-303,-288},{-273,-350,-329,-300,-335,-353},{-247,-300,-335,-353,-282,-329},{-329,-282,-294,-335,-238,-353},{-265,-288,-273,-244,-273,-247},{-309,-256,-282,-288,-323,-309},{-256,-288,-344,-244,-262,-309},{-247,-338,-270,-306,-247,-235},{-326,-306,-273,-247,-350,-297},{-306,-268,-344,-250,-270,-273},{-288,-235,-291,-326,-344,-303},{-329,-259,-341,-338,-338,-276},{-306,-235,-241,-288,-259,-312},{-285,-279,-320,-276,-335,-241},{-303,-288,-315,-323,-318,-244}},{{-335,-235,-347,-329,-353,-320},{-270,-259,-244,-338,-235,-247},{-244,-247,-335,-259,-247,-262},{-341,-282,-285,-265,-285,-270},{-265,-341,-262,-300,-259,-300},{-282,-238,-241,-353,-268,-288},{-323,-285,-265,-270,-318,-256},{-253,-250,-262,-303,-312,-326},{-303,-323,-262,-241,-326,-350},{-303,-344,-268,-350,-326,-309},{-332,-353,-320,-335,-282,-315},{-320,-265,-332,-285,-306,-259},{-279,-259,-270,-265,-253,-318},{-353,-320,-256,-294,-326,-241},{-241,-247,-318,-262,-341,-341},{-273,-291,-350,-276,-250,-276},{-294,-276,-285,-347,-315,-309},{-294,-250,-335,-285,-338,-247},{-312,-273,-285,-344,-273,-235},{-291,-250,-326,-238,-332,-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]={6,3,2,7,3,2,6,3,2,8,4,3,8,4,3,7,4,3,8,4,3,8,4,3,7,4,3,8,4,3,7,4,3,7,4,3,8,4,3,8,4,3,8,4,3,8,4,3,8,5,3,8,5,3,8,4,3,8,4,3,7,4,3,7,4,3,7,4,3,7,4,3}; // 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}}; // set of shipments in each bid 
int SHsts[SPN]={1,3,5,7,9,11,1,5,9,2,8,0,2,4,6,8,10,12,2,6,10,2,8,2,4,6,8,10,12,2,6,10,2,8,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,0,2,4,6,8,10,12,14,0,4,8,12,1,7,13,1,3,5,7,9,11,13,0,4,8,12,0,6,12,0,2,4,6,8,10,12,14,2,6,10,14,2,8,14,1,3,5,7,9,11,13,15,1,5,9,13,1,7,13,2,4,6,8,10,12,14,1,5,9,13,2,8,14,1,3,5,7,9,11,13,15,0,4,8,12,2,8,14,2,4,6,8,10,12,14,0,4,8,12,2,8,14,2,4,6,8,10,12,14,1,5,9,13,1,7,13,2,4,6,8,10,12,14,16,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,2,6,10,14,0,6,12,2,4,6,8,10,12,14,16,1,5,9,13,2,8,14,2,4,6,8,10,12,14,16,2,6,10,14,2,8,14,2,4,6,8,10,12,14,16,0,4,8,12,16,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,16,2,8,14,0,2,4,6,8,10,12,14,2,6,10,14,0,6,12,1,3,5,7,9,11,13,15,0,4,8,12,1,7,13,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,2,6,10,14,2,8,14,2,4,6,8,10,12,14,2,6,10,14,0,6,12,2,4,6,8,10,12,14,2,6,10,14,0,6,12}; // set of start times of each shipment 
int SHets[SPN]={6,8,10,12,14,16,6,10,14,7,13,5,7,9,11,13,15,17,7,11,15,7,13,7,9,11,13,15,17,7,11,15,7,13,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,4,10,16,4,6,8,10,12,14,16,3,7,11,15,3,9,15,2,4,6,8,10,12,14,16,4,8,12,16,4,10,16,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,4,6,8,10,12,14,16,3,7,11,15,4,10,16,3,5,7,9,11,13,15,17,2,6,10,14,4,10,16,4,6,8,10,12,14,16,2,6,10,14,4,10,16,4,6,8,10,12,14,16,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,1,7,13,2,4,6,8,10,12,14,16,3,7,11,15,1,7,13,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,3,5,7,9,11,13,15,17,3,7,11,15,3,9,15,3,5,7,9,11,13,15,17,1,5,9,13,17,1,7,13,2,4,6,8,10,12,14,16,1,5,9,13,17,3,9,15,2,4,6,8,10,12,14,16,4,8,12,16,2,8,14,3,5,7,9,11,13,15,17,2,6,10,14,3,9,15,4,6,8,10,12,14,16,4,8,12,16,4,10,16,5,7,9,11,13,15,17,5,9,13,17,5,11,17,5,7,9,11,13,15,17,5,9,13,17,3,9,15,5,7,9,11,13,15,17,5,9,13,17,3,9,15}; // set of end times of each shipment 
