Dip  0.92.4
List of all members
AlpsDecompModel Class Reference

Derivation of AlpsModel for DECOMP. More...

#include <AlpsDecompModel.h>

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

Public Member Functions

Constructors and destructor.
 AlpsDecompModel ()
 Default constructors. More...
 
 AlpsDecompModel (UtilParameters &utilParam, DecompAlgo *decompAlgo)
 Default constructors. More...
 
virtual ~AlpsDecompModel ()
 Destructor. More...
 
Virtual functions from AlpsModel.
virtual AlpsTreeNodecreateRoot ()
 Create the root node of the search tree. More...
 
virtual bool fathomAllNodes ()
 Return true, if all nodes can be fathomed. More...
 
Helper functions.
AlpsExitStatus solve ()
 Solve with ALPS and DECOMP. More...
 
void setAlpsSettings ()
 Set the ALPS parameters. More...
 
void setDecompAlgo (DecompAlgo *decompAlgo)
 Solve with ALPS and DECOMP. More...
 
Set/get methods.
DecompAlgogetDecompAlgo ()
 Get a ptr to the decomp algorithm vector. More...
 
AlpsDecompParamgetParam ()
 Get a ptr to the decomp algorithm vector. More...
 
const int getNumCoreRows () const
 Get number of rows in core decomp model. More...
 
const int getNumCoreCols () const
 Get number of cols in core decomp model. More...
 
const std::vector< std::string > & getColNames () const
 Get the column names in core decomp model. More...
 
const std::vector< std::string > & getRowNames () const
 Get the row names in core decomp model. More...
 
const DecompSolutiongetBestSolution () const
 Get the best solution found. More...
 
const double getGlobalLB () const
 Get a ptr to the decomp algorithm vector. More...
 
const double getGlobalUB () const
 Get a ptr to the decomp algorithm vector. More...
 
const int getSolStatus () const
 Get a ptr to the decomp algorithm vector. More...
 
const int getNumNodesProcessed () const
 Get a ptr to the decomp algorithm vector. More...
 
- Public Member Functions inherited from AlpsModel
 AlpsModel ()
 Default construtor. More...
 
virtual ~AlpsModel ()
 Destructor. More...
 
AlpsKnowledgeBrokergetKnowledgeBroker ()
 Get knowledge broker. More...
 
void setKnowledgeBroker (AlpsKnowledgeBroker *b)
 Set knowledge broker. More...
 
std::string getDataFile () const
 Get the input file. More...
 
void setDataFile (std::string infile)
 Set the data file. More...
 
AlpsParamsAlpsPar ()
 Access Alps Parameters. More...
 
virtual void readInstance (const char *dateFile)
 Read in the instance data. More...
 
virtual void readParameters (const int argnum, const char *const *arglist)
 Read in Alps parameters. More...
 
void writeParameters (std::ostream &outstream) const
 Write out parameters. More...
 
virtual bool setupSelf ()
 
Do necessary work to make model ready for use, such as classify 

variable and constraint types. More...

 
virtual void preprocess ()
 Preprocessing the model. More...
 
virtual void postprocess ()
 Postprocessing results. More...
 
virtual void modelLog ()
 Problem specific log. More...
 
virtual void nodeLog (AlpsTreeNode *node, bool force)
 Node log. More...
 
AlpsReturnStatus encodeAlps (AlpsEncoded *encoded) const
 Pack Alps portion of node into an encoded object. More...
 
AlpsReturnStatus decodeAlps (AlpsEncoded &encoded)
 Unpack Alps portion of node from an encoded object. More...
 
virtual void decodeToSelf (AlpsEncoded &encoded)
 Decode model data from the encoded form and fill member data. More...
 
virtual void registerKnowledge ()
 Register knowledge class. More...
 
virtual void sendGeneratedKnowledge ()
 Send generated knowledge. More...
 
virtual void receiveGeneratedKnowledge ()
 Receive generated knowledge. More...
 
virtual AlpsEncodedpackSharedKnowlege ()
 Pack knowledge to be shared with others into an encoded object. More...
 
virtual void unpackSharedKnowledge (AlpsEncoded &)
 Unpack and store shared knowledge from an encoded object. More...
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 
virtual ~AlpsKnowledge ()
 
KnowledgeType getType ()
 
void setType (KnowledgeType t)
 
virtual AlpsEncodedencode () const
 This method should encode the content of the object and return a pointer to the encoded form. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const
 This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More...
 
AlpsEncodedgetEncoded () const
 Get/set encoded. More...
 
