Re: [eclipse-clp-users] basic problem

From: Marco Gavanelli <marco.gavanelli_at_unife.it>
Date: Mon, 16 Feb 2009 16:35:09 +0100
Wit Jakuczun wrote:
> 2009/2/16 Marcin Krol <mrkafk_at_gmail.com>:
>> 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),
	bb_min(labeling(X),S).

Cheers,
Marco
-- 
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
http://www.ing.unife.it/docenti/MarcoGavanelli/
Received on Mon Feb 16 2009 - 15:59:20 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET