Alps  2.0.2
Protected Attributes | Private Attributes | List of all members
AlpsKnowledgeBroker Class Referenceabstract

The base class of knowledge broker class. More...

#include <AlpsKnowledgeBroker.h>

+ Inheritance diagram for AlpsKnowledgeBroker:
+ Collaboration diagram for AlpsKnowledgeBroker:

Public Member Functions

Constructor and Destructor.
 AlpsKnowledgeBroker ()
 Default constructor. More...
 
 AlpsKnowledgeBroker (AlpsModel &model)
 Constructor that sets the model. More...
 
virtual ~AlpsKnowledgeBroker ()
 Destructor. More...
 
Funcitons related to register knowledge.
void registerClass (int name, AlpsKnowledge *userKnowledge)
 Every user derived knowledge class must register. More...
 
const AlpsKnowledgedecoderObject (int name) const
 This method returns the pointer to an empty object of the registered class name. More...
 
Funcitons related to exploring subtree.
virtual void initializeSearch (int argc, char *argv[], AlpsModel &model, bool showBanner=true)=0
 Do some initialization for search. More...
 
virtual void rootSearch (AlpsTreeNode *root)=0
 Explore the tree rooted as the given root. More...
 
virtual void search (AlpsModel *model)
 Search best solution for a given model. More...
 
Get/set phase.
AlpsPhase getPhase ()
 
void setPhase (AlpsPhase ph)
 
AlpsModelgetModel ()
 
void setModel (AlpsModel *m)
 
int getTreeDepth ()
 Get tree depth. More...
 
void setPeakMemory (double size)
 Set peak memory usage. More...
 
double getPeakMemory ()
 Get peak memory usage. More...
 
Interface with the knowledge pools
void setupKnowledgePools ()
 Set up knowledge pools for this broker. More...
 
void addKnowledgePool (AlpsKnowledgeType kt, AlpsKnowledgePool *kp)
 Add a knowledge pool into the Knowledge pools. More...
 
AlpsKnowledgePoolgetKnowledgePool (AlpsKnowledgeType kt) const
 Retrieve a knowledge pool in the Knowledge base. More...
 
virtual int getNumKnowledges (AlpsKnowledgeType kt) const
 Query the number of knowledge in the given type of a knowledge pool. More...
 
virtual int getMaxNumKnowledges (AlpsKnowledgeType kt) const
 Query the max number of knowledge can be stored in a given type of knowledge pools. More...
 
virtual void setMaxNumKnowledges (AlpsKnowledgeType kt, int num)
 Set the max number of knowledge can be stored in a given type o fknowledge pools. More...
 
virtual bool hasKnowledge (AlpsKnowledgeType kt) const
 Query whether there are knowledges in the given type of knowledge pools. More...
 
virtual std::pair< AlpsKnowledge *, double > getKnowledge (AlpsKnowledgeType kt) const
 Get a knowledge, but doesn't remove it from the pool. More...
 
virtual void popKnowledge (AlpsKnowledgeType kt)
 Remove the a knowledge from the given type of knowledge pools. More...
 
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge (AlpsKnowledgeType kt) const
 Get the best knowledge in the given type of knowledge pools. More...
 
