All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.optaplanner.examples.conferencescheduling.domain.ConferenceSolution Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 9.44.0.Final
Show newest version
package org.optaplanner.examples.conferencescheduling.domain;

import java.util.List;

import org.optaplanner.core.api.domain.constraintweight.ConstraintConfigurationProvider;
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.score.buildin.hardmediumsoft.HardMediumSoftScore;
import org.optaplanner.examples.common.domain.AbstractPersistable;

@PlanningSolution
public class ConferenceSolution extends AbstractPersistable {

    private String conferenceName;
    @ConstraintConfigurationProvider
    private ConferenceConstraintConfiguration constraintConfiguration;

    @ProblemFactCollectionProperty
    private List talkTypeList;

    @ProblemFactCollectionProperty
    private List timeslotList;

    @ProblemFactCollectionProperty
    private List roomList;

    @ProblemFactCollectionProperty
    private List speakerList;

    @PlanningEntityCollectionProperty
    private List talkList;

    @PlanningScore
    private HardMediumSoftScore score = null;

    public ConferenceSolution() {
    }

    public ConferenceSolution(long id) {
        super(id);
    }

    @Override
    public String toString() {
        return conferenceName;
    }

    // ************************************************************************
    // Simple getters and setters
    // ************************************************************************

    public String getConferenceName() {
        return conferenceName;
    }

    public void setConferenceName(String conferenceName) {
        this.conferenceName = conferenceName;
    }

    public ConferenceConstraintConfiguration getConstraintConfiguration() {
        return constraintConfiguration;
    }

    public void setConstraintConfiguration(ConferenceConstraintConfiguration constraintConfiguration) {
        this.constraintConfiguration = constraintConfiguration;
    }

    public List getTalkTypeList() {
        return talkTypeList;
    }

    public void setTalkTypeList(List talkTypeList) {
        this.talkTypeList = talkTypeList;
    }

    public List getTimeslotList() {
        return timeslotList;
    }

    public void setTimeslotList(List timeslotList) {
        this.timeslotList = timeslotList;
    }

    public List getRoomList() {
        return roomList;
    }

    public void setRoomList(List roomList) {
        this.roomList = roomList;
    }

    public List getSpeakerList() {
        return speakerList;
    }

    public void setSpeakerList(List speakerList) {
        this.speakerList = speakerList;
    }

    public List getTalkList() {
        return talkList;
    }

    public void setTalkList(List talkList) {
        this.talkList = talkList;
    }

    public HardMediumSoftScore getScore() {
        return score;
    }

    public void setScore(HardMediumSoftScore score) {
        this.score = score;
    }

    // ************************************************************************
    // With methods
    // ************************************************************************

    public ConferenceSolution withConstraintConfiguration(ConferenceConstraintConfiguration constraintConfiguration) {
        this.constraintConfiguration = constraintConfiguration;
        return this;
    }

    public ConferenceSolution withTalkTypeList(List talkTypeList) {
        this.talkTypeList = talkTypeList;
        return this;
    }

    public ConferenceSolution withTimeslotList(List timeslotList) {
        this.timeslotList = timeslotList;
        return this;
    }

    public ConferenceSolution withRoomList(List roomList) {
        this.roomList = roomList;
        return this;
    }

    public ConferenceSolution withSpeakerList(List speakerList) {
        this.speakerList = speakerList;
        return this;
    }

    public ConferenceSolution withTalkList(List talkList) {
        this.talkList = talkList;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy