[ library(visualization) | Reference Manual | Alphabetic Index ]

# create_visualization(+Options, -Handle)

Prepare to generate visualization output

Options
  a list of option pairs of form option:value
Handle
  a free variable, will be bound to an opaque data structure for the visualization

## Description

This predicate prepares the system for visualization output and create a data structure Handle which is used by all other visualization predicates. For every run, the predicate should only be called once. It can not be called again, until the current visualization is closed with close_visualization/1. The predicate only prepares the system, it does not record a execution state on its own.

Possible options are:

output
  atom/string (default 'OUTPUT'), name of directory where log files will be placed
ignore_fixed
  yes/no (default yes), states if fixed assignments will be ignored and not create tree nodes

## Examples

    top(N,L):-
        length(L,N),
        L :: 1..N,
        alldifferent(L),
        create_visualization([],Handle),
        add_visualizer(Handle,vector(L),[]),
        number_variables(Handle,L,Terms),
        root(Handle),
        search(Terms,1,first_fail,tree_indomain(Handle,_),complete,[]),
        solution(Handle),
        close_visualization(Handle).

## See Also

visualize_tree : root / 1, visualize_tree : solution / 1, visualize_tree : try / 4, visualize_tree : failure / 4, visualize_tree : tree_indomain / 3, draw_visualization / 1, close_visualization / 1