public class Test extends Object implements SolutionListener<Lecture,Placement>
DataProperties
).
TimetableLoader.load()
).
Solver
).
TimetableSaver.save()
, when
General.Save property is set to true.
Modifier and Type | Method and Description |
---|---|
void |
bestCleared(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.clearBest() is
called. |
void |
bestRestored(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.restoreBest() is
called. |
void |
bestSaved(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.saveBest() is called. |
void |
getInfo(Solution<Lecture,Placement> solution,
Map<String,String> info)
Called by the solution when it is asked to produce info table, see
Solution.getInfo() . |
void |
getInfo(Solution<Lecture,Placement> solution,
Map<String,String> info,
Collection<Lecture> variables)
Called by the solution when it is asked to produce info table, see
Solution.getInfo() . |
static String |
getVersionString()
Current version
|
void |
init(Solver<Lecture,Placement> solver)
Solver initialization
|
static void |
main(String[] args) |
void |
notify(Solution<Lecture,Placement> solution)
Add a line into the output CSV file when a enw best solution is found.
|
static void |
printClassInfo(PrintWriter pw,
TimetableModel model)
Class information
|
static void |
printRoomInfo(PrintWriter pw,
TimetableModel model)
Print room utilization
|
static void |
printSomeStuff(Solution<Lecture,Placement> solution)
Create info.txt with some more information about the problem
|
static void |
saveOutputCSV(Solution<Lecture,Placement> s,
File file) |
static void |
setupLogging(File logFile,
boolean debug)
Setup log4j logging
|
void |
solutionUpdated(Solution<Lecture,Placement> solution)
Called by the solution when it is updated, see
Solution.update(double) . |
public static String getVersionString()
public static void setupLogging(File logFile, boolean debug)
logFile
- log filedebug
- true if debug messages should be logged (use -Ddebug=true to enable debug message)public void bestCleared(Solution<Lecture,Placement> solution)
SolutionListener
Solution.clearBest()
is
called.bestCleared
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void bestRestored(Solution<Lecture,Placement> solution)
SolutionListener
Solution.restoreBest()
is
called.bestRestored
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void bestSaved(Solution<Lecture,Placement> solution)
SolutionListener
Solution.saveBest()
is called.bestSaved
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void getInfo(Solution<Lecture,Placement> solution, Map<String,String> info)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.getInfo
in interface SolutionListener<Lecture,Placement>
solution
- source solutioninfo
- produced info tablepublic void getInfo(Solution<Lecture,Placement> solution, Map<String,String> info, Collection<Lecture> variables)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.getInfo
in interface SolutionListener<Lecture,Placement>
solution
- source solutioninfo
- produced info tablevariables
- only variables from this set are includedpublic void solutionUpdated(Solution<Lecture,Placement> solution)
SolutionListener
Solution.update(double)
.solutionUpdated
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void notify(Solution<Lecture,Placement> solution)
public static void printRoomInfo(PrintWriter pw, TimetableModel model)
public static void printClassInfo(PrintWriter pw, TimetableModel model)
public static void printSomeStuff(Solution<Lecture,Placement> solution) throws IOException
IOException
public static void saveOutputCSV(Solution<Lecture,Placement> s, File file)