Skip to content

Commit

Permalink
Manage Solvers: Solver Stats
Browse files Browse the repository at this point in the history
- ensure Created date is populated after a restart (for a backed up solver)
- the other stats: use best solution info when available, otherwise use the current solution info
  • Loading branch information
tomas-muller committed Nov 25, 2024
1 parent 1ee2b86 commit 016ca29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ public String getSolverTable(SolverType type) {
if (solver == null) continue;
DataProperties properties = solver.getProperties();
if (properties == null) continue;
Map<String,String> info = solver.statusSolutionInfo();
Map<String,String> info = solver.bestSolutionInfo();
if (info == null)
info = solver.currentSolutionInfo();

String bgColor = null;
if (selectedId != null && selectedId.equals(solver.getUser()))
Expand Down
7 changes: 7 additions & 0 deletions JavaSource/org/unitime/timetable/solver/AbstractSolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,13 @@ public boolean restore(File folder, String puid, boolean removeFiles) {
inXmlFile.delete();
}

if (iLoadedDate == null) {
List<Progress.Message> log = Progress.getInstance(currentSolution().getModel()).getLog();
if (log!=null && !log.isEmpty()) {
iLoadedDate = log.get(0).getDate();
}
}

return true;
} catch (Exception e) {
sLog.error(e.getMessage(),e);
Expand Down

0 comments on commit 016ca29

Please sign in to comment.