#include <AlpsParams.h>
Inheritance diagram for AlpsParams:
Public Types | |
checkMemory | |
Check memory. | |
deleteDeadNode | |
Remove dead nodes or not. | |
interClusterBalance | |
Master balances the workload of hubs: centralized. | |
intraClusterBalance | |
Hub balances the workload of workers: receiver initialized. | |
printSolution | |
Print solution to screen and log if have a solution and msgLevel and logFileLevel permits. | |
endOfBoolParams | |
bufSpare | |
The size of extra memory allocated to a message buffer. | |
clockType | |
Type of clock when timing rampup, rampdown, etc. | |
eliteSize | |
Number of the "elite" nodes that are used in determining workload. | |
hubInitNodeNum | |
The number of nodes initially generated by each hub. | |
hubMsgLevel | |
Message level of the hub specific messages. | |
hubNum | |
The number of hubs. | |
largeSize | |
The size of memory allocated for large size message. | |
logFileLevel | |
The level of log file. | |
masterInitNodeNum | |
The number of nodes initially generated by the master. | |
masterReportInterval | |
The interval between master report system status. | |
hubWorkClusterSizeLimit | |
If the number of processes in a cluster is less than it, the hub also work as a worker. | |
mediumSize | |
The size of memory allocated for medium size message. | |
msgLevel | |
The level of printing messages on screen. | |
nodeLimit | |
The max number of nodes can be processed. | |
nodeLogInterval | |
Node log interval. | |
processNum | |
The total number of processes that are launched for parallel code. | |
staticBalanceScheme | |
Static load balancing scheme -- root initialization (0) -- spiral (1). | |
searchStrategy | |
Search strategy -- best-first (0) -- best-first-estimate (1) -- breadth-first (2) -- depth-first (3) -- hybrid (4) Default: hybrid. | |
searchStrategyRampUp | |
smallSize | |
The size of memory allocated for small size message. | |
solLimit | |
The max num of solution can be stored in a solution pool. | |
unitWorkNodes | |
The size/number of nodes of a unit work. | |
workerMsgLevel | |
Message level of the worker specific messages. | |
endOfIntParams | |
changeWorkThreshold | |
The threshold of workload below which a worker will change the subtree that is working on. | |
donorThreshold | |
It is between 1.0 - infty. | |
hubReportPeriod | |
The time period (sec) for hubs to process messages. | |
masterBalancePeriod | |
The time period for master to do loading balance/termination check. | |
needWorkThreshold | |
The threshold of workload below which a process will ask for workload Default: 2. | |
receiverThreshold | |
It is between 0.0 - 1.0. | |
timeLimit | |
The time limit (in seconds) of search. | |
tolerance | |
The numeric tolerance. | |
unitWorkTime | |
The time length of a unit work. | |
zeroLoad | |
If less than this number, it is considered zero workload. | |
endOfDblParams | |
instance | |
The instance to be solved. | |
logFile | |
The name of log file. | |
endOfStrParams | |
strArrayDummy | |
endOfStrArrayParams | |
enum | boolParams { checkMemory, deleteDeadNode, interClusterBalance, intraClusterBalance, printSolution, endOfBoolParams } |
Character parameters. More... | |
enum | intParams { bufSpare, clockType, eliteSize, hubInitNodeNum, hubMsgLevel, hubNum, largeSize, logFileLevel, masterInitNodeNum, masterReportInterval, hubWorkClusterSizeLimit, mediumSize, msgLevel, nodeLimit, nodeLogInterval, processNum, staticBalanceScheme, searchStrategy, searchStrategyRampUp, smallSize, solLimit, unitWorkNodes, workerMsgLevel, endOfIntParams } |
Integer paramters. More... | |
enum | dblParams { changeWorkThreshold, donorThreshold, hubReportPeriod, masterBalancePeriod, needWorkThreshold, receiverThreshold, timeLimit, tolerance, unitWorkTime, zeroLoad, endOfDblParams } |
Double parameters. More... | |
enum | strParams { instance, logFile, endOfStrParams } |
String parameters. More... | |
enum | strArrayParams { strArrayDummy, endOfStrArrayParams } |
There are no string array parameters. More... | |
Public Member Functions | |
virtual | ~AlpsParams () |
AlpsParams & | operator= (const AlpsParams &x) |
virtual void | createKeywordList () |
Method for creating the list of keyword looked for in the parameter file. | |
virtual void | setDefaultEntries () |
Method for setting the default values for the parameters. | |
void | setEntry (const boolParams key, const char *val) |
char* is true(1) or false(0), not used | |
void | setEntry (const boolParams key, const char val) |
char is true(1) or false(0), not used | |
void | setEntry (const boolParams key, const bool val) |
This method is the one that ever been used. | |
void | setEntry (const intParams key, const char *val) |
void | setEntry (const intParams key, const int val) |
void | setEntry (const dblParams key, const char *val) |
void | setEntry (const dblParams key, const double val) |
void | setEntry (const strParams key, const char *val) |
void | setEntry (const strArrayParams key, const char *val) |
Constructors. | |
AlpsParams () | |
The default constructor creates a parameter set with from the template argument structure. | |
Query methods | |
The members of the parameter set can be queried for using the overloaded entry() method. Using the example in the class documentation the user can get a parameter with the "<code>param.entry(USER_par::parameter_name)</code>" expression. | |
bool | entry (const boolParams key) const |
int | entry (const intParams key) const |
double | entry (const dblParams key) const |
const std::string & | entry (const strParams key) const |
const std::vector< std::string > & | entry (const strArrayParams key) const |
Packing/unpacking methods | |
void | pack (AlpsEncoded &buf) |
Pack the parameter set into buf. | |
void | unpack (AlpsEncoded &buf) |
Unpack the parameter set from buf. |
Definition at line 36 of file AlpsParams.h.
Character parameters.
All of these variable are used as booleans (ture = 1, false = 0).
Definition at line 40 of file AlpsParams.h.
Integer paramters.
Definition at line 63 of file AlpsParams.h.
Double parameters.
Definition at line 155 of file AlpsParams.h.
String parameters.
instance |
The instance to be solved.
Default: "NONE" |
logFile |
The name of log file.
Default: "Alps.log " |
endOfStrParams |
Definition at line 196 of file AlpsParams.h.
AlpsParams::AlpsParams | ( | ) | [inline] |
The default constructor creates a parameter set with from the template argument structure.
The keyword list is created and the defaults are set.
Definition at line 224 of file AlpsParams.h.
References createKeywordList(), and setDefaultEntries().
virtual AlpsParams::~AlpsParams | ( | ) | [inline, virtual] |
Definition at line 238 of file AlpsParams.h.
AlpsParams& AlpsParams::operator= | ( | const AlpsParams & | x | ) | [inline] |
Definition at line 241 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsParameterSet::sapar_, and AlpsParameterSet::spar_.
virtual void AlpsParams::createKeywordList | ( | ) | [virtual] |
Method for creating the list of keyword looked for in the parameter file.
Implements AlpsParameterSet.
Referenced by AlpsParams().
virtual void AlpsParams::setDefaultEntries | ( | ) | [virtual] |
Method for setting the default values for the parameters.
Implements AlpsParameterSet.
Referenced by AlpsParams().
bool AlpsParams::entry | ( | const boolParams | key | ) | const [inline] |
Definition at line 290 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
Referenced by KnapModel::readParameters().
int AlpsParams::entry | ( | const intParams | key | ) | const [inline] |
double AlpsParams::entry | ( | const dblParams | key | ) | const [inline] |
const std::string& AlpsParams::entry | ( | const strParams | key | ) | const [inline] |
const std::vector<std::string>& AlpsParams::entry | ( | const strArrayParams | key | ) | const [inline] |
void AlpsParams::setEntry | ( | const boolParams | key, | |
const char * | val | |||
) | [inline] |
char* is true(1) or false(0), not used
Definition at line 306 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
Referenced by VrpModel::VrpModel().
void AlpsParams::setEntry | ( | const boolParams | key, | |
const char | val | |||
) | [inline] |
char is true(1) or false(0), not used
Definition at line 309 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
void AlpsParams::setEntry | ( | const boolParams | key, | |
const bool | val | |||
) | [inline] |
This method is the one that ever been used.
Definition at line 312 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
void AlpsParams::setEntry | ( | const intParams | key, | |
const char * | val | |||
) | [inline] |
void AlpsParams::setEntry | ( | const intParams | key, | |
const int | val | |||
) | [inline] |
void AlpsParams::setEntry | ( | const dblParams | key, | |
const char * | val | |||
) | [inline] |
void AlpsParams::setEntry | ( | const dblParams | key, | |
const double | val | |||
) | [inline] |
void AlpsParams::setEntry | ( | const strParams | key, | |
const char * | val | |||
) | [inline] |
void AlpsParams::setEntry | ( | const strArrayParams | key, | |
const char * | val | |||
) | [inline] |
void AlpsParams::pack | ( | AlpsEncoded & | buf | ) | [inline, virtual] |
Pack the parameter set into buf.
Reimplemented from AlpsParameterSet.
Definition at line 338 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsParameterSet::sapar_, AlpsParameterSet::spar_, and AlpsEncoded::writeRep().
void AlpsParams::unpack | ( | AlpsEncoded & | buf | ) | [inline, virtual] |
Unpack the parameter set from buf.
Reimplemented from AlpsParameterSet.
Definition at line 352 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsEncoded::readRep(), AlpsParameterSet::sapar_, and AlpsParameterSet::spar_.