net.sf.cpsolver.studentsct.heuristics
Class EnrollmentSelection

java.lang.Object
  extended by net.sf.cpsolver.studentsct.heuristics.EnrollmentSelection
All Implemented Interfaces:
ValueSelection<Request,Enrollment>

public class EnrollmentSelection
extends Object
implements ValueSelection<Request,Enrollment>

Enrollment selection criterion. It is similar to GeneralValueSelection, however, it is not allowed to assign a enrollment to a dummy student Student.isDummy() that is conflicting with an enrollment of a real student.

Version:
StudentSct 1.2 (Student Sectioning)
Copyright (C) 2007 - 2010 Tomas Muller
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/.

Field Summary
protected  List<Enrollment> iTabu
           
protected  int iTabuPos
           
protected  int iTabuSize
           
 
Constructor Summary
EnrollmentSelection()
           
EnrollmentSelection(DataProperties properties)
          Constructor
 
Method Summary
 void init(Solver<Request,Enrollment> solver)
          Initialization
 boolean isAllowed(Enrollment value)
          true, if it is allowed to assign given value
 boolean isAllowed(Enrollment value, Set<Enrollment> conflicts)
          true, if it is allowed to assign given value
 Enrollment selectValue(Solution<Request,Enrollment> solution, Request selectedVariable)
          Value selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iTabuSize

protected int iTabuSize

iTabu

protected List<Enrollment> iTabu

iTabuPos

protected int iTabuPos
Constructor Detail

EnrollmentSelection

public EnrollmentSelection()

EnrollmentSelection

public EnrollmentSelection(DataProperties properties)
Constructor

Parameters:
properties - input configuration
Method Detail

init

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

Specified by:
init in interface ValueSelection<Request,Enrollment>

isAllowed

public boolean isAllowed(Enrollment value)
true, if it is allowed to assign given value


isAllowed

public boolean isAllowed(Enrollment value,
                         Set<Enrollment> conflicts)
true, if it is allowed to assign given value


selectValue

public Enrollment selectValue(Solution<Request,Enrollment> solution,
                              Request selectedVariable)
Value selection

Specified by:
selectValue in interface ValueSelection<Request,Enrollment>
Parameters:
solution - current solution
selectedVariable - selected variable


Copyright © 2014 UniTime LLC. All Rights Reserved.