summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-06-24 21:35:06 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-07-05 16:58:31 +0200
commit12e092b414208ba4342f20fe190681d73d9c6ff9 (patch)
tree3fb32cc62786da619d924bbe00f6d8c31f480c03
parent19ff1064c84f1e5e5081ff624b3abd5e6ad99367 (diff)
tdf#43388: add missing info for Evolutionary Algorithm Solver
Add SolverConstraintOperator.INTEGER_value case and in the same time the also missing SolverConstraintOperator.BINARY_value case Change-Id: I18b826e74a2381dedaea3090919118b8d5dad072 Reviewed-on: https://gerrit.libreoffice.org/56359 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 02a66f29fec36aed5fb1e800a08c1390d3674b59) Reviewed-on: https://gerrit.libreoffice.org/56435 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
index 701e6ba63226..c0b10c2f4951 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
@@ -105,6 +105,12 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
case SolverConstraintOperator.LESS_EQUAL_value:
setDefaultYAt(i + 1, BasicBound.MINDOUBLE, constraint.Data);
break;
+ case SolverConstraintOperator.INTEGER_value:
+ setDefaultYAt(i + 1, BasicBound.MINDOUBLE, BasicBound.MAXDOUBLE);
+ break;
+ case SolverConstraintOperator.BINARY_value:
+ setDefaultYAt(i + 1, 0, 1);
+ break;
}
}