summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java4
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java4
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java5
3 files changed, 13 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 c0b10c2f4951..c5724ca5461e 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
@@ -189,6 +189,10 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
protected void initializeSolve() {
super.initializeSolve();
+ if (m_variableCount == 0)
+ {
+ return;
+ }
if (m_enhancedSolverStatus.getValue())
m_solverStatusDialog = new EvolutionarySolverStatusUno(m_xContext);
else
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 f152cf92d481..aff425ba4e20 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java
@@ -119,6 +119,10 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
Logger.getLogger(DEPSSolverImpl.class.getName()).log(Level.SEVERE, null, ex);
}
initializeSolve();
+ if (m_problemEncoder == null)
+ {
+ return;
+ }
//Init:
DEPSAgent[] agents = new DEPSAgent[m_swarmSize.getValue()];
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
index cefe51006751..c1798606d4e6 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
@@ -90,6 +90,11 @@ public final class SCOSolverImpl extends BaseEvolutionarySolver
public void solve() {
initializeSolve();
+ if (m_problemEncoder == null)
+ {
+ return;
+ }
+
//Init:
int swarmSize = m_swarmSize.getValue();
SCAgent[] agents = new SCAgent[swarmSize];