virtual void getAllKnowledges (AlpsKnowledgeType kt, std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
 Get all knowledges in the given type of knowledge pools. More...
 
virtual void addKnowledge (AlpsKnowledgeType kt, AlpsKnowledge *kl, double value)
 Add a knowledge in the given type of knowledge pools. More...
 
Querty and set statistics
int getNumNodesProcessed () const
 Query the number of node processed by this process. More...
 
int getNumNodesBranched () const
 Query the number of node processed by this process. More...
 
int getNumNodesDiscarded () const
 Query the number of node processed by this process. More...
 
int getNumNodesPartial () const
 Query the number of node in the queue that are pregnant. More...
 
int getNumNodesProcessedSystem () const
 Query the number of node processed by the system. More...
 
virtual int updateNumNodesLeft ()
 Update the number of left nodes on this process. More...
 
virtual AlpsTreeNodegetBestNode () const
 Query the best node in the subtree pool. More...
 
AlpsExitStatus getSolStatus () const
 Query search termination status. More...
 
void setExitStatus (AlpsExitStatus status)
 Set terminate status. More...
 
AlpsTimertimer ()
 Query timer. More...
 
AlpsTimersubTreeTimer ()
 Query subtree timer. More...
 
AlpsTimertempTimer ()
 Query secondary timer. More...
 
virtual void searchLog ()=0
 Search statistics log. More...
 
Query and set the approximate memory size of a tree node
int getNodeMemSize ()
 
void setNodeMemSize (int ms)
 
Query and set the approximate node processing time
double getNodeProcessingTime ()
 
void setNodeProcessingTime (double npTime)
 
int getLargeSize () const
 
Report the best result
virtual double getIncumbentValue () const =0
 The process queries the objective value of the incumbent that it stores. More...
 
virtual double getBestQuality () const =0
 The process (serial) / the master (parallel) queries the quality of the best solution that it knows. More...
 
virtual double getBestEstimateQuality ()
 Get best estimalted quality in system. More...
 
virtual int getNumNodeLeftSystem ()
 
virtual void printBestSolution (char *outputFile=0) const =0
 The process (serial) / the master (parallel) outputs the best solution that it knows to a file or std::out. More...
 
virtual int getProcRank () const
 Qeury the global rank of process. More...
 
virtual int getMasterRank () const
 Query the global rank of the Master. More...
 
virtual AlpsProcessType getProcType () const
 Query the type (master, hub, or worker) of the process. More...
 
Query and set node index
AlpsNodeIndex_t nextNodeIndex ()
 Query the next index assigned to a newly created node, and then increment the nextIndex_ by 1. More...
 
AlpsNodeIndex_t getNextNodeIndex () const
 Query the next index assigned to a newly created node. More...
 
void setNextNodeIndex (AlpsNodeIndex_t s)
 Set nextIndex_. More...
 
AlpsNodeIndex_t getMaxNodeIndex () const
 Queriy the upper bound of node indices. More...
 
void setMaxNodeIndex (AlpsNodeIndex_t s)
 Set the upper bound of node indices. More...
 
Query and set comparision
AlpsSearchStrategy< AlpsSubTree * > * getSubTreeSelection () const
 
void setSubTreeSelection (AlpsSearchStrategy< AlpsSubTree * > *tc)
 
AlpsSearchStrategy< AlpsTreeNode * > * getNodeSelection () const
 
void setNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > *nc)
 
AlpsSearchStrategy< AlpsTreeNode * > * getRampUpNodeSelection () const
 
void setRampUpNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > *nc)
 

Protected Attributes

std::string instanceName_
 The instance name. More...
 
AlpsModelmodel_
 Pointer to model. More...
 
AlpsPhase phase_
 Alps phase. More...
 
knowledge pools
AlpsSubTreePoolsubTreePool_
 A subtree pool holding a collection of subtrees. More...
 
AlpsSolutionPoolsolPool_
 A solution pool containing the solutions found. More...
 
std::map< AlpsKnowledgeType, AlpsKnowledgePool * > * pools_
 The collection of pools managed by the knowledge broker. More...
 
Exploring subtree
AlpsSubTreeworkingSubTree_
 Point to the subtree that being explored. More...
 
bool needWorkingSubTree_
 Indicate whether need a new subtree. More...
 
AlpsNodeIndex_t nextIndex_
 The index to be assigned to a new search tree node. More...
 
AlpsNodeIndex_t maxIndex_
 The maximum index can been assigned on this process. More...
 
Statistics
AlpsTimer timer_
 Main timer. More...
 
AlpsTimer subTreeTimer_
 Subtree timer. More...
 
AlpsTimer tempTimer_
 Secondary timer. More...
 
int solNum_
 The number of solutions found. More...
 
int nodeProcessedNum_
 The number of nodes that have been processed. More...
 
int nodeBranchedNum_
 The number of nodes that have been branched. More...
 
int nodeDiscardedNum_
 The number of nodes that have been discarded before processing. More...
 
int nodePartialNum_
 The number of nodes that are pregnant. More...
 
int systemNodeProcessed_
 To record how many nodes processed by the system (used in parallel code). More...
 
int nodeLeftNum_
 The number of nodes left. More...
 
int treeDepth_
 The depth of the tree. More...
 
int bestSolNode_
 The number of nodes pocessed to find the solution. More...
 
double peakMemory_
 Peak memory usage. More...
 
AlpsExitStatus exitStatus_
 The status of search when terminated. More...
 
Search strategy
AlpsSearchStrategy< AlpsSubTree * > * treeSelection_
 Tree selection criterion. More...
 
AlpsSearchStrategy< AlpsTreeNode * > * nodeSelection_
 Node selection criterion. More...
 
AlpsSearchStrategy< AlpsTreeNode * > * rampUpNodeSelection_
 Node selection criterion. More...
 
message handling
CoinMessageHandler * handler_
 Message handler. More...
 
CoinMessages messages_
 Alps messages. More...
 
int msgLevel_
 The leve of printing message to screen of the master and general message. More...
 
