Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ttsolver.model
Class Lecture

    java.lang.Object
      ifs.model.Variable
          ttsolver.model.Lecture

All Implemented Interfaces:
  Comparable

    public class Lecture

extends Variable

Lecture (variable).

Version:
  1.0
Author:
  Tomáš Müller

Field Summary

Fields inherited from class ifs.model.Variable
`iValue`

Constructor Summary
`Lecture(long id, String name, Vector timeLocations, double bestTimePref, String instructorId, Vector roomLocations, int bestRoomPref, Placement initialPlacement, int expectedCapacity, String inctructorName, String pattern)` Constructor

Method Summary
`Vector` | `activeJenrls()` Active jenrl constraints (active mean that there is at least one student between its classes)
`void` | `addActiveJenrl(JenrlConstraint constr)` Add active jenrl constraint (active mean that there is at least one student between its classes)
`void` | `addContstraint(Constraint constraint)` Adds a constraint.
`void` | `addSameLectureStudent(String student)` Add a student enrolled to a cross-listed class
`void` | `addStudent(String student)` Add an enrolled student
`Vector` | `allStudents()` List of enrolled students of this class and of all its cross-listed classes
`Vector` | `computeValues()` Domain -- all combinations of room and time locations
`Vector` | `conflictLectures()` Lectures different from this one, which are in a student conflict with the this lecture
`Vector` | `conflictLectures(String student)` Lectures different from this one, where it is student conflict of the given student between this and the lecture
`Vector` | `conflictLectures(Value value)` Lectures different from this one, which are in a student conflict with the given assignment (of this lecture)
`Vector` | `conflictLecturesNames(String student)` Names of lectures different from this one, where it is student conflict of the given student between this and the lecture
`Vector` | `conflictStudents()` List of students of this class which are in conflict with any other assignment
`Vector` | `conflictStudents(Value value)` List of students of this class in conflict with the given assignment
`Vector` | `conflictStudents(Value value, Variable anotherVariable)` List of students which are in conflict with the given two classes
`int` | `countInitialStudentConflicts()` Number of student conflicts caused by the initial assignment of this lecture
`int` | `countStudentConflicts(Value value)` Number of student conflicts caused by the given assignment of this lecture
`long` | `countStudents()` Expected capacity
`Vector` | `crossListedLectures()`
`boolean` | `equals(Object o)`
`int` | `getBestRoomPreference()` Best room preference of this lecture
`double` | `getBestTimePreference()` Best time preference of this lecture
`long` | `getClassId()` Class id
`String` | `getDepartment()` Department
`DepartmentSpreadConstraint` | `getDeptSpreadConstraint()` Departmental spreading constraint
`String` | `getDescription()` Description
`long` | `getId()` Class id
`Hashtable` | `getInitialStudentConflicts()` Table of student conflicts caused by the initial assignment of this lecture in format (another lecture, number)
`InstructorConstraint` | `getInstructorConstraint()` Instructor constraint
`String` | `getInstructorId()` Instructor id
`String` | `getInstructorName()` Instructor name
`String` | `getName()` Class name
`Vector` | `getSameRoomValues(String roomId)` All values which uses the given room
`String` | `getValuesString()`
`boolean` | `hasStudent(String student)` Returns true if the given student is enrolled
`Set` | `initialStudentConflicts()` List of student conflicts caused by the initial assignment of this lecture
`int` | `isInConflict(String student)` True if this lecture is in a student conflict with the given student
`boolean` | `isSwapTabu(String student, String swapStudent)` Prohibited swaps
`Vector` | `jenrlConstraints()` All JENRL constraints of this lecture
`void` | `removeActiveJenrl(JenrlConstraint constr)` Remove active jenrl constraint (active mean that there is at least one student between its classes)
`void` | `removeContstraint(Constraint constraint)` Removes a constraint.
`Vector` | `roomLocations()` All room locations
`Vector` | `sameLectures()` Set of lectures of the same class (only section is different)
`Vector` | `sameStudentLectures(String student)` Lectures which share the given student, different from this one
`Vector` | `sameStudents(Lecture lecture)` List of students enrolled in this class as well as in the given class
`void` | `setCrossListedLectures(Vector crossListedLectures)`
`void` | `setDepartment(String dept)` Department
`void` | `setSameLectures(Vector sameLectures)` Set of lectures of the same class (only section is different)
`Vector` | `students()` List of enrolled students
`Set` | `swapStudents()` Swap students between this and the same lectures (lectures which differ only in the section)
`Vector` | `timeLocations()` All time locations
`String` | `toString()`
`Vector` | `values()` All values

Methods inherited from class ifs.model.Variable
`addVariableListener, assign, compareTo, constraints, constraintVariables, countAssignments, getAssignment, getBestAssignment, getBestAssignmentIteration, getExtra, getInitialAssignment, getModel, hardConstraints, hasAssignment, hashCode, hasInitialAssignment, lastAssignmentIteration, lastUnassignmentIteration, removeInitialValue, removeValue, removeVariableListener, setBestAssignment, setExtra, setInitialAssignment, setModel, setValues, softConstraints, unassign`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Lecture

    public Lecture(long id,
                   String name,
                   Vector timeLocations,
                   double bestTimePref,
                   String instructorId,
                   Vector roomLocations,
                   int bestRoomPref,
                   Placement initialPlacement,
                   int expectedCapacity,
                   String inctructorName,
                   String pattern)

  Constructor

  Parameters:
    `id` - unique identification
    `name` - class name
    `timeLocations` - set of time locations
    `bestTimePref` - best time preference over all time locations
    `instructorId` - instuctor id
    `roomLocations` - set of room location
    `bestRoomPref` - best room preference over all room locations
    `initialPlacement` - initial placement
    `expectedCapacity` - expected number of students
    `inctructorName` - instructor name
    `pattern` - time pattern (e.g., 2x100)

