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;
@ AlpsKnowledgeTypeSolution
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.
virtual void searchLog()
Search log.
AlpsKnowledgeBrokerSerial(int argc, char *argv[], AlpsModel &model)
Userful constructor.
AlpsKnowledgeBrokerSerial(AlpsModel &model)
Useful constructor.
virtual void rootSearch(AlpsTreeNode *root)
Search for best solution.
virtual double getIncumbentValue() const
The process queries the quality of the incumbent that it stores.
virtual double getBestQuality() const
The process queries the quality of the best solution that it finds.
AlpsKnowledgeBrokerSerial()
Default constructor.
virtual void initializeSearch(int argc, char *argv[], AlpsModel &model)
Reading in Alps and user parameter sets, and read in model data.
virtual ~AlpsKnowledgeBrokerSerial()
Destructor.
The base class of knowledge broker class.
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.
AlpsExitStatus getSolStatus() const
Query search termination status.
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge(AlpsKnowledgeType kt) const
Get the best knowledge in the given type of knowledge pools.
int msgLevel_
The leve of printing message to screen of the master and general message.
This class holds one node of the search tree.