org.cpsolver.studentsct.heuristics.selection

## Class CriticalStandardSelection

- java.lang.Object
- - org.cpsolver.studentsct.heuristics.selection.StandardSelection
  - - org.cpsolver.studentsct.heuristics.selection.CriticalStandardSelection

- All Implemented Interfaces:
    NeighbourSelection<Request,Enrollment>, AssignmentCheck<Request,Enrollment>

      public class CriticalStandardSelection
      extends StandardSelection

  Use the standard IFS search for the unassigned critical course requests. This selection is based on `StandardSelection` using `UnassignedCriticalCourseRequestSelection` as variable selection. Unlike `StandardSelection`, it allows for a critical course request to be unassigned.
  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

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.studentsct.heuristics.selection.StandardSelection

      `iCanConflict, iCanHigherPriorityConflict, iCanWorsen, iCanWorsenCritical, iConflictTimeOut, iNrIterations, iPreferPriorityStudents, iTimeOut, iValueSelection, iVariableSelection, iWorsenTimeOut`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CriticalStandardSelection(DataProperties properties, ValueSelection<Request,Enrollment> valueSelection)`
    `CriticalStandardSelection(DataProperties properties, ValueSelection<Request,Enrollment> valueSelection, Request.RequestPriority priority)`
    `CriticalStandardSelection(DataProperties properties, VariableSelection<Request,Enrollment> variableSelection, ValueSelection<Request,Enrollment> valueSelection, Request.RequestPriority priority)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canUnassign(Enrollment enrollment, Enrollment conflict, Assignment<Request,Enrollment> assignment)` Check if the given conflicting enrollment can be unassigned
    `void` | `init(Solver<Request,Enrollment> solver)` Initialization

    - ### Methods inherited from class org.cpsolver.studentsct.heuristics.selection.StandardSelection

      `accept, init, selectNeighbour`

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

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

- - ### Constructor Detail

    - #### CriticalStandardSelection

          public CriticalStandardSelection(DataProperties properties,
                                           VariableSelection<Request,Enrollment> variableSelection,
                                           ValueSelection<Request,Enrollment> valueSelection,
                                           Request.RequestPriority priority)

    - #### CriticalStandardSelection

          public CriticalStandardSelection(DataProperties properties,
                                           ValueSelection<Request,Enrollment> valueSelection,
                                           Request.RequestPriority priority)

    - #### CriticalStandardSelection

          public CriticalStandardSelection(DataProperties properties,
                                           ValueSelection<Request,Enrollment> valueSelection)

  - ### Method Detail

    - #### init

          public void init(Solver<Request,Enrollment> solver)

      Description copied from class: `StandardSelection`
      Initialization
      Specified by:
        `init` in interface `NeighbourSelection<Request,Enrollment>`
      Overrides:
        `init` in class `StandardSelection`
      Parameters:
        `solver` - current solver

    - #### canUnassign

          public boolean canUnassign(Enrollment enrollment,
                                     Enrollment conflict,
                                     Assignment<Request,Enrollment> assignment)

      Description copied from class: `StandardSelection`
      Check if the given conflicting enrollment can be unassigned
      Specified by:
        `canUnassign` in interface `AssignmentCheck<Request,Enrollment>`
      Overrides:
        `canUnassign` in class `StandardSelection`
      Parameters:
        `enrollment` - value to be assigned
        `conflict` - given enrollment
        `assignment` - current assignment
      Returns:
        if running MPP, do not unassign initial enrollments