diff options
author | 2023-08-07 12:59:35 +0200 | |
---|---|---|
committer | 2023-08-07 15:12:37 +0200 | |
commit | a20fd33c647d8511762f84436dbd8d1632b57fe8 (patch) | |
tree | f28113c37476cca869a3283cd57d81de605b06e7 /subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java | |
parent | Update exploration strategies (diff) | |
download | refinery-a20fd33c647d8511762f84436dbd8d1632b57fe8.tar.gz refinery-a20fd33c647d8511762f84436dbd8d1632b57fe8.tar.zst refinery-a20fd33c647d8511762f84436dbd8d1632b57fe8.zip |
Clean up design space exploration
Diffstat (limited to 'subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java')
-rw-r--r-- | subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java index 4e5cc467..1329480c 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java | |||
@@ -43,7 +43,6 @@ public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExploration | |||
43 | private ObjectiveComparatorHelper objectiveComparatorHelper; | 43 | private ObjectiveComparatorHelper objectiveComparatorHelper; |
44 | private List<Version> trajectory = new ArrayList<>(); | 44 | private List<Version> trajectory = new ArrayList<>(); |
45 | private Map<Version, Version> parents = new HashMap<>(); | 45 | private Map<Version, Version> parents = new HashMap<>(); |
46 | private Fitness lastFitness; | ||
47 | private final List<Version> solutions = new ArrayList<>(); | 46 | private final List<Version> solutions = new ArrayList<>(); |
48 | private Map<Version, List<Activation>> statesAndTraversedActivations; | 47 | private Map<Version, List<Activation>> statesAndTraversedActivations; |
49 | private Random random = new Random(); | 48 | private Random random = new Random(); |
@@ -184,9 +183,7 @@ public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExploration | |||
184 | 183 | ||
185 | @Override | 184 | @Override |
186 | public Fitness getFitness() { | 185 | public Fitness getFitness() { |
187 | var result = fitnessCache.computeIfAbsent(model.getState(), s -> calculateFitness()); | 186 | return fitnessCache.computeIfAbsent(model.getState(), s -> calculateFitness()); |
188 | lastFitness = result; | ||
189 | return result; | ||
190 | } | 187 | } |
191 | 188 | ||
192 | private Fitness calculateFitness() { | 189 | private Fitness calculateFitness() { |
@@ -201,8 +198,6 @@ public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExploration | |||
201 | } | 198 | } |
202 | result.setSatisfiesHardObjectives(satisfiesHardObjectives); | 199 | result.setSatisfiesHardObjectives(satisfiesHardObjectives); |
203 | 200 | ||
204 | lastFitness = result; | ||
205 | |||
206 | return result; | 201 | return result; |
207 | } | 202 | } |
208 | 203 | ||