-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch Student Scheduling: Standard Selection (IFS)
- in the enrollment selection, allow to only select values with conflicts that can be unassigned (passing the AssignmentCheck interface from StandardSelection and CriticalStandardSelection who already implement the canUnassign method) - Standard Selection: added ability to only select neighbors that are not worsening the total value (when Neighbour.StandardCanWorsen is set to false, default to true) - Critical Standard Selection: always only select neighbors that are not worsening the total value
- Loading branch information
1 parent
84de73e
commit edf1e54
Showing
4 changed files
with
111 additions
and
15 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/org/cpsolver/studentsct/heuristics/AssignmentCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.cpsolver.studentsct.heuristics; | ||
|
||
import org.cpsolver.ifs.assignment.Assignment; | ||
import org.cpsolver.ifs.model.Value; | ||
import org.cpsolver.ifs.model.Variable; | ||
|
||
/** | ||
* Simple interface providing an assignment check for the {@link EnrollmentSelection}. | ||
* | ||
* @version StudentSct 1.3 (Student Sectioning)<br> | ||
* Copyright (C) 2007 - 2014 Tomas Muller<br> | ||
* <a href="mailto:muller@unitime.org">muller@unitime.org</a><br> | ||
* <a href="http://muller.unitime.org">http://muller.unitime.org</a><br> | ||
* <br> | ||
* 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. <br> | ||
* <br> | ||
* 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. <br> | ||
* <br> | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not see | ||
* <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>. | ||
*/ | ||
public interface AssignmentCheck<V extends Variable<V, T>, T extends Value<V, T>> { | ||
|
||
/** | ||
* Check whether the given conflict can be unassigned | ||
* @param value value to be assigned | ||
* @param conflict conflicting value | ||
* @param assignment current assignment | ||
* @return true if the conflict can be unassigned due to the given value | ||
*/ | ||
public boolean canUnassign(T value, T conflict, Assignment<V, T> assignment); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters