diff options
Diffstat (limited to 'nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java')
-rw-r--r-- | nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java index ae718e63519b..3a08df39f5e7 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java @@ -72,7 +72,8 @@ public class DEPSAgent { private double switchP = 0.5; - public DEPSAgent(ProblemEncoder encoder, DEGTBehavior deGTBehavior, PSGTBehavior psGTBehavior, double switchP, IGoodnessCompareEngine comparer) { + public DEPSAgent(ProblemEncoder encoder, DEGTBehavior deGTBehavior, PSGTBehavior psGTBehavior, + double switchP, IGoodnessCompareEngine comparer, SearchPoint pbest) { this.switchP = switchP; problemEncoder = encoder; @@ -82,6 +83,7 @@ public class DEPSAgent { trailPoint = problemEncoder.getFreshSearchPoint(); pold_t = problemEncoder.getFreshSearchPoint(); pcurrent_t = problemEncoder.getFreshSearchPoint(); + pbest_t = pbest; this.deGTBehavior = deGTBehavior; this.deGTBehavior.setMemPoints(pbest_t, pcurrent_t, pold_t); @@ -94,12 +96,6 @@ public class DEPSAgent { qualityComparator = comparer; } - public void setPbest(SearchPoint pbest) { - pbest_t = pbest; - deGTBehavior.setPbest(pbest_t); - psGTBehavior.setPbest(pbest_t); - } - private AbsGTBehavior getGTBehavior() { if (RandomGenerator.doubleZeroOneRandom() < switchP) { return deGTBehavior; |