solver
1.0
|
Output operators and other related functions for solution printing or writing. More...
Functions | |
std::ostream & | operator<< (std::ostream &out, const Solution &s) |
It prints the solution to the output stream. | |
std::ostream & | operator<< (std::ostream &out, const State &st) |
It prints the state of a solution to the output stream. | |
void | writeBriefResultToStream (std::ostream &OUT, const std::string &instanceName, const Solution &s) |
It prints the solution as follows: 'instance name (state, runtime s): energy'. More... | |
void | writeBriefResultToCsvFile (const std::string &instanceName, const std::string &pathToFile, const Solution &s) |
It writes the solution to the file in the same format as writeBriefResultToStream function. More... | |
void | writeSolutionToCsvFile (const std::string &file, const Solution &s, const PrecalculatedMapping &mapper) |
It writes the solution to a csv file, the header is 'activity id, start time, duration, type, point, power saving mode, movement, energy'. More... | |
Output operators and other related functions for solution printing or writing.
The module contains the output stream operators for Solution class, and functions dedicated to writing brief or detailed results to *.csv files.
void writeBriefResultToCsvFile | ( | const std::string & | instanceName, |
const std::string & | pathToFile, | ||
const Solution & | s | ||
) |
It writes the solution to the file in the same format as writeBriefResultToStream function.
instanceName | A short name of the instance. |
pathToFile | A path to the file to which a brief result will be written. |
s | Solution to be written. |
Definition at line 164 of file Solution.cpp.
void writeBriefResultToStream | ( | std::ostream & | OUT, |
const std::string & | instanceName, | ||
const Solution & | s | ||
) |
It prints the solution as follows: 'instance name (state, runtime s): energy'.
OUT | An output stream to which a brief result will be written. |
instanceName | A short name of the instance. |
s | Solution to be printed. |
Definition at line 152 of file Solution.cpp.
void writeSolutionToCsvFile | ( | const std::string & | file, |
const Solution & | s, | ||
const PrecalculatedMapping & | mapper | ||
) |
It writes the solution to a csv file, the header is 'activity id, start time, duration, type, point, power saving mode, movement, energy'.
file | A file to which the solution will be written in the form of csv file. |
s | Solution to be written. |
mapper | Fast access to the data structure of the related robotic cell. |
Definition at line 109 of file Solution.cpp.