Re: Possible bug in ic

From: Warwick Harvey <wh_at_icparc.ic.ac.uk>
Date: Wed 09 Oct 2002 05:01:45 PM GMT
Message-ID: <20021009180141.O23209@tempest.icparc.ic.ac.uk>
On Wed, Oct 09, 2002 at 05:49:02PM +0100, Karen E Petrie wrote:
[...]
> constrain(Node, Edge):-
> 	Edge[1] #= abs(Node[1]-Node[2]),
> 	Edge[2] #= abs(Node[2]-Node[4]),
> 	Edge[3] #= abs(Node[3]-Node[4]),
> 	Edge[4] #= abs(Node[1]-Node[3]),
> 	Edge[5] #= abs(Node[1]-Node[5]),
> 	Edge[6] #= abs(Node[2]-Node[6]),
> 	Edge[7] #= abs(Node[3]-Node[7]),
> 	Edge[8] #= abs(Node[4]-Node[8]),
> 	Edge[9] #= abs(Node[5]-Node[6]),
> 	Edge[10] #= abs(Node[6]-Node[8]),
> 	Edge[11] #= abs(Node[7]-Node[8]),
> 	Edge[12] #= abs(Node[5]-Node[7]),
> 	Edge[13] #= abs(Node[5]-Node[8]),
> 	Edge[14] #= abs(Node[6]-Node[7]),
> 	Edge[15] #= abs(Node[1]-Node[4]),
> 	Edge[16] #= abs(Node[2]-Node[3]),
> 	flatten_matrix(Edge, EdgeList),
> 	flatten_matrix(Node, NodeList),
> 	ic_global:alldifferent(EdgeList),
> 	ic_global:alldifferent(NodeList).
[...]

> It may be that this is not a bug, and is infact expected behaviour, in 
> which case I would be gratified if someone can explain to me why this is 
> so.

Is it not just that labelling the nodes is sufficient to completely define
the edge values, but not vice-versa?  (Or at least, the system cannot figure
this out by local propagation.)

Note that each constraint has one edge but two nodes: if you label the
nodes, this leaves one variable (for which a value can be chosen), but if
you label the edges, it leaves two variables (and it's not clear which
values they could/should be given).

Cheers,
Warwick
Received on Wed Oct 09 18:01:45 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:18 PM GMT GMT