org.optaplanner.examples.nurserostering.domain.NurseRoster Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optaplanner-examples Show documentation
Show all versions of optaplanner-examples Show documentation
OptaPlanner solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains the examples which demonstrate how to use it in a normal Java application.
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.optaplanner.examples.nurserostering.domain;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import org.optaplanner.core.api.domain.solution.PlanningEntityCollectionProperty;
import org.optaplanner.core.api.domain.solution.PlanningScore;
import org.optaplanner.core.api.domain.solution.PlanningSolution;
import org.optaplanner.core.api.domain.solution.drools.ProblemFactCollectionProperty;
import org.optaplanner.core.api.domain.solution.drools.ProblemFactProperty;
import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider;
import org.optaplanner.core.api.score.buildin.hardsoft.HardSoftScore;
import org.optaplanner.examples.common.domain.AbstractPersistable;
import org.optaplanner.examples.nurserostering.domain.contract.Contract;
import org.optaplanner.examples.nurserostering.domain.contract.ContractLine;
import org.optaplanner.examples.nurserostering.domain.contract.PatternContractLine;
import org.optaplanner.examples.nurserostering.domain.pattern.Pattern;
import org.optaplanner.examples.nurserostering.domain.request.DayOffRequest;
import org.optaplanner.examples.nurserostering.domain.request.DayOnRequest;
import org.optaplanner.examples.nurserostering.domain.request.ShiftOffRequest;
import org.optaplanner.examples.nurserostering.domain.request.ShiftOnRequest;
import org.optaplanner.persistence.xstream.api.score.buildin.hardsoft.HardSoftScoreXStreamConverter;
@PlanningSolution
@XStreamAlias("NurseRoster")
public class NurseRoster extends AbstractPersistable {
private String code;
@ProblemFactProperty
private NurseRosterParametrization nurseRosterParametrization;
@ProblemFactCollectionProperty
private List skillList;
@ProblemFactCollectionProperty
private List shiftTypeList;
@ProblemFactCollectionProperty
private List shiftTypeSkillRequirementList;
@ProblemFactCollectionProperty
private List patternList;
@ProblemFactCollectionProperty
private List contractList;
@ProblemFactCollectionProperty
private List contractLineList;
@ProblemFactCollectionProperty
private List patternContractLineList;
@ValueRangeProvider(id = "employeeRange")
@ProblemFactCollectionProperty
private List employeeList;
@ProblemFactCollectionProperty
private List skillProficiencyList;
@ProblemFactCollectionProperty
private List shiftDateList;
@ProblemFactCollectionProperty
private List shiftList;
@ProblemFactCollectionProperty
private List dayOffRequestList;
@ProblemFactCollectionProperty
private List dayOnRequestList;
@ProblemFactCollectionProperty
private List shiftOffRequestList;
@ProblemFactCollectionProperty
private List shiftOnRequestList;
@PlanningEntityCollectionProperty
private List shiftAssignmentList;
@PlanningScore
@XStreamConverter(HardSoftScoreXStreamConverter.class)
private HardSoftScore score;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public NurseRosterParametrization getNurseRosterParametrization() {
return nurseRosterParametrization;
}
public void setNurseRosterParametrization(NurseRosterParametrization nurseRosterParametrization) {
this.nurseRosterParametrization = nurseRosterParametrization;
}
public List getSkillList() {
return skillList;
}
public void setSkillList(List skillList) {
this.skillList = skillList;
}
public List getShiftTypeList() {
return shiftTypeList;
}
public void setShiftTypeList(List shiftTypeList) {
this.shiftTypeList = shiftTypeList;
}
public List getShiftTypeSkillRequirementList() {
return shiftTypeSkillRequirementList;
}
public void setShiftTypeSkillRequirementList(List shiftTypeSkillRequirementList) {
this.shiftTypeSkillRequirementList = shiftTypeSkillRequirementList;
}
public List getPatternList() {
return patternList;
}
public void setPatternList(List patternList) {
this.patternList = patternList;
}
public List getContractList() {
return contractList;
}
public void setContractList(List contractList) {
this.contractList = contractList;
}
public List getContractLineList() {
return contractLineList;
}
public void setContractLineList(List contractLineList) {
this.contractLineList = contractLineList;
}
public List getPatternContractLineList() {
return patternContractLineList;
}
public void setPatternContractLineList(List patternContractLineList) {
this.patternContractLineList = patternContractLineList;
}
public List getEmployeeList() {
return employeeList;
}
public void setEmployeeList(List employeeList) {
this.employeeList = employeeList;
}
public List getSkillProficiencyList() {
return skillProficiencyList;
}
public void setSkillProficiencyList(List skillProficiencyList) {
this.skillProficiencyList = skillProficiencyList;
}
public List getShiftDateList() {
return shiftDateList;
}
public void setShiftDateList(List shiftDateList) {
this.shiftDateList = shiftDateList;
}
public List getShiftList() {
return shiftList;
}
public void setShiftList(List shiftList) {
this.shiftList = shiftList;
}
public List getDayOffRequestList() {
return dayOffRequestList;
}
public void setDayOffRequestList(List dayOffRequestList) {
this.dayOffRequestList = dayOffRequestList;
}
public List getDayOnRequestList() {
return dayOnRequestList;
}
public void setDayOnRequestList(List dayOnRequestList) {
this.dayOnRequestList = dayOnRequestList;
}
public List getShiftOffRequestList() {
return shiftOffRequestList;
}
public void setShiftOffRequestList(List shiftOffRequestList) {
this.shiftOffRequestList = shiftOffRequestList;
}
public List getShiftOnRequestList() {
return shiftOnRequestList;
}
public void setShiftOnRequestList(List shiftOnRequestList) {
this.shiftOnRequestList = shiftOnRequestList;
}
public List getShiftAssignmentList() {
return shiftAssignmentList;
}
public void setShiftAssignmentList(List shiftAssignmentList) {
this.shiftAssignmentList = shiftAssignmentList;
}
public HardSoftScore getScore() {
return score;
}
public void setScore(HardSoftScore score) {
this.score = score;
}
// ************************************************************************
// Complex methods
// ************************************************************************
}