void setEncoded (AlpsEncoded *e)
 

Private Attributes

Data.
std::string m_classTag
 Store the name of the class (for logging/debugging) - "who am I?". More...
 
AlpsDecompParam m_param
 Parameters for Alps. More...
 
DecompAlgom_decompAlgo
 Pointer to decomp algorithm used for bounding. More...
 
double m_bestLB
 Objective of best solution found. More...
 
double m_bestUB
 Store the name of the class (for logging/debugging) - "who am I?". More...
 
int m_nodesProcessed
 Store the name of the class (for logging/debugging) - "who am I?". More...
 
int m_alpsStatus
 Store the name of the class (for logging/debugging) - "who am I?". More...
 

Additional Inherited Members

- Protected Attributes inherited from AlpsModel
AlpsKnowledgeBrokerbroker_
 Knowledge broker. More...
 
std::string dataFile_
 Data file. More...
 
AlpsParamsAlpsPar_
 The parameter set that is used in Alps. More...
 
- Protected Attributes inherited from AlpsKnowledge
KnowledgeType type_
 

Detailed Description

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:

See Also
AlpsModel
DecompAlgo
Todo:

Clone a monkey.

Arm wrestle Ted.

Allow use of Alps writeParameters.

Use message handler.

Use differencing scheme.

Setup for parallel.

Definition at line 64 of file AlpsDecompModel.h.

Constructor & Destructor Documentation

AlpsDecompModel::AlpsDecompModel ( )
inline

Default constructors.

Definition at line 112 of file AlpsDecompModel.h.

AlpsDecompModel::AlpsDecompModel ( UtilParameters utilParam,
DecompAlgo decompAlgo 
)
inline

Default constructors.

Definition at line 119 of file AlpsDecompModel.h.

References setAlpsSettings(), and UtilException.

virtual AlpsDecompModel::~AlpsDecompModel ( )
inlinevirtual

Destructor.

Definition at line 135 of file AlpsDecompModel.h.

Member Function Documentation

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 177 of file AlpsDecompModel.h.

References m_decompAlgo.

DecompAlgo* AlpsDecompModel::getDecompAlgo ( )
inline

Get a ptr to the decomp algorithm vector.

Definition at line 194 of file AlpsDecompModel.h.

References m_decompAlgo.

AlpsDecompParam& AlpsDecompModel::getParam ( )
inline

Get a ptr to the decomp algorithm vector.

Definition at line 198 of file AlpsDecompModel.h.

References m_param.

const int AlpsDecompModel::getNumCoreRows ( ) const
inline

Get number of rows in core decomp model.

Definition at line 206 of file AlpsDecompModel.h.

References DecompModel::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 213 of file AlpsDecompModel.h.

References DecompModel::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 220 of file AlpsDecompModel.h.

References DecompConstraintSet::getColNames(), DecompModel::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 227 of file AlpsDecompModel.h.

References DecompModel::getModel(), DecompAlgo::getModelCore(), DecompConstraintSet::getRowNames(), and m_decompAlgo.

const DecompSolution* AlpsDecompModel::getBestSolution ( ) const
inline

Get the best solution found.

Definition at line 234 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 238 of file AlpsDecompModel.h.

References m_bestLB.

const double AlpsDecompModel::getGlobalUB ( ) const
inline

Get a ptr to the decomp algorithm vector.

Definition at line 241 of file AlpsDecompModel.h.

References m_bestUB.

const int AlpsDecompModel::getSolStatus ( ) const
inline

Get a ptr to the decomp algorithm vector.

Definition at line 244 of file AlpsDecompModel.h.

References m_alpsStatus.

const int AlpsDecompModel::getNumNodesProcessed ( ) const
inline

Get a ptr to the decomp algorithm vector.

Definition at line 247 of file AlpsDecompModel.h.

References m_nodesProcessed.

Member Data Documentation

std::string AlpsDecompModel::m_classTag
private

Store the name of the class (for logging/debugging) - "who am I?".

Definition at line 78 of file AlpsDecompModel.h.

AlpsDecompParam AlpsDecompModel::m_param
private

Parameters for Alps.

Definition at line 83 of file AlpsDecompModel.h.

Referenced by getParam().

DecompAlgo* AlpsDecompModel::m_decompAlgo
private

Pointer to decomp algorithm used for bounding.

Definition at line 88 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 93 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 94 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 95 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 96 of file AlpsDecompModel.h.

Referenced by getSolStatus().


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