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;
015
016/**
017 * Online student sectioning interface to be implemented by any sectioning algorithm.
018 * 
019 * @version StudentSct 1.3 (Student Sectioning)<br>
020 *          Copyright (C) 2014 Tomas Muller<br>
021 *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
022 *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
023 * <br>
024 *          This library is free software; you can redistribute it and/or modify
025 *          it under the terms of the GNU Lesser General Public License as
026 *          published by the Free Software Foundation; either version 3 of the
027 *          License, or (at your option) any later version. <br>
028 * <br>
029 *          This library is distributed in the hope that it will be useful, but
030 *          WITHOUT ANY WARRANTY; without even the implied warranty of
031 *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
032 *          Lesser General Public License for more details. <br>
033 * <br>
034 *          You should have received a copy of the GNU Lesser General Public
035 *          License along with this library; if not see <a href='http://www.gnu.org/licenses'>http://www.gnu.org/licenses</a>.
036 * 
037 */
038public interface OnlineSectioningSelection {
039    /**
040     * Set online sectioning model
041     * @param model online sectioning model
042     */
043    public void setModel(OnlineSectioningModel model);
044    
045    /**
046     * Set preferred sections
047     * @param preferredSections preferred sections for each course request
048     */
049    public void setPreferredSections(Hashtable<CourseRequest, Set<Section>> preferredSections);
050    
051    /**
052     * Set required sections
053     * @param requiredSections required sections for each course request
054     */
055    public void setRequiredSections(Hashtable<CourseRequest, Set<Section>> requiredSections);
056    
057    /**
058     * Set required free times
059     * @param requiredFreeTimes required free times
060     */
061    public void setRequiredFreeTimes(Set<FreeTimeRequest> requiredFreeTimes);
062    
063    /**
064     * Compute student schedule
065     * @param assignment current assignment
066     * @param student student in question
067     * @return student schedule
068     */
069    public BranchBoundSelection.BranchBoundNeighbour select(Assignment<Request, Enrollment> assignment, Student student);
070}