32 high_resolution_clock::time_point start = high_resolution_clock::now();
34 vector<RoboticLine*> lines;
35 if (Settings::VERBOSE && numberOfProblems > 0)
36 cout<<
"Generation of instances: "<<endl;
38 for (uint32_t pn = 0; pn < numberOfProblems; ++pn) {
40 if (Settings::VERBOSE) {
41 cout<<
" 0 % ["<<setfill(
'#')<<setw(50)<<string(50*(numberOfProblems-pn-1)/numberOfProblems,
' ')<<
"] ";
42 cout<<setprecision(2)<<fixed<<100.0*(pn+1)/numberOfProblems<<
" %"<<
'\r';
47 if (Settings::VERBOSE && numberOfProblems > 0)
53 for (uint32_t pn = 0; pn < numberOfProblems; ++pn) {
54 if (!lines[pn]->warnings().empty()) {
55 if (Settings::VERBOSE)
57 clog<<
"Warnings for instance "<<pn<<
":"<<endl;
58 for (
const string& warn : lines[pn]->warnings())
66 duration<double> runtime = duration_cast<duration<double>>(high_resolution_clock::now()-start);
67 if (Settings::VERBOSE)
68 cout<<endl<<setprecision(10)<<
"Total running time: "<<runtime.count()<<
" s"<<endl;
It primarily defines XmlWriter class for writing the generated instances to the file.
void writeXmlFile(std::string filename=Settings::OUTPUT_FILE)
It transforms the instances of the robotic cells to the form of the xml file.
The file contains the Generator class.
void generateProblems(uint32_t numberOfProblems=Settings::NUMBER_OF_INSTANCES)
It generates the specified number of instances and writes them to the xml file.
It writes problem instances to the xml file.
The robotic cell corresponds to an instance of this class.