Derivation of AlpsModel for DECOMP. More...
#include <AlpsDecompModel.h>
Public Member Functions | |
Constructors and destructor. | |
AlpsDecompModel () | |
Default constructors. | |
AlpsDecompModel (UtilParameters &utilParam, DecompAlgo *decompAlgo) | |
Default constructors. | |
virtual | ~AlpsDecompModel () |
Destructor. | |
Virtual functions from AlpsModel. | |
virtual AlpsTreeNode * | createRoot () |
Create the root node of the search tree. | |
virtual bool | fathomAllNodes () |
Return true, if all nodes can be fathomed. | |
Helper functions. | |
AlpsExitStatus | solve () |
Solve with ALPS and DECOMP. | |
void | setAlpsSettings () |
Set the ALPS parameters. | |
void | setDecompAlgo (DecompAlgo *decompAlgo) |
Solve with ALPS and DECOMP. | |
Set/get methods. | |
DecompAlgo * | getDecompAlgo () |
Get a ptr to the decomp algorithm vector. | |
AlpsDecompParam & | getParam () |
Get a ptr to the decomp algorithm vector. | |
const int | getNumCoreRows () const |
Get number of rows in core decomp model. | |
const int | getNumCoreCols () const |
Get number of cols in core decomp model. | |
const std::vector< std::string > & | getColNames () const |
Get the column names in core decomp model. | |
const std::vector< std::string > & | getRowNames () const |
Get the row names in core decomp model. | |
const DecompSolution * | getBestSolution () const |
Get the best solution found. | |
const double | getGlobalLB () const |
Get a ptr to the decomp algorithm vector. | |
const double | getGlobalUB () const |
Get a ptr to the decomp algorithm vector. | |
const int | getSolStatus () const |
Get a ptr to the decomp algorithm vector. | |
const int | getNumNodesProcessed () const |
Get a ptr to the decomp algorithm vector. | |
Private Attributes | |
Data. | |
std::string | m_classTag |
Store the name of the class (for logging/debugging) - "who am I?". | |
AlpsDecompParam | m_param |
Parameters for Alps. | |
DecompAlgo * | m_decompAlgo |
Pointer to decomp algorithm used for bounding. | |
double | m_bestLB |
Objective of best solution found. | |
double | m_bestUB |
Store the name of the class (for logging/debugging) - "who am I?". | |
int | m_nodesProcessed |
Store the name of the class (for logging/debugging) - "who am I?". | |
int | m_alpsStatus |
Store the name of the class (for logging/debugging) - "who am I?". |
Derivation of AlpsModel for DECOMP.
An object derived from AlpsModel. It interfaces with DECOMP methods through a pointer to the active DecompAlgo.
Virtual methods that should be derived here:
Clone a monkey.
Arm wrestle Ted.
Allow use of Alps writeParameters.
Use message handler.
Use differencing scheme.
Setup for parallel.
Definition at line 65 of file AlpsDecompModel.h.
AlpsDecompModel::AlpsDecompModel | ( | ) | [inline] |
Default constructors.
Definition at line 113 of file AlpsDecompModel.h.
AlpsDecompModel::AlpsDecompModel | ( | UtilParameters & | utilParam, | |
DecompAlgo * | decompAlgo | |||
) | [inline] |
Default constructors.
Definition at line 120 of file AlpsDecompModel.h.
References setAlpsSettings(), and UtilException.
virtual AlpsDecompModel::~AlpsDecompModel | ( | ) | [inline, virtual] |
Destructor.
Definition at line 136 of file AlpsDecompModel.h.
virtual AlpsTreeNode* AlpsDecompModel::createRoot | ( | ) | [virtual] |
Create the root node of the search tree.
Reimplemented from AlpsModel.
virtual bool AlpsDecompModel::fathomAllNodes | ( | ) | [virtual] |
Return true, if all nodes can be fathomed.
Reimplemented from AlpsModel.
AlpsExitStatus AlpsDecompModel::solve | ( | ) |
Solve with ALPS and DECOMP.
void AlpsDecompModel::setAlpsSettings | ( | ) |
Set the ALPS parameters.
Referenced by AlpsDecompModel().
void AlpsDecompModel::setDecompAlgo | ( | DecompAlgo * | decompAlgo | ) | [inline] |
Solve with ALPS and DECOMP.
Definition at line 178 of file AlpsDecompModel.h.
References m_decompAlgo.
DecompAlgo* AlpsDecompModel::getDecompAlgo | ( | ) | [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 195 of file AlpsDecompModel.h.
References m_decompAlgo.
AlpsDecompParam& AlpsDecompModel::getParam | ( | ) | [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 199 of file AlpsDecompModel.h.
References m_param.
const int AlpsDecompModel::getNumCoreRows | ( | ) | const [inline] |
Get number of rows in core decomp model.
Definition at line 207 of file AlpsDecompModel.h.
References DecompAppModel::getModel(), DecompAlgo::getModelCore(), DecompConstraintSet::getNumRows(), and m_decompAlgo.
const int AlpsDecompModel::getNumCoreCols | ( | ) | const [inline] |
Get number of cols in core decomp model.
Definition at line 214 of file AlpsDecompModel.h.
References DecompAppModel::getModel(), DecompAlgo::getModelCore(), DecompConstraintSet::getNumCols(), and m_decompAlgo.
Referenced by AlpsDecompNodeDesc::AlpsDecompNodeDesc().
const std::vector<std::string>& AlpsDecompModel::getColNames | ( | ) | const [inline] |
Get the column names in core decomp model.
Definition at line 221 of file AlpsDecompModel.h.
References DecompConstraintSet::getColNames(), DecompAppModel::getModel(), DecompAlgo::getModelCore(), and m_decompAlgo.
const std::vector<std::string>& AlpsDecompModel::getRowNames | ( | ) | const [inline] |
Get the row names in core decomp model.
Definition at line 228 of file AlpsDecompModel.h.
References DecompAppModel::getModel(), DecompAlgo::getModelCore(), DecompConstraintSet::getRowNames(), and m_decompAlgo.
const DecompSolution* AlpsDecompModel::getBestSolution | ( | ) | const [inline] |
Get the best solution found.
Definition at line 235 of file AlpsDecompModel.h.
References DecompAlgo::getXhatIPBest(), and m_decompAlgo.
const double AlpsDecompModel::getGlobalLB | ( | ) | const [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 239 of file AlpsDecompModel.h.
References m_bestLB.
const double AlpsDecompModel::getGlobalUB | ( | ) | const [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 242 of file AlpsDecompModel.h.
References m_bestUB.
const int AlpsDecompModel::getSolStatus | ( | ) | const [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 245 of file AlpsDecompModel.h.
References m_alpsStatus.
const int AlpsDecompModel::getNumNodesProcessed | ( | ) | const [inline] |
Get a ptr to the decomp algorithm vector.
Definition at line 248 of file AlpsDecompModel.h.
References m_nodesProcessed.
std::string AlpsDecompModel::m_classTag [private] |
Store the name of the class (for logging/debugging) - "who am I?".
Definition at line 79 of file AlpsDecompModel.h.
AlpsDecompParam AlpsDecompModel::m_param [private] |
DecompAlgo* AlpsDecompModel::m_decompAlgo [private] |
Pointer to decomp algorithm used for bounding.
Definition at line 89 of file AlpsDecompModel.h.
Referenced by getBestSolution(), getColNames(), getDecompAlgo(), getNumCoreCols(), getNumCoreRows(), getRowNames(), and setDecompAlgo().
double AlpsDecompModel::m_bestLB [private] |
Objective of best solution found.
Definition at line 94 of file AlpsDecompModel.h.
Referenced by getGlobalLB().
double AlpsDecompModel::m_bestUB [private] |
Store the name of the class (for logging/debugging) - "who am I?".
Definition at line 95 of file AlpsDecompModel.h.
Referenced by getGlobalUB().
int AlpsDecompModel::m_nodesProcessed [private] |
Store the name of the class (for logging/debugging) - "who am I?".
Definition at line 96 of file AlpsDecompModel.h.
Referenced by getNumNodesProcessed().
int AlpsDecompModel::m_alpsStatus [private] |
Store the name of the class (for logging/debugging) - "who am I?".
Definition at line 97 of file AlpsDecompModel.h.
Referenced by getSolStatus().