net.sf.cpsolver.studentsct.model
Class Student

java.lang.Object
  extended by net.sf.cpsolver.studentsct.model.Student

public class Student
extends Object

Representation of a student. Each student contains id, and a list of requests.

Last-like semester students are mark as dummy. Dummy students have lower value and generally should not block "real" students from getting requested courses.

Version:
StudentSct 1.1 (Student Sectioning)
Copyright (C) 2007 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic

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 2.1 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Field Summary
static double sDummyStudentWeight
           
 
Constructor Summary
Student(long id)
          Constructor
Student(long id, boolean dummy)
          Constructor
 
Method Summary
 boolean canAssign(Request request)
          True if the given request can be assigned to the student.
 boolean equals(Object object)
          Compare two students for equality.
 Vector getAcademicAreaClasiffications()
          List of academic area - classification codes (AcademicAreaCode) for the given student
 long getId()
          Student unique id
 Vector getMajors()
          List of major codes (AcademicAreaCode) for the given student
 Vector getMinors()
          List of major codes (AcademicAreaCode) for the given student
 Vector getRequests()
          Student's course and free time requests
 int hashCode()
          Hash code (base only on student id)
 boolean isComplete()
          True if the student has assigned the desired number of requests (i.e., number of non-alternative course requests).
 boolean isDummy()
          Student's dummy flag.
 int nrAlternativeRequests()
          Number of alternative requests
 int nrAssignedRequests()
          Number of assigned COURSE requests
 int nrRequests()
          Number of requests (alternative requests are ignored)
 void setDummy(boolean dummy)
          Set student's dummy flag.
 void setId(long id)
          Set student unique id
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sDummyStudentWeight

public static double sDummyStudentWeight
Constructor Detail

Student

public Student(long id)
Constructor

Parameters:
id - student unique id

Student

public Student(long id,
               boolean dummy)
Constructor

Parameters:
id - student unique id
dummy - dummy flag
Method Detail

getId

public long getId()
Student unique id


setId

public void setId(long id)
Set student unique id


getRequests

public Vector getRequests()
Student's course and free time requests


nrRequests

public int nrRequests()
Number of requests (alternative requests are ignored)


nrAlternativeRequests

public int nrAlternativeRequests()
Number of alternative requests


canAssign

public boolean canAssign(Request request)
True if the given request can be assigned to the student. A request cannot be assigned to a student when the student already has the desired number of requests assigned (i.e., number of non-alternative course requests).


isComplete

public boolean isComplete()
True if the student has assigned the desired number of requests (i.e., number of non-alternative course requests).


nrAssignedRequests

public int nrAssignedRequests()
Number of assigned COURSE requests


toString

public String toString()
Overrides:
toString in class Object

isDummy

public boolean isDummy()
Student's dummy flag. Dummy students have lower value and generally should not block "real" students from getting requested courses.


setDummy

public void setDummy(boolean dummy)
Set student's dummy flag. Dummy students have lower value and generally should not block "real" students from getting requested courses.


getAcademicAreaClasiffications

public Vector getAcademicAreaClasiffications()
List of academic area - classification codes (AcademicAreaCode) for the given student


getMajors

public Vector getMajors()
List of major codes (AcademicAreaCode) for the given student


getMinors

public Vector getMinors()
List of major codes (AcademicAreaCode) for the given student


equals

public boolean equals(Object object)
Compare two students for equality. Two students are considered equal if they have the same id.

Overrides:
equals in class Object

hashCode

public int hashCode()
Hash code (base only on student id)

Overrides:
hashCode in class Object