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:
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).