Method Detail

### addActiveJenrl

    public void addActiveJenrl(JenrlConstraint constr)

  Add active jenrl constraint (active mean that there is at least one student between its classes)

### activeJenrls

    public Vector activeJenrls()

  Active jenrl constraints (active mean that there is at least one student between its classes)

### removeActiveJenrl

    public void removeActiveJenrl(JenrlConstraint constr)

  Remove active jenrl constraint (active mean that there is at least one student between its classes)

### getClassId

    public long getClassId()

  Class id

### getName

    public String getName()

  Class name

  Overrides:
    `getName` in class `Variable`

### getId

    public long getId()

  Class id

  Overrides:
    `getId` in class `Variable`

### getInstructorName

    public String getInstructorName()

  Instructor name

### getInstructorId

    public String getInstructorId()

  Instructor id

### students

    public Vector students()

  List of enrolled students

### allStudents

    public Vector allStudents()

  List of enrolled students of this class and of all its cross-listed classes

### addStudent

    public void addStudent(String student)

  Add an enrolled student

### addSameLectureStudent

    public void addSameLectureStudent(String student)

  Add a student enrolled to a cross-listed class

### hasStudent

    public boolean hasStudent(String student)

  Returns true if the given student is enrolled

### setSameLectures

    public void setSameLectures(Vector sameLectures)

  Set of lectures of the same class (only section is different)

### sameLectures

    public Vector sameLectures()

  Set of lectures of the same class (only section is different)

### crossListedLectures

    public Vector crossListedLectures()

### setCrossListedLectures

    public void setCrossListedLectures(Vector crossListedLectures)

### sameStudents

    public Vector sameStudents(Lecture lecture)

  List of students enrolled in this class as well as in the given class

### conflictStudents

    public Vector conflictStudents(Value value,
                                   Variable anotherVariable)

  List of students which are in conflict with the given two classes

### conflictStudents

    public Vector conflictStudents(Value value)

  List of students of this class in conflict with the given assignment

### conflictStudents

    public Vector conflictStudents()

  List of students of this class which are in conflict with any other assignment

### sameStudentLectures

    public Vector sameStudentLectures(String student)

  Lectures which share the given student, different from this one

### conflictLecturesNames

    public Vector conflictLecturesNames(String student)

  Names of lectures different from this one, where it is student conflict of the given student between this and the lecture

### conflictLectures

    public Vector conflictLectures(String student)

  Lectures different from this one, where it is student conflict of the given student between this and the lecture

### conflictLectures

    public Vector conflictLectures(Value value)

  Lectures different from this one, which are in a student conflict with the given assignment (of this lecture)

### conflictLectures

    public Vector conflictLectures()

  Lectures different from this one, which are in a student conflict with the this lecture

### isInConflict

    public int isInConflict(String student)

  True if this lecture is in a student conflict with the given student

### swapStudents

    public Set swapStudents()

  Swap students between this and the same lectures (lectures which differ only in the section)

### isSwapTabu

    public boolean isSwapTabu(String student,
                              String swapStudent)

  Prohibited swaps

### computeValues

    public Vector computeValues()

  Domain -- all combinations of room and time locations

### getSameRoomValues

    public Vector getSameRoomValues(String roomId)

  All values which uses the given room

### values

    public Vector values()

  All values

  Overrides:
    `values` in class `Variable`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Variable`

### getBestTimePreference

    public double getBestTimePreference()

  Best time preference of this lecture

### getBestRoomPreference

    public int getBestRoomPreference()

  Best room preference of this lecture

### countStudentConflicts

    public int countStudentConflicts(Value value)

  Number of student conflicts caused by the given assignment of this lecture

### countInitialStudentConflicts

    public int countInitialStudentConflicts()

  Number of student conflicts caused by the initial assignment of this lecture

### getInitialStudentConflicts

    public Hashtable getInitialStudentConflicts()

  Table of student conflicts caused by the initial assignment of this lecture in format (another lecture, number)

### initialStudentConflicts

    public Set initialStudentConflicts()

  List of student conflicts caused by the initial assignment of this lecture

### addContstraint

    public void addContstraint(Constraint constraint)

  Description copied from class: `Variable`
  Adds a constraint. Called automatically when the constraint is added to the model, i.e., `Model.addConstraint(Constraint)` is called.

  Overrides:
    `addContstraint` in class `Variable`
  Parameters:
    `constraint` - added constraint

### removeContstraint

    public void removeContstraint(Constraint constraint)

  Description copied from class: `Variable`
  Removes a constraint. Called automatically when the constraint is removed from the model, i.e., `Model.removeConstraint(Constraint)` is called.

  Overrides:
    `removeContstraint` in class `Variable`
  Parameters:
    `constraint` - added constraint

### jenrlConstraints

    public Vector jenrlConstraints()

  All JENRL constraints of this lecture

### countStudents

    public long countStudents()

  Expected capacity

### toString

    public String toString()

  Overrides:
    `toString` in class `Variable`

### getDescription

    public String getDescription()

  Description

  Overrides:
    `getDescription` in class `Variable`

### getValuesString

    public String getValuesString()

### getDepartment

    public String getDepartment()

  Department

### setDepartment

    public void setDepartment(String dept)

  Department

### getDeptSpreadConstraint

    public DepartmentSpreadConstraint getDeptSpreadConstraint()

  Departmental spreading constraint

### getInstructorConstraint

    public InstructorConstraint getInstructorConstraint()

  Instructor constraint

### roomLocations

    public Vector roomLocations()

  All room locations

### timeLocations

    public Vector timeLocations()

  All time locations

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Tomáš Müller