    001package org.cpsolver.studentsct.online.selection;
    002
    003import java.util.Hashtable;
    004import java.util.Set;
    005
    006import org.cpsolver.ifs.assignment.Assignment;
    007import org.cpsolver.studentsct.heuristics.selection.BranchBoundSelection;
    008import org.cpsolver.studentsct.model.CourseRequest;
    009import org.cpsolver.studentsct.model.Enrollment;
    010import org.cpsolver.studentsct.model.FreeTimeRequest;
    011import org.cpsolver.studentsct.model.Request;
    012import org.cpsolver.studentsct.model.Section;
    013import org.cpsolver.studentsct.model.Student;
    014import org.cpsolver.studentsct.online.OnlineSectioningModel;
    015import org.cpsolver.studentsct.online.expectations.OverExpectedCriterion;
    016
    017/**
    018 * Online student sectioning interface to be implemented by any sectioning algorithm.
    019 *
    020 * @version StudentSct 1.3 (Student Sectioning)<br>
    021 *          Copyright (C) 2014 Tomáš Müller<br>
    022 *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
    023 *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
    024 * <br>
    025 *          This library is free software; you can redistribute it and/or modify
    026 *          it under the terms of the GNU Lesser General Public License as
    027 *          published by the Free Software Foundation; either version 3 of the
    028 *          License, or (at your option) any later version. <br>
    029 * <br>
    030 *          This library is distributed in the hope that it will be useful, but
    031 *          WITHOUT ANY WARRANTY; without even the implied warranty of
    032 *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    033 *          Lesser General Public License for more details. <br>
    034 * <br>
    035 *          You should have received a copy of the GNU Lesser General Public
    036 *          License along with this library; if not see <a href='http://www.gnu.org/licenses'>http://www.gnu.org/licenses</a>.
    037 *
    038 */
    039public interface OnlineSectioningSelection {
    040    /**
    041     * Set online sectioning model
    042     * @param model online sectioning model
    043     */
    044    public void setModel(OnlineSectioningModel model);
    045
    046    /**
    047     * Set preferred sections
    048     * @param preferredSections preferred sections for each course request
    049     */
    050    public void setPreferredSections(Hashtable<CourseRequest, Set<Section>> preferredSections);
    051
    052    /**
    053     * Set required sections
    054     * @param requiredSections required sections for each course request
    055     */
    056    public void setRequiredSections(Hashtable<CourseRequest, Set<Section>> requiredSections);
    057
    058    /**
    059     * Set required free times
    060     * @param requiredFreeTimes required free times
    061     */
    062    public void setRequiredFreeTimes(Set<FreeTimeRequest> requiredFreeTimes);
    063
    064    /**
    065     * Set course requests that are to be left unassigned
    066     * @param requiredUnassignedRequests course requests that are required to be left unassigned
    067     */
    068    public void setRequiredUnassinged(Set<CourseRequest> requiredUnassignedRequests);
    069
    070    /**
    071     * Compute student schedule
    072     * @param assignment current assignment
    073     * @param student student in question
    074     * @return student schedule
    075     */
    076    public BranchBoundSelection.BranchBoundNeighbour select(Assignment<Request, Enrollment> assignment, Student student);
    077
    078    /**
    079     * Set hard limit on the {@link OverExpectedCriterion} penalty.
    080     * @param maxOverExpected max over-expected limit
    081     */
    082    public void setMaxOverExpected(double maxOverExpected);
    083}