Title: Modeling with finite domain constraints II
1Modeling with finite domain constraints II
- Kris Kuchcinski
- kku_at_ida.liu.se
2Outline
- Advanced modeling example for scheduling
- elliptic wave filter example
- use of cumulative constraints for task scheduling
and bin packing problems - The role of forward checking and look-ahead
methods during search - Meta-search heuristics
- credit search
- limited discrepancy search
3Elliptic wave filter example
4Precedence constraints
5Modeling with Sicstus I
6Modeling with Sicstus II
7Experimental results
Results for 2 adders and 2 multipliers
8Modeling with CHIP
CPU time 0.23 s
9Use of cumulative constraint for task scheduling
Resource
Resource limit
Time
cumulative(T1, T2, T3, D1, D2, D3, 1, 1, 1,
ResourceLimit)
10Use of cumulative constraint for binpacking
problems
Time
Time limit
Resource
cumulative(R1, R2, R3, 1, 1, 1, D1, D2, D3,
TimeLimit)
11Branch and Bound algorithm
- Branch and Bound consists of the following steps
- finds a bound for the cost function after each
decision, - cut out all the branches of the decision tree
which give results worse than the bound (branch), - update the bound if a better value for the
performance index is found.
12Typical branch and bound search(TSP problem)
1 L ³ 0
13Search with restart(CHIPs min_max)
1 L ³ 0
14When backtracking is initiated during search?
- by constraint violation Prolog standard,
- unavoidability of constraint violation in the
next step- Forward Checking (FC), - unavoidability of constraint violation in future
steps- (Full) Look Ahead (LA) or Maintaining Arc
Consistency (MAC).
15Forward Checking and Look Ahead
Not yet instantiated variables
Currently instantiated variable
Instantiated variables
16Forward Checking algorithm
procedure AC-FC(CurrentVar) Q (Vi,
VCurrentVar) in arcs(G), i gt CurrentVar consiste
nt true while not Q empty consistent select
and delete any arc (Vk, Vm) from Q if
arc_consistent(Vk, Vm) then consistent not
Dk empty endif endwhile return consistent end
AC-FC
17Look Ahead algorithm
procedure AC-LA(CurrentVar) Q (Vi,
VCurrentVar) in arcs(G), i gt CurrentVar
consistent true while not Q empty
consistent select and delete any arc (Vk,
Vm) from Q if arc_consistent(Vk, Vm)
then Q Q È (Vi,Vk) such that (Vi,Vk) in
arcs(G), i ¹ k, i ¹ m, i gt
CurrentVar consistent not Dk empty
endif endwhile return consistent end
AC-LA
18Meta-heuristics - motivation
- Large optimization problems can run for a long
time without providing any solution, - The search using branch and bound can be trapped
in the beginning of the search tree and can not
explore the rest of the search space, - There exist known heuristics and meta-heuristics
for selected problems.
19Credit search
credit(T, 8, credits 10, my_delete, my_in
domain, 3, backtracks part(1,2)),