Re: [eclipse-clp-users] Correct use of minimize to find a globally minimal solution

From: Kish Shen <kisshen_at_...5...>
Date: Thu, 28 Feb 2013 03:55:26 +0000
On 28/02/2013 00:10, Misha Aizatulin wrote:

> Allocation = [0, 2]
> Yes (0.00s cpu, solution 1, maybe more) ? ;
> Found a solution with cost 2
>


Hi Misha,

 From the outputs, you are getting multiple solutions. This suggest
that your program is performing search outside the minimize/2 call (I 
assume you are calling minimize/2 of lib(branch_and_bound), because 
minimize/2 produces only a single optimal solution. It looks like
you are performing search before the call to minimize/2, and so
minimize is called again and again when you ask for more solutions with ';'.

Can you show how you are calling minimize/2, and any surrounding code?

I am not sure if you have used the reference documentation when you were 
trying to understand minimize/2? All 'built-in' and library predicates 
should have reference documentation, which you can access with help/1, 
for example:

help branch_and_bound: minimize/2.

(this will direct you to read the documentation for bb_min/3, as 
minimize/2 is a short-hand for calling bb_min/3).

Cheers,

Kish
Received on Thu Feb 28 2013 - 03:56:41 CET

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