org.optaplanner.examples.tennis.domain.TennisSolution 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.
package org.optaplanner.examples.tennis.domain;
import java.util.List;
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.ProblemFactCollectionProperty;
import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider;
import org.optaplanner.core.api.score.buildin.hardmediumsoft.HardMediumSoftScore;
import org.optaplanner.examples.common.domain.AbstractPersistable;
@PlanningSolution
public class TennisSolution extends AbstractPersistable {
private List teamList;
private List dayList;
private List unavailabilityPenaltyList;
private List teamAssignmentList;
private HardMediumSoftScore score;
public TennisSolution() {
}
public TennisSolution(long id) {
super(id);
}
@ValueRangeProvider
@ProblemFactCollectionProperty
public List getTeamList() {
return teamList;
}
public void setTeamList(List teamList) {
this.teamList = teamList;
}
@ProblemFactCollectionProperty
public List getDayList() {
return dayList;
}
public void setDayList(List dayList) {
this.dayList = dayList;
}
@ProblemFactCollectionProperty
public List getUnavailabilityPenaltyList() {
return unavailabilityPenaltyList;
}
public void setUnavailabilityPenaltyList(List unavailabilityPenaltyList) {
this.unavailabilityPenaltyList = unavailabilityPenaltyList;
}
@PlanningEntityCollectionProperty
public List getTeamAssignmentList() {
return teamAssignmentList;
}
public void setTeamAssignmentList(List teamAssignmentList) {
this.teamAssignmentList = teamAssignmentList;
}
@PlanningScore
public HardMediumSoftScore getScore() {
return score;
}
public void setScore(HardMediumSoftScore score) {
this.score = score;
}
}