The penalty method for optimization with an equality constraint. More...
#include <Penalty.h>
Public Types | |
typedef Function | function_type |
The function type. | |
typedef Constraint | constraint_type |
The constraint type. | |
typedef T | number_type |
The number type. | |
typedef Point | point_type |
A point in N dimensions. | |
Public Member Functions | |
Constructors etc. | |
Penalty (const function_type &function, const constraint_type &constraint, const number_type initial_step_size=std::pow(std::numeric_limits< number_type >::epsilon(), 0.25), const number_type final_step_size=std::sqrt(std::numeric_limits< number_type >::epsilon()), const number_type max_constraint_error=std::pow(std::numeric_limits< number_type >::epsilon(), 0.25), const int max_function_calls=10000) | |
Construct from the objective function, the constraint and many optional parameters. | |
virtual | ~Penalty () |
Destructor. | |
Minimization. | |
void | find_minimum (point_type &x) |
Find the minimum to within the tolerances. | |
Accessors. | |
number_type | penalty_parameter () const |
Return the penalty parameter. | |
number_type | max_constraint_error () const |
Return the maximum allowed constraint error. | |
Manipulators. | |
void | set_initial_step_size (const number_type initial_step_size) |
Set the initial step size. | |
void | set_final_step_size (const number_type final_step_size) |
Set the stepsize at which to halt optimization. | |
void | set_step_size_reduction_factor (const number_type step_size_reduction_factor) |
Set the stepsize reduction factor. | |
void | set_max_constraint_error (const number_type max_constraint_error) |
Set the maximum allowed constraint error. | |
void | set_penalty_parameter (const number_type penalty_parameter) |
Set the penalty parameter. |
The penalty method for optimization with an equality constraint.
N | is the problem dimension. | |
Function | is the functor to minimize. | |
Constraint | is the equality constraint. | |
T | is the number type. By default it is Function::result_type; | |
Point | is the point type. By default it is Function::argument_type; |