org.cpsolver.studentsct.extension

## Enum StudentQuality.Type

- java.lang.Object
- - java.lang.Enum<StudentQuality.Type>
  - - org.cpsolver.studentsct.extension.StudentQuality.Type

- All Implemented Interfaces:
    Serializable, Comparable<StudentQuality.Type>
  Enclosing class:
    StudentQuality

      public static enum StudentQuality.Type
      extends Enum<StudentQuality.Type>

  Measured student qualities

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AccBackToBack` DRC: A back-to-back conflict (for students with BTB accommodation) is there every time when a student has two classes that are NOT back-to-back or less than Accommodations.BackToBackDistance time slots apart (defaults to 30 minutes).
    `AccBreaksBetweenClasses` DRC: A not back-to-back conflict (for students with BBC accommodation) is there every time when a student has two classes that are back-to-back or less than Accommodations.BackToBackDistance time slots apart (defaults to 30 minutes).
    `AccFreeTimeOverlap` DRC: Time conflict between class and a free time request (for students with FT accommodation).
    `BackToBack` A back-to-back conflict is there every time when a student has two classes that are back-to-back or less than StudentWeights.BackToBackDistance time slots apart (defaults to 30 minutes).
    `CourseTimeOverlap` Time conflicts between two classes that is allowed.
    `Distance` Distance conflict.
    `FreeTimeOverlap` Time conflict between class and a free time request.
    `LunchBreak` Naive, yet effective approach for modeling student lunch breaks.
    `Modality` There is a student modality preference conflict when a student that prefers online gets a non-online class (`Section.isOnline()` is false) or when a student that prefers non-online gets an online class (@{link Section#isOnline()} is true).
    `ShortDistance` Short distance conflict.
    `TooEarly`
    `TooLate`
    `TravelTime` Naive, yet effective approach for modeling travel times.
    `Unavailability` Student unavailability conflict.
    `UnavailabilityDistance` Student unavailability distance conflict.
    `WorkDay` A work-day conflict is there every time when a student has two classes that are too far apart.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAbbv()`
    `String` | `getName()`
    `StudentQuality.WeightType` | `getType()`
    `double` | `getWeight(StudentQuality.Context cx, StudentQuality.Conflict c, Enrollment e)`
    `double` | `getWeightDefault()`
    `String` | `getWeightName()`
    `boolean` | `inConflict(StudentQuality.Context cx, SctAssignment a1, SctAssignment a2)`
    `boolean` | `isApplicable(StudentQuality.Context cx, Student student, Request r1, Request r2)`
    `Iterable<? extends SctAssignment>` | `other(StudentQuality.Context cx, Enrollment e)`
    `int` | `penalty(StudentQuality.Context cx, Student s, SctAssignment a1, SctAssignment a2)`
    `static StudentQuality.Type` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static StudentQuality.Type[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CourseTimeOverlap

          public static final StudentQuality.Type CourseTimeOverlap

      Time conflicts between two classes that is allowed. Time conflicts are penalized as shared time between two course requests proportional to the time of each, capped at one half of the time. This criterion is weighted by StudentWeights.TimeOverlapFactor, defaulting to 0.5.

    - #### FreeTimeOverlap

          public static final StudentQuality.Type FreeTimeOverlap

      Time conflict between class and a free time request. Free time conflicts are penalized as the time of a course request overlapping with a free time proportional to the time of the request, capped at one half of the time. This criterion is weighted by StudentWeights.TimeOverlapFactor, defaulting to 0.5.

    - #### Unavailability

          public static final StudentQuality.Type Unavailability

      Student unavailability conflict. Time conflict between a class that the student is taking and a class that the student is teaching (if time conflicts are allowed). Unavailability conflicts are penalized as the time of a course request overlapping with an unavailability proportional to the time of the request, capped at one half of the time. This criterion is weighted by StudentWeights.TimeOverlapFactor, defaulting to 0.5.

    - #### Distance

          public static final StudentQuality.Type Distance

      Distance conflict. When Distances.ComputeDistanceConflictsBetweenNonBTBClasses is set to false, distance conflicts are only considered between back-to-back classes (break time of the first class is shorter than the distance in minutes between the two classes). When Distances.ComputeDistanceConflictsBetweenNonBTBClasses is set to true, the distance between the two classes is also considered. This criterion is weighted by StudentWeights.DistanceConflict, defaulting to 0.01.

    - #### ShortDistance

          public static final StudentQuality.Type ShortDistance

      Short distance conflict. Similar to distance conflicts but for students that require short distances. When Distances.ComputeDistanceConflictsBetweenNonBTBClasses is set to false, distance conflicts are only considered between back-to-back classes (travel time between the two classes is more than zero minutes). When Distances.ComputeDistanceConflictsBetweenNonBTBClasses is set to true, the distance between the two classes is also considered (break time is also ignored). This criterion is weighted by StudentWeights.ShortDistanceConflict, defaulting to 0.1.

    - #### LunchBreak

          public static final StudentQuality.Type LunchBreak

      Naive, yet effective approach for modeling student lunch breaks. It creates a conflict whenever there are two classes (of a student) overlapping with the lunch time which are one after the other with a break in between smaller than the requested lunch break. Lunch time is defined by StudentLunch.StartSlot and StudentLunch.EndStart properties (default is 11:00 am - 1:30 pm), with lunch break of at least StudentLunch.Length slots (default is 30 minutes). Such a conflict is weighted by StudentWeights.LunchBreakFactor, which defaults to 0.005.

    - #### TravelTime

          public static final StudentQuality.Type TravelTime

      Naive, yet effective approach for modeling travel times. A conflict with the penalty equal to the distance in minutes occurs when two classes are less than TravelTime.MaxTravelGap time slots a part (defaults 1 hour), or when they are less then twice as long apart and the travel time is longer than the break time of the first class. Such a conflict is weighted by StudentWeights.TravelTimeFactor, which defaults to 0.001.

    - #### BackToBack

          public static final StudentQuality.Type BackToBack

      A back-to-back conflict is there every time when a student has two classes that are back-to-back or less than StudentWeights.BackToBackDistance time slots apart (defaults to 30 minutes). Such a conflict is weighted by StudentWeights.BackToBackFactor, which defaults to -0.0001 (these conflicts are preferred by default, trying to avoid schedule gaps). NEW: Consider student's back-to-back preference. That is, students with no preference are ignored, and students that discourage back-to-backs have a negative weight on the conflict.

    - #### WorkDay

          public static final StudentQuality.Type WorkDay

      A work-day conflict is there every time when a student has two classes that are too far apart. This means that the time between the start of the first class and the end of the last class is more than WorkDay.WorkDayLimit (defaults to 6 hours). A penalty of one is incurred for every hour started over this limit. Such a conflict is weighted by StudentWeights.WorkDayFactor, which defaults to 0.01.

    - #### TooEarly

          public static final StudentQuality.Type TooEarly

    - #### TooLate

          public static final StudentQuality.Type TooLate

    - #### Modality

          public static final StudentQuality.Type Modality

      There is a student modality preference conflict when a student that prefers online gets a non-online class (`Section.isOnline()` is false) or when a student that prefers non-online gets an online class (@{link Section#isOnline()} is true). Such a conflict is weighted by StudentWeights.ModalityFactor, which defaults to 0.05.

    - #### AccFreeTimeOverlap

          public static final StudentQuality.Type AccFreeTimeOverlap

      DRC: Time conflict between class and a free time request (for students with FT accommodation). Free time conflicts are penalized as the time of a course request overlapping with a free time proportional to the time of the request, capped at one half of the time. This criterion is weighted by Accommodations.FreeTimeOverlapFactor, defaulting to 0.5.

    - #### AccBackToBack

          public static final StudentQuality.Type AccBackToBack

      DRC: A back-to-back conflict (for students with BTB accommodation) is there every time when a student has two classes that are NOT back-to-back or less than Accommodations.BackToBackDistance time slots apart (defaults to 30 minutes). Such a conflict is weighted by Accommodations.BackToBackFactor, which defaults to 0.001

    - #### AccBreaksBetweenClasses

          public static final StudentQuality.Type AccBreaksBetweenClasses

      DRC: A not back-to-back conflict (for students with BBC accommodation) is there every time when a student has two classes that are back-to-back or less than Accommodations.BackToBackDistance time slots apart (defaults to 30 minutes). Such a conflict is weighted by Accommodations.BreaksBetweenClassesFactor, which defaults to 0.001.

    - #### UnavailabilityDistance

          public static final StudentQuality.Type UnavailabilityDistance

      Student unavailability distance conflict. Distance conflict between a class that the student is taking and a class that the student is teaching or attending in a different session. This criterion is weighted by StudentWeights.UnavailabilityDistanceConflict, defaulting to 0.1.

  - ### Method Detail

    - #### values

          public static StudentQuality.Type[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (StudentQuality.Type c : StudentQuality.Type.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static StudentQuality.Type valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### isApplicable

          public boolean isApplicable(StudentQuality.Context cx,
                                      Student student,
                                      Request r1,
                                      Request r2)

    - #### inConflict

          public boolean inConflict(StudentQuality.Context cx,
                                    SctAssignment a1,
                                    SctAssignment a2)

    - #### penalty

          public int penalty(StudentQuality.Context cx,
                             Student s,
                             SctAssignment a1,
                             SctAssignment a2)

    - #### other

          public Iterable<? extends SctAssignment> other(StudentQuality.Context cx,
                                                         Enrollment e)

    - #### getWeight

          public double getWeight(StudentQuality.Context cx,
                                  StudentQuality.Conflict c,
                                  Enrollment e)

    - #### getName

          public String getName()

    - #### getAbbv

          public String getAbbv()

    - #### getType

          public StudentQuality.WeightType getType()

    - #### getWeightName

          public String getWeightName()

    - #### getWeightDefault

          public double getWeightDefault()