net.sf.cpsolver.studentsct.model
Class Offering

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

public class Offering
extends Object

Representation of an instructional offering. An offering contains id, name, the list of course offerings, and the list of possible configurations. See Config and Course.

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

Constructor Summary
Offering(long id, String name)
          Constructor
 
Method Summary
 HashSet getChoices(String instructionalType)
          Return the list of all possible choices of the given instructional type for this offering.
 Vector getConfigs()
          Possible configurations
 Course getCourse(Student student)
          Return course, under which the given student enrolls into this offering.
 Vector getCourses()
          List of courses.
 long getId()
          Offering id
 HashSet getInstructionalTypes()
          Return set of instructional types, union over all configurations.
 double getMaxPenalty()
          Maximal penalty from Config.getMaxPenalty()
 double getMinPenalty()
          Minimal penalty from Config.getMinPenalty()
 String getName()
          Offering name
 Section getSection(long sectionId)
          Return section of the given id, if it is part of one of this offering configurations.
 HashSet getSubparts(String instructionalType)
          Return list of all subparts of the given isntructional type for this offering.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Offering

public Offering(long id,
                String name)
Constructor

Parameters:
id - instructional offering unique id
name - instructional offering name (this is usually the name of the controlling course)
Method Detail

getId

public long getId()
Offering id


getName

public String getName()
Offering name


getConfigs

public Vector getConfigs()
Possible configurations


getCourses

public Vector getCourses()
List of courses. One instructional offering can contain multiple courses (names under which it is offered)


getSection

public Section getSection(long sectionId)
Return section of the given id, if it is part of one of this offering configurations.


getCourse

public Course getCourse(Student student)
Return course, under which the given student enrolls into this offering.


getInstructionalTypes

public HashSet getInstructionalTypes()
Return set of instructional types, union over all configurations.


getChoices

public HashSet getChoices(String instructionalType)
Return the list of all possible choices of the given instructional type for this offering.


getSubparts

public HashSet getSubparts(String instructionalType)
Return list of all subparts of the given isntructional type for this offering.


getMinPenalty

public double getMinPenalty()
Minimal penalty from Config.getMinPenalty()


getMaxPenalty

public double getMaxPenalty()
Maximal penalty from Config.getMaxPenalty()


toString

public String toString()
Overrides:
toString in class Object