Re: [eclipse-clp-users] Question about using bb_min/minimize

From: Kish Shen <kisshen_at_...5...>
Date: Fri, 09 Oct 2009 17:22:31 +0100
Seppe vanden Broucke wrote:
> What am I doing wrong? I believe the problem to be in my fromto-loop. I 
> use structures the calculate my total cost, while the example uses 
> matrices... I tried using a three-dimensional array []([]([](...))), but 
> that gave "instantiation fault in arg" errors when using Costarray[My1, 
> My2, My3].
Hi Seppe,

You appear to be calling minimize with Cost already instantiated:

 >    minimize(labeling(Triplets), Cost).

Cost is already set in your previous loop. The idea of the 
branch-and-bound search is that Cost should be instantiated by your 
search routine (labeling(Triplets)) in your case), either directly,
or indirectly (e.g. Cost is in a constraint). The search in 
branch-and-bound will produce only one solution, the one with the 
minimal value for Cost. Since your Cost value is already instantiated,
calling minimize/2 will simply produce the first solution.



This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Fri Oct 09 2009 - 16:35:14 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 21 2019 - 09:13:32 CEST