Print solution
| 205 | } |
| 206 | /// Print solution |
| 207 | virtual void |
| 208 | print(std::ostream& os) const { |
| 209 | os << "\tInstance: " << spec.iname() << std::endl; |
| 210 | if (bin.assigned()) { |
| 211 | for (int j=0; j<spec.bins(); j++) { |
| 212 | os << "\tbin[" << j << "]: "; |
| 213 | for (int i=0; i<spec.items(); i++) |
| 214 | if (bin[i].val() == j) |
| 215 | os << i << " "; |
| 216 | os << "\n\t\tloads: "; |
| 217 | for (int k=0; k<spec.dimension(); k++) |
| 218 | os << load[j*spec.dimension()+k] << " "; |
| 219 | os << std::endl; |
| 220 | } |
| 221 | } else { |
| 222 | os << "\tbins: " << bin << std::endl |
| 223 | << "\tload: " << load << std::endl; |
| 224 | } |
| 225 | } |
| 226 | }; |
| 227 | |
| 228 | /** \brief Main-function |