
add_visualizer(+Handle, ++Visualizer, ++Options)

   Add a visualizer to the visualisation

Arguments
   Handle              an opaque data structure for the visualization
   Visualizer          a term, defining the visualizer
   Options             a list of option:value pairs describing the options to be applied to the visualizer

Type
   library(visualization)

Description

This predicate is used to add a visualizer to an existing
visualization.  It can be called after the visualization has been
created with a create_visualization/2 call.  The second argument is
the description of the visualizer, either for variables or for
constraints.

Variable visualizers display the state and/or evolution of a
collection of variables.  At the moment this can be one of the
following entries:



Variable Visualizer  Description


vector(L)  The visualizer shows the current state of a
collection of variables.  It marks which variables have been assigned,
which values have been removed and which values remain in the domain.


vector_waterfall(L)  This visualizer shows the changes of
the collection of variables on the path from the root node to the
current node.  It marks if a variable is assigned, changed (min and
max, min, max or size only), or if it is not modified in each step.


vector_size(L)  This visualizer shows the change of the
domain sizes for a collection of variables from the root node to the
current node in the search.


binary_vector(Bool)  This visualizer is a special variant
of the vector visualizer for a collection of 0/1 vairables.  Values
are marked either as unassigned, or as assigned to zero or to one.


domain_matrix(Matrix)  This visualizer shows a 2D matrix of
domain variables.  Depending on the options, it only shows the
assigned values, or displayed the values remaining in the domain.


binary_matrix(BoolMatrix)  A specialized version of the
matrix visualizer for 0/1 variables.




Constraint visualizers show the state and/or evolution of a global
constraint.  At the moment, visualizers for the following global
constraints are provided.



Constraint Visualizer


alldifferent(Xs)


alldifferent_matrix(Matrix)


bin_packing(Items,Sizes,Bins)


bool_channeling(X,Bool,Start)


cumulative(Starts,Durations,Resources,Limit)


cumulative(Starts,Durationss,Resources,Limit,End)


disjoint2(Rectangles)


element(X,Vs,Y)


gcc(Limits,Vars)


gcc_matrix(RowLimits,ColLimits,Matrix)


inverse(Succ,Pred)


lex_le(Xs,Ys)


lex_lt(Xs,Ys)


same(Xs,Ys)


sequence_total(Min,Max,Low,Hi,K,ZeroOnes)







Possible Options are:

display
    influences how the visualizer will be drawn (expanded, text, gantt, ...),
    default: minimal
group
    group id number for the visualizer (integer, or 'other')
x,y
    position at which the visualizer will be placed (default 0,0)





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
   ic : alldifferent / 1, ic_symbolic : alldifferent / 1, gfd : alldifferent / 1, sd : alldifferent / 1, fd_global : alldifferent / 1, ic_global : alldifferent / 1, fd : alldifferent / 1, fd_global_gac : alldifferent / 1, ic_global_gac : alldifferent / 1, fd_global : alldifferent_matrix / 1, ic_global : alldifferent_matrix / 1, fd_global_gac : alldifferent_matrix / 1, ic_global_gac : alldifferent_matrix / 1, gfd : bin_packing / 3, fd_global : bin_packing / 3, ic_global : bin_packing / 3, gfd : bool_channeling / 3, fd_global : bool_channeling / 3, ic_global : bool_channeling / 3, ic_edge_finder : cumulative / 4, ic_edge_finder3 : cumulative / 4, gfd : cumulative / 4, edge_finder : cumulative / 4, edge_finder3 : cumulative / 4, cumulative : cumulative / 4, ic_cumulative : cumulative / 4, ic : element / 3, ic_symbolic : element / 3, gfd : element / 3, fd : element / 3, gfd : gcc / 2, fd_global_gac : gcc / 2, ic_global_gac : gcc / 2, fd_global_gac : gcc_matrix / 3, ic_global_gac : gcc_matrix / 3, gfd : inverse / 2, fd_global : inverse / 2, ic_global : inverse / 2, fd_global_gac : inverse / 2, ic_global_gac : inverse / 2, gfd : lex_le / 2, fd_global : lex_le / 2, ic_global : lex_le / 2, fd_global_gac : lex_le / 2, ic_global_gac : lex_le / 2, gfd : lex_lt / 2, fd_global : lex_lt / 2, ic_global : lex_lt / 2, fd_global_gac : lex_lt / 2, ic_global_gac : lex_lt / 2, fd_global_gac : same / 2, ic_global_gac : same / 2, fd_global : sequence_total / 6, ic_global : sequence_total / 6, create_visualization / 2, close_visualization / 1, visualize_tree : solution / 1, visualize_tree : try / 4, visualize_tree : failure / 4, visualize_tree : tree_indomain / 3, draw_visualization / 1
