Simplex minimization of function in a limited research range?
Feuerstein
11-22-2006, 11:18 AM
Hello
I am looking for a method to constrain the variables in a limited range during minimization of function of those variables.
My problem is that I want to avoid convergence to values which are out of my estimated searching range.
Thanks
Feuerstein
David Buchan
11-23-2006, 12:48 AM
Feuerstein,
I believe the easiest way to constrain the range of possible solutions that downhill simplex can find, is by adjusting the cost function ytry when your limits are exceeded.
So, in amotry, after a new point ptry is determined, you check to see if it is outside your limits. i.e., loop through all ndim coordinates of ptry, comparing with your limits. If any exceed your limits, set the cost function ytry to some huge value, otherwise, let amotry set it to its usual function value (ytry=funk(ptry)) as normal. Everything else then continues as before, where amotry tests to see if ytry is better (smaller) than the highest cost function value.
Dave Buchan
Feuerstein
11-23-2006, 03:17 AM
I did what you propose, but i am still thinking about this "huge value" should it be x times bigger than the max const function or could it be just few times?
Thanks
F
David Buchan
11-23-2006, 05:52 AM
Actually, the "huge" ytry value just has to be big enough that you can be confident that the downhill simplex method won't mistake that value for a global cost function minimum. Theoretically, it could be just fractionally bigger than the smallest value in your solution space (the one you're trying to find). BUT, downhill simplex can get stuck at local minima, so I would use some value that is a few orders of magnitude above your largest (if you roughly know the largest), just to be unamibiguous. Or you could just set it to 1E40 or something really humungous.
Also it occurs to me you could put all this constraint business inside your function funk instead of amotry. That way, you keep your coding separate from NR's code. That's merely a matter of taste though.
Dave Buchan
kutta
06-09-2007, 04:15 AM
Hello
I am looking for a method to constrain the variables in a limited range during minimization of function of those variables.
My problem is that I want to avoid convergence to values which are out of my estimated searching range.
Thanks
Feuerstein
Pl.try to execute this programm which is for either max or min.
You pl confirm if this is suitable for your limited scope.
As Always
C.R.Muthukumar
kutta
11-29-2007, 09:37 AM
Pl.try to execute this programm which is for either max or min.
You pl confirm if this is suitable for your limited scope.
As Always
C.R.Muthukumar
It appears that you were neither able to respond if the one suggested is ok or not nor you expect a still and yet another
example that will perhaps suits your quest.So pl try and repond to help better this time.
Thanks and As Always
C.R.Muthukumar(Kutta):)