Convexify Class Reference

Class to convexify a (decomposed) function. More...

#include <relax.h>

Collaboration diagram for Convexify:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Convexify (Pointer< Param > param_)
void new_sampleset (UserVector< double > &lower, UserVector< double > &upper, SepQcFunc &f)
 Computes a new sample set for the nonlinear blocks of a function.
double convexify (SepQcFunc &f, bool eq, vector< double > &min_eigval, vector< double > &max_eigval, UserVector< double > &lower, UserVector< double > &upper)
 Computes the cgu or alpha parameters for a function.
void get_decomposed_functions (pair< Pointer< SepQcFunc >, Pointer< SepQcFunc > > &f)
 Gives a convexified function.
void check_convex2 (vector< double > &min_eigval, vector< double > &max_eigval, SepQcFunc &f, const vector< vector< dvector > > &sample_set)
void check_convexification (MinlpProblem &conv_prob, MinlpProblem &orig_prob, const ivector &ineq_index, int test_pts=20)
 Checks, if a problem is a convex relaxation of another problem.

Public Attributes

vector< pair< double, double > > convexify_c
 Constant parts, generated by alpha or cgu.
map< int, double > characteristica1
 The shifting parameters which characterize the latest convexification.
map< int, double > characteristica2

Private Member Functions

void convexify_cgu (SepQcFunc &f, int k)
 Computes the cgu-parameters for the convexification of the k'th block of f.
pair< double, double > convexify_alpha (SepQcFunc &f, int k, const dvector &low, const dvector &up, Pointer< set< int > > i_quad, Pointer< set< int > > i_nonquadlin)
 Computes the alpha-parameters for the convexification of the k'th block of f.
pair< double, double > convexify_alpha (SepQcFunc &f, int k, const dvector &low, const dvector &up)
pair< double, double > convexify_alpha2 (SepQcFunc &f, int k, const dvector &low, const dvector &up)

Private Attributes

Pointer< Paramparam
Sampling sampling
 Object to generate sample points.
vector< vector< dvector > > sample_set
Decomposition decomp
double very_large
double cgu_eps
pair< Pointer< UserVector<
double > >, Pointer< UserVector<
double > > > 
convexify_a
 Diagonal of matrices, generated by alpha or cgu method.
pair< Pointer< UserVector<
double > >, Pointer< UserVector<
double > > > 
convexify_b
 Linear parts, generated by alpha or cgu method.
vector< bool > convexified_by_cgu
 Indicates, whether the last function was convexified with the cgu method.

Detailed Description

Class to convexify a (decomposed) function.

Parameters:
Relax very large options double default 1E+99 Determines, when we use CGU and when we use the alpha-method to convexify a function. If ${}{} < -very$, we use CGU, else we try alpha. If the norm of the computed alpha is > very, we use also CGU.
Relax CGU epsilon options double $$ default 0. An epsilon, which is added to each constraint in the LP, we solve when we compute a CGU.

Definition at line 33 of file relax.h.


Constructor & Destructor Documentation

Convexify::Convexify ( Pointer< Param param_  )  [inline]

Definition at line 80 of file relax.h.

References cgu_eps, param, and very_large.


Member Function Documentation

void Convexify::convexify_cgu ( SepQcFunc f,
int  k 
) [private]

Computes the cgu-parameters for the convexification of the k'th block of f.

Parameters:
f The function to convexify.
k The block number.

pair<double, double> Convexify::convexify_alpha ( SepQcFunc f,
int  k,
const dvector low,
const dvector up,
Pointer< set< int > >  i_quad,
Pointer< set< int > >  i_nonquadlin 
) [private]

Computes the alpha-parameters for the convexification of the k'th block of f.

Parameters:
f The function to convexify.
k The block number.
low Lower bounds for the k'th block.
up Upper bounds for the k'th block.

pair<double, double> Convexify::convexify_alpha ( SepQcFunc f,
int  k,
const dvector low,
const dvector up 
) [private]

