Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
I have a quick question.
I am using the MINIMIZE and MAXIMIZE function, to find parameters value that optimize a funciton.
I am wondering how I can set the solver to find the GLOBAL max or min of the function, or to set to give me LOCAL max or min.
Is that possible?
Thank you in advance
Regards
Hi Manuel,
In Mathcad's "Data Analysis Extension Pack" (in main program menu of Mathcad 14/15 select "Help" --> "E-books" --> "Data Analysis Extension Pack") there are two functions which can help you with this - "localmax"/"localmin". Quote: "The routines localmax and localmin compare adjacent values in a data set to determine local maxima and minima. The optional window value, w, determines how many points on each side of the point in question must also be smaller or larger for the point to be considered maximum or minimum. Larger windows will help give true maxima for noisy data sets. These functions work for both 2D and 3D data sets". Examples of the work of these functions can be found in the attachment.
I am using the MINIMIZE and MAXIMIZE function, to find parameters value that optimize a funciton.
I am wondering how I can set the solver to find the GLOBAL max or min of the function, or to set to give me LOCAL max or min.
You can't do that. That's not how non-linear solvers work. They start at some point on the surface (defined by your guess) and head either downhill or uphill until they reach either the minimum or the maximum. Then they stop. The solver has no way to know if it's found a local or a global minimum or maximum. There is in fact no general solution that guarantees finding the global minimum or maximum of a function (unless there is a symbolic solution, of course).
The functions Vladimir points to can be used to find the minima or maxima in data, but not to minimize or maximize functions,
Richard Jackson wrote:
... The functions Vladimir points to can be used to find the minima or maxima in data, but not to minimize or maximize functions...
Thanks Richard. I forgot to mention it.