net.sf.cpsolver.studentsct.heuristics
Class EnrollmentSelection

java.lang.Object
  extended by net.sf.cpsolver.studentsct.heuristics.EnrollmentSelection
All Implemented Interfaces:
ValueSelection

public class EnrollmentSelection
extends Object
implements ValueSelection

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.1 (Student Sectioning)
Copyright (C) 2007 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic

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 2.1 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Field Summary
protected  ArrayList iTabu
           
protected  int iTabuPos
           
protected  int iTabuSize
           
 
Constructor Summary
EnrollmentSelection()
           
EnrollmentSelection(DataProperties properties)
          Constructor
 
Method Summary
 void init(Solver solver)
          Initialization
 boolean isAllowed(Value value)
          true, if it is allowed to assign given value
 boolean isAllowed(Value value, Collection conflicts)
          true, if it is allowed to assign given value
 Value selectValue(Solution solution, Variable selectedVariable)
          Value selecion
 
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 ArrayList 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 solver)
Initialization

Specified by:
init in interface ValueSelection

isAllowed

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


isAllowed

public boolean isAllowed(Value value,
                         Collection conflicts)
true, if it is allowed to assign given value


selectValue

public Value selectValue(Solution solution,
                         Variable selectedVariable)
Value selecion

Specified by:
selectValue in interface ValueSelection
Parameters:
solution - current solution
selectedVariable - selected variable