summaryrefslogtreecommitdiff
path: root/nlpsolver/src/com
diff options
context:
space:
mode:
authorTodor Balabanov <todor.balabanov@gmail.com>2019-05-15 19:54:21 +0300
committerTomaž Vajngerl <quikee@gmail.com>2019-06-03 15:53:30 +0200
commit90ace7be71d41257e29a28fa2e7c0adf8f84050d (patch)
tree2e7fee4022c5ae79c42f65a82f09f5630ae31b98 /nlpsolver/src/com
parent7bf2515fc48ed0d4c436aef298fa9c35e573352b (diff)
Range for DE scaling factor was implemented.
Change-Id: I5b8d3cd69a6138d7eebf37c299626019b32d639a Reviewed-on: https://gerrit.libreoffice.org/72373 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'nlpsolver/src/com')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java
index 716a79b79438..2e5c38d0d179 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java
@@ -59,7 +59,8 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
super(context, "DEPS Evolutionary Algorithm");
registerProperty(m_agentSwitchRate);
- registerProperty(m_factor);
+ registerProperty(m_minFactor);
+ registerProperty(m_maxFactor);
registerProperty(m_CR);
registerProperty(m_c1);
registerProperty(m_c2);
@@ -102,7 +103,8 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
private final PropertyInfo<Double> m_agentSwitchRate = new PropertyInfo<Double>("AgentSwitchRate", 0.5, "Agent Switch Rate (DE Probability)");
// --DE
- private final PropertyInfo<Double> m_factor = new PropertyInfo<Double>("DEFactor", 0.5, "DE: Scaling Factor (0-1.2)");
+ private final PropertyInfo<Double> m_minFactor = new PropertyInfo<Double>("DEFactorMin", 0.5, "DE: Min Scaling Factor (0-1.2)");
+ private final PropertyInfo<Double> m_maxFactor = new PropertyInfo<Double>("DEFactorMax", 0.5, "DE: Max Scaling Factor (0-1.2)");
private final PropertyInfo<Double> m_CR = new PropertyInfo<Double>("DECR", 0.9, "DE: Crossover Probability (0-1)");
// --PS
private final PropertyInfo<Double> m_c1 = new PropertyInfo<Double>("PSC1", 1.494, "PS: Cognitive Constant");
@@ -126,7 +128,8 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
agents[i].setPbest(m_library.getSelectedPoint(i));
DEGTBehavior deGTBehavior = new DEGTBehavior();
- deGTBehavior.FACTOR = m_factor.getValue();
+ deGTBehavior.MIN_FACTOR = m_minFactor.getValue();
+ deGTBehavior.MAX_FACTOR = m_maxFactor.getValue();
deGTBehavior.CR = m_CR.getValue();
PSGTBehavior psGTBehavior = new PSGTBehavior();