int hubMsgLevel_
 The leve of printing message to screen of hubs. More...
 
int workerMsgLevel_
 The leve of printing message to screen of workers. More...
 
int logFileLevel_
 The degree of log file. More...
 
std::string logfile_
 The log file. More...
 
int nodeMemSize_
 The approximate memory size (bytes) of a node with full description. More...
 
double nodeProcessingTime_
 The approximately CPU time to process a node. More...
 
int largeSize_
 The size of largest message buffer can be sent or received. More...
 
bool userBalancePeriod_
 Has user input balance period. More...
 
int numNodeLog_
 Times that node log is printed. More...
 

Private Attributes

std::map< int, AlpsKnowledge * > decodeMap_
 Stores registered knowledge. More...
 

Message and log file handling

void passInMessageHandler (CoinMessageHandler *handler)
 Pass in Message handler (not deleted at end). More...
 
void newLanguage (CoinMessages::Language language)
 Set language. More...
 
void setLanguage (CoinMessages::Language language)
 
CoinMessageHandler * messageHandler () const
 Return handler. More...
 
CoinMessages messages ()
 Return messages. More...
 
CoinMessages * messagesPointer ()
 Return pointer to messages. More...
 
int getMsgLevel ()
 Return msg level. More...
 
int getHubMsgLevel ()
 Return msg level. More...
 
int getMasterMsgLevel ()
 Return msg level. More...
 
int getlogFileLevel ()
 Return log file level. More...
 
int getNumNodeLog () const
 Get times that node log has been printed. More...
 
void setNumNodeLog (int num)
 Get times that node log has been printed. More...
 
AlpsSubTreegetWorkingSubTree ()
 
 AlpsKnowledgeBroker (const AlpsKnowledgeBroker &)
 
AlpsKnowledgeBrokeroperator= (const AlpsKnowledgeBroker &)
 

Detailed Description

The base class of knowledge broker class.

Definition at line 52 of file AlpsKnowledgeBroker.h.

Constructor & Destructor Documentation

◆ AlpsKnowledgeBroker() [1/3]

AlpsKnowledgeBroker::AlpsKnowledgeBroker ( )

Default constructor.

◆ AlpsKnowledgeBroker() [2/3]

AlpsKnowledgeBroker::AlpsKnowledgeBroker ( AlpsModel model)

Constructor that sets the model.

◆ ~AlpsKnowledgeBroker()

virtual AlpsKnowledgeBroker::~AlpsKnowledgeBroker ( )
virtual

Destructor.

◆ AlpsKnowledgeBroker() [3/3]

AlpsKnowledgeBroker::AlpsKnowledgeBroker ( const AlpsKnowledgeBroker )
private

Member Function Documentation

◆ registerClass()

void AlpsKnowledgeBroker::registerClass ( int  name,
AlpsKnowledge userKnowledge 
)
inline

Every user derived knowledge class must register.

The register methods register the decode method of the class so that later on we can decode objects from buffers. Invoking this registration for class foo is a single line:
foo().registerClass(name, userKnowledge). NOTE: take over user knowledge's memory ownership, user doesn't need free memory.

Definition at line 185 of file AlpsKnowledgeBroker.h.

◆ decoderObject()

const AlpsKnowledge* AlpsKnowledgeBroker::decoderObject ( int  name) const
inline

This method returns the pointer to an empty object of the registered class name.

Then the decode() method of that object can be used to decode a new object of the same type from the buffer. This method will be invoked as follows to decode an object whose type is name:
obj = AlpsKnowledge::decoderObject(name)->decode(buf)

Definition at line 207 of file AlpsKnowledgeBroker.h.

◆ initializeSearch()

virtual void AlpsKnowledgeBroker::initializeSearch ( int  argc,
char *  argv[],
AlpsModel model,
bool  showBanner = true 
)
pure virtual

Do some initialization for search.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ rootSearch()

virtual void AlpsKnowledgeBroker::rootSearch ( AlpsTreeNode root)
pure virtual

Explore the tree rooted as the given root.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ search()

virtual void AlpsKnowledgeBroker::search ( AlpsModel model)
inlinevirtual

Search best solution for a given model.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 230 of file AlpsKnowledgeBroker.h.

◆ getPhase()

AlpsPhase AlpsKnowledgeBroker::getPhase ( )
inline

Definition at line 240 of file AlpsKnowledgeBroker.h.

◆ setPhase()

void AlpsKnowledgeBroker::setPhase ( AlpsPhase  ph)
inline

Definition at line 241 of file AlpsKnowledgeBroker.h.

◆ getModel()

AlpsModel* AlpsKnowledgeBroker::getModel ( )
inline

