23 #ifndef AlpsKnowledgeBrokerSerial_h_
24 #define AlpsKnowledgeBrokerSerial_h_
103 std::cout <<
"\nALPS did not find a solution."
107 if (outputFile != 0) {
109 std::ofstream os(outputFile);
110 os <<
"============================================" << std::endl;
112 os <<
"Optimal solution:" << std::endl;
115 os <<
"Best solution found:" << std::endl;
123 std::cout <<
"============================================" << std::endl;
125 std::cout <<
"Optimal solution:" << std::endl;
128 std::cout <<
"Best solution found:" << std::endl;
131 std::cout << std::endl;
134 std::cout <<
"============================================" << std::endl;
The base class of knowledge broker class.
virtual void searchLog()
Search log.
virtual void printBestSolution(char *outputFile=0) const
The process outputs the best solution and the quality that it finds to a file or std::out...
AlpsKnowledgeBrokerSerial & operator=(const AlpsKnowledgeBrokerSerial &)
AlpsKnowledgeBrokerSerial()
Default constructor.
AlpsKnowledgeBrokerSerial(int argc, char *argv[], AlpsModel &model)
Userful constructor.
This class holds one node of the search tree.
virtual void rootSearch(AlpsTreeNode *root)
Search for best solution.
int msgLevel_
The leve of printing message to screen of the master and general message.
virtual double getBestQuality() const
The process queries the quality of the best solution that it finds.
virtual double getIncumbentValue() const
The process queries the quality of the incumbent that it stores.
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge(AlpsKnowledgeType kt) const
Get the best knowledge in the given type of knowledge pools.
virtual ~AlpsKnowledgeBrokerSerial()
Destructor.
virtual void initializeSearch(int argc, char *argv[], AlpsModel &model)
Reading in Alps and user parameter sets, and read in model data.
AlpsExitStatus getSolStatus() const
Query search termination status.
virtual bool hasKnowledge(AlpsKnowledgeType kt) const
Query whether there are knowledges in the given type of knowledge pools.
virtual int getNumKnowledges(AlpsKnowledgeType kt) const
Query the number of knowledge in the given type of a knowledge pool.
AlpsKnowledgeBrokerSerial(AlpsModel &model)
Useful constructor.