| 1243 | } |
| 1244 | |
| 1245 | void writeOldRawSolution(FILE* file, const HighsLogOptions& log_options, |
| 1246 | const HighsLp& lp, const HighsBasis& basis, |
| 1247 | const HighsSolution& solution) { |
| 1248 | const bool have_value = solution.value_valid; |
| 1249 | const bool have_dual = solution.dual_valid; |
| 1250 | const bool have_basis = basis.valid; |
| 1251 | vector<double> use_col_value; |
| 1252 | vector<double> use_row_value; |
| 1253 | vector<double> use_col_dual; |
| 1254 | vector<double> use_row_dual; |
| 1255 | vector<HighsBasisStatus> use_col_status; |
| 1256 | vector<HighsBasisStatus> use_row_status; |
| 1257 | if (have_value) { |
| 1258 | use_col_value = solution.col_value; |
| 1259 | use_row_value = solution.row_value; |
| 1260 | } |
| 1261 | if (have_dual) { |
| 1262 | use_col_dual = solution.col_dual; |
| 1263 | use_row_dual = solution.row_dual; |
| 1264 | } |
| 1265 | if (have_basis) { |
| 1266 | use_col_status = basis.col_status; |
| 1267 | use_row_status = basis.row_status; |
| 1268 | } |
| 1269 | if (!have_value && !have_dual && !have_basis) return; |
| 1270 | highsFprintfString( |
| 1271 | file, log_options, |
| 1272 | highsFormatToString( |
| 1273 | "%" HIGHSINT_FORMAT " %" HIGHSINT_FORMAT |
| 1274 | " : Number of columns and rows for primal or dual solution " |
| 1275 | "or basis\n", |
| 1276 | lp.num_col_, lp.num_row_)); |
| 1277 | std::stringstream ss; |
| 1278 | ss.str(std::string()); |
| 1279 | if (have_value) { |
| 1280 | ss << highsFormatToString("T"); |
| 1281 | } else { |
| 1282 | ss << highsFormatToString("F"); |
| 1283 | } |
| 1284 | ss << highsFormatToString(" Primal solution\n"); |
| 1285 | highsFprintfString(file, log_options, ss.str()); |
| 1286 | ss.str(std::string()); |
| 1287 | if (have_dual) { |
| 1288 | ss << highsFormatToString("T"); |
| 1289 | } else { |
| 1290 | ss << highsFormatToString("F"); |
| 1291 | } |
| 1292 | ss << highsFormatToString(" Dual solution\n"); |
| 1293 | highsFprintfString(file, log_options, ss.str()); |
| 1294 | ss.str(std::string()); |
| 1295 | if (have_basis) { |
| 1296 | ss << highsFormatToString("T"); |
| 1297 | } else { |
| 1298 | ss << highsFormatToString("F"); |
| 1299 | } |
| 1300 | ss << highsFormatToString(" Basis\n"); |
| 1301 | highsFprintfString(file, log_options, ss.str()); |
| 1302 | highsFprintfString(file, log_options, "Columns\n"); |
no test coverage detected