int Dev = 30;// 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 = 742;//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]={{{{10969,0,0,0,0,0},{11069,0,0,0,0,0},{10893,0,0,0,0,0},{11475,0,0,0,0,0},{10898,0,0,0,0,0},{10782,0,0,0,0,0},{11174,0,0,0,0,0},{11330,0,0,0,0,0},{10982,0,0,0,0,0},{10859,0,0,0,0,0}},{{10935,0,0,0,0,0},{10639,0,0,0,0,0},{10562,0,0,0,0,0},{10758,0,0,0,0,0},{11626,0,0,0,0,0},{11117,0,0,0,0,0},{10726,0,0,0,0,0},{11090,0,0,0,0,0},{11404,0,0,0,0,0},{11188,0,0,0,0,0}},{{10993,0,0,0,0,0},{11152,0,0,0,0,0},{10819,0,0,0,0,0},{11267,0,0,0,0,0},{11189,0,0,0,0,0},{11443,0,0,0,0,0},{11065,0,0,0,0,0},{11901,0,0,0,0,0},{11731,0,0,0,0,0},{10549,0,0,0,0,0}},{{10998,0,0,0,0,0},{10888,0,0,0,0,0},{10902,0,0,0,0,0},{11549,0,0,0,0,0},{11473,0,0,0,0,0},{11149,0,0,0,0,0},{11210,0,0,0,0,0},{11152,0,0,0,0,0},{10996,0,0,0,0,0},{11355,0,0,0,0,0}},{{11116,0,0,0,0,0},{11378,0,0,0,0,0},{11199,0,0,0,0,0},{11370,0,0,0,0,0},{11107,0,0,0,0,0},{10947,0,0,0,0,0},{10901,0,0,0,0,0},{10845,0,0,0,0,0},{10833,0,0,0,0,0},{10999,0,0,0,0,0}},{{11769,0,0,0,0,0},{11450,0,0,0,0,0},{11348,0,0,0,0,0},{11032,0,0,0,0,0},{10760,0,0,0,0,0},{11120,0,0,0,0,0},{10666,0,0,0,0,0},{11022,0,0,0,0,0},{11214,0,0,0,0,0},{11081,0,0,0,0,0}}},{{{-181,-206,-260,-211,-199,-291},{-287,-260,-228,-190,-195,-267},{-166,-197,-215,-184,-255,-260},{-289,-228,-222,-222,-224,-184},{-240,-166,-280,-199,-197,-222},{-159,-184,-251,-168,-271,-166},{-190,-164,-179,-258,-276,-195},{-253,-289,-175,-188,-213,-175},{-255,-267,-159,-159,-273,-168},{-255,-220,-179,-188,-242,-264}},{{-193,-208,-161,-287,-242,-289},{-161,-235,-226,-222,-202,-217},{-164,-179,-190,-166,-168,-231},{-172,-186,-226,-226,-258,-195},{-184,-291,-282,-287,-271,-242},{-188,-188,-253,-181,-186,-188},{-215,-179,-260,-197,-258,-164},{-202,-188,-235,-193,-251,-289},{-276,-199,-235,-251,-262,-188},{-251,-282,-255,-255,-262,-276}},{{-267,-287,-226,-184,-267,-262},{-240,-206,-206,-262,-231,-164},{-233,-190,-211,-291,-267,-186},{-291,-260,-193,-184,-195,-287},{-195,-211,-199,-260,-273,-161},{-175,-282,-181,-224,-188,-240},{-267,-267,-172,-291,-213,-235},{-260,-258,-278,-264,-271,-179},{-193,-249,-161,-276,-179,-175},{-267,-258,-157,-244,-269,-269}},{{-177,-224,-206,-161,-224,-287},{-181,-235,-204,-181,-287,-237},{-161,-260,-161,-262,-224,-278},{-213,-233,-264,-282,-190,-291},{-217,-246,-231,-217,-269,-190},{-262,-213,-237,-240,-269,-220},{-260,-164,-184,-240,-251,-181},{-237,-197,-224,-262,-237,-172},{-271,-255,-258,-199,-278,-289},{-204,-206,-242,-157,-157,-255}},{{-181,-249,-188,-217,-224,-193},{-258,-276,-253,-193,-244,-199},{-233,-282,-258,-161,-206,-228},{-246,-226,-231,-269,-233,-251},{-249,-233,-177,-273,-168,-267},{-161,-181,-267,-267,-213,-206},{-264,-211,-168,-271,-224,-199},{-242,-233,-262,-289,-188,-157},{-282,-258,-255,-164,-159,-175},{-206,-244,-280,-197,-258,-197}},{{-208,-199,-267,-269,-244,-235},{-242,-262,-255,-273,-222,-271},{-260,-258,-188,-161,-255,-233},{-206,-278,-211,-228,-278,-197},{-217,-211,-211,-208,-255,-159},{-280,-170,-289,-211,-231,-164},{-249,-206,-186,-246,-164,-161},{-213,-181,-260,-164,-291,-251},{-276,-204,-217,-190,-271,-240},{-199,-166,-159,-186,-244,-233}}},{{{-219,-269,-193,-236,-252,-309},{-217,-221,-228,-243,-202,-267},{-171,-209,-240,-252,-302,-293},{-298,-250,-224,-169,-228,-188},{-243,-309,-240,-219,-176,-193},{-236,-300,-269,-200,-178,-240},{-305,-186,-205,-278,-198,-281},{-288,-212,-309,-307,-309,-219},{-252,-293,-271,-276,-278,-271},{-212,-259,-193,-221,-190,-250}},{{-257,-221,-307,-274,-209,-307},{-217,-174,-293,-209,-219,-243},{-207,-262,-238,-178,-169,-305},{-259,-195,-205,-248,-205,-217},{-298,-259,-269,-193,-236,-167},{-290,-257,-276,-252,-238,-259},{-271,-214,-188,-167,-309,-200},{-257,-171,-288,-236,-207,-264},{-269,-181,-219,-190,-214,-181},{-188,-302,-181,-286,-212,-307}},{{-245,-207,-269,-264,-207,-221},{-302,-214,-264,-221,-252,-248},{-300,-181,-231,-243,-219,-198},{-248,-300,-245,-233,-259,-193},{-169,-307,-169,-174,-255,-262},{-231,-293,-262,-205,-178,-293},{-224,-190,-169,-214,-288,-202},{-176,-240,-298,-186,-293,-167},{-233,-293,-290,-195,-307,-288},{-198,-267,-202,-178,-226,-259}},{{-190,-259,-228,-309,-238,-186},{-259,-231,-257,-240,-269,-300},{-283,-288,-207,-240,-202,-305},{-283,-217,-190,-290,-193,-238},{-255,-262,-240,-190,-167,-309},{-305,-202,-307,-295,-207,-202},{-283,-300,-209,-233,-305,-259},{-186,-238,-221,-221,-207,-300},{-274,-193,-167,-233,-212,-198},{-176,-283,-248,-252,-264,-205}},{{-214,-219,-193,-190,-257,-250},{-293,-202,-276,-245,-276,-188},{-186,-269,-245,-293,-171,-248},{-245,-281,-300,-309,-188,-307},{-212,-226,-300,-243,-286,-243},{-224,-198,-262,-298,-281,-288},{-236,-171,-224,-178,-219,-248},{-267,-209,-188,-271,-233,-238},{-219,-186,-309,-262,-171,-181},{-200,-248,-171,-209,-207,-186}},{{-238,-274,-281,-269,-195,-202},{-228,-264,-236,-276,-174,-231},{-193,-293,-243,-190,-176,-307},{-176,-274,-290,-288,-245,-209},{-212,-278,-286,-233,-181,-198},{-305,-198,-228,-252,-193,-238},{-171,-212,-274,-193,-257,-271},{-207,-183,-245,-212,-288,-233},{-238,-167,-186,-178,-259,-300},{-262,-221,-181,-245,-224,-286}}},{{{-224,-243,-300,-224,-262,-355},{-221,-262,-273,-292,-221,-194},{-216,-284,-221,-349,-257,-205},{-276,-311,-229,-300,-227,-314},{-218,-311,-262,-311,-306,-243},{-328,-265,-259,-278,-333,-227},{-224,-210,-344,-248,-317,-339},{-295,-229,-314,-218,-314,-322},{-298,-344,-341,-308,-227,-235},{-259,-352,-262,-349,-303,-341}},{{-246,-265,-328,-251,-278,-287},{-238,-325,-330,-281,-218,-235},{-325,-207,-322,-197,-270,-202},{-207,-278,-330,-341,-306,-352},{-330,-314,-191,-349,-341,-308},{-278,-218,-333,-259,-238,-278},{-216,-341,-336,-229,-191,-336},{-229,-287,-281,-197,-243,-319},{-339,-349,-270,-355,-336,-259},{-240,-221,-341,-265,-268,-197}},{{-344,-276,-306,-347,-298,-227},{-281,-349,-232,-308,-191,-270},{-213,-317,-349,-325,-224,-202},{-259,-194,-199,-341,-281,-322},{-325,-292,-210,-308,-281,-240},{-349,-339,-218,-295,-240,-306},{-311,-303,-213,-328,-355,-306},{-344,-292,-349,-284,-278,-259},{-306,-355,-289,-341,-221,-257},{-287,-229,-336,-270,-197,-210}},{{-210,-347,-295,-229,-336,-224},{-210,-328,-311,-287,-289,-328},{-224,-273,-339,-238,-227,-336},{-349,-333,-336,-232,-243,-199},{-306,-303,-229,-284,-248,-303},{-344,-349,-295,-207,-207,-235},{-349,-273,-202,-232,-240,-336},{-303,-333,-259,-254,-347,-202},{-311,-322,-330,-268,-229,-333},{-347,-278,-238,-325,-270,-191}},{{-199,-306,-328,-268,-341,-295},{-243,-292,-306,-317,-227,-216},{-308,-319,-308,-311,-257,-246},{-344,-273,-268,-317,-240,-287},{-216,-303,-254,-243,-303,-262},{-213,-243,-330,-270,-218,-295},{-224,-278,-300,-319,-322,-205},{-254,-330,-333,-218,-281,-276},{-270,-197,-221,-248,-295,-273},{-308,-213,-229,-347,-352,-325}},{{-328,-295,-333,-259,-303,-224},{-243,-352,-224,-292,-325,-300},{-213,-341,-213,-276,-251,-336},{-259,-322,-227,-276,-216,-199},{-336,-317,-265,-246,-227,-232},{-243,-298,-240,-336,-259,-352},{-325,-278,-317,-238,-319,-218},{-265,-197,-268,-240,-276,-251},{-216,-248,-221,-339,-227,-284},{-306,-317,-330,-257,-240,-254}}},{{{-140,-120,-131,-154,-116,-179},{-171,-125,-192,-189,-139,-145},{-196,-116,-177,-116,-177,-168},{-146,-180,-182,-117,-114,-199},{-108,-131,-119,-129,-132,-180},{-151,-168,-120,-152,-143,-200},{-142,-156,-114,-172,-152,-136},{-140,-174,-109,-168,-160,-171},{-172,-143,-112,-172,-156,-189},{-156,-186,-152,-152,-174,-125}},{{-197,-120,-197,-168,-136,-185},{-132,-179,-154,-168,-185,-159},{-154,-168,-129,-165,-200,-142},{-160,-111,-142,-122,-159,-183},{-174,-111,-109,-142,-163,-131},{-180,-159,-131,-140,-154,-109},{-123,-112,-109,-177,-157,-112},{-168,-183,-108,-131,-139,-116},{-200,-112,-120,-108,-169,-197},{-109,-149,-165,-174,-120,-197}},{{-111,-174,-149,-122,-160,-162},{-142,-140,-131,-122,-120,-159},{-182,-196,-152,-119,-149,-199},{-134,-139,-111,-131,-128,-185},{-137,-128,-159,-114,-156,-177},{-151,-192,-159,-171,-152,-200},{-149,-128,-154,-156,-146,-154},{-172,-169,-186,-199,-148,-191},{-200,-143,-196,-163,-120,-132},{-185,-108,-136,-128,-136,-171}},{{-134,-160,-192,-131,-200,-149},{-143,-148,-143,-137,-146,-112},{-123,-199,-119,-116,-172,-159},{-128,-186,-199,-142,-109,-189},{-188,-136,-186,-199,-183,-157},{-152,-176,-169,-191,-166,-109},{-162,-196,-189,-128,-109,-168},{-109,-196,-114,-122,-145,-180},{-172,-109,-151,-188,-176,-172},{-185,-172,-134,-123,-109,-177}},{{-186,-199,-125,-179,-122,-162},{-109,-197,-192,-197,-199,-180},{-183,-114,-111,-142,-172,-162},{-111,-123,-174,-185,-117,-189},{-166,-199,-162,-111,-134,-196},{-116,-188,-160,-157,-142,-154},{-137,-123,-194,-108,-189,-186},{-177,-119,-109,-123,-146,-186},{-111,-172,-186,-156,-152,-191},{-120,-156,-157,-165,-108,-149}},{{-131,-114,-154,-143,-183,-188},{-179,-191,-125,-156,-120,-172},{-183,-180,-191,-182,-189,-117},{-174,-176,-168,-137,-125,-120},{-191,-132,-166,-156,-156,-131},{-197,-143,-145,-146,-140,-159},{-123,-146,-189,-192,-169,-157},{-156,-140,-154,-148,-117,-191},{-174,-191,-143,-154,-116,-194},{-108,-200,-160,-126,-177,-109}}},{{{-213,-228,-213,-193,-217,-144},{-235,-209,-184,-226,-136,-169},{-147,-180,-202,-146,-202,-187},{-164,-215,-217,-229,-224,-186},{-207,-184,-127,-153,-149,-169},{-171,-175,-127,-164,-235,-211},{-202,-211,-197,-166,-182,-209},{-237,-206,-202,-169,-162,-135},{-207,-153,-153,-197,-155,-218},{-142,-146,-197,-171,-146,-147}},{{-186,-158,-226,-182,-197,-184},{-146,-237,-151,-157,-147,-206},{-184,-184,-127,-207,-187,-224},{-217,-207,-129,-217,-193,-142},{-158,-144,-187,-224,-162,-209},{-209,-167,-222,-155,-195,-127},{-151,-160,-162,-155,-211,-207},{-222,-166,-202,-186,-142,-226},{-133,-207,-237,-207,-200,-169},{-147,-231,-136,-220,-149,-235}},{{-207,-191,-158,-173,-182,-175},{-129,-171,-155,-195,-195,-235},{-182,-133,-184,-237,-178,-177},{-198,-129,-235,-215,-175,-229},{-226,-166,-162,-218,-237,-177},{-131,-173,-129,-177,-229,-224},{-229,-133,-200,-164,-189,-146},{-186,-226,-187,-218,-187,-187},{-133,-173,-228,-220,-217,-235},{-237,-197,-153,-171,-157,-186}},{{-167,-226,-226,-200,-162,-162},{-178,-184,-166,-178,-129,-147},{-127,-149,-198,-173,-129,-151},{-211,-202,-186,-228,-127,-158},{-197,-158,-187,-138,-133,-202},{-164,-171,-211,-228,-158,-162},{-144,-222,-184,-162,-153,-233},{-127,-175,-200,-169,-235,-233},{-138,-235,-180,-202,-127,-127},{-193,-178,-193,-146,-149,-135}},{{-231,-131,-229,-220,-178,-215},{-233,-182,-135,-226,-209,-228},{-140,-184,-209,-162,-213,-195},{-155,-158,-149,-133,-182,-187},{-155,-231,-211,-133,-204,-184},{-193,-198,-144,-211,-202,-151},{-157,-153,-162,-229,-153,-138},{-220,-211,-164,-186,-166,-160},{-224,-204,-204,-226,-147,-235},{-226,-231,-173,-167,-222,-129}},{{-131,-147,-237,-222,-224,-204},{-215,-187,-233,-164,-182,-202},{-207,-127,-129,-138,-149,-217},{-147,-202,-147,-142,-204,-144},{-146,-218,-167,-228,-157,-233},{-138,-136,-175,-197,-233,-207},{-149,-151,-160,-164,-191,-127},{-231,-202,-129,-142,-180,-195},{-197,-178,-178,-136,-155,-233},{-186,-204,-182,-158,-167,-144}}},{{{-172,-230,-208,-189,-306,-279},{-238,-179,-247,-189,-287,-299},{-172,-306,-172,-206,-172,-174},{-294,-260,-311,-201,-191,-186},{-181,-274,-292,-240,-223,-196},{-176,-252,-270,-306,-250,-216},{-176,-287,-296,-213,-257,-277},{-203,-172,-223,-301,-304,-267},{-257,-172,-196,-318,-186,-203},{-233,-211,-292,-211,-191,-223}},{{-274,-243,-223,-252,-299,-174},{-189,-230,-240,-186,-196,-272},{-243,-223,-272,-238,-272,-181},{-191,-284,-198,-181,-284,-243},{-257,-270,-184,-265,-203,-304},{-220,-189,-191,-228,-296,-218},{-287,-316,-267,-235,-206,-240},{-176,-172,-240,-318,-292,-220},{-191,-287,-272,-216,-309,-292},{-220,-292,-306,-294,-252,-198}},{{-206,-172,-306,-186,-238,-216},{-304,-279,-208,-257,-311,-318},{-252,-252,-196,-235,-238,-277},{-292,-174,-294,-196,-223,-284},{-235,-228,-318,-267,-250,-233},{-309,-292,-243,-196,-277,-216},{-184,-198,-228,-250,-262,-196},{-218,-299,-262,-284,-220,-216},{-216,-260,-301,-306,-316,-287},{-174,-194,-316,-191,-218,-186}},{{-250,-267,-306,-208,-240,-225},{-284,-223,-218,-233,-223,-191},{-174,-292,-172,-228,-186,-294},{-260,-257,-306,-228,-233,-292},{-196,-282,-282,-274,-250,-287},{-277,-311,-294,-238,-318,-296},{-289,-306,-174,-292,-206,-245},{-206,-287,-238,-260,-318,-223},{-260,-211,-174,-172,-314,-220},{-284,-296,-206,-289,-250,-230}},{{-260,-284,-196,-216,-203,-311},{-233,-206,-292,-296,-174,-228},{-196,-245,-186,-247,-311,-314},{-299,-179,-186,-294,-294,-235},{-233,-186,-181,-245,-186,-304},{-220,-289,-235,-230,-267,-282},{-311,-279,-233,-282,-270,-260},{-306,-220,-191,-194,-203,-230},{-211,-274,-208,-235,-311,-208},{-240,-309,-309,-174,-181,-191}},{{-238,-208,-292,-314,-174,-284},{-314,-225,-191,-270,-176,-233},{-196,-301,-306,-265,-311,-316},{-201,-255,-245,-309,-318,-179},{-250,-196,-223,-287,-284,-279},{-250,-223,-179,-287,-296,-225},{-257,-316,-198,-179,-220,-203},{-292,-284,-211,-235,-294,-247},{-252,-289,-235,-270,-272,-301},{-243,-296,-179,-247,-257,-267}}},{{{-249,-180,-217,-268,-296,-254},{-219,-254,-284,-249,-201,-203},{-194,-261,-270,-284,-249,-238},{-247,-176,-256,-189,-249,-261},{-245,-196,-256,-247,-266,-233},{-289,-196,-263,-187,-182,-222},{-293,-206,-266,-245,-259,-273},{-182,-164,-296,-233,-293,-219},{-162,-176,-243,-245,-176,-176},{-213,-187,-243,-185,-240,-229}},{{-185,-240,-226,-203,-162,-182},{-277,-196,-261,-282,-224,-166},{-210,-162,-261,-171,-256,-180},{-243,-199,-182,-217,-266,-164},{-289,-291,-256,-166,-261,-277},{-199,-169,-289,-238,-286,-245},{-189,-164,-233,-169,-256,-176},{-185,-169,-249,-275,-238,-176},{-229,-273,-224,-261,-236,-169},{-206,-194,-268,-222,-208,-282}},{{-192,-282,-238,-166,-222,-208},{-293,-162,-213,-240,-275,-187},{-169,-261,-192,-263,-171,-201},{-275,-286,-229,-280,-169,-249},{-219,-275,-222,-210,-245,-296},{-231,-284,-180,-256,-286,-298},{-284,-238,-199,-238,-270,-217},{-286,-291,-261,-240,-291,-266},{-300,-273,-254,-286,-277,-249},{-201,-201,-192,-206,-231,-229}},{{-208,-178,-182,-171,-263,-247},{-194,-199,-245,-199,-213,-231},{-284,-280,-217,-229,-231,-224},{-277,-189,-256,-240,-266,-233},{-236,-215,-291,-273,-180,-222},{-203,-222,-213,-166,-238,-201},{-178,-282,-166,-178,-282,-203},{-185,-203,-300,-182,-226,-236},{-293,-289,-286,-164,-199,-164},{-171,-270,-289,-298,-231,-268}},{{-173,-201,-166,-247,-236,-238},{-196,-293,-238,-233,-182,-284},{-219,-293,-164,-256,-208,-268},{-217,-199,-236,-261,-233,-162},{-261,-208,-259,-182,-240,-245},{-243,-259,-196,-233,-180,-298},{-229,-266,-270,-226,-224,-182},{-280,-245,-245,-233,-164,-185},{-282,-284,-247,-213,-280,-185},{-229,-252,-236,-189,-236,-300}},{{-277,-280,-196,-296,-233,-192},{-240,-201,-249,-291,-169,-245},{-286,-247,-243,-231,-249,-215},{-263,-226,-268,-266,-282,-249},{-282,-286,-182,-210,-201,-236},{-238,-266,-247,-213,-208,-233},{-236,-282,-194,-284,-249,-254},{-236,-215,-247,-222,-268,-277},{-291,-169,-293,-291,-291,-233},{-243,-259,-286,-210,-270,-213}}},{{{-370,-323,-238,-218,-220,-270},{-318,-376,-294,-259,-232,-353},{-223,-320,-368,-306,-320,-368},{-370,-338,-332,-376,-320,-362},{-353,-344,-370,-359,-238,-262},{-362,-215,-376,-241,-206,-244},{-232,-282,-365,-285,-279,-247},{-270,-356,-373,-347,-253,-212},{-294,-341,-279,-306,-318,-232},{-262,-232,-238,-356,-312,-368}},{{-265,-212,-220,-288,-262,-279},{-279,-232,-270,-300,-338,-235},{-332,-262,-265,-256,-359,-368},{-273,-306,-212,-297,-368,-262},{-212,-326,-362,-253,-356,-368},{-362,-359,-379,-347,-353,-241},{-265,-276,-315,-282,-373,-370},{-329,-376,-382,-273,-376,-318},{-350,-379,-326,-294,-223,-241},{-294,-250,-232,-288,-226,-335}},{{-241,-356,-326,-229,-294,-247},{-362,-223,-309,-291,-303,-282},{-268,-297,-297,-238,-326,-218},{-315,-235,-329,-253,-329,-362},{-303,-276,-318,-244,-382,-320},{-303,-291,-318,-265,-338,-273},{-291,-353,-232,-282,-291,-356},{-206,-370,-315,-212,-376,-356},{-226,-320,-247,-365,-265,-215},{-223,-294,-273,-379,-212,-341}},{{-285,-320,-368,-315,-226,-300},{-338,-235,-335,-303,-220,-359},{-320,-229,-373,-332,-294,-220},{-341,-368,-294,-300,-309,-259},{-350,-359,-300,-320,-300,-326},{-226,-291,-223,-291,-262,-226},{-353,-247,-353,-370,-273,-262},{-362,-373,-312,-265,-362,-209},{-288,-215,-368,-250,-273,-259},{-376,-359,-382,-326,-329,-309}},{{-209,-373,-382,-335,-262,-335},{-329,-212,-215,-306,-344,-326},{-291,-332,-265,-259,-350,-279},{-312,-382,-256,-347,-235,-365},{-376,-226,-238,-344,-273,-376},{-338,-273,-218,-247,-223,-285},{-329,-256,-250,-338,-244,-262},{-273,-270,-232,-335,-250,-353},{-312,-315,-229,-238,-218,-250},{-238,-356,-362,-288,-241,-288}},{{-382,-341,-356,-338,-373,-294},{-379,-318,-350,-244,-312,-247},{-247,-359,-256,-359,-356,-209},{-276,-320,-273,-223,-294,-320},{-209,-206,-318,-273,-226,-259},{-312,-294,-306,-273,-332,-235},{-291,-220,-262,-209,-359,-250},{-318,-379,-273,-229,-244,-341},{-335,-353,-229,-300,-294,-206},{-373,-335,-220,-338,-320,-294}}}}; // 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,5,15,8,6,16,8,5,16,8,6,16,9,6,16,8,6,17,9,6,16,8,6,16,9,6,16,9,6,16,9,6,17,9,6,17,9,6,17,9,6,17,9,6,18,9,6,17,9,6,17,9,6,16,9,6,17,9,6,17,8,6,16,9,6,16,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}}; // 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,1,7,13,19,25,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,1,5,9,13,17,21,25,29,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,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,2,8,14,20,26,32,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,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,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,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,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,0,6,12,18,24,30,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,0,6,12,18,24,30,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,1,7,13,19,25,31,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,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,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,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,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,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,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,5,9,13,17,21,25,29,1,7,13,19,25,31,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,2,6,10,14,18,22,26,30,1,7,13,19,25,31}; // 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,6,12,18,24,30,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,6,10,14,18,22,26,30,34,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,4,10,16,22,28,34,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,5,11,17,23,29,35,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,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,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,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,3,7,11,15,19,23,27,31,35,3,9,15,21,27,33,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,2,6,10,14,18,22,26,30,34,4,10,16,22,28,34,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,1,7,13,19,25,31,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,3,7,11,15,19,23,27,31,35,1,7,13,19,25,31,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,35,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,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,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,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,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,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,4,8,12,16,20,24,28,32,4,10,16,22,28,34,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,5,9,13,17,21,25,29,33,4,10,16,22,28,34}; // set of end times of each shipment 
