diff options
author | Todor Balabanov <todor.balabanov@gmail.com> | 2019-05-17 17:13:13 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-06-03 16:12:17 +0200 |
commit | a2720a24328fcee3bde431dc632c068b266228c9 (patch) | |
tree | 909c056356e75b5d5d7c0edcc3b5bfe23535be4b /nlpsolver | |
parent | 7f373a4c88961348f35e4f990182628488878efe (diff) |
Checking of min and max factor value was added.
It is possible user to swap these two values.
Change-Id: Ib375d705e42f7257aa9b16d72ab834020e401cde
Reviewed-on: https://gerrit.libreoffice.org/72483
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'nlpsolver')
-rw-r--r-- | nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java | 4 |
1 files changed, 2 insertions, 2 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 2e5c38d0d179..f152cf92d481 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java @@ -128,8 +128,8 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver agents[i].setPbest(m_library.getSelectedPoint(i)); DEGTBehavior deGTBehavior = new DEGTBehavior(); - deGTBehavior.MIN_FACTOR = m_minFactor.getValue(); - deGTBehavior.MAX_FACTOR = m_maxFactor.getValue(); + deGTBehavior.MIN_FACTOR = Math.min(m_minFactor.getValue(), m_maxFactor.getValue()); + deGTBehavior.MAX_FACTOR = Math.max(m_minFactor.getValue(), m_maxFactor.getValue()); deGTBehavior.CR = m_CR.getValue(); PSGTBehavior psGTBehavior = new PSGTBehavior(); |