pair<double, double> Convexify::convexify_alpha2 ( SepQcFunc f,
int  k,
const dvector low,
const dvector up 
) [private]

void Convexify::new_sampleset ( UserVector< double > &  lower,
UserVector< double > &  upper,
SepQcFunc f 
)

Computes a new sample set for the nonlinear blocks of a function.

Parameters:
lower Lower bounds of variables.
upper Upper bounds of variables.
f The function, which block-structure we use.

double Convexify::convexify ( SepQcFunc f,
bool  eq,
vector< double > &  min_eigval,
vector< double > &  max_eigval,
UserVector< double > &  lower,
UserVector< double > &  upper 
)

Computes the cgu or alpha parameters for a function.

Parameters:
f The function.
eq Indicates, whether also the parameters for -f should be computed.
min_eigval The minimum eigenvalues for the hessians of each block of f.
max_eigval The maximum eigenvalues for the hessians of each block of f.
convex Indicates, whether f is convex.
concave Indicates, whether f is concave.
lower Lower bounds of variables.
upper Upper bounds of variables.

void Convexify::get_decomposed_functions ( pair< Pointer< SepQcFunc >, Pointer< SepQcFunc > > &  f  ) 

Gives a convexified function.

Gives the convexified function in it's decomposed form (the form, which was used in convexify).

Parameters:
f A pair, where ew can store the convexified f and (sometimes) -f in. At the beginning, it needs to hold the decomposed f at first place, the second needs to empty.

void Convexify::check_convex2 ( vector< double > &  min_eigval,
vector< double > &  max_eigval,
SepQcFunc f,
const vector< vector< dvector > > &  sample_set 
)

void Convexify::check_convexification ( MinlpProblem conv_prob,
MinlpProblem orig_prob,
const ivector ineq_index,
int  test_pts = 20 
)

Checks, if a problem is a convex relaxation of another problem.

Checks, if the minimum eigenvalues of the convexified functions are >=0. Checks, if the function values of the convexified functions are lower than the value of the original functions.

Parameters:
conv_prob The convexified problem.
orig_prob The original problem to compare with.
test_ptr The number of sample points to use, default is 20.


Member Data Documentation

Pointer<Param> Convexify::param [private]

Definition at line 35 of file relax.h.

Referenced by Convexify().

Sampling Convexify::sampling [private]

Object to generate sample points.

Definition at line 38 of file relax.h.

vector<vector<dvector> > Convexify::sample_set [private]

Definition at line 39 of file relax.h.

Decomposition Convexify::decomp [private]

Definition at line 41 of file relax.h.

double Convexify::very_large [private]

Definition at line 43 of file relax.h.

Referenced by Convexify().

double Convexify::cgu_eps [private]

Definition at line 43 of file relax.h.

Referenced by Convexify().

pair<Pointer<UserVector<double> >, Pointer<UserVector<double> > > Convexify::convexify_a [private]

Diagonal of matrices, generated by alpha or cgu method.

Definition at line 47 of file relax.h.

pair<Pointer<UserVector<double> >, Pointer<UserVector<double> > > Convexify::convexify_b [private]

Linear parts, generated by alpha or cgu method.

Definition at line 50 of file relax.h.

vector<bool> Convexify::convexified_by_cgu [private]

Indicates, whether the last function was convexified with the cgu method.

Definition at line 54 of file relax.h.

vector<pair<double, double> > Convexify::convexify_c

Constant parts, generated by alpha or cgu.

Definition at line 73 of file relax.h.

map<int, double> Convexify::characteristica1

The shifting parameters which characterize the latest convexification.

The function was convexified by adding sum_i shift_i (x_i- x_i)(x_i- x_i) for (i, shift_i) in the map.

Definition at line 78 of file relax.h.

map<int, double> Convexify::characteristica2

Definition at line 78 of file relax.h.


The documentation for this class was generated from the following file:
Generated on Wed Oct 22 03:12:51 2008 for LaGO by  doxygen 1.4.7