Definition at line 245 of file AlpsKnowledgeBroker.h.

◆ setModel()

void AlpsKnowledgeBroker::setModel ( AlpsModel m)
inline

Definition at line 246 of file AlpsKnowledgeBroker.h.

◆ getTreeDepth()

int AlpsKnowledgeBroker::getTreeDepth ( )
inline

Get tree depth.

Definition at line 250 of file AlpsKnowledgeBroker.h.

◆ setPeakMemory()

void AlpsKnowledgeBroker::setPeakMemory ( double  size)
inline

Set peak memory usage.

Definition at line 252 of file AlpsKnowledgeBroker.h.

◆ getPeakMemory()

double AlpsKnowledgeBroker::getPeakMemory ( )
inline

Get peak memory usage.

Definition at line 254 of file AlpsKnowledgeBroker.h.

◆ setupKnowledgePools()

void AlpsKnowledgeBroker::setupKnowledgePools ( )

Set up knowledge pools for this broker.

◆ addKnowledgePool()

void AlpsKnowledgeBroker::addKnowledgePool ( AlpsKnowledgeType  kt,
AlpsKnowledgePool kp 
)
inline

Add a knowledge pool into the Knowledge pools.

Definition at line 263 of file AlpsKnowledgeBroker.h.

◆ getKnowledgePool()

AlpsKnowledgePool* AlpsKnowledgeBroker::getKnowledgePool ( AlpsKnowledgeType  kt) const
inline

Retrieve a knowledge pool in the Knowledge base.

Definition at line 275 of file AlpsKnowledgeBroker.h.

◆ getNumKnowledges()

virtual int AlpsKnowledgeBroker::getNumKnowledges ( AlpsKnowledgeType  kt) const
virtual

Query the number of knowledge in the given type of a knowledge pool.

◆ getMaxNumKnowledges()

virtual int AlpsKnowledgeBroker::getMaxNumKnowledges ( AlpsKnowledgeType  kt) const
inlinevirtual

Query the max number of knowledge can be stored in a given type of knowledge pools.

Definition at line 288 of file AlpsKnowledgeBroker.h.

◆ setMaxNumKnowledges()

virtual void AlpsKnowledgeBroker::setMaxNumKnowledges ( AlpsKnowledgeType  kt,
int  num 
)
inlinevirtual

Set the max number of knowledge can be stored in a given type o fknowledge pools.

Definition at line 299 of file AlpsKnowledgeBroker.h.

◆ hasKnowledge()

virtual bool AlpsKnowledgeBroker::hasKnowledge ( AlpsKnowledgeType  kt) const
inlinevirtual

Query whether there are knowledges in the given type of knowledge pools.

Definition at line 311 of file AlpsKnowledgeBroker.h.

◆ getKnowledge()

virtual std::pair<AlpsKnowledge*, double> AlpsKnowledgeBroker::getKnowledge ( AlpsKnowledgeType  kt) const
inlinevirtual

Get a knowledge, but doesn't remove it from the pool.

Definition at line 321 of file AlpsKnowledgeBroker.h.

◆ popKnowledge()

virtual void AlpsKnowledgeBroker::popKnowledge ( AlpsKnowledgeType  kt)
inlinevirtual

Remove the a knowledge from the given type of knowledge pools.

Definition at line 332 of file AlpsKnowledgeBroker.h.

◆ getBestKnowledge()

virtual std::pair<AlpsKnowledge*, double> AlpsKnowledgeBroker::getBestKnowledge ( AlpsKnowledgeType  kt) const
virtual

Get the best knowledge in the given type of knowledge pools.

◆ getAllKnowledges()

virtual void AlpsKnowledgeBroker::getAllKnowledges ( AlpsKnowledgeType  kt,
std::vector< std::pair< AlpsKnowledge *, double > > &  kls 
) const
inlinevirtual

Get all knowledges in the given type of knowledge pools.

Definition at line 347 of file AlpsKnowledgeBroker.h.

◆ addKnowledge()

virtual void AlpsKnowledgeBroker::addKnowledge ( AlpsKnowledgeType  kt,
AlpsKnowledge kl,
double  value 
)
inlinevirtual

Add a knowledge in the given type of knowledge pools.

Definition at line 360 of file AlpsKnowledgeBroker.h.

◆ getNumNodesProcessed()

int AlpsKnowledgeBroker::getNumNodesProcessed ( ) const
inline

Query the number of node processed by this process.

Definition at line 379 of file AlpsKnowledgeBroker.h.

◆ getNumNodesBranched()

int AlpsKnowledgeBroker::getNumNodesBranched ( ) const
inline

