net.sf.cpsolver.studentsct.model
Interface Assignment

All Known Implementing Classes:
FreeTimeRequest, Section

public interface Assignment

Time and room assignment. This can be either Section or FreeTimeRequest.

Version:
StudentSct 1.2 (Student Sectioning)
Copyright (C) 2007 - 2010 Tomáš Müller
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/.

Method Summary
 void assigned(Enrollment enrollment)
          Enrollment with this assignmnet was assigned to a Request.
 int compareById(Assignment a)
          Compare assignments by unique ids.
 Set<Enrollment> getEnrollments()
          Return the list of assigned enrollments that contains this assignment.
 long getId()
          Unique id
 int getNrRooms()
          Number of rooms in which a section meets
 List<RoomLocation> getRooms()
          Room assignment
 TimeLocation getTime()
          Time assignment
 boolean isAllowOverlap()
          Return true if overlaps are allowed, but the number of overlapping slots should be minimized.
 boolean isOverlapping(Assignment assignment)
          True, if this assignment is overlapping in time and space with the given assignment.
 boolean isOverlapping(Set<? extends Assignment> assignments)
          True, if this assignment is overlapping in time and space with the given set of assignments.
 void unassigned(Enrollment enrollment)
          Enrollment with this assignmnet was unassigned from a Request.
 

Method Detail

getTime

TimeLocation getTime()
Time assignment


getRooms

List<RoomLocation> getRooms()
Room assignment

Returns:
list of RoomLocation

getNrRooms

int getNrRooms()
Number of rooms in which a section meets


isOverlapping

boolean isOverlapping(Assignment assignment)
True, if this assignment is overlapping in time and space with the given assignment.


isOverlapping

boolean isOverlapping(Set<? extends Assignment> assignments)
True, if this assignment is overlapping in time and space with the given set of assignments.


assigned

void assigned(Enrollment enrollment)
Enrollment with this assignmnet was assigned to a Request.


unassigned

void unassigned(Enrollment enrollment)
Enrollment with this assignmnet was unassigned from a Request.


getEnrollments

Set<Enrollment> getEnrollments()
Return the list of assigned enrollments that contains this assignment.


isAllowOverlap

boolean isAllowOverlap()
Return true if overlaps are allowed, but the number of overlapping slots should be minimized.


getId

long getId()
Unique id


compareById

int compareById(Assignment a)
Compare assignments by unique ids.