[eclipse-clp-users] Multiple Value Ordering

From: Amine Marref <cyborgamine_at_...32...>
Date: Sat, 6 Feb 2010 13:28:47 +0000
Hello CLP people,

Is it possible to use more than one value-ordering heuristic in search/6?

In (dummy) example [1], I have two lists of variables: Vars1 and Vars2. Currently, I search for Goal by labeling variables in both lists in indomain_min fashion. Let's say that I know a priori that the optimal solution is found faster if variables in Vars1 are labelled indomain_min and variables in Vars2 are labelled indomain_max. I want to search for Goal by using value choice "indomain_min over Vars1" and value choice "indomain_max over Vars2". Is there any way to achieve this behaviour in Eclipse?

Amine.

[1]
:-lib(ic).
:-lib(branch_and_bound).
:-lib(lists).

solve(Goal):-
    Vars1 = [X1, X2, X3],
    Vars2 = [Y1, Y2, Y3],
    Vars1 #:: [1..10],
    Vars2 #:: [1..10],
    append(Vars1, Vars2, Vars),
    Goal #= Y1 + Y2 + Y3 - X1 - X2 - X3,     
    bb_min(search(Vars,0,input_order,indomain_min,complete,[]),Goal,bb_options{timeout:1}).







 		 	   		  
Received on Sat Feb 06 2010 - 13:28:54 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST