BoundsFinder Class Reference

Finds bounds for variables. More...

#include <boxfind.h>

Collaboration diagram for BoundsFinder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BoundsFinder (Pointer< Param > param_=NULL)
 (Standard-)Constructor.
pair< int, int > compute_bounds (MinlpProblem &prob, vector< bool > &discr)
 Tries to find or improve variables bounds.
pair< int, int > compute_bounds_guess (MinlpProblem &prob)
 Tries to find missing bounds by guessing.
pair< int, int > compute_bounds_expensive (MinlpProblem &conv_prob, dvector &lower, dvector &upper, vector< bool > &discr)
 Tries to find or improve variable bounds.
pair< int, int > compute_bounds_expensive2 (MinlpProblem &conv_prob, dvector &lower, dvector &upper, vector< bool > &discr)
 Tries to find or improve variable bounds.
void compute_linbounds (MinlpProblem &prob)
 Computes bounds using linear constraints.

Public Attributes

bool low
bool up
bool known

Private Member Functions

double compute_bound (MinlpProblem &conv_prob, int &ret, int index, int block, bool low)
 Computes a new bound for one variables.

Private Attributes

Pointer< Paramparam
 Parameters.
int method
 The method to use to find and update bounds.

Detailed Description

Finds bounds for variables.

Parameters:
BoundsFinder method options guess, expensive, expensive2 default guess level 1 The method, how to compute missing bounds in case that Boxreduce effort is set to 2. ``guess'' just guesses bounds, while expensive tries to compute an enclosure of the set determined by the convex constraints of the original problem.
Box Reduction skip binaries options 0, 1 default 0 level 0 Indicates, whether we should skip to perform box reduction for binary variables.

Definition at line 32 of file boxfind.h.


Constructor & Destructor Documentation

BoundsFinder::BoundsFinder ( Pointer< Param param_ = NULL  ) 

(Standard-)Constructor.

Parameters:
param_ Parameters, default is NULL.

Member Function Documentation

double BoundsFinder::compute_bound ( MinlpProblem conv_prob,
int &  ret,
int  index,
int  block,
bool  low 
) [private]

Computes a new bound for one variables.

Calls SNOPT for the problem min { (low ? 1 : -1) * x_(block,index) s.t. con's from conv_prob }.

Parameters:
conv_prob A convex problem, we can give to SNOPT after changing it's objective.
ret An integer to store the return value from SNOPT in.
index The index (in a block) of the variable to compute the bound for.
block The block number of the variables to compute the bound for.
low Indicates, wheter we should compute the lower (true) or upper bound.
Returns:
The new bound.
pair<int,int> BoundsFinder::compute_bounds ( MinlpProblem prob,
vector< bool > &  discr 
)

Tries to find or improve variables bounds.

Depending on the parameter "BoundsFinder method" calls the simple or expensive method.

Parameters:
prob A problem, for which variable bounds should be computed.
discr Indicates, which variables were discrete in the original problem.
Returns:
The number of bounds, where we had problems to compute a new bound and the number of guessed bounds.
pair<int,int> BoundsFinder::compute_bounds_guess ( MinlpProblem prob  ) 

Tries to find missing bounds by guessing.

Computes the minimum/maximum of all existing lower/upper bounds. A guess for a missing lower bound is than 10*MIN(min_lower, -1). A guess for a missing upper bound is than 10*MAX(min_lower, -1).

Parameters:
prob A MinlpProblem to guess missing bounds for.
Returns:
The number guessed bounds in the second part.
pair<int,int> BoundsFinder::compute_bounds_expensive ( MinlpProblem conv_prob,
dvector lower,
dvector upper,
vector< bool > &  discr 
)

Tries to find or improve variable bounds.

For each variable x, tries to solve the problems max/min { x s.t. convex-constraints from conv_prob. } with SNOPT. If SNOPT returns 0, 3 or 9, it takes the solution from snopt as a new bound, if it doesn't exceed a limit. If SNOPT returns with other code, it guesses a new bound.

In normal, a new bound of variable j is not used when we compute the bounds of variables after j. But if the variable was unbounded or SNOPT returns with 0, we use the new bounds also to compute other bounds.

So the bounds in conv_prob are changed, when we are sure.

Parameters:
conv_prob A convex problem, which objective is changed during this method.
lower A dvector to store the computed lower bounds in, even the one, where we are not sure.
upper A dvector to store the computed upper bounds in, even the one, where we are not sure.
discr Indicates, which variables were discrete in the original problem.
Returns:
The number of bounds, where we had problems to compute a new bound (LocOpt return != 0) and the number of guessed bounds.
pair<int,int> BoundsFinder::compute_bounds_expensive2 ( MinlpProblem conv_prob,
dvector lower,
dvector upper,
vector< bool > &  discr 
)

Tries to find or improve variable bounds.

Runs compute_bounds_expensive as often, as the number of errors is decreasing.

Parameters:
conv_prob A convex problem, which variable bounds should be improved.
lower A dvector to store the computed lower bounds in, even the one, where we are not sure.
upper A dvector to store the computed upper bounds in, even the one, where we are not sure.
discr Indicates, which variables were discrete in the original problem.
Returns:
The (final) number of bounds, where we had problems to compute a new bound (LocOpt return != 0) and the number of guessed bounds.
void BoundsFinder::compute_linbounds ( MinlpProblem prob  ) 

Computes bounds using linear constraints.

Computes bounds of variables in constraints of the form bx+c <= 0.

Parameters:
prob The problem, for which we compute the new bounds.

Member Data Documentation

Parameters.

Definition at line 36 of file boxfind.h.

int BoundsFinder::method [private]

The method to use to find and update bounds.

Definition at line 40 of file boxfind.h.

Definition at line 54 of file boxfind.h.

Definition at line 54 of file boxfind.h.

Definition at line 54 of file boxfind.h.


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

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1