Re: [eclipse-clp-users] basic problem

From: Marco Gavanelli <marco.gavanelli_at_...17...>
Date: Mon, 16 Feb 2009 16:35:09 +0100
Wit Jakuczun wrote:
> 2009/2/16 Marcin Krol <mrkafk_at_...6...>:
>> 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:
> Right! There have been 2 mistakes in your code :).
> The correct code should have labeling(X) instead
> of sum(X, S) in bb_min predicate and S should be
> defined as: S #= sum(X) (this should be added before
> bb_min).
> Moreover you do not need to use suspend module.
> In fact loading it generates an error in my eclipse.

I agree with Wit.
The last problem I see in your code is that bb_min requires as argument 
a predicate that generates a search tree, such as labeling.

So, your predicate should end like the following:

	S #= sum(X),

Marco Gavanelli, Ph.D. in Computer Science
Dept of Engineering
University of Ferrara
Via Saragat 1 - 44100 Ferrara (Italy)
Tel  +39-0532-97-4833
Fax  +39-0532-97-4870
Received on Mon Feb 16 2009 - 15:59:20 CET

This archive was generated by hypermail 2.3.0 : Sat Aug 24 2019 - 06:15:04 CEST