diff --git a/CHANGELOG.md b/CHANGELOG.md index 7713dd2b..753e2437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fixed double comparison in SolutionCostPair.compareTo(SolutionCostPair). * Added missing equals and hashCode methods to SolutionCostPair. * Fixed end of line characters when writing weighted static scheduling instances to file. +* WeightedStaticScheduling: fixed constants that should be static fields. ### Dependencies diff --git a/src/main/java/org/cicirello/search/problems/scheduling/WeightedStaticScheduling.java b/src/main/java/org/cicirello/search/problems/scheduling/WeightedStaticScheduling.java index 80bcdd06..11560fb5 100644 --- a/src/main/java/org/cicirello/search/problems/scheduling/WeightedStaticScheduling.java +++ b/src/main/java/org/cicirello/search/problems/scheduling/WeightedStaticScheduling.java @@ -93,8 +93,8 @@ public final class WeightedStaticScheduling implements SingleMachineSchedulingPr private final int[] duedates; private final int[] weights; - private final int PROCESS_TIME_SPAN = MAX_PROCESS_TIME - MIN_PROCESS_TIME + 1; - private final int WEIGHT_SPAN = MAX_WEIGHT - MIN_WEIGHT + 1; + private static final int PROCESS_TIME_SPAN = MAX_PROCESS_TIME - MIN_PROCESS_TIME + 1; + private static final int WEIGHT_SPAN = MAX_WEIGHT - MIN_WEIGHT + 1; /** * Generates random single machine scheduling problem instances.