org.cpsolver.studentsct.weights

## Interface StudentWeights

- All Superinterfaces:
    SolutionComparator<Request,Enrollment>
  All Known Implementing Classes:
    EqualStudentWeights, OriginalStudentWeights, PriorityStudentWeights, ResectioningWeights, StudentSchedulingAssistantWeights

      public interface StudentWeights
      extends SolutionComparator<Request,Enrollment>

  Interface to model various student weightings
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2007 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    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 3 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 see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `StudentWeights.Implementation` Registered implementation

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getBound(Request request)` Return lower bound for the given request
    `double` | `getDistanceConflictWeight(Assignment<Request,Enrollment> assignment, DistanceConflict.Conflict distanceConflict)` Return weight of a distance conflict
    `double` | `getStudentQualityConflictWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment, StudentQuality.Conflict conflict)` Return weight of a student quality conflict
    `double` | `getTimeOverlapConflictWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment, TimeOverlapsCounter.Conflict timeOverlap)` Return weight of a time overlapping conflict
    `double` | `getWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment)` Return base weight of the given enrollment
    `double` | `getWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment, Set<DistanceConflict.Conflict> distanceConflicts, Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)` Return weight of the given enrollment
    `double` | `getWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment, Set<StudentQuality.Conflict> qualityConflicts)` Return weight of the given enrollment
    `boolean` | `isFreeTimeAllowOverlaps()` Return true if free time requests allow overlaps

    - ### Methods inherited from interface org.cpsolver.ifs.solution.SolutionComparator

      `isBetterThanBestSolution`

- - ### Method Detail

    - #### getBound

          double getBound(Request request)

      Return lower bound for the given request
      Parameters:
        `request` - given request
      Returns:
        weight of the best value

    - #### getWeight

          double getWeight(Assignment<Request,Enrollment> assignment,
                           Enrollment enrollment)

      Return base weight of the given enrollment
      Parameters:
        `assignment` - current assignment
        `enrollment` - given enrollment
      Returns:
        weight (higher weight means better value)

    - #### getWeight

          double getWeight(Assignment<Request,Enrollment> assignment,
                           Enrollment enrollment,
                           Set<DistanceConflict.Conflict> distanceConflicts,
                           Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)

      Return weight of the given enrollment
      Parameters:
        `assignment` - current assignment
        `enrollment` - given enrollment
        `distanceConflicts` - distance conflicts
        `timeOverlappingConflicts` - time overlapping conflicts
      Returns:
        weight (higher weight means better value)

    - #### getWeight

          double getWeight(Assignment<Request,Enrollment> assignment,
                           Enrollment enrollment,
                           Set<StudentQuality.Conflict> qualityConflicts)

      Return weight of the given enrollment
      Parameters:
        `assignment` - current assignment
        `enrollment` - given enrollment
        `qualityConflicts` - student quality conflicts
      Returns:
        weight (higher weight means better value)

    - #### getDistanceConflictWeight

          double getDistanceConflictWeight(Assignment<Request,Enrollment> assignment,
                                           DistanceConflict.Conflict distanceConflict)

      Return weight of a distance conflict
      Parameters:
        `assignment` - current assignment
        `distanceConflict` - distance conflict
      Returns:
        weight of the conflict

    - #### getTimeOverlapConflictWeight

          double getTimeOverlapConflictWeight(Assignment<Request,Enrollment> assignment,
                                              Enrollment enrollment,
                                              TimeOverlapsCounter.Conflict timeOverlap)

      Return weight of a time overlapping conflict
      Parameters:
        `assignment` - current assignment
        `enrollment` - enrollment in question
        `timeOverlap` - time overlapping conflict
      Returns:
        weight of the conflict

    - #### getStudentQualityConflictWeight

          double getStudentQualityConflictWeight(Assignment<Request,Enrollment> assignment,
                                                 Enrollment enrollment,
                                                 StudentQuality.Conflict conflict)

      Return weight of a student quality conflict
      Parameters:
        `assignment` - current assignment
        `enrollment` - enrollment in question
        `conflict` - student quality conflict
      Returns:
        weight of the conflict

    - #### isFreeTimeAllowOverlaps

          boolean isFreeTimeAllowOverlaps()

      Return true if free time requests allow overlaps
      Returns:
        true if free time overlaps are allowed, but the overlapping time is minimized