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