Given this small example:
go:-
length( X, 200 ),
domain( X, 1, 25),
postConstraints( X, Y ),
labeling( [minimize(Y), X ).
If we assume that postConstraints
set up some complex constraints.
Y is returned from postConstraints
and used as cost-function during labeling.
We assume that we have no (or minimal) knowledge about the constraints set up by postConstraints
. But we know that the optimal solution (or a good solution) will be that X contains a more or less uniform distribution of the possible domain. I.e. the value 1 will appear around 8 (200/25) times, 2 will appear around 8 times, etc.
However we don't know at what position each value will appear.
If we start by use of default labeling, X will first be assigned with only 1, which is a solution, but not a good solution (high Y). By running the search for a long time, the optimal solution will be found, which is a more or less uniform distribution over the possible domain.
This mean that the search use a long time to go from the first possible solution to the optimal (or the better) solution.
I think that if an initial 'guess' could be applied to X before labeling, the search would be faster.
Ex. if X was populated with random values from the domain?
Is there any way to do that in Sicstus? Is this where you use value(Enum)
in labeling
?