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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java index b9784c8a2ab3..58250089b02f 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java @@ -35,6 +35,7 @@ package net.adaptivebox.deps; import net.adaptivebox.deps.behavior.AbsGTBehavior; import net.adaptivebox.deps.behavior.DEGTBehavior; import net.adaptivebox.deps.behavior.PSGTBehavior; +import net.adaptivebox.global.RandomGenerator; import net.adaptivebox.goodness.IGoodnessCompareEngine; import net.adaptivebox.knowledge.ILibEngine; import net.adaptivebox.knowledge.Library; @@ -91,7 +92,7 @@ public class DEPSAgent implements ILibEngine { } private AbsGTBehavior getGTBehavior() { - if (Math.random() < switchP) { + if (RandomGenerator.doubleZeroOneRandom() < switchP) { return deGTBehavior; } else { return psGTBehavior; |