Skip to content

Commit f601a38

Browse files
isPANNclaude
andcommitted
Fix incorrect expected value in zero-length-task test (#472 review)
The relaxed-validator test asserted Min(14) but the actual weighted completion time for lengths [0,1,3], weights [3,5,1], schedule [0,1,2] is 3*0 + 5*1 + 1*4 = 9. Surfaced during structural review of #472. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1dce707 commit f601a38

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/unit_tests/models/misc/sequencing_to_minimize_weighted_completion_time.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ fn test_sequencing_to_minimize_weighted_completion_time_zero_length_task() {
147147
SequencingToMinimizeWeightedCompletionTime::new(vec![0, 1, 3], vec![3, 5, 1], vec![]);
148148

149149
assert_eq!(problem.lengths(), &[0, 1, 3]);
150-
assert_eq!(problem.evaluate(&[0, 0, 0]), Min(Some(14)));
150+
// Lehmer [0,0,0] decodes to schedule [0,1,2]; C = [0, 1, 4]; weighted sum
151+
// = 3*0 + 5*1 + 1*4 = 9.
152+
assert_eq!(problem.evaluate(&[0, 0, 0]), Min(Some(9)));
151153
}
152154

153155
#[test]

0 commit comments

Comments
 (0)