title: Contraint Logic Programming Scheduling
body: <p>I'm trying to solve a problem using clp in prolog. The problem is as follows:</p>
  
  <p>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:</p>
  
  <p>container(a,1,1). <br/>
  container(b,2,2). <br/>
  container(c,2,2). <br/>
  container(d,3,3). <br/></p>
  
  <p>The containers can also be put on top of another, like:</p>
  
  <p>on(a,c). <br/>
  on(b,c). <br/>
  on(c,d). <br/></p>
  
  <p>Container a is on top of c and so on...</p>
  
  <p>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.</p>
  
  <p>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? </p>