I'm trying to solve a problem using clp in prolog. The problem is as follows:
Basically a ship is carrying a number of containers and we want to unload them. The containers is described as predicates container(I,N,D), where I is the containers identifier, N is number of persons required to unload and D is the duration. An example may look like:
container(a,1,1).
container(b,2,2).
container(c,2,2).
container(d,3,3).
The containers can also be put on top of another, like:
on(a,c).
on(b,c).
on(c,d).
Container a is on top of c and so on...
The problem is to minimize the cost of unloading the containers. The cost is defined as the number of persons hired times the required time. All persons are hired for the whole duration of the unloading.
I'm having problem starting with the problem, as I'm not familiar with the clp part of prolog. Does anyone have any suggestions on how to solve the problem or where you can find examples on how clp prolog works?