net.sf.cpsolver.studentsct.weights
Interface StudentWeights

All Superinterfaces:
SolutionComparator<Request,Enrollment>
All Known Implementing Classes:
EqualStudentWeights, OriginalStudentWeights, PriorityStudentWeights

public interface StudentWeights
extends SolutionComparator<Request,Enrollment>

Interface to model various student weightings

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/.

Nested Class Summary
static class StudentWeights.Implementation
          Registered implementation
 
Method Summary
 double getBound(Request request)
          Return lower bound for the given request
 double getDistanceConflictWeight(DistanceConflict.Conflict distanceConflict)
          Return weight of a distance conflict
 double getTimeOverlapConflictWeight(Enrollment enrollment, TimeOverlapsCounter.Conflict timeOverlap)
          Return weight of a time overlapping conflict
 double getWeight(Enrollment enrollment)
          Return base weight of the given enrollment
 double getWeight(Enrollment enrollment, Set<DistanceConflict.Conflict> distanceConflicts, Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)
          Return weight of the given enrollment
 boolean isFreeTimeAllowOverlaps()
          Return true if free time requests allow overlaps
 
Methods inherited from interface net.sf.cpsolver.ifs.solution.SolutionComparator
isBetterThanBestSolution
 

Method Detail

getBound

double getBound(Request request)
Return lower bound for the given request

Parameters:
request - given request
Returns:
weight of the best value

getWeight

double getWeight(Enrollment enrollment)
Return base weight of the given enrollment

Parameters:
enrollment - given enrollment
Returns:
weight (higher weight means better value)

getWeight

double getWeight(Enrollment enrollment,
                 Set<DistanceConflict.Conflict> distanceConflicts,
                 Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)
Return weight of the given enrollment

Parameters:
enrollment - given enrollment
distanceConflicts - distance conflicts
timeOverlappingConflicts - time overlapping conflicts
Returns:
weight (higher weight means better value)

getDistanceConflictWeight

double getDistanceConflictWeight(DistanceConflict.Conflict distanceConflict)
Return weight of a distance conflict


getTimeOverlapConflictWeight

double getTimeOverlapConflictWeight(Enrollment enrollment,
                                    TimeOverlapsCounter.Conflict timeOverlap)
Return weight of a time overlapping conflict


isFreeTimeAllowOverlaps

boolean isFreeTimeAllowOverlaps()
Return true if free time requests allow overlaps



Copyright © 2014 UniTime LLC. All Rights Reserved.