solver  1.0
Functions
solution printing or writing

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...
 

Detailed Description

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.

Function Documentation

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.

Parameters
instanceNameA short name of the instance.
pathToFileA path to the file to which a brief result will be written.
sSolution 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'.

Parameters
OUTAn output stream to which a brief result will be written.
instanceNameA short name of the instance.
sSolution 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'.

Parameters
fileA file to which the solution will be written in the form of csv file.
sSolution to be written.
mapperFast access to the data structure of the related robotic cell.

Definition at line 109 of file Solution.cpp.