From 705a3b09f00e0f07b9fac641e4e2dd952d9aa95b Mon Sep 17 00:00:00 2001 From: "Vincent A. Cicirello" Date: Fri, 4 Aug 2023 15:41:00 -0400 Subject: [PATCH] Fixed constants that should be static fields --- CHANGELOG.md | 1 + .../search/problems/scheduling/WeightedStaticScheduling.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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.