# AlpsKnowledgeBroker Class Reference

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

`#include <AlpsKnowledgeBroker.h>`

Inheritance diagram for AlpsKnowledgeBroker:
[legend]
Collaboration diagram for AlpsKnowledgeBroker:
[legend]

List of all members.

## Public Member Functions
| AlpsKnowledgeBroker ()
| Default constructor.
virtual | ~AlpsKnowledgeBroker ()
| Destructor.
int | getTreeDepth ()
| Get tree depth.
void | setPeakMemory (double size)
| Set peak memory usage.
double | getPeakMemory ()
| Get peak memory usage.
int | getLargeSize () const
virtual int | getProcRank () const
| Qeury the global rank of process.
virtual int | getMasterRank () const
| Query the global rank of the Master.
virtual AlpsProcessType | getProcType () const
| Query the type (master, hub, or worker) of the process.
Funcitons related to register knowledge.
void | registerClass (int name, AlpsKnowledge *userKnowledge)
| Every user derived knowledge class must register.
const AlpsKnowledge * | decoderObject (int name)
| This method returns the pointer to an empty object of the registered class `name`.
Funcitons related to exploring subtree.
virtual void | initializeSearch (int argc, char *argv[], AlpsModel &model)=0
| Do some initialization for search.
virtual void | rootSearch (AlpsTreeNode *root)=0
| Explore the tree rooted as the given root.
virtual void | search (AlpsModel *model)
| Search best solution for a given model.
Get/set phase.
AlpsPhase | getPhase ()
void | setPhase (AlpsPhase ph)
AlpsModel * | getModel ()
void | setModel (AlpsModel *m)
Interface with the knowledge pools
void | setupKnowledgePools ()
| Set up knowledge pools for this broker.
void | addKnowledgePool (AlpsKnowledgeType kt, AlpsKnowledgePool *kp)
| Add a knowledge pool into the Knowledge pools.
AlpsKnowledgePool * | getKnowledgePool (AlpsKnowledgeType kt) const
| Retrieve a knowledge pool in the Knowledge base.
virtual int | getNumKnowledges (AlpsKnowledgeType kt) const
| Query the number of knowledge in the given type of a knowledge pool.
virtual int | getMaxNumKnowledges (AlpsKnowledgeType kt) const
| Query the max number of knowledge can be stored in a given type of knowledge pools.
virtual void | setMaxNumKnowledges (AlpsKnowledgeType kt, int num)
| Set the max number of knowledge can be stored in a given type o fknowledge pools.
virtual bool | hasKnowledge (AlpsKnowledgeType kt) const
| Query whether there are knowledges in the given type of knowledge pools.
virtual std::pair < AlpsKnowledge *, double > | getKnowledge (AlpsKnowledgeType kt) const
| Get a knowledge, but doesn't remove it from the pool.
virtual void | popKnowledge (AlpsKnowledgeType kt)
| Remove the a knowledge from the given type of knowledge pools.
virtual std::pair < AlpsKnowledge *, double > | getBestKnowledge (AlpsKnowledgeType kt) const
| Get the best knowledge in the given type of knowledge pools.
virtual void | getAllKnowledges (AlpsKnowledgeType kt, std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
| Get all knowledges in the given type of knowledge pools.
virtual void | addKnowledge (AlpsKnowledgeType kt, AlpsKnowledge *kl, double value)
| Add a knowledge in the given type of knowledge pools.
Querty and set statistics
int | getNumNodesProcessed () const
| Query the number of node processed by this process.
int | getNumNodesBranched () const
| Query the number of node processed by this process.
int | getNumNodesDiscarded () const
| Query the number of node processed by this process.
int | getNumNodesPartial () const
| Query the number of node in the queue that are pregnant.
int | getNumNodesProcessedSystem () const
| Query the number of node processed by the system.
virtual int | updateNumNodesLeft ()
| Update the number of left nodes on this process.
virtual AlpsTreeNode * | getBestNode () const
| Query the best node in the subtree pool.
AlpsExitStatus | getSolStatus () const
| Query search termination status.
void | setExitStatus (AlpsExitStatus status)
| Set terminate status.
AlpsTimer & | timer ()
| Query timer.
AlpsTimer & | subTreeTimer ()
| Query subtree timer.
AlpsTimer & | tempTimer ()
| Query secondary timer.
virtual void | searchLog ()=0
| Search statistics log.
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)
Report the best result
virtual double | getIncumbentValue () const =0
| The process queries the objective value of the incumbent that it stores.
virtual double | getBestQuality () const =0
| The process (serial) / the master (parallel) queries the quality of the best solution that it knows.
virtual double | getBestEstimateQuality ()
| Get best estimalted quality in system.
virtual int | getNumNodeLeftSystem ()
| The process queries the objective value of the incumbent that it stores.
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.
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.
AlpsNodeIndex_t | getNextNodeIndex () const
| Query the next index assigned to a newly created node.
void | setNextNodeIndex (AlpsNodeIndex_t s)
| Set nextIndex_.
AlpsNodeIndex_t | getMaxNodeIndex () const
| Queriy the upper bound of node indices.
void | setMaxNodeIndex (AlpsNodeIndex_t s)
| Set the upper bound of node indices.
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)
Message and log file handling
void | passInMessageHandler (CoinMessageHandler *handler)
| Pass in Message handler (not deleted at end).
void | newLanguage (CoinMessages::Language language)
| Set language.
void | setLanguage (CoinMessages::Language language)
| Pass in Message handler (not deleted at end).
CoinMessageHandler * | messageHandler () const
| Return handler.
CoinMessages | messages ()
| Return messages.
CoinMessages * | messagesPointer ()
| Return pointer to messages.
int | getMsgLevel ()
| Return msg level.
int | getHubMsgLevel ()
| Return msg level.
int | getMasterMsgLevel ()
| Return msg level.
int | getlogFileLevel ()
| Return log file level.
int | getNumNodeLog () const
| Get times that node log has been printed.
void | setNumNodeLog (int num)
| Get times that node log has been printed.
## Protected Attributes
std::string | instanceName_
| The instance name.
AlpsModel * | model_
| Pointer to model.
AlpsPhase | phase_
| Alps phase.
int | nodeMemSize_
| The approximate memory size (bytes) of a node with full description.
double | nodeProcessingTime_
| The approximately CPU time to process a node.
int | largeSize_
| The size of largest message buffer can be sent or received.
bool | userBalancePeriod_
| Has user input balance period.
int | numNodeLog_
| Times that node log is printed.
knowledge pools
AlpsSubTreePool * | subTreePool_
| A subtree pool holding a collection of subtrees.
AlpsSolutionPool * | solPool_
| A solution pool containing the solutions found.
std::map< AlpsKnowledgeType, AlpsKnowledgePool * > * | pools_
| The collection of pools managed by the knowledge broker.
Exploring subtree
AlpsSubTree * | workingSubTree_
| Point to the subtree that being explored.
bool | needWorkingSubTree_
| Indicate whether need a new subtree.
AlpsNodeIndex_t | nextIndex_
| The index to be assigned to a new search tree node.
AlpsNodeIndex_t | maxIndex_
| The maximum index can been assigned on this process.
Statistics
AlpsTimer | timer_
| Main timer.
AlpsTimer | subTreeTimer_
| Subtree timer.
AlpsTimer | tempTimer_
| Secondary timer.
int | solNum_
| The number of solutions found.
int | nodeProcessedNum_
| The number of nodes that have been processed.
int | nodeBranchedNum_
| The number of nodes that have been branched.
int | nodeDiscardedNum_
| The number of nodes that have been discarded before processing.
int | nodePartialNum_
| The number of nodes that are pregnant.
int | systemNodeProcessed_
| To record how many nodes processed by the system (used in parallel code).
int | nodeLeftNum_
| The number of nodes left.
int | treeDepth_
| The depth of the tree.
int | bestSolNode_
| The number of nodes pocessed to find the solution.
double | peakMemory_
| Peak memory usage.
AlpsExitStatus | exitStatus_
| The status of search when terminated.
Search strategy
AlpsSearchStrategy < AlpsSubTree * > * | treeSelection_
| Tree selection criterion.
AlpsSearchStrategy < AlpsTreeNode * > * | nodeSelection_
| Node selection criterion.
AlpsSearchStrategy < AlpsTreeNode * > * | rampUpNodeSelection_
| Node selection criterion.
message handling
CoinMessageHandler * | handler_
| Message handler.
CoinMessages | messages_
| Alps messages.
int | msgLevel_
| The leve of printing message to screen of the master and general message.
int | hubMsgLevel_
| The leve of printing message to screen of hubs.
int | workerMsgLevel_
| The leve of printing message to screen of workers.
int | logFileLevel_
| The degree of log file.
std::string | logfile_
| The log file.
## Private Member Functions
| AlpsKnowledgeBroker (const AlpsKnowledgeBroker &)
AlpsKnowledgeBroker & | operator= (const AlpsKnowledgeBroker &)
## Private Attributes
std::map< int, AlpsKnowledge * > | decodeMap_
| Stores registered knowledge.

## Detailed Description

The base class of knowledge broker class.

Definition at line 48 of file AlpsKnowledgeBroker.h.

## Constructor & Destructor Documentation

AlpsKnowledgeBroker::AlpsKnowledgeBroker | ( | const AlpsKnowledgeBroker & |  | ) | `[private]`

AlpsKnowledgeBroker::AlpsKnowledgeBroker | ( |  | ) |

Default constructor.

virtual AlpsKnowledgeBroker::~AlpsKnowledgeBroker | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

AlpsKnowledgeBroker& AlpsKnowledgeBroker::operator= | ( | const AlpsKnowledgeBroker & |  | ) | `[private]`

Reimplemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

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 230 of file AlpsKnowledgeBroker.h.

const AlpsKnowledge* AlpsKnowledgeBroker::decoderObject | ( | int | name | ) | `[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 253 of file AlpsKnowledgeBroker.h.

virtual void AlpsKnowledgeBroker::initializeSearch | ( | int | argc,
|  | char * | argv[],
|  | AlpsModel & | model |
| ) |  |  | `[pure virtual]`

Do some initialization for search.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

virtual void AlpsKnowledgeBroker::rootSearch | ( | AlpsTreeNode * | root | ) | `[pure virtual]`

Explore the tree rooted as the given root.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

virtual void AlpsKnowledgeBroker::search | ( | AlpsModel * | model | ) | `[inline, virtual]`

Search best solution for a given model.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 273 of file AlpsKnowledgeBroker.h.

AlpsPhase AlpsKnowledgeBroker::getPhase | ( |  | ) | `[inline]`

Definition at line 285 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setPhase | ( | AlpsPhase | ph | ) | `[inline]`

Definition at line 286 of file AlpsKnowledgeBroker.h.

AlpsModel* AlpsKnowledgeBroker::getModel | ( |  | ) | `[inline]`

Definition at line 290 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setModel | ( | AlpsModel * | m | ) | `[inline]`

Definition at line 291 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getTreeDepth | ( |  | ) | `[inline]`

Get tree depth.

Definition at line 295 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setPeakMemory | ( | double | size | ) | `[inline]`

Set peak memory usage.

Definition at line 298 of file AlpsKnowledgeBroker.h.

double AlpsKnowledgeBroker::getPeakMemory | ( |  | ) | `[inline]`

Get peak memory usage.

Definition at line 301 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setupKnowledgePools | ( |  | ) |

Set up knowledge pools for this broker.

void AlpsKnowledgeBroker::addKnowledgePool | ( | AlpsKnowledgeType | kt,
|  | AlpsKnowledgePool * | kp |
| ) |  |  | `[inline]`

Add a knowledge pool into the Knowledge pools.

Definition at line 311 of file AlpsKnowledgeBroker.h.

AlpsKnowledgePool* AlpsKnowledgeBroker::getKnowledgePool | ( | AlpsKnowledgeType | kt | ) | const`[inline]`

Retrieve a knowledge pool in the Knowledge base.

Definition at line 324 of file AlpsKnowledgeBroker.h.

virtual int AlpsKnowledgeBroker::getNumKnowledges | ( | AlpsKnowledgeType | kt | ) | const`[virtual]`

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

virtual int AlpsKnowledgeBroker::getMaxNumKnowledges | ( | AlpsKnowledgeType | kt | ) | const`[inline, virtual]`

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

Definition at line 339 of file AlpsKnowledgeBroker.h.

virtual void AlpsKnowledgeBroker::setMaxNumKnowledges | ( | AlpsKnowledgeType | kt,
|  | int | num |
| ) |  |  | `[inline, virtual]`

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

Definition at line 351 of file AlpsKnowledgeBroker.h.

virtual bool AlpsKnowledgeBroker::hasKnowledge | ( | AlpsKnowledgeType | kt | ) | const`[inline, virtual]`

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

Definition at line 363 of file AlpsKnowledgeBroker.h.

virtual std::pair<AlpsKnowledge*, double> AlpsKnowledgeBroker::getKnowledge | ( | AlpsKnowledgeType | kt | ) | const`[inline, virtual]`

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

Definition at line 373 of file AlpsKnowledgeBroker.h.

virtual void AlpsKnowledgeBroker::popKnowledge | ( | AlpsKnowledgeType | kt | ) | `[inline, virtual]`

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

Definition at line 384 of file AlpsKnowledgeBroker.h.

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

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

virtual void AlpsKnowledgeBroker::getAllKnowledges | ( | AlpsKnowledgeType | kt,
|  | std::vector< std::pair< AlpsKnowledge *, double > > & | kls |
| ) |  |  | const`[inline, virtual]`

Get all knowledges in the given type of knowledge pools.

Definition at line 399 of file AlpsKnowledgeBroker.h.

virtual void AlpsKnowledgeBroker::addKnowledge | ( | AlpsKnowledgeType | kt,
|  | AlpsKnowledge * | kl,
|  | double | value |
| ) |  |  | `[inline, virtual]`

Add a knowledge in the given type of knowledge pools.

Definition at line 412 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodesProcessed | ( |  | ) | const`[inline]`

Query the number of node processed by this process.

Definition at line 429 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodesBranched | ( |  | ) | const`[inline]`

Query the number of node processed by this process.

Definition at line 434 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodesDiscarded | ( |  | ) | const`[inline]`

Query the number of node processed by this process.

Definition at line 439 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodesPartial | ( |  | ) | const`[inline]`

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

Definition at line 444 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodesProcessedSystem | ( |  | ) | const`[inline]`

Query the number of node processed by the system.

Definition at line 449 of file AlpsKnowledgeBroker.h.

virtual int AlpsKnowledgeBroker::updateNumNodesLeft | ( |  | ) | `[virtual]`

Update the number of left nodes on this process.

virtual AlpsTreeNode* AlpsKnowledgeBroker::getBestNode | ( |  | ) | const`[virtual]`

Query the best node in the subtree pool.

Return NULL if no node exits.

AlpsExitStatus AlpsKnowledgeBroker::getSolStatus | ( |  | ) | const`[inline]`

Query search termination status.

Definition at line 460 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setExitStatus | ( | AlpsExitStatus | status | ) | `[inline]`

Set terminate status.

Definition at line 465 of file AlpsKnowledgeBroker.h.

AlpsTimer& AlpsKnowledgeBroker::timer | ( |  | ) | `[inline]`

Query timer.

Definition at line 470 of file AlpsKnowledgeBroker.h.

AlpsTimer& AlpsKnowledgeBroker::subTreeTimer | ( |  | ) | `[inline]`

Query subtree timer.

Definition at line 475 of file AlpsKnowledgeBroker.h.

AlpsTimer& AlpsKnowledgeBroker::tempTimer | ( |  | ) | `[inline]`

Query secondary timer.

Definition at line 480 of file AlpsKnowledgeBroker.h.

virtual void AlpsKnowledgeBroker::searchLog | ( |  | ) | `[pure virtual]`

Search statistics log.

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

int AlpsKnowledgeBroker::getNodeMemSize | ( |  | ) | `[inline]`

Definition at line 492 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setNodeMemSize | ( | int | ms | ) | `[inline]`

Definition at line 493 of file AlpsKnowledgeBroker.h.

double AlpsKnowledgeBroker::getNodeProcessingTime | ( |  | ) | `[inline]`

Definition at line 500 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setNodeProcessingTime | ( | double | npTime | ) | `[inline]`

Definition at line 501 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getLargeSize | ( |  | ) | const`[inline]`

Definition at line 504 of file AlpsKnowledgeBroker.h.

virtual double AlpsKnowledgeBroker::getIncumbentValue | ( |  | ) | const`[pure virtual]`

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

Implemented in AlpsKnowledgeBrokerMPI, and AlpsKnowledgeBrokerSerial.

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.

virtual double AlpsKnowledgeBroker::getBestEstimateQuality | ( |  | ) | `[inline, virtual]`

Get best estimalted quality in system.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 519 of file AlpsKnowledgeBroker.h.

virtual int AlpsKnowledgeBroker::getNumNodeLeftSystem | ( |  | ) | `[inline, virtual]`

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

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 521 of file AlpsKnowledgeBroker.h.

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.

virtual int AlpsKnowledgeBroker::getProcRank | ( |  | ) | const`[inline, virtual]`

Qeury the global rank of process.

Note: not useful for serial code.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 529 of file AlpsKnowledgeBroker.h.

virtual int AlpsKnowledgeBroker::getMasterRank | ( |  | ) | const`[inline, virtual]`

Query the global rank of the Master.

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 532 of file AlpsKnowledgeBroker.h.

virtual AlpsProcessType AlpsKnowledgeBroker::getProcType | ( |  | ) | const`[inline, virtual]`

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

Reimplemented in AlpsKnowledgeBrokerMPI.

Definition at line 535 of file AlpsKnowledgeBroker.h.

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 544 of file AlpsKnowledgeBroker.h.

AlpsNodeIndex_t AlpsKnowledgeBroker::getNextNodeIndex | ( |  | ) | const`[inline]`

Query the next index assigned to a newly created node.

Definition at line 547 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setNextNodeIndex | ( | AlpsNodeIndex_t | s | ) | `[inline]`

Set nextIndex_.

Definition at line 550 of file AlpsKnowledgeBroker.h.

AlpsNodeIndex_t AlpsKnowledgeBroker::getMaxNodeIndex | ( |  | ) | const`[inline]`

Queriy the upper bound of node indices.

Definition at line 553 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setMaxNodeIndex | ( | AlpsNodeIndex_t | s | ) | `[inline]`

Set the upper bound of node indices.

Definition at line 556 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsSubTree*>* AlpsKnowledgeBroker::getSubTreeSelection | ( |  | ) | const`[inline]`

Definition at line 563 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setSubTreeSelection | ( | AlpsSearchStrategy< AlpsSubTree * > * | tc | ) | `[inline]`

Definition at line 566 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::getNodeSelection | ( |  | ) | const`[inline]`

Definition at line 571 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setNodeSelection | ( | AlpsSearchStrategy< AlpsTreeNode * > * | nc | ) | `[inline]`

Definition at line 574 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::getRampUpNodeSelection | ( |  | ) | const`[inline]`

Definition at line 578 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setRampUpNodeSelection | ( | AlpsSearchStrategy< AlpsTreeNode * > * | nc | ) | `[inline]`

Definition at line 581 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::passInMessageHandler | ( | CoinMessageHandler * | handler | ) |

Pass in Message handler (not deleted at end).

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

Set language.

void AlpsKnowledgeBroker::setLanguage | ( | CoinMessages::Language | language | ) | `[inline]`

Pass in Message handler (not deleted at end).

Definition at line 594 of file AlpsKnowledgeBroker.h.

CoinMessageHandler* AlpsKnowledgeBroker::messageHandler | ( |  | ) | const`[inline]`

Return handler.

Definition at line 598 of file AlpsKnowledgeBroker.h.

CoinMessages AlpsKnowledgeBroker::messages | ( |  | ) | `[inline]`

Return messages.

Definition at line 601 of file AlpsKnowledgeBroker.h.

CoinMessages* AlpsKnowledgeBroker::messagesPointer | ( |  | ) | `[inline]`

Return pointer to messages.

Definition at line 604 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getMsgLevel | ( |  | ) | `[inline]`

Return msg level.

Definition at line 607 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getHubMsgLevel | ( |  | ) | `[inline]`

Return msg level.

Definition at line 610 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getMasterMsgLevel | ( |  | ) | `[inline]`

Return msg level.

Definition at line 613 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getlogFileLevel | ( |  | ) | `[inline]`

Return log file level.

Definition at line 616 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::getNumNodeLog | ( |  | ) | const`[inline]`

Get times that node log has been printed.

Definition at line 619 of file AlpsKnowledgeBroker.h.

void AlpsKnowledgeBroker::setNumNodeLog | ( | int | num | ) | `[inline]`

Get times that node log has been printed.

Definition at line 622 of file AlpsKnowledgeBroker.h.

## Member Data Documentation

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

Stores registered knowledge.

Definition at line 56 of file AlpsKnowledgeBroker.h.

std::string AlpsKnowledgeBroker::instanceName_`[protected]`

The instance name.

Definition at line 61 of file AlpsKnowledgeBroker.h.

AlpsModel* AlpsKnowledgeBroker::model_`[protected]`

Pointer to model.

Definition at line 64 of file AlpsKnowledgeBroker.h.

AlpsPhase AlpsKnowledgeBroker::phase_`[protected]`

Alps phase.

(RAMPUP, SEARCH, RAMPDOWN)

Definition at line 67 of file AlpsKnowledgeBroker.h.

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 75 of file AlpsKnowledgeBroker.h.

AlpsSolutionPool* AlpsKnowledgeBroker::solPool_`[protected]`

A solution pool containing the solutions found.

Definition at line 78 of file AlpsKnowledgeBroker.h.

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

The collection of pools managed by the knowledge broker.

Definition at line 81 of file AlpsKnowledgeBroker.h.

AlpsSubTree* AlpsKnowledgeBroker::workingSubTree_`[protected]`

Point to the subtree that being explored.

Definition at line 89 of file AlpsKnowledgeBroker.h.

bool AlpsKnowledgeBroker::needWorkingSubTree_`[protected]`

Indicate whether need a new subtree.

Definition at line 92 of file AlpsKnowledgeBroker.h.

AlpsNodeIndex_t AlpsKnowledgeBroker::nextIndex_`[protected]`

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

Definition at line 95 of file AlpsKnowledgeBroker.h.

AlpsNodeIndex_t AlpsKnowledgeBroker::maxIndex_`[protected]`

The maximum index can been assigned on this process.

Definition at line 98 of file AlpsKnowledgeBroker.h.

AlpsTimer AlpsKnowledgeBroker::timer_`[protected]`

Main timer.

Do not touch.

Definition at line 107 of file AlpsKnowledgeBroker.h.

AlpsTimer AlpsKnowledgeBroker::subTreeTimer_`[protected]`

Subtree timer.

Do not touch.

Definition at line 110 of file AlpsKnowledgeBroker.h.

AlpsTimer AlpsKnowledgeBroker::tempTimer_`[protected]`

Secondary timer.

Definition at line 113 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::solNum_`[protected]`

The number of solutions found.

Definition at line 116 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodeProcessedNum_`[protected]`

The number of nodes that have been processed.

Definition at line 119 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodeBranchedNum_`[protected]`

The number of nodes that have been branched.

Definition at line 122 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodeDiscardedNum_`[protected]`

The number of nodes that have been discarded before processing.

Definition at line 125 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodePartialNum_`[protected]`

The number of nodes that are pregnant.

Definition at line 128 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::systemNodeProcessed_`[protected]`

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

Definition at line 132 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodeLeftNum_`[protected]`

The number of nodes left.

Definition at line 135 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::treeDepth_`[protected]`

The depth of the tree.

Definition at line 138 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::bestSolNode_`[protected]`

The number of nodes pocessed to find the solution.

Definition at line 141 of file AlpsKnowledgeBroker.h.

double AlpsKnowledgeBroker::peakMemory_`[protected]`

Peak memory usage.

Definition at line 144 of file AlpsKnowledgeBroker.h.

AlpsExitStatus AlpsKnowledgeBroker::exitStatus_`[protected]`

The status of search when terminated.

Definition at line 147 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsSubTree*>* AlpsKnowledgeBroker::treeSelection_`[protected]`

Tree selection criterion.

Definition at line 155 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::nodeSelection_`[protected]`

Node selection criterion.

Definition at line 158 of file AlpsKnowledgeBroker.h.

AlpsSearchStrategy<AlpsTreeNode*>* AlpsKnowledgeBroker::rampUpNodeSelection_`[protected]`

Node selection criterion.

Definition at line 161 of file AlpsKnowledgeBroker.h.

CoinMessageHandler* AlpsKnowledgeBroker::handler_`[protected]`

Message handler.

Definition at line 169 of file AlpsKnowledgeBroker.h.

CoinMessages AlpsKnowledgeBroker::messages_`[protected]`

Alps messages.

Definition at line 172 of file AlpsKnowledgeBroker.h.

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 176 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::hubMsgLevel_`[protected]`

The leve of printing message to screen of hubs.

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

Definition at line 180 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::workerMsgLevel_`[protected]`

The leve of printing message to screen of workers.

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

Definition at line 184 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::logFileLevel_`[protected]`

The degree of log file.

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

Definition at line 188 of file AlpsKnowledgeBroker.h.

std::string AlpsKnowledgeBroker::logfile_`[protected]`

The log file.

Definition at line 191 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::nodeMemSize_`[protected]`

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

Definition at line 195 of file AlpsKnowledgeBroker.h.

double AlpsKnowledgeBroker::nodeProcessingTime_`[protected]`

The approximately CPU time to process a node.

Definition at line 198 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::largeSize_`[protected]`

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

Definition at line 201 of file AlpsKnowledgeBroker.h.

bool AlpsKnowledgeBroker::userBalancePeriod_`[protected]`

Has user input balance period.

Definition at line 204 of file AlpsKnowledgeBroker.h.

int AlpsKnowledgeBroker::numNodeLog_`[protected]`

Times that node log is printed.

Definition at line 207 of file AlpsKnowledgeBroker.h.

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

- /home/coin/svn-release/Alps-1.4.8/Alps/src/AlpsKnowledgeBroker.h