Package org.chocosolver.solver.trace
Interface IOutputFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIOutputFactory.DefaultDecisionMessageThe default decision message formatstatic classIOutputFactory.DefaultSolutionMessageThe default solution message format
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidconstraintNetworkToGephi(String gexfFilename)Populate a GEXF file (gexfFilename with constraint netwok to be vizualized with Gephi.PrintStreamgetErr()PrintStreamgetOut()default CloseableoutputSearchTreeToCPProfiler(boolean domain)Plug cp-profiler instance to this.default CloseableoutputSearchTreeToGephi(String gexfFilename)Populate a GEXF file (gexfFilename with search tree to be vizualized with Gephi.default CloseableoutputSearchTreeToGraphviz(String gvFilename)Populate a DOT file (gvFilename with search tree to be vizualized with Graphviz.default voidprintCSVStatistics()Output the resolution statistics in a comma-separated single line.default voidprintFeatures()Print (succint) features of the solver given in argumentdefault voidprintShortFeatures()Print (succint) features of the solver given in argument in a single line.default voidprintShortStatistics()Output the resolution statistics in a single line.default voidprintStatistics()Print the resolution statistics.default voidprintVersion()Print the version message.voidsetErr(PrintStream printStream)Set the current error stream (default is System.err)voidsetOut(PrintStream printStream)Set the current output stream (default is System.out)default voidshowContradiction()Plug a search monitor which outputs the contradictions thrown during the search.default voidshowDashboard()Create and show a simple dashboard that render resolution statistics every 100 milliseconds.default voidshowDashboard(long refresh)Create and show a simple dashboard that render resolution statistics every 'refresh' milliseconds.default voidshowDecisions()Plug a search monitor which outputs a message on each decision.default voidshowDecisions(IMessage message)Plug a search monitor which outputsmessageon each decision.default voidshowShortStatistics()Plug a search monitor which callsprintShortStatistics()before closing the search.default voidshowShortStatisticsOnShutdown()CallsprintShortStatistics()before the program ends (normally or not)?default voidshowSolutions()Plug a search monitor which outputs a message on each solution.default voidshowSolutions(IMessage message)Plug a search monitor which outputsmessageon each solution.default voidshowStatistics()Plug a search monitor which callsprintVersion()andprintStatistics()before closing the search.default voidshowStatisticsDuringResolution(long f)Plug a search monitor which prints a one-line statistics everyfms.
-
-
-
Method Detail
-
setOut
void setOut(PrintStream printStream)
Set the current output stream (default is System.out)- Parameters:
printStream- a print stream
-
getOut
PrintStream getOut()
- Returns:
- the current output stream (default is System.out)
-
setErr
void setErr(PrintStream printStream)
Set the current error stream (default is System.err)- Parameters:
printStream- a print stream
-
getErr
PrintStream getErr()
- Returns:
- the current error stream (default is System.err)
-
printVersion
default void printVersion()
Print the version message.
-
printFeatures
default void printFeatures()
Print (succint) features of the solver given in argument
-
printShortFeatures
default void printShortFeatures()
Print (succint) features of the solver given in argument in a single line.
-
printStatistics
default void printStatistics()
Print the resolution statistics.Recommended usage: to be called after the resolution step.
-
printShortStatistics
default void printShortStatistics()
Output the resolution statistics in a single line.Recommended usage: to be called after the resolution step.
-
printCSVStatistics
default void printCSVStatistics()
Output the resolution statistics in a comma-separated single line. The header is:solutionCount;buildingTime(sec);initTime(sec);initPropag(sec);totalTime(sec);objective;nodes;backtracks;fails;restarts;fineProp;coarseProp;
-
showStatistics
default void showStatistics()
Plug a search monitor which callsprintVersion()andprintStatistics()before closing the search.Recommended usage: to be called before the resolution step.
-
showShortStatistics
default void showShortStatistics()
Plug a search monitor which callsprintShortStatistics()before closing the search.Recommended usage: to be called before the resolution step.
-
showShortStatisticsOnShutdown
default void showShortStatisticsOnShutdown()
CallsprintShortStatistics()before the program ends (normally or not)? This adds a shutdown hook.Recommended usage: to be called before the resolution step.
-
showSolutions
default void showSolutions(IMessage message)
Plug a search monitor which outputsmessageon each solution.Recommended usage: to be called before the resolution step.
- Parameters:
message- the message to print.
-
showSolutions
default void showSolutions()
Plug a search monitor which outputs a message on each solution.Recommended usage: to be called before the resolution step.
- See Also:
IOutputFactory.DefaultSolutionMessage
-
showDecisions
default void showDecisions(IMessage message)
Plug a search monitor which outputsmessageon each decision.Recommended usage: to be called before the resolution step.
- Parameters:
message- the message to print.
-
showDecisions
default void showDecisions()
Plug a search monitor which outputs a message on each decision.Recommended usage: to be called before the resolution step.
- See Also:
IOutputFactory.DefaultSolutionMessage
-
showContradiction
default void showContradiction()
Plug a search monitor which outputs the contradictions thrown during the search.
-
showStatisticsDuringResolution
default void showStatisticsDuringResolution(long f)
Plug a search monitor which prints a one-line statistics everyfms.- Parameters:
f- frequency, in millisecond
-
showDashboard
default void showDashboard()
Create and show a simple dashboard that render resolution statistics every 100 milliseconds.
-
showDashboard
default void showDashboard(long refresh)
Create and show a simple dashboard that render resolution statistics every 'refresh' milliseconds. Note that a low refresh rate will slow down the entire process.- Parameters:
refresh- frequency rate, in milliseconds.
-
outputSearchTreeToGraphviz
default Closeable outputSearchTreeToGraphviz(String gvFilename)
Populate a DOT file (gvFilename with search tree to be vizualized with Graphviz.- Parameters:
gvFilename- dot filename- Returns:
- a
Closeableobject to be closed at the end of resolution
-
outputSearchTreeToGephi
default Closeable outputSearchTreeToGephi(String gexfFilename)
Populate a GEXF file (gexfFilename with search tree to be vizualized with Gephi.- Parameters:
gexfFilename- dot filename- Returns:
- a
Closeableobject to be closed at the end of resolution
-
outputSearchTreeToCPProfiler
default Closeable outputSearchTreeToCPProfiler(boolean domain)
Plug cp-profiler instance to this.- Parameters:
domain- set to true to send variables' domain on each node, false otherwise.- Returns:
- a
Closeableobject to be closed at the end of resolution
-
-