net.sf.cpsolver.studentsct.reservation
Class CurriculumReservation

java.lang.Object
  extended by net.sf.cpsolver.studentsct.reservation.Reservation
      extended by net.sf.cpsolver.studentsct.reservation.CurriculumReservation
All Implemented Interfaces:
Comparable<Reservation>

public class CurriculumReservation
extends Reservation

Curriculum reservation. Students are matched based on their academic area. If classifications and/or majors are included, student must match on them as well.

Version:
StudentSct 1.2 (Student Sectioning)
Copyright (C) 2007 - 2010 Tomas Muller
muller@unitime.org
http://muller.unitime.org

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.

Constructor Summary
CurriculumReservation(long id, double limit, Offering offering, String acadArea, Collection<String> classifications, Collection<String> majors)
          Constructor
 
Method Summary
 boolean canAssignOverLimit()
          Curriculum reservation cannot go over the limit
 String getAcademicArea()
          Academic area
 Set<String> getClassifications()
          Academic classifications
 Set<String> getMajors()
          Majors
 int getPriority()
          Reservation priority (lower than individual and group reservations)
 double getReservationLimit()
          Reservation limit (-1 for unlimited)
 boolean isApplicable(Student student)
          Check the area, classifications and majors
 boolean mustBeUsed()
          Curriculum reservation do not need to be used
 void setReservationLimit(double limit)
          Set reservation limit (-1 for unlimited)
 
Methods inherited from class net.sf.cpsolver.studentsct.reservation.Reservation
addConfig, addSection, assigned, canEnroll, compareTo, getConfigs, getEnrollments, getId, getLimit, getLimitCap, getOffering, getReservedAvailableSpace, getRestrictivity, getSections, getSections, getUsedSpace, isAllowOverlap, isExpired, isIncluded, setExpired, unassigned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurriculumReservation

public CurriculumReservation(long id,
                             double limit,
                             Offering offering,
                             String acadArea,
                             Collection<String> classifications,
                             Collection<String> majors)
Constructor

Parameters:
id - unique id
limit - reservation limit (-1 for unlimited)
offering - instructional offering on which the reservation is set
acadArea - academic area
classifications - zero or more classifications (classifications must match if not empty)
majors - zero or more majors (majors must match if not empty)
Method Detail

canAssignOverLimit

public boolean canAssignOverLimit()
Curriculum reservation cannot go over the limit

Specified by:
canAssignOverLimit in class Reservation

mustBeUsed

public boolean mustBeUsed()
Curriculum reservation do not need to be used

Specified by:
mustBeUsed in class Reservation

getReservationLimit

public double getReservationLimit()
Reservation limit (-1 for unlimited)

Specified by:
getReservationLimit in class Reservation

setReservationLimit

public void setReservationLimit(double limit)
Set reservation limit (-1 for unlimited)


getPriority

public int getPriority()
Reservation priority (lower than individual and group reservations)

Specified by:
getPriority in class Reservation

getAcademicArea

public String getAcademicArea()
Academic area


getMajors

public Set<String> getMajors()
Majors


getClassifications

public Set<String> getClassifications()
Academic classifications


isApplicable

public boolean isApplicable(Student student)
Check the area, classifications and majors

Specified by:
isApplicable in class Reservation
Parameters:
student - a student
Returns:
true if student can use the reservation to get into the course / configuration / section


Copyright © 2014 UniTime LLC. All Rights Reserved.