No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BasicSolver.java 636B

1234567891011121314151617181920212223
  1. package jobshop.solvers;
  2. import jobshop.Instance;
  3. import jobshop.Result;
  4. import jobshop.encodings.JobNumbers;
  5. /**
  6. * A very naïve solver that first schedules all first tasks, then all second tasks, ...
  7. **/
  8. public class BasicSolver implements Solver {
  9. @Override
  10. public Result solve(Instance instance, long deadline) {
  11. JobNumbers sol = new JobNumbers(instance);
  12. for(int t = 0 ; t<instance.numTasks ; t++) {
  13. for(int j = 0 ; j<instance.numJobs ; j++) {
  14. sol.addTask(j);
  15. }
  16. }
  17. return new Result(instance, sol.toSchedule(), Result.ExitCause.Blocked);
  18. }
  19. }