MinlpPenaltyFunc Class Reference

A Penalty Function for a MinlpProblem. More...

#include <problem.h>

Inheritance diagram for MinlpPenaltyFunc:
Inheritance graph
[legend]
Collaboration diagram for MinlpPenaltyFunc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MinlpPenaltyFunc (Pointer< MinlpProblem > minlp_, Pointer< Param > penalty_param=NULL)
 Constructor for a MinlpProblem.
double eval (const UserVector< double > &x) const
 Evaluates the penalty function for a UserVector<double>.
int valgrad (double &val, UserVector< double > &y, const UserVector< double > &x) const
 Computes the value and the gradient of this penalty function.
void grad (UserVector< double > &y, const UserVector< double > &x) const
 Computes the gradient of this penalty function.
void HessMult (UserVector< double > &y, const UserVector< double > &z, const UserVector< double > &x) const
 Computes the product of the hessian of this matrix and a UserVector<double>.
virtual void set_curvature (CurvatureType ct)
virtual CurvatureType get_curvature () const
void print (ostream &out) const
 Prints some information about this function.

Public Attributes

dvector delta
 The vector of delta-values.

Private Attributes

Pointer< MinlpProblemminlp
 The MinlpProblem.

Detailed Description

A Penalty Function for a MinlpProblem.

The function has the form $ \Psi (x) = \sum_{i\in I_i} \delta_i \max \{0,f_i(x)\} + \sum_{i\in I_e} \delta_i |f_i(x)|. $

Definition at line 327 of file problem.h.


Constructor & Destructor Documentation

MinlpPenaltyFunc::MinlpPenaltyFunc ( Pointer< MinlpProblem minlp_,
Pointer< Param penalty_param = NULL 
) [inline]

Constructor for a MinlpProblem.

Sets the delta-values to 1000.

Parameters:
minlp_ The MinlpProblem, which PenaltyFunc should be represented.
penalty_param The delta-values for penalty of each constraints as parameters, default is "penaltyfunc.res".

Definition at line 343 of file problem.h.


Member Function Documentation

double MinlpPenaltyFunc::eval ( const UserVector< double > &  x  )  const [virtual]

Evaluates the penalty function for a UserVector<double>.

Parameters:
x The UserVector<double> to compute the value for.
Returns:
The value of this function.
See also:
MinlpPenaltyFunc
valgrad(double&, UserVector<double>&, const UserVector<double>&)

Implements Func.

int MinlpPenaltyFunc::valgrad ( double &  val,
UserVector< double > &  y,
const UserVector< double > &  x 
) const [virtual]

Computes the value and the gradient of this penalty function.

The gradient of the absolut of an equality constraint is handled as zero, if the gradient of the equality constraint is zero.

Parameters:
val A double to store the value in.
y A UserVector<double> to store the gradient in.
x The UserVector<double> to compute.
Returns:
0
See also:
eval(const UserVector<double>&)
grad(UserVector<double>&, const UserVector<double>&)

Reimplemented from Func.

void MinlpPenaltyFunc::grad ( UserVector< double > &  y,
const UserVector< double > &  x 
) const [virtual]

Computes the gradient of this penalty function.

Calls valgrad(double&, UserVector<double>&, const UserVector<double>&).

Parameters:
y The UserVector<double> to store the gradient in.
x The UserVector<double> to compute.
See also:
valgrad(double&, UserVector<double>&, const UserVector<double>&)

Implements Func.

void MinlpPenaltyFunc::HessMult ( UserVector< double > &  y,
const UserVector< double > &  z,
const UserVector< double > &  x 
) const [virtual]

Computes the product of the hessian of this matrix and a UserVector<double>.

Parameters:
y The UserVector<double> to store the result in.
z The UserVector<double> to compute the hessian for.
x The UserVector<double> to multiply with the hessian.

Implements Func.

virtual void MinlpPenaltyFunc::set_curvature ( CurvatureType  ct  )  [inline, virtual]

Implements Func.

Definition at line 390 of file problem.h.

virtual CurvatureType MinlpPenaltyFunc::get_curvature (  )  const [inline, virtual]

Implements Func.

Definition at line 391 of file problem.h.

void MinlpPenaltyFunc::print ( ostream &  out  )  const [inline, virtual]

Prints some information about this function.

Prints the delta vector.

Parameters:
out The ostream to print to.
See also:
delta

Reimplemented from Func.

Definition at line 398 of file problem.h.


Member Data Documentation

The MinlpProblem.

Definition at line 331 of file problem.h.

The vector of delta-values.

Definition at line 336 of file problem.h.


The documentation for this class was generated from the following file:

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1