|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.coursett.Test
public class Test
A main class for running of the solver from command line.
Usage:
java -Xmx1024m -jar coursett1.1.jar config.properties [input_file] [output_folder]
See http://www.unitime.org for example configuration files and banchmark data sets.
The test does the following steps:
DataProperties
).
TimetableLoader.load()
).
Solver
).
TimetableSaver.save()
, when General.Save property is set to true.
Constructor Summary | |
---|---|
Test(String[] args)
Solver Test |
Method Summary | |
---|---|
void |
bestCleared(Solution solution)
Called by the solution when method Solution.clearBest() is called. |
void |
bestRestored(Solution solution)
Called by the solution when method Solution.restoreBest() is called. |
void |
bestSaved(Solution solution)
Called by the solution when method Solution.saveBest() is called. |
void |
getInfo(Solution solution,
Dictionary info)
Called by the solution when it is asked to produce info table, see Solution.getInfo() . |
void |
getInfo(Solution solution,
Dictionary info,
Vector variables)
Called by the solution when it is asked to produce info table, see Solution.getInfo() . |
static String |
getVersionString()
Current version |
void |
init(Solver solver)
Solver initialization |
static void |
main(String[] args)
|
void |
notify(Solution 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 solution)
Create info.txt with some more information about the problem |
static void |
saveOutputCSV(Solution s,
File file)
|
void |
solutionUpdated(Solution solution)
Called by the solution when it is updated, see Solution.update(double) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Test(String[] args)
args
- command line argumentsMethod Detail |
---|
public static String getVersionString()
public void init(Solver solver)
public static void main(String[] args)
public void bestCleared(Solution solution)
SolutionListener
Solution.clearBest()
is called.
bestCleared
in interface SolutionListener
solution
- source solutionpublic void bestRestored(Solution solution)
SolutionListener
Solution.restoreBest()
is called.
bestRestored
in interface SolutionListener
solution
- source solutionpublic void bestSaved(Solution solution)
SolutionListener
Solution.saveBest()
is called.
bestSaved
in interface SolutionListener
solution
- source solutionpublic void getInfo(Solution solution, Dictionary info)
SolutionListener
Solution.getInfo()
.
A listener can also add some its info into this table.
getInfo
in interface SolutionListener
solution
- source solutioninfo
- produced info tablepublic void getInfo(Solution solution, Dictionary info, Vector variables)
SolutionListener
Solution.getInfo()
.
A listener can also add some its info into this table.
getInfo
in interface SolutionListener
solution
- source solutioninfo
- produced info tablevariables
- only variables from this set are includedpublic void solutionUpdated(Solution solution)
SolutionListener
Solution.update(double)
.
solutionUpdated
in interface SolutionListener
solution
- source solutionpublic void notify(Solution solution)
public static void printRoomInfo(PrintWriter pw, TimetableModel model)
public static void printClassInfo(PrintWriter pw, TimetableModel model)
public static void printSomeStuff(Solution solution) throws IOException
IOException
public static void saveOutputCSV(Solution s, File file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |