Hi Joost, My guess is that you meant to have "maxlist" instead of "minlist" for AX2 and BX2. Is this what you mean? I've attached a shorter version of your problem. Note the use of '::' to give the initial domains of your variables. run(Out) :- CVars = [AX1,AX2,BX1,BX2,CX1,CX2,DX1,DX2], Out = [ax1:AX1,ax2:AX2,bx1:BX1,bx2:BX2,cx1:CX1,cx2:CX2,dx1:DX1,dx2:DX2], L = 0, H = 1000, CVars :: L .. H, % set size for A , B WA = 180, WB = 120, % width A,B WA #= AX2 - AX1, WB #= BX2 - BX1, % A before B AX2 #=< BX1, % C contains A&B AX1 #>= CX1, AX2 #=< CX2, BX1 #>= CX1, BX2 #=< CX2, % find minimum and maximum of A & B minlist([AX1,BX1],MinX1), maxlist([AX2,BX2],MaxX2), % <==== change % D contains C DX1 #=< CX1, DX2 #>= CX2, % C fits tightly CX1 #= MinX1, CX2 #= MaxX2, % This constraint fails! <==== not any more labeling(CVars), true. AndySReceived on Fri Nov 19 17:26:08 2004
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:31 PM GMT GMT