trace
Class Visualization

java.lang.Object
  extended by trace.Visualization

public class Visualization
extends Object

A class to produce log files of a problem resolution.
It creates 3 files:
- configuration.xml
- tree.xml
- visualization.xml
respecting the log formats defined by Helmut Simonis.
These files are created at the root directory of the project (see logback.xml for more details).
These files can be treaten with cpviz


Before calling the solve step of the program, one can create a new instance of Visualization.

This object provides 3 main services:
- createTree(): declare the tree search visualizer
- createViz(): declare the constraint and variable visualizers container
- addVisualizer(Visualizervisualizer): add a visualizer to the container
- close() : close the log files


Since:
9 d�c. 2010
Author:
Charles Prud'homme

Field Summary
 int trace_tools
           
 
Constructor Summary
Visualization(Solver solver, String dir)
          Build a new instance of Visualization.
Visualization(String pbname, Solver solver, String dir)
          Build a new instance of Visualization.
 
Method Summary
 void addVisualizer(Visualizer visualizer)
          Add a constraint/variable visualizer to the container
 void close()
          Close the log files
 void createTree()
          Declare the tree search visualization, with default construction parameters.
 void createTree(String type, String display, String repeat, int width, int height)
          Declare the tree search visualization.
 void createViz()
          Declare the constraint and variable visualizers container, with default construction parameters.
 void createViz(String type, String display, String repeat, int width, int height)
          Declare the constraint and variable visualizers container.
protected  void init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trace_tools

public int trace_tools
Constructor Detail

Visualization

public Visualization(Solver solver,
                     String dir)
Build a new instance of Visualization.

Parameters:
solver - associated solver
dir - output directory

Visualization

public Visualization(String pbname,
                     Solver solver,
                     String dir)
Build a new instance of Visualization.

Parameters:
pbname - name of the treated problem (suffix of log files)
solver - associated solver
dir - output directory
Method Detail

createTree

public void createTree(String type,
                       String display,
                       String repeat,
                       int width,
                       int height)
Declare the tree search visualization.
Append to the configuration xml file

Parameters:
type - "layout", "graph" or "values"
display - "compact" or "expanded"
repeat - "all", "final", "i" or "-i"
width - width of SVG canvas in screen pixels
height - height of SVG canvas in screen pixels

createTree

public void createTree()
Declare the tree search visualization, with default construction parameters.
- type : "layout"
- display : "compact"
- repeat: "all"
- width : 500
- height : 500
Append to the configuration xml file.


createViz

public void createViz(String type,
                      String display,
                      String repeat,
                      int width,
                      int height)
Declare the constraint and variable visualizers container.
Append to the configuration xml file

Parameters:
type - "layout"
display - "compact" or "expanded"
repeat - "all", "final", "i" or "-i"
width - width of SVG canvas in screen pixels
height - height of SVG canvas in screen pixels

createViz

public void createViz()
Declare the constraint and variable visualizers container, with default construction parameters.
- type : "layout"
- display : "compact"
- repeat: "all"
- width : 500
- height : 500
Append to the configuration xml file


addVisualizer

public void addVisualizer(Visualizer visualizer)
Add a constraint/variable visualizer to the container

Parameters:
visualizer - the visualizer to add

close

public void close()
Close the log files


init

protected void init()


Copyright © 2012. All Rights Reserved.