title: Constraints programming in java
body: <p>How to develope  an efficent job scheduling with constraints??</p>
  
  <p>The scheduler should include these methods:</p>
  
  <pre><code>startBeforeEndOf(Job j)
  startAfterEndOf(Job j)
  startBeforeStartOf(Job j)
  startAfterStartOf(Job j)
  endBeforeEndOf(Job j)
  endAfterEndOf(Job j)
  endBeforeStartOf(Job j)
  endAfterStartOf(Job j)
  </code></pre>
  
  <p>Every job has an id and the time parameter.</p>
  
  <p>A possible solution for this matter, may be based on technical backtracking. The jobs are used as choice points, and temporal instants as choices (in the worst case the total duration of the activity is the sum of the durations of the work, resulting in a fully sequential execution). </p>
  
  <p>Alternatively I should adequately represent the data and then generates a scheduling on the time axis, placing the work under the constraints and moving forward in a job (and all the jobs that depend on it) when a constraint is not satisfied.
   But I don't know how exactly I can do this in java.</p>
  
  <p>In other words I looking for a way to avoiding the intense backtracking approach, in the job management described.</p>