Skip to content

Commit

Permalink
remove groupSizeHard1_6 - not working
Browse files Browse the repository at this point in the history
  • Loading branch information
UrszulaNeuman committed Jul 14, 2023
1 parent 60f4a9c commit b26cdf4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


.idea/
.vscode/
target/

.classpath
Expand Down
11 changes: 0 additions & 11 deletions src/main/resources/scheduling.drl
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ rule "groupSizeSoft"
scoreHolder.addSoftConstraintMatch(kcontext, -groupSoft*($total.intValue() * $total.intValue()));
end

rule "groupSizeHard1_6"
when
Facility($facility_name : name)
$total : Number(intValue < 1) from accumulate(
$a : Allocation(shift != null, shift.facility.name == $facility_name),
count($a)
)
then
scoreHolder.addHardConstraintMatch(kcontext, $total.intValue()-1);
end

rule "groupSizeHard"
when
Allocation($aid : ID, shift != null, $ashiftID : shift.ID, $studentsNumber : shift.getStudentsPerShift())
Expand Down
10 changes: 0 additions & 10 deletions src/test/java/uk/ac/diamond/ss/PlannerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ public void testSchedule() {
// initial weights
for (ConstraintMatchTotal constraintMatchTotal : guiScoreDirector
.getConstraintMatchTotals()) {
if (constraintMatchTotal.getConstraintName().equals(
"groupSizeHard1")) {
assertEquals(constraintMatchTotal.getWeightTotalAsNumber()
.intValue(), -1);
}
if (constraintMatchTotal.getConstraintName().equals(
"preferencesSoft")) {
assertEquals(constraintMatchTotal.getWeightTotalAsNumber()
Expand Down Expand Up @@ -167,11 +162,6 @@ public void testSchedule() {
guiScoreDirector.setWorkingSolution(ps);
for (ConstraintMatchTotal constraintMatchTotal : guiScoreDirector
.getConstraintMatchTotals()) {
if (constraintMatchTotal.getConstraintName().equals(
"groupSizeHard1")) {
assertEquals(constraintMatchTotal.getWeightTotalAsNumber()
.intValue(), 0);
}
if (constraintMatchTotal.getConstraintName().equals(
"preferencesSoft")) {
assertEquals(constraintMatchTotal.getWeightTotalAsNumber()
Expand Down

0 comments on commit b26cdf4

Please sign in to comment.