GST-4 Timefold Solver
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package com.baeldung.timefoldsolver;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import ai.timefold.solver.core.api.domain.solution.PlanningEntityCollectionProperty;
|
||||
import ai.timefold.solver.core.api.domain.solution.PlanningScore;
|
||||
import ai.timefold.solver.core.api.domain.solution.PlanningSolution;
|
||||
import ai.timefold.solver.core.api.domain.valuerange.ValueRangeProvider;
|
||||
import ai.timefold.solver.core.api.score.buildin.hardsoft.HardSoftScore;
|
||||
|
||||
@PlanningSolution
|
||||
public class ShiftSchedule {
|
||||
|
||||
@ValueRangeProvider
|
||||
private List<Employee> employees;
|
||||
@PlanningEntityCollectionProperty
|
||||
private List<Shift> shifts;
|
||||
|
||||
@PlanningScore
|
||||
private HardSoftScore score = null;
|
||||
|
||||
// A no-arg constructor is required for @PlanningSolution annotated classes
|
||||
public ShiftSchedule() {
|
||||
}
|
||||
|
||||
public ShiftSchedule(List<Employee> employees, List<Shift> shifts) {
|
||||
this.employees = employees;
|
||||
this.shifts = shifts;
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
// Getters and setters
|
||||
// ************************************************************************
|
||||
|
||||
public List<Employee> getEmployees() {
|
||||
return employees;
|
||||
}
|
||||
|
||||
public List<Shift> getShifts() {
|
||||
return shifts;
|
||||
}
|
||||
|
||||
public HardSoftScore getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user