The Summary class manages the output in the summary file.
More...
#include <OCPOutput.hpp>
The Summary class manages the output in the summary file.
Definition at line 103 of file OCPOutput.hpp.
◆ PrintInfo()
void Summary::PrintInfo |
( |
const string & |
dir | ) |
const |
Write output information to a file.
Write output information in the dir/SUMMARY.out file.
Definition at line 506 of file OCPOutput.cpp.
508 string FileOut = dir +
"SUMMARY.out";
509 ofstream outF(FileOut);
510 if (!outF.is_open()) {
516 const USI num = Sumdata.size();
517 const USI len = Sumdata[0].val.size();
525 outF <<
"Row " << ++row <<
"\n";
528 outF <<
"\t" << setw(ns) << Sumdata[0].Item;
531 for (
USI i = 1; i < col; i++) {
532 outF <<
"\t" << setw(ns) << Sumdata[
id++].Item;
533 if (
id == num)
break;
538 outF <<
"\t" << setw(ns) << Sumdata[0].Unit;
541 for (
USI i = 1; i < col; i++) {
542 outF <<
"\t" << setw(ns) << Sumdata[
id++].Unit;
543 if (
id == num)
break;
548 outF <<
"\t" << setw(ns) << Sumdata[0].Obj;
551 for (
USI i = 1; i < col; i++) {
552 outF <<
"\t" << setw(ns) << Sumdata[
id++].Obj;
553 if (
id == num)
break;
558 for (
USI l = 0; l < len; l++) {
561 outF <<
"\t" << setw(ns) << fixed << setprecision(3) << Sumdata[0].val[l];
564 for (
USI i = 1; i < col; i++) {
565 if (Sumdata[
id].Type ==
"int") {
566 outF << fixed << setprecision(0);
567 }
else if (Sumdata[
id].Type ==
"fixed") {
568 outF << fixed << setprecision(3);
569 }
else if (Sumdata[
id].Type ==
"float") {
570 outF << scientific << setprecision(5);
572 outF <<
"\t" << setw(ns) << Sumdata[
id++].val[l];
573 if (
id == num)
break;
unsigned int USI
Generic unsigned integer.
#define OCP_ABORT(msg)
Abort if critical error happens.
References OCP_ABORT.
The documentation for this class was generated from the following files: