next up previous
Next: Herbrand Terms Up: Adding Computation Domains: CLP Previous: A Project Management Problem

A Project Management Problem (V)

  $\mbox{$\bullet$}$
Constraints describing the net:
pn3(A,B,C,D,E,F,G,X,Y):-
A #>= 0, G #<= 10,
X #>= 2, Y #>= 2, X + Y #= 6,
B #>= A, C #>= A, D #>= A,
E #>= B + X, E #>= C + 2,
F #>= C + 2, F #>= D + Y,
G #>= E + 4, G #>= F + 1.
  $\mbox{$\bullet$}$
Query:
?- pn3(A,B,C,D,E,F,G,X,Y), mindomain(G,G).
A = 0, B = 0, C = 0, D::0..1, E = 2,
F::4..5, X = 2, Y = 4, G = 6, F #>= 4 + D
  $\mbox{$\bullet$}$
I.e., we must devote more resources to task X
  $\mbox{$\bullet$}$
All tasks but F and D are critical now
  $\mbox{$\bullet$}$
In some cases, mindomain/2 is not enough to provide the best solution (pending constraints)
  $\mbox{$\bullet$}$
A labeling + branch-and-bound procedure is provided:
?- pn3(A,B,C,D,E,F,G,X,Y),
minimize(labeling([G]),G).



Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>