Re: [eclipse-clp-users] basic problem

From: Marcin Krol <mrkafk_at_...6...>
Date: Mon, 16 Feb 2009 16:16:18 +0100
Wit Jakuczun wrote:
>    I am afraid but there is no bb_min/2 defined.
> The min arity is 3. Try to run your code
> with bb_min(sum(X,S), S, bb_options{strategy:continue}).

Thanks for answer, I figured that out a moment after I sent that mail, 
but now I have a different problem:

instantiation fault in +(0, _431{1 .. 9}, _839)


(     bb_min(sum(X,S),S,bb_options{strategy:continue}), )

It seems that the list that is being summed is only partially 
instantiated, the sum docs say so:

http://eclipse.crosscoreoptimization.com/doc/bips/kernel/arithmetic/sum-2.html

In coroutining mode, if the list is only partly instantiated, the 
predicate delays until the list is complete.

According to User Manual I should use 'suspend' library, but it doesn't 
help:

:- lib(ic).
:- lib(branch_and_bound).
:- lib(suspend).

minsum(X, Range) :-
     X = [A,B,C,D,E,F],
     X :: 1 .. Range,
     integers(X),
     alldifferent(X),
     bb_min(sum(X,S),S,bb_options{strategy:continue}),
     labeling(X).

I get again instantation fault, or if I specify suspend: directly I get 
"calling an undefined procedure suspend":

     bb_min(sum(X,S),S,bb_options{strategy:continue}),


Regards,
mk
Received on Mon Feb 16 2009 - 15:16:24 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST