Skip to content

Commit 8df1a5c

Browse files
committed
Also write end row in MIP trace in case no solution is found (put "na" for best found)
1 parent eada8f3 commit 8df1a5c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

gmscuopt.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,21 @@ int main(int argc, char *argv[])
617617
}
618618
gmoCompleteSolution(gmo);
619619
}
620+
else if (fp_mip_trace) // gmoModelStat(gmo) == gmoModelStat_NoSolutionReturned
621+
{
622+
double total_elapsed = (gevTimeJNow(gev) - context.tstart) * 3600.0 * 24.0;
623+
if (gmoModelType(gmo) == gmoProc_mip && has_integer_vars)
624+
{
625+
status = cuOptGetSolutionBound(solution, &solution_bound);
626+
if (status != CUOPT_SUCCESS)
627+
{
628+
printOut(gev, "Error getting solution bound: %d\n", status);
629+
goto DONE;
630+
}
631+
gmoSetHeadnTail(gmo, gmoTmipbest, solution_bound);
632+
}
633+
mip_trace_line('E', 0, 0, total_elapsed, GMS_SV_NA, solution_bound);
634+
}
620635
status = gmoUnloadSolutionLegacy(gmo);
621636
if (status) {
622637
printOut(gev, "Problems unloading solution\n");

0 commit comments

Comments
 (0)