net.sf.cpsolver.coursett.heuristics
Class PlacementSelection

java.lang.Object
  extended by net.sf.cpsolver.coursett.heuristics.PlacementSelection
All Implemented Interfaces:
ValueSelection

public class PlacementSelection
extends Object
implements ValueSelection

Placement (value) selection.

We have implemented a hierarchical handling of the value selection criteria (see HeuristicSelector).

The value selection heuristics also allow for random selection of a value with a given probability (random walk, e.g., 2%) and, in the case of MPP, to select the initial value (if it exists) with a given probability (e.g., 70%).

Parameters (general):

ParameterTypeComment
Placement.RandomWalkProbDoubleRandom walk probability
Placement.GoodSelectionProbDoubleGood value (not removed from domain) selection probability (MAC related)
Placement.TabuLengthIntegerTabu-list length (-1 means do not use tabu-list)
Placement.MPP_InitialProbDoubleMPP initial selection probability
Placement.MPP_LimitIntegerMPP: limit on the number of perturbations (-1 for no limit)
Placement.MPP_PenaltyLimitDoubleMPP: limit on the perturbations penalty (-1 for no limit)

Parameters (for each level of selection):
ParameterTypeComment
Placement.NrAssignmentsWeight1
Placement.NrAssignmentsWeight2
Placement.NrAssignmentsWeight3
DoubleNumber of previous assignments of the value weight
Placement.NrConflictsWeight1,2,3DoubleNumber of conflicts weight
Placement.WeightedConflictsWeight1,2,3DoubleWeighted conflicts weight (Conflict-based Statistics related)
Placement.NrPotentialConflictsWeight1,2,3DoubleNumber of potential conflicts weight (Conflict-based Statistics related)
Placement.MPP_DeltaInitialAssignmentWeight1,2,3DoubleDelta initial assigments weight (MPP, violated initials related)
Placement.NrHardStudConfsWeight1,2,3DoubleHard student conflicts weight (student conflicts between single-section classes)
Placement.NrStudConfsWeight1,2,3DoubleStudent conflicts weight
Placement.TimePreferenceWeight1,2,3DoubleTime preference weight
Placement.DeltaTimePreferenceWeight1,2,3DoubleTime preference delta weight (difference between before and after assignemnt of the value)
Placement.ConstrPreferenceWeight1,2,3DoubleConstraint preference weight
Placement.RoomPreferenceWeight1,2,3DoubleRoom preference weight
Placement.UselessSlotsWeight1,2,3DoubleUseless slot weight
Placement.TooBigRoomWeight1,2,3DoubleToo big room weight
Placement.DistanceInstructorPreferenceWeight1,2,3DoubleDistance (of the rooms of the back-to-back classes) based instructor preferences weight
Placement.DeptSpreadPenaltyWeight1,2,3DoubleDepartment spreading: penalty of when a slot over initial allowance is used
Placement.ThresholdKoef1,2DoubleThreshold koeficient of the level

Version:
CourseTT 1.1 (University Course Timetabling)
Copyright (C) 2006 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
See Also:
PlacementSelection

Nested Class Summary
 class PlacementSelection.ParamRetriever
           
 
Field Summary
static String DELTA_INITIAL_ASSIGNMENT_WEIGHT
           
static String DELTA_TIME_PREFERENCE_WEIGHT
           
static String DEPT_SPREAD_WEIGHT
           
static String DISTANCE_INSTRUCTOR_PREFERENCE_WEIGHT
           
static String GOOD_SELECTION_PROB
           
static String INITIAL_SELECTION_PROB
           
static String NR_ASSIGNMENTS_WEIGHT
           
static String NR_COMMITED_STUDENT_CONF_WEIGHT
           
static String NR_CONFLICTS_WEIGHT
           
static String NR_HARD_STUDENT_CONF_WEIGHT
           
static String NR_MPP_LIMIT
           
static String NR_MPP_PENALTY_LIMIT
           
static String NR_POTENTIAL_CONFLICTS_WEIGHT
           
static String NR_STUDENT_CONF_WEIGHT
           
static String NR_THRESHOLD_KOEF
           
static String RW_SELECTION_PROB
           
static String SPREAD_WEIGHT
           
static String SUM_CONSTR_PREFERENCE_WEIGHT
           
static String SUM_ROOM_PREFERENCE_WEIGHT
           
static String SUM_TIME_PREFERENCE_WEIGHT
           
static String TABU_LENGTH
           
static String TOO_BIG_ROOM_WEIGHT
           
static String USELESS_SLOTS_WEIGHT
           
static String WEIGHTED_CONFLICTS_WEIGHT
           
 
Constructor Summary
PlacementSelection(DataProperties properties)
           
 
Method Summary
 boolean containsItselfSingletonOrCommited(TimetableModel model, Collection values, Value selectedValue)
           
 double getCost(PlacementSelection.ParamRetriever paramRetriever, int level, Double flt)
           
 PlacementSelection.ParamRetriever getParameters(Solution solution, Lecture lecture, Placement placement)
           
 PerturbationsCounter getPerturbationsCounter()
           
 void init(Solver solver)
          Initialization
 Value selectValue(Solution solution, Variable selectedVariable)
          Value selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOOD_SELECTION_PROB

public static final String GOOD_SELECTION_PROB
See Also:
Constant Field Values

RW_SELECTION_PROB

public static final String RW_SELECTION_PROB
See Also:
Constant Field Values

INITIAL_SELECTION_PROB

public static final String INITIAL_SELECTION_PROB
See Also:
Constant Field Values

NR_MPP_LIMIT

public static final String NR_MPP_LIMIT
See Also:
Constant Field Values

NR_MPP_PENALTY_LIMIT

public static final String NR_MPP_PENALTY_LIMIT
See Also:
Constant Field Values

NR_CONFLICTS_WEIGHT

public static final String NR_CONFLICTS_WEIGHT
See Also:
Constant Field Values

NR_POTENTIAL_CONFLICTS_WEIGHT

public static final String NR_POTENTIAL_CONFLICTS_WEIGHT
See Also:
Constant Field Values

WEIGHTED_CONFLICTS_WEIGHT

public static final String WEIGHTED_CONFLICTS_WEIGHT
See Also:
Constant Field Values

DELTA_TIME_PREFERENCE_WEIGHT

public static final String DELTA_TIME_PREFERENCE_WEIGHT
See Also:
Constant Field Values

DELTA_INITIAL_ASSIGNMENT_WEIGHT

public static final String DELTA_INITIAL_ASSIGNMENT_WEIGHT
See Also:
Constant Field Values

NR_STUDENT_CONF_WEIGHT

public static final String NR_STUDENT_CONF_WEIGHT
See Also:
Constant Field Values

NR_HARD_STUDENT_CONF_WEIGHT

public static final String NR_HARD_STUDENT_CONF_WEIGHT
See Also:
Constant Field Values

NR_COMMITED_STUDENT_CONF_WEIGHT

public static final String NR_COMMITED_STUDENT_CONF_WEIGHT
See Also:
Constant Field Values

USELESS_SLOTS_WEIGHT

public static final String USELESS_SLOTS_WEIGHT
See Also:
Constant Field Values

SUM_CONSTR_PREFERENCE_WEIGHT

public static final String SUM_CONSTR_PREFERENCE_WEIGHT
See Also:
Constant Field Values

SUM_ROOM_PREFERENCE_WEIGHT

public static final String SUM_ROOM_PREFERENCE_WEIGHT
See Also:
Constant Field Values

SUM_TIME_PREFERENCE_WEIGHT

public static final String SUM_TIME_PREFERENCE_WEIGHT
See Also:
Constant Field Values

NR_ASSIGNMENTS_WEIGHT

public static final String NR_ASSIGNMENTS_WEIGHT
See Also:
Constant Field Values

NR_THRESHOLD_KOEF

public static final String NR_THRESHOLD_KOEF
See Also:
Constant Field Values

TOO_BIG_ROOM_WEIGHT

public static final String TOO_BIG_ROOM_WEIGHT
See Also:
Constant Field Values

DEPT_SPREAD_WEIGHT

public static final String DEPT_SPREAD_WEIGHT
See Also:
Constant Field Values

DISTANCE_INSTRUCTOR_PREFERENCE_WEIGHT

public static final String DISTANCE_INSTRUCTOR_PREFERENCE_WEIGHT
See Also:
Constant Field Values

SPREAD_WEIGHT

public static final String SPREAD_WEIGHT
See Also:
Constant Field Values

TABU_LENGTH

public static final String TABU_LENGTH
See Also:
Constant Field Values
Constructor Detail

PlacementSelection

public PlacementSelection(DataProperties properties)
Method Detail

init

public void init(Solver solver)
Description copied from interface: ValueSelection
Initialization

Specified by:
init in interface ValueSelection

selectValue

public Value selectValue(Solution solution,
                         Variable selectedVariable)
Description copied from interface: ValueSelection
Value selection

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

containsItselfSingletonOrCommited

public boolean containsItselfSingletonOrCommited(TimetableModel model,
                                                 Collection values,
                                                 Value selectedValue)

getParameters

public PlacementSelection.ParamRetriever getParameters(Solution solution,
                                                       Lecture lecture,
                                                       Placement placement)

getCost

public double getCost(PlacementSelection.ParamRetriever paramRetriever,
                      int level,
                      Double flt)

getPerturbationsCounter

public PerturbationsCounter getPerturbationsCounter()