org.cpsolver.studentsct.online.selection

## Class EqualWeightCriterion

- java.lang.Object
- - org.cpsolver.studentsct.online.selection.OnlineSectioningCriterion
  - - org.cpsolver.studentsct.online.selection.EqualWeightCriterion

- All Implemented Interfaces:
    MultiCriteriaBranchAndBoundSelection.SelectionComparator, MultiCriteriaBranchAndBoundSelection.SelectionCriterion

      public class EqualWeightCriterion
      extends OnlineSectioningCriterion

  Equal weighting multi-criteria selection criterion. Much like the `OnlineSectioningCriterion`, but course request priorities are ignored. Most complete solution is preferred instead.
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.cpsolver.studentsct.online.selection.OnlineSectioningCriterion

      `OnlineSectioningCriterion.TimeToAvoid`

  - ### Field Summary

    - ### Fields inherited from class org.cpsolver.studentsct.online.selection.OnlineSectioningCriterion

      `iQalityWeights`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EqualWeightCriterion(Student student, OnlineSectioningModel model, Assignment<Request,Enrollment> assignment, Hashtable<CourseRequest,Set<Section>> preferredSections)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canImprove(Assignment<Request,Enrollment> assignment, int maxIdx, Enrollment[] current, Enrollment[] best)` Bound
    `int` | `compare(Assignment<Request,Enrollment> assignment, Enrollment[] current, Enrollment[] best)` Compare two solutions

    - ### Methods inherited from class org.cpsolver.studentsct.online.selection.OnlineSectioningCriterion

      `compare, getDistanceConflicts, getModel, getPreferredSections, getRequest, getStudent, getStudentQualityConflicts, getTimeOverlappingConflicts, getTimesToAvoid, getTotalWeight, getWeight, getWeight, isFreeTime`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EqualWeightCriterion

          public EqualWeightCriterion(Student student,
                                      OnlineSectioningModel model,
                                      Assignment<Request,Enrollment> assignment,
                                      Hashtable<CourseRequest,Set<Section>> preferredSections)

  - ### Method Detail

    - #### compare

          public int compare(Assignment<Request,Enrollment> assignment,
                             Enrollment[] current,
                             Enrollment[] best)

      Description copied from interface: `MultiCriteriaBranchAndBoundSelection.SelectionCriterion`
      Compare two solutions
      Specified by:
        `compare` in interface `MultiCriteriaBranchAndBoundSelection.SelectionCriterion`
      Overrides:
        `compare` in class `OnlineSectioningCriterion`
      Parameters:
        `assignment` - current assignment
        `current` - current solution
        `best` - best known solution
      Returns:
        true if current solution is better than the best one

    - #### canImprove

          public boolean canImprove(Assignment<Request,Enrollment> assignment,
                                    int maxIdx,
                                    Enrollment[] current,
                                    Enrollment[] best)

      Description copied from interface: `MultiCriteriaBranchAndBoundSelection.SelectionCriterion`
      Bound
      Specified by:
        `canImprove` in interface `MultiCriteriaBranchAndBoundSelection.SelectionCriterion`
      Overrides:
        `canImprove` in class `OnlineSectioningCriterion`
      Parameters:
        `assignment` - current assignment
        `maxIdx` - current request index
        `current` - current solution
        `best` - best known solution
      Returns:
        if the current solution can be extended and possibly improve upon the best known solution