Query the number of node processed by this process.

Definition at line 383 of file AlpsKnowledgeBroker.h.

◆ getNumNodesDiscarded()

int AlpsKnowledgeBroker::getNumNodesDiscarded ( ) const
inline

Query the number of node processed by this process.

Definition at line 387 of file AlpsKnowledgeBroker.h.

◆ getNumNodesPartial()

int AlpsKnowledgeBroker::getNumNodesPartial ( ) const
inline

Query the number of node in the queue that are pregnant.

Definition at line 391 of file AlpsKnowledgeBroker.h.

◆ getNumNodesProcessedSystem()

int AlpsKnowledgeBroker::getNumNodesProcessedSystem ( ) const
inline

Query the number of node processed by the system.

Definition at line 395 of file AlpsKnowledgeBroker.h.

◆ updateNumNodesLeft()

virtual int AlpsKnowledgeBroker::updateNumNodesLeft ( )
virtual

Update the number of left nodes on this process.

◆ getBestNode()

virtual AlpsTreeNode* AlpsKnowledgeBroker::getBestNode ( ) const
virtual

Query the best node in the subtree pool.

Return NULL if no node exits.

◆ getSolStatus()

AlpsExitStatus AlpsKnowledgeBroker::getSolStatus ( ) const
inline

Query search termination status.

Definition at line 403 of file AlpsKnowledgeBroker.h.

◆ setExitStatus()

void AlpsKnowledgeBroker::setExitStatus ( AlpsExitStatus  status)
inline

Set terminate status.

Definition at line 407 of file AlpsKnowledgeBroker.h.

◆ timer()

AlpsTimer& AlpsKnowledgeBroker::timer ( )
inline

Query timer.

Definition at line 411 of file AlpsKnowledgeBroker.h.

◆ subTreeTimer()

AlpsTimer& AlpsKnowledgeBroker::subTreeTimer ( )
inline

Query subtree timer.

Definition at line 415 of file AlpsKnowledgeBroker.h.

◆ tempTimer()

AlpsTimer& AlpsKnowledgeBroker::tempTimer ( )
inline

Query secondary timer.

Definition at line 419 of file AlpsKnowledgeBroker.h.

◆ searchLog()

virtual void AlpsKnowledgeBroker::searchLog ( )
pure virtual

Search statistics log.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ getNodeMemSize()

int AlpsKnowledgeBroker::getNodeMemSize ( )
inline

Definition at line 428 of file AlpsKnowledgeBroker.h.

◆ setNodeMemSize()

void AlpsKnowledgeBroker::setNodeMemSize ( int  ms)
inline

Definition at line 429 of file AlpsKnowledgeBroker.h.

◆ getNodeProcessingTime()

double AlpsKnowledgeBroker::getNodeProcessingTime ( )
inline

Definition at line 434 of file AlpsKnowledgeBroker.h.

◆ setNodeProcessingTime()

void AlpsKnowledgeBroker::setNodeProcessingTime ( double  npTime)
inline

Definition at line 435 of file AlpsKnowledgeBroker.h.

◆ getLargeSize()

int AlpsKnowledgeBroker::getLargeSize ( ) const
inline

Definition at line 438 of file AlpsKnowledgeBroker.h.

◆ getIncumbentValue()

virtual double AlpsKnowledgeBroker::getIncumbentValue ( ) const
pure virtual

The process queries the objective value of the incumbent that it stores.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ getBestQuality()

virtual double AlpsKnowledgeBroker::getBestQuality ( ) const
pure virtual

The process (serial) / the master (parallel) queries the quality of the best solution that it knows.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ getBestEstimateQuality()

virtual double AlpsKnowledgeBroker::getBestEstimateQuality ( )
inlinevirtual

Get best estimalted quality in system.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 451 of file AlpsKnowledgeBroker.h.

◆ getNumNodeLeftSystem()

virtual int AlpsKnowledgeBroker::getNumNodeLeftSystem ( )
inlinevirtual

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 453 of file AlpsKnowledgeBroker.h.

◆ printBestSolution()

virtual void AlpsKnowledgeBroker::printBestSolution ( char *  outputFile = 0) const
pure virtual

The process (serial) / the master (parallel) outputs the best solution that it knows to a file or std::out.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

◆ getProcRank()

virtual int AlpsKnowledgeBroker::getProcRank ( ) const
inlinevirtual

Qeury the global rank of process.

Note: not useful for serial code.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 461 of file AlpsKnowledgeBroker.h.

◆ getMasterRank()

virtual int AlpsKnowledgeBroker::getMasterRank ( ) const
inlinevirtual

Query the global rank of the Master.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 464 of file AlpsKnowledgeBroker.h.

◆ getProcType()

virtual AlpsProcessType AlpsKnowledgeBroker::getProcType ( ) const
inlinevirtual

Query the type (master, hub, or worker) of the process.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 467 of file AlpsKnowledgeBroker.h.

◆ nextNodeIndex()

AlpsNodeIndex_t AlpsKnowledgeBroker::nextNodeIndex ( )
inline

Query the next index assigned to a newly created node, and then increment the nextIndex_ by 1.

Definition at line 474 of file AlpsKnowledgeBroker.h.

◆ getNextNodeIndex()

AlpsNodeIndex_t AlpsKnowledgeBroker::getNextNodeIndex ( ) const
inline

Query the next index assigned to a newly created node.

Definition at line 476 of file AlpsKnowledgeBroker.h.

◆ setNextNodeIndex()

void AlpsKnowledgeBroker::setNextNodeIndex ( AlpsNodeIndex_t  s)
inline

Set nextIndex_.

Definition at line 478 of file AlpsKnowledgeBroker.h.

◆ getMaxNodeIndex()

AlpsNodeIndex_t AlpsKnowledgeBroker::getMaxNodeIndex ( ) const
inline

Queriy the upper bound of node indices.

Definition at line 480 of file AlpsKnowledgeBroker.h.

◆ setMaxNodeIndex()

void AlpsKnowledgeBroker::setMaxNodeIndex ( AlpsNodeIndex_t  s)
inline

Set the upper bound of node indices.

Definition at line 482 of file AlpsKnowledgeBroker.h.

◆ getSubTreeSelection()

AlpsSearchStrategy<AlpsSubTree*>* AlpsKnowledgeBroker::getSubTreeSelection ( ) const
inline

Definition at line 487 of file AlpsKnowledgeBroker.h.

◆ setSubTreeSelection()

void AlpsKnowledgeBroker::setSubTreeSelection ( AlpsSearchStrategy< AlpsSubTree * > *  tc)
inline

Definition at line 490 of file AlpsKnowledgeBroker.h.

◆ getNodeSelection()

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::getNodeSelection ( ) const
inline

Definition at line 495 of file AlpsKnowledgeBroker.h.

◆ setNodeSelection()

void AlpsKnowledgeBroker::setNodeSelection ( AlpsSearchStrategy< AlpsTreeNode * > *  nc)
inline

Definition at line 498 of file AlpsKnowledgeBroker.h.

◆ getRampUpNodeSelection()

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::getRampUpNodeSelection ( ) const
inline

Definition at line 502 of file AlpsKnowledgeBroker.h.

◆ setRampUpNodeSelection()

void AlpsKnowledgeBroker::setRampUpNodeSelection ( AlpsSearchStrategy< AlpsTreeNode * > *  nc)
inline

Definition at line 505 of file AlpsKnowledgeBroker.h.

◆ passInMessageHandler()

void AlpsKnowledgeBroker::passInMessageHandler ( CoinMessageHandler *  handler)

Pass in Message handler (not deleted at end).

◆ newLanguage()

void AlpsKnowledgeBroker::newLanguage ( CoinMessages::Language  language)

Set language.

◆ setLanguage()

void AlpsKnowledgeBroker::setLanguage ( CoinMessages::Language  language)
inline

Definition at line 517 of file AlpsKnowledgeBroker.h.

◆ messageHandler()

CoinMessageHandler* AlpsKnowledgeBroker::messageHandler ( ) const
inline

Return handler.

Definition at line 520 of file AlpsKnowledgeBroker.h.

◆ messages()

CoinMessages AlpsKnowledgeBroker::messages ( )
inline

Return messages.

Definition at line 522 of file AlpsKnowledgeBroker.h.

◆ messagesPointer()

CoinMessages* AlpsKnowledgeBroker::messagesPointer ( )
inline

Return pointer to messages.

Definition at line 524 of file AlpsKnowledgeBroker.h.

◆ getMsgLevel()

int AlpsKnowledgeBroker::getMsgLevel ( )
inline

Return msg level.

Definition at line 526 of file AlpsKnowledgeBroker.h.

◆ getHubMsgLevel()

int AlpsKnowledgeBroker::getHubMsgLevel ( )
inline

Return msg level.

Definition at line 528 of file AlpsKnowledgeBroker.h.

◆ getMasterMsgLevel()

int AlpsKnowledgeBroker::getMasterMsgLevel ( )
inline

Return msg level.

Definition at line 530 of file AlpsKnowledgeBroker.h.

◆ getlogFileLevel()

int AlpsKnowledgeBroker::getlogFileLevel ( )
inline

Return log file level.

Definition at line 532 of file AlpsKnowledgeBroker.h.

◆ getNumNodeLog()

int AlpsKnowledgeBroker::getNumNodeLog ( ) const
inline

Get times that node log has been printed.

Definition at line 534 of file AlpsKnowledgeBroker.h.

◆ setNumNodeLog()

void AlpsKnowledgeBroker::setNumNodeLog ( int  num)
inline

Get times that node log has been printed.

Definition at line 536 of file AlpsKnowledgeBroker.h.

◆ getWorkingSubTree()

AlpsSubTree* AlpsKnowledgeBroker::getWorkingSubTree ( )
inline

Definition at line 540 of file AlpsKnowledgeBroker.h.

◆ operator=()

AlpsKnowledgeBroker& AlpsKnowledgeBroker::operator= ( const AlpsKnowledgeBroker )
private

Member Data Documentation

◆ decodeMap_

std::map<int, AlpsKnowledge*> AlpsKnowledgeBroker::decodeMap_
private

Stores registered knowledge.

Definition at line 54 of file AlpsKnowledgeBroker.h.

◆ instanceName_

std::string AlpsKnowledgeBroker::instanceName_
protected

The instance name.

Definition at line 59 of file AlpsKnowledgeBroker.h.

◆ model_

AlpsModel* AlpsKnowledgeBroker::model_
protected

Pointer to model.

Definition at line 61 of file AlpsKnowledgeBroker.h.

◆ phase_

AlpsPhase AlpsKnowledgeBroker::phase_
protected

Alps phase.

(RAMPUP, SEARCH, RAMPDOWN)

Definition at line 63 of file AlpsKnowledgeBroker.h.

◆ subTreePool_

AlpsSubTreePool* AlpsKnowledgeBroker::subTreePool_
protected

A subtree pool holding a collection of subtrees.

For serial version, there is only one subtree in the pool.

Definition at line 69 of file AlpsKnowledgeBroker.h.

◆ solPool_

AlpsSolutionPool* AlpsKnowledgeBroker::solPool_
protected

A solution pool containing the solutions found.

Definition at line 71 of file AlpsKnowledgeBroker.h.

◆ pools_

std::map<AlpsKnowledgeType, AlpsKnowledgePool*>* AlpsKnowledgeBroker::pools_
protected

The collection of pools managed by the knowledge broker.

Definition at line 73 of file AlpsKnowledgeBroker.h.

◆ workingSubTree_

AlpsSubTree* AlpsKnowledgeBroker::workingSubTree_
protected

Point to the subtree that being explored.

Definition at line 79 of file AlpsKnowledgeBroker.h.

◆ needWorkingSubTree_

bool AlpsKnowledgeBroker::needWorkingSubTree_
protected

Indicate whether need a new subtree.

Definition at line 81 of file AlpsKnowledgeBroker.h.

◆ nextIndex_

AlpsNodeIndex_t AlpsKnowledgeBroker::nextIndex_
protected

The index to be assigned to a new search tree node.

Definition at line 83 of file AlpsKnowledgeBroker.h.

◆ maxIndex_

AlpsNodeIndex_t AlpsKnowledgeBroker::maxIndex_
protected

The maximum index can been assigned on this process.

Definition at line 85 of file AlpsKnowledgeBroker.h.

◆ timer_

AlpsTimer AlpsKnowledgeBroker::timer_
protected

Main timer.

Do not touch.

Definition at line 91 of file AlpsKnowledgeBroker.h.

◆ subTreeTimer_

AlpsTimer AlpsKnowledgeBroker::subTreeTimer_
protected

Subtree timer.

Do not touch.

Definition at line 93 of file AlpsKnowledgeBroker.h.

◆ tempTimer_

AlpsTimer AlpsKnowledgeBroker::tempTimer_
protected

Secondary timer.

Definition at line 95 of file AlpsKnowledgeBroker.h.

◆ solNum_

int AlpsKnowledgeBroker::solNum_
protected

The number of solutions found.

Definition at line 97 of file AlpsKnowledgeBroker.h.

◆ nodeProcessedNum_

int AlpsKnowledgeBroker::nodeProcessedNum_
protected

The number of nodes that have been processed.

Definition at line 99 of file AlpsKnowledgeBroker.h.

◆ nodeBranchedNum_

int AlpsKnowledgeBroker::nodeBranchedNum_
protected

The number of nodes that have been branched.

Definition at line 101 of file AlpsKnowledgeBroker.h.

◆ nodeDiscardedNum_

int AlpsKnowledgeBroker::nodeDiscardedNum_
protected

The number of nodes that have been discarded before processing.

Definition at line 103 of file AlpsKnowledgeBroker.h.

◆ nodePartialNum_

int AlpsKnowledgeBroker::nodePartialNum_
protected

The number of nodes that are pregnant.

Definition at line 105 of file AlpsKnowledgeBroker.h.

◆ systemNodeProcessed_

int AlpsKnowledgeBroker::systemNodeProcessed_
protected

To record how many nodes processed by the system (used in parallel code).

Definition at line 108 of file AlpsKnowledgeBroker.h.

◆ nodeLeftNum_

int AlpsKnowledgeBroker::nodeLeftNum_
protected

The number of nodes left.

Definition at line 110 of file AlpsKnowledgeBroker.h.

◆ treeDepth_

int AlpsKnowledgeBroker::treeDepth_
protected

The depth of the tree.

Definition at line 112 of file AlpsKnowledgeBroker.h.

◆ bestSolNode_

int AlpsKnowledgeBroker::bestSolNode_
protected

The number of nodes pocessed to find the solution.

Definition at line 114 of file AlpsKnowledgeBroker.h.

◆ peakMemory_

double AlpsKnowledgeBroker::peakMemory_
protected

Peak memory usage.

Definition at line 116 of file AlpsKnowledgeBroker.h.

◆ exitStatus_

AlpsExitStatus AlpsKnowledgeBroker::exitStatus_
protected

The status of search when terminated.

Definition at line 118 of file AlpsKnowledgeBroker.h.

◆ treeSelection_

AlpsSearchStrategy<AlpsSubTree*>* AlpsKnowledgeBroker::treeSelection_
protected

Tree selection criterion.

Definition at line 124 of file AlpsKnowledgeBroker.h.

◆ nodeSelection_

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::nodeSelection_
protected

Node selection criterion.

Definition at line 126 of file AlpsKnowledgeBroker.h.

◆ rampUpNodeSelection_

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::rampUpNodeSelection_
protected

Node selection criterion.

Definition at line 128 of file AlpsKnowledgeBroker.h.

◆ handler_

CoinMessageHandler* AlpsKnowledgeBroker::handler_
protected

Message handler.

Definition at line 134 of file AlpsKnowledgeBroker.h.

◆ messages_

CoinMessages AlpsKnowledgeBroker::messages_
protected

Alps messages.

Definition at line 136 of file AlpsKnowledgeBroker.h.

◆ msgLevel_

int AlpsKnowledgeBroker::msgLevel_
protected

The leve of printing message to screen of the master and general message.

(0: no; 1: basic; 2: moderate, 3: verbose)

Definition at line 139 of file AlpsKnowledgeBroker.h.

◆ hubMsgLevel_

int AlpsKnowledgeBroker::hubMsgLevel_
protected

The leve of printing message to screen of hubs.

(0: no; 1: basic; 2: moderate, 3: verbose)

Definition at line 142 of file AlpsKnowledgeBroker.h.

◆ workerMsgLevel_

int AlpsKnowledgeBroker::workerMsgLevel_
protected

The leve of printing message to screen of workers.

(0: no; 1: basic; 2: moderate, 3: verbose)

Definition at line 145 of file AlpsKnowledgeBroker.h.

◆ logFileLevel_

int AlpsKnowledgeBroker::logFileLevel_
protected

The degree of log file.

(0: no; 1: basic; 2: moderate, 3: verbose)

Definition at line 148 of file AlpsKnowledgeBroker.h.

◆ logfile_

std::string AlpsKnowledgeBroker::logfile_
protected

The log file.

Definition at line 150 of file AlpsKnowledgeBroker.h.

◆ nodeMemSize_

int AlpsKnowledgeBroker::nodeMemSize_
protected

The approximate memory size (bytes) of a node with full description.

Definition at line 154 of file AlpsKnowledgeBroker.h.

◆ nodeProcessingTime_

double AlpsKnowledgeBroker::nodeProcessingTime_
protected

The approximately CPU time to process a node.

Definition at line 156 of file AlpsKnowledgeBroker.h.

◆ largeSize_

int AlpsKnowledgeBroker::largeSize_
protected

The size of largest message buffer can be sent or received.

Definition at line 158 of file AlpsKnowledgeBroker.h.

◆ userBalancePeriod_

bool AlpsKnowledgeBroker::userBalancePeriod_
protected

Has user input balance period.

Definition at line 160 of file AlpsKnowledgeBroker.h.

◆ numNodeLog_

int AlpsKnowledgeBroker::numNodeLog_
protected

Times that node log is printed.

Definition at line 162 of file AlpsKnowledgeBroker.h.


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