I'm running a NMaximize problem using NelderMead. For a reason I don't understand when I try to set different initial points using RandomSeed and I check this with the step monitor the initial vector is always the same. I don't know if this is a problem with the number of parameters I'm looking for because I tried fixing n-1 parameters finding that the RandomSeed was working properly. Does anyone now if RamdonSeed has some constraints (like dimensionality)?
This is the last part of my code:
seed = RandomInteger[{0, 1000}];
resultMax =
NMaximize[
objFunctionUnique[0.582667, 0.000026, 0.000084, b0, b1, b2, b3, b4,
b5, b6, b7, b8, b9, b10, b11, 0, yT2002, yT2003, yT2004, yT2005,
yT2006, yT2007, yT2008, 0, 1, a1, a2, a3, a4, a5, 0, a7, a8, a9,
a10, a11, 0, a13, yP2002, yP2003, yP2004, yP2005, yP2006, yP2007,
yP2008, yP2009],
{b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, yT2002, yT2003,
yT2004, yT2005, yT2006, yT2007, yT2008, a1, a2, a3, a4, a5, a7,
a8, a9, a10, a11, a13, yP2002, yP2003, yP2004, yP2005, yP2006,
yP2007, yP2008, yP2009},
Method -> {"NelderMead", "RandomSeed" -> seed},
MaxIterations -> 10000, WorkingPrecision -> 5,
StepMonitor :>
Print[{seed,
objFunctionUnique[0.582667, 0.000026, 0.000084, b0, b1, b2, b3,
b4, b5, b6, b7, b8, b9, b10, b11, 0, yT2002, yT2003, yT2004,
yT2005, yT2006, yT2007, yT2008, 0, 1, a1, a2, a3, a4, a5, 0,
a7, a8, a9, a10, a11, 0, a13, yP2002, yP2003, yP2004, yP2005,
yP2006, yP2007, yP2008, yP2009], {b0, b1, b2, b3, b4, b5, b6,
b7, b8, b9, b10, b11, yT2002, yT2003, yT2004, yT2005, yT2006,
yT2007, yT2008, a1, a2, a3, a4, a5, a7, a8, a9, a10, a11, a13,
yP2002, yP2003, yP2004, yP2005, yP2006, yP2007, yP2008,
yP2009}}]
];

seed = RandomInteger[{0, 1000}]; f = Sin[Sum[Random[] a[i], {i, 10}]]; resultMax = NMaximize[f, Array[a, 100], Method -> {"NelderMead", "RandomSeed" -> seed}, MaxIterations -> 10000, WorkingPrecision -> 5, StepMonitor :> Print[{seed, f, Array[a, 100]}]]– Sjoerd C. de Vries Feb 6 at 20:45seed = RandomInteger[{0, 1000}];in a separate cell fromresultMax = ...? – rcollyer Feb 7 at 3:14