4.2.6.1. MiniZincIDE solution visualisation tools
Provides functionality for web-based solution visualisation.
All predefined visualisations are designed to used from output
items:
var 1..10: x;
output vis_line(x, "x-value");
Multiple such output items can be used in a single model to open multiple visualisations concurrently.
Custom visualisations can be created using the vis_server
function:
int: n;
var 1..10: x;
output :: vis_server("my-vis.html", (n: n)) (x: x);
The file my-vis.html will be opened and the MiniZinc IDE JavaScript API can be used to listen for events and retrieve solutions. For more information, see Visualising solutions in the MiniZinc IDE.
In this section: vis_bar, vis_column, vis_digraph, vis_digraph_highlight, vis_gantt, vis_geost_2d, vis_graph, vis_graph_highlight, vis_line, vis_scatter, vis_scatter_cumulative, vis_server.
vis_bar
1. annotation vis_bar(array [$$D] of var int: x)
2. annotation vis_bar(array [$$D] of var float: x)
3. annotation vis_bar(array [$$D] of var int: x,
array [$$D] of string: data_labels)
4. annotation vis_bar(array [$$D] of var float: x,
array [$$D] of string: data_labels)
5. annotation vis_bar(array [$$S,$$D] of var int: x)
6. annotation vis_bar(array [$$S,$$D] of var float: x)
7. annotation vis_bar(array [$$S,$$D] of var int: x,
array [$$S] of string: series_labels,
array [$$D] of string: data_labels)
8. annotation vis_bar(array [$$S,$$D] of var float: x,
array [$$S] of string: series_labels,
array [$$D] of string: data_labels)
|
|
vis_column
1. annotation vis_column(array [$$D] of var int: x)
2. annotation vis_column(array [$$D] of var float: x)
3. annotation vis_column(array [$$D] of var int: x,
array [$$D] of string: data_labels)
4. annotation vis_column(array [$$D] of var float: x,
array [$$D] of string: data_labels)
5. annotation vis_column(array [$$S,$$D] of var int: x)
6. annotation vis_column(array [$$S,$$D] of var float: x)
7. annotation vis_column(array [$$S,$$D] of var int: x,
array [$$S] of string: series_labels,
array [$$D] of string: data_labels)
8. annotation vis_column(array [$$S,$$D] of var float: x,
array [$$S] of string: series_labels,
array [$$D] of string: data_labels)
|
|
vis_digraph
1. annotation vis_digraph(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
2. annotation vis_digraph(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
3. annotation vis_digraph(array [$$N] of string: node_labels,
array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
|
|
vis_digraph_highlight
1. annotation vis_digraph_highlight(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
2. annotation vis_digraph_highlight(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
3. annotation vis_digraph_highlight(array [$$N] of string: node_labels,
array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
|
|
vis_gantt
1. annotation vis_gantt(array [$$E] of var int: start,
array [$$E] of var int: dur)
2. annotation vis_gantt(array [$$E] of var int: start,
array [$$E] of var int: dur,
array [$$E] of string: labels)
3. annotation vis_gantt(array [$$E] of var int: start,
array [$$E] of var int: dur,
array [$$E] of string: labels,
array [$$E] of string: colors)
|
|
vis_geost_2d
1. annotation vis_geost_2d(array [$$E] of int: rect_x,
array [$$E] of int: rect_y,
array [$$E] of int: rect_dx,
array [$$E] of int: rect_dy,
array [$$K] of set of $$E: shape,
array [$$T] of var int: x,
array [$$T] of var int: y,
array [$$T] of var $$K: kind)
2. annotation vis_geost_2d(array [$$E,1..2] of int: rect_size,
array [$$E,1..2] of int: rect_offset,
array [$$K] of set of $$E: shape,
array [$$T,1..2] of var int: x,
array [$$T] of var $$K: kind)
3. annotation vis_geost_2d(array [$$E] of tuple(int, int): rect_size,
array [$$E] of tuple(int, int): rect_offset,
array [$$K] of set of $$E: shape,
array [$$T] of var tuple(var int, var int): x,
array [$$T] of var $$K: kind)
|
|
vis_graph
1. annotation vis_graph(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
2. annotation vis_graph(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
3. annotation vis_graph(array [$$N] of string: node_labels,
array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
|
|
vis_graph_highlight
1. annotation vis_graph_highlight(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
2. annotation vis_graph_highlight(array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
3. annotation vis_graph_highlight(array [$$N] of string: node_labels,
array [$$E] of $$N: from,
array [$$E] of $$N: to,
array [$$E] of string: edge_labels,
array [$$N] of var bool: ns,
array [$$E] of var bool: es)
|
|
vis_line
1. annotation vis_line(var int: x, string: label)
2. annotation vis_line(var float: x, string: label)
3. annotation vis_line(array [$$E] of var int: x)
4. annotation vis_line(array [$$E] of var float: x)
5. annotation vis_line(array [$$E] of var int: x,
array [$$E] of string: series_labels)
6. annotation vis_line(array [$$E] of var float: x,
array [$$E] of string: series_labels)
7. annotation vis_line(array [$$E] of var int: x,
array [$$E] of var int: y,
string: x_label,
string: y_label)
8. annotation vis_line(array [$$E] of var float: x,
array [$$E] of var float: y,
string: x_label,
string: y_label)
|
|
vis_scatter
annotation vis_scatter(array [$$E] of var int: x,
array [$$E] of var int: y,
string: x_label,
string: y_label)
annotation vis_scatter(array [$$E] of var float: x,
array [$$E] of var float: y,
string: x_label,
string: y_label)
|
Add a scatter plot of x against y, labelling the axes x_label and y_label respectively. |
vis_scatter_cumulative
1. annotation vis_scatter_cumulative(var int: x,
var int: y,
string: x_label,
string: y_label,
string: series_label)
2. annotation vis_scatter_cumulative(var float: x,
var float: y,
string: x_label,
string: y_label,
string: series_label)
3. annotation vis_scatter_cumulative(array [$$E] of var int: x,
array [$$E] of var int: y,
string: x_label,
string: y_label)
4. annotation vis_scatter_cumulative(array [$$E] of var float: x,
array [$$E] of var float: y,
string: x_label,
string: y_label)
5. annotation vis_scatter_cumulative(array [$$E] of var int: x,
array [$$E] of var int: y,
string: x_label,
string: y_label,
array [$$E] of string: series_labels)
6. annotation vis_scatter_cumulative(array [$$E] of var float: x,
array [$$E] of var float: y,
string: x_label,
string: y_label,
array [$$E] of string: series_labels)
|
|
vis_server
1. annotation vis_server(string: file)
2. annotation vis_server(string: file, opt $T: user_data)
3. annotation vis_server(string: file, array [$X] of opt $T: user_data)
|
|