net.sf.cpsolver.studentsct.heuristics.selection
Class BranchBoundSelection

java.lang.Object
  extended by net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection
All Implemented Interfaces:
NeighbourSelection
Direct Known Subclasses:
OnlineSelection, ResectionIncompleteStudentsSelection, ResectionUnassignedStudentsSelection

public class BranchBoundSelection
extends Object
implements NeighbourSelection

Section all students using incremental branch & bound (no unassignments). All students are taken in a random order, for each student a branch & bound algorithm is used to find his/her best schedule on top of all other existing student schedules (no enrollment of a different student is unassigned).

Parameters:

ParameterTypeComment
Neighbour.BranchAndBoundTimeoutIntegerTimeout for each neighbour selection (in milliseconds).
Neighbour.BranchAndBoundMinimizePenaltyBooleanIf true, section penalties (instead of section values) are minimized: overall penalty is minimized together with the maximization of the number of assigned requests and minimization of distance conflicts -- this variant is to better mimic the case when students can choose their sections (section times).


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

Nested Class Summary
static class BranchBoundSelection.BranchBoundNeighbour
          Branch & bound neighbour -- a schedule of a student
 class BranchBoundSelection.Selection
          Branch & bound selection for a student
 
Field Summary
protected  DistanceConflict iDistanceConflict
           
protected  double iDistConfWeight
           
protected  boolean iMinimizePenalty
           
protected  StudentOrder iOrder
           
protected  Enumeration iStudentsEnumeration
           
protected  int iTimeout
           
static boolean sDebug
           
 
Constructor Summary
BranchBoundSelection(DataProperties properties)
          Constructor
 
Method Summary
 BranchBoundSelection.Selection getSelection(Student student)
          Branch & bound selection for a student
 void init(Solver solver)
          Criterion initialization
 void init(Solver solver, String name)
          Initialize
 Neighbour selectNeighbour(Solution solution)
          Select neighbour.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iTimeout

protected int iTimeout

iDistanceConflict

protected DistanceConflict iDistanceConflict

sDebug

public static boolean sDebug

iStudentsEnumeration

protected Enumeration iStudentsEnumeration

iMinimizePenalty

protected boolean iMinimizePenalty

iOrder

protected StudentOrder iOrder

iDistConfWeight

protected double iDistConfWeight
Constructor Detail

BranchBoundSelection

public BranchBoundSelection(DataProperties properties)
Constructor

Parameters:
properties - configuration
Method Detail

init

public void init(Solver solver,
                 String name)
Initialize


init

public void init(Solver solver)
Description copied from interface: NeighbourSelection
Criterion initialization

Specified by:
init in interface NeighbourSelection

selectNeighbour

public Neighbour selectNeighbour(Solution solution)
Select neighbour. All students are taken, one by one in a random order. For each student a branch & bound search is employed.

Specified by:
selectNeighbour in interface NeighbourSelection
Parameters:
solution - given solution
Returns:
a neighbour assignment

getSelection

public BranchBoundSelection.Selection getSelection(Student student)
Branch & bound selection for a student