Next: Be a Solver (III)
Up: What is CLP
Previous: Be a Solver (I)
- Will use finite domain constraints:
- Each variable has a (finite) domain associated
- There are (dis)equations which relate the variables
- Changes to the domains are propagated to other variables
- A possible strategy:
- Go through the equations one by one
- Update domains of variables
- Finish when no more updates
| |
Variables and Domains |
|
|
| Step |
a |
b |
c |
d |
e |
f |
g |
| 0 |
0..10 |
0..10 |
0..10 |
0..10 |
0..10 |
0..10 |
0..10 |
| 1 |
|
0..9 |
|
|
1..10 |
|
|
| 2 |
|
|
0..8 |
|
2..10 |
|
|
| 3 |
|
|
|
|
|
2..10 |
|
| 4 |
|
|
|
0..7 |
|
3..10 |
|
| 5 |
|
|
|
|
2..6 |
|
6..10 |
| 6 |
|
|
|
|
|
3..9 |
|
| 7 |
0..7 |
|
|
|
|
|
|
| 8 |
|
0..5 |
|
|
|
|
|
| 9 |
|
|
0..4 |
|
|
|
|
| 10 |
|
|
|
0..6 |
|
|
|
| 11 |
0..4 |
|
|
|
|
|
|
Next: Be a Solver (III)
Up: What is CLP
Previous: Be a Solver (I)
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>