net.sf.cpsolver.studentsct.heuristics.selection
Class SwapStudentSelection.SwapStudentNeighbour

java.lang.Object
  extended by net.sf.cpsolver.ifs.model.Neighbour<Request,Enrollment>
      extended by net.sf.cpsolver.studentsct.heuristics.selection.SwapStudentSelection.SwapStudentNeighbour
Enclosing class:
SwapStudentSelection

public static class SwapStudentSelection.SwapStudentNeighbour
extends Neighbour<Request,Enrollment>

Neighbour that contains the swap


Constructor Summary
SwapStudentSelection.SwapStudentNeighbour(double value, Enrollment enrollment, List<Enrollment> swaps)
          Constructor
 
Method Summary
 void assign(long iteration)
          Perform the move.
 String toString()
           
 double value()
          Difference in the evaluation function, if this neighnour is assigned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwapStudentSelection.SwapStudentNeighbour

public SwapStudentSelection.SwapStudentNeighbour(double value,
                                                 Enrollment enrollment,
                                                 List<Enrollment> swaps)
Constructor

Parameters:
value - cost of the move
enrollment - the enrollment which is to be assigned to the given student
swaps - enrollment swaps
Method Detail

value

public double value()
Description copied from class: Neighbour
Difference in the evaluation function, if this neighnour is assigned.

Specified by:
value in class Neighbour<Request,Enrollment>

assign

public void assign(long iteration)
Perform the move. All the requeired swaps are identified and performed as well.

Specified by:
assign in class Neighbour<Request,Enrollment>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 UniTime LLC. All Rights Reserved.