net.sf.cpsolver.studentsct
Class StudentSectioningModel

java.lang.Object
  extended by net.sf.cpsolver.ifs.model.Model
      extended by net.sf.cpsolver.studentsct.StudentSectioningModel

public class StudentSectioningModel
extends Model

Student sectioning model.

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
 
Fields inherited from class net.sf.cpsolver.ifs.model.Model
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat
 
Constructor Summary
StudentSectioningModel(DataProperties properties)
          Constructor
 
Method Summary
 void addOffering(Offering offering)
          Add an offering into the model
 void addStudent(Student student)
          Add a student into the model
 void afterAssigned(long iteration, Value value)
          Called after an enrollment was assigned to a request.
 void afterUnassigned(long iteration, Value value)
          Called before an enrollment was unassigned from a request.
 double avgNrRequests()
          Average number of requests per student (see Student.getRequests())
 double avgUnassignPriority()
          Average priority of unassigned requests (see Request.getPriority())
 void clearOnlineSectioningInfos()
          Empty online student sectioning infos for all sections (see Section.getSpaceExpected() and Section.getSpaceHeld()).
 void computeOnlineSectioningInfos()
          Compute online student sectioning infos for all sections (see Section.getSpaceExpected() and Section.getSpaceHeld()).
 Set getCompleteStudents()
          Students with complete schedules (see Student.isComplete())
 DistanceConflict getDistanceConflict()
          Return distance conflict extension
 Hashtable getExtendedInfo()
          Model extended info.
 Hashtable getInfo()
          Model info
 int getNrAssignedLastLikeRequests(boolean precise)
          Number of requests from last-like (Student.isDummy() equals true) students that are assigned.
 int getNrAssignedRealRequests(boolean precise)
          Number of requests from real (Student.isDummy() equals false) students that are assigned.
 int getNrCompleteLastLikeStudents(boolean precise)
          Number of last like (Student.isDummy() equals true) students with a complete schedule (Student.isComplete() equals true).
 int getNrCompleteRealStudents(boolean precise)
          Number of real (Student.isDummy() equals false) students with a complete schedule (Student.isComplete() equals true).
 int getNrLastLikeRequests(boolean precise)
          Number of requests from last-like (Student.isDummy() equals true) students.
 int getNrLastLikeStudents(boolean precise)
          Number of last like (Student.isDummy() equals true) students.
 int getNrRealRequests(boolean precise)
          Number of requests from real (Student.isDummy() equals false) students.
 int getNrRealStudents(boolean precise)
          Number of real (Student.isDummy() equals false) students.
 Vector getOfferings()
          List of offerings
 DataProperties getProperties()
          Configuration
 Vector getStudents()
          Students
 double getTotalRequestWeight()
          Sum of weights of all requests (see Request.getWeight()).
 double getTotalValue()
          Overall solution value
 double getUnassignedRequestWeight()
          Sum of weights of all requests that are not assigned (see Request.getWeight()).
 int nrComplete()
          Number of students with complete schedule
 void removeStudent(Student student)
          Remove a student from the model
 void setDistanceConflict(DistanceConflict dc)
          Set distance conflict extension
 
Methods inherited from class net.sf.cpsolver.ifs.model.Model
addConstraint, addGlobalConstraint, addModelListener, addVariable, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, clearBest, conflictConstraints, conflictValues, constraints, countConstraints, countGlobalConstraints, countVariables, getBestPerturbations, getBestUnassignedVariables, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, globalConstraints, inConflict, init, invalidateVariablesWithInitialValueCache, modelListenerOfType, nrAssignedVariables, nrUnassignedVariables, perturbVariables, perturbVariables, removeConstraint, removeGlobalConstraint, removeModelListener, removeVariable, restoreBest, saveBest, toString, unassignedHardConstraints, unassignedVariables, variables, variablesWithInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StudentSectioningModel

public StudentSectioningModel(DataProperties properties)
Constructor

Parameters:
properties - configuration
Method Detail

getStudents

public Vector getStudents()
Students


getCompleteStudents

public Set getCompleteStudents()
Students with complete schedules (see Student.isComplete())


addStudent

public void addStudent(Student student)
Add a student into the model


removeStudent

public void removeStudent(Student student)
Remove a student from the model


getOfferings

public Vector getOfferings()
List of offerings


addOffering

public void addOffering(Offering offering)
Add an offering into the model


nrComplete

public int nrComplete()
Number of students with complete schedule


getInfo

public Hashtable getInfo()
Model info

Overrides:
getInfo in class Model

getTotalValue

public double getTotalValue()
Overall solution value

Overrides:
getTotalValue in class Model

afterAssigned

public void afterAssigned(long iteration,
                          Value value)
Called after an enrollment was assigned to a request. The list of complete students and the overall solution value are updated.

Overrides:
afterAssigned in class Model

afterUnassigned

public void afterUnassigned(long iteration,
                            Value value)
Called before an enrollment was unassigned from a request. The list of complete students and the overall solution value are updated.

Overrides:
afterUnassigned in class Model

getProperties

public DataProperties getProperties()
Configuration


clearOnlineSectioningInfos

public void clearOnlineSectioningInfos()
Empty online student sectioning infos for all sections (see Section.getSpaceExpected() and Section.getSpaceHeld()).


computeOnlineSectioningInfos

public void computeOnlineSectioningInfos()
Compute online student sectioning infos for all sections (see Section.getSpaceExpected() and Section.getSpaceHeld()).


getUnassignedRequestWeight

public double getUnassignedRequestWeight()
Sum of weights of all requests that are not assigned (see Request.getWeight()).


getTotalRequestWeight

public double getTotalRequestWeight()
Sum of weights of all requests (see Request.getWeight()).


setDistanceConflict

public void setDistanceConflict(DistanceConflict dc)
Set distance conflict extension


getDistanceConflict

public DistanceConflict getDistanceConflict()
Return distance conflict extension


avgUnassignPriority

public double avgUnassignPriority()
Average priority of unassigned requests (see Request.getPriority())


avgNrRequests

public double avgNrRequests()
Average number of requests per student (see Student.getRequests())


getNrLastLikeStudents

public int getNrLastLikeStudents(boolean precise)
Number of last like (Student.isDummy() equals true) students.


getNrRealStudents

public int getNrRealStudents(boolean precise)
Number of real (Student.isDummy() equals false) students.


getNrCompleteLastLikeStudents

public int getNrCompleteLastLikeStudents(boolean precise)
Number of last like (Student.isDummy() equals true) students with a complete schedule (Student.isComplete() equals true).


getNrCompleteRealStudents

public int getNrCompleteRealStudents(boolean precise)
Number of real (Student.isDummy() equals false) students with a complete schedule (Student.isComplete() equals true).


getNrLastLikeRequests

public int getNrLastLikeRequests(boolean precise)
Number of requests from last-like (Student.isDummy() equals true) students.


getNrRealRequests

public int getNrRealRequests(boolean precise)
Number of requests from real (Student.isDummy() equals false) students.


getNrAssignedLastLikeRequests

public int getNrAssignedLastLikeRequests(boolean precise)
Number of requests from last-like (Student.isDummy() equals true) students that are assigned.


getNrAssignedRealRequests

public int getNrAssignedRealRequests(boolean precise)
Number of requests from real (Student.isDummy() equals false) students that are assigned.


getExtendedInfo

public Hashtable getExtendedInfo()
Model extended info. Some more information (that is more expensive to compute) is added to an ordinary Model.getInfo().

Overrides:
getExtendedInfo in class Model