Skip to content
Numerical Method , home
Menu

Forum Numerical Method Optimization

How to use function "search" in the package "Minimizer"?

  1. megatrooperParticipant 2011-06-04 at 4:50 am

    for the package: com.numericalmethod.suanshu.optimization.Minimizer ,

    the method search is used to find the vector of values of parameters which can minimize the function of the parameters.

    but how to declare a function with 2 or more variables? Is that similar to UnivariateRealFunction? And from the javadoc in numerical method, what should I enter for “vector” in the search method? And where should I enter the function such that the method search can help me to optimize? Also, where should the constraint be entered?

    How to minimize x^2+y^2 given the condition x+y=1 using “search” ? Is the code similar when there is no constraints?

  2. Haksun LiModerator 2011-06-04 at 12:16 pm

    Hello Issac,

    Please take a look at this example. http://www.numericalmethod.com/wiki/numericalmethod/browser/public/Examples/src/com/numericalmethod/suanshu/examples/Optimization.java

    We have published a few examples on using SuanShu. You may find the collection at: http://www.numericalmethod.com/wiki/numericalmethod/browser/public/Examples/src/com/numericalmethod/suanshu/examples?order=name

    Let us know if you have further questions.

  3. Haksun LiModerator 2011-06-04 at 12:22 pm

    Please take a look at the example [tt:1ky4anvh]generalConstrainedOptimUsingBFGS[/tt:1ky4anvh] for solving a constrained optimization problem.