diff options
Diffstat (limited to 'nlpsolver/ThirdParty/EvolutionarySolver/src')
8 files changed, 19 insertions, 19 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java index c9879c099e61..c40f2c1ec258 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java @@ -35,7 +35,7 @@ import net.adaptivebox.problem.*; import net.adaptivebox.space.*; public class DEGTBehavior extends AbsGTBehavior implements ILibEngine { - private int DVNum = 2; //Number of differential vectors, normally be 1 or 2 + private final int DVNum = 2; //Number of differential vectors, normally be 1 or 2 public double FACTOR = 0.5; //scale constant: (0, 1.2], normally be 0.5 public double CR = 0.9; //crossover constant: [0, 1], normally be 0.1 or 0.9 diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java index b61046d34d92..1ad1adefd08c 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java @@ -25,7 +25,7 @@ import net.adaptivebox.global.*; public class EvalElement { //The weight for each response (target) - private double weight = 1; + private final double weight = 1; /** * The expected range of the response value, forms the following objective: * diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java index ae8d4d130f8c..2d9f55fc2ac4 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java @@ -36,18 +36,18 @@ import net.adaptivebox.global.*; public class ACRComparator implements IGoodnessCompareEngine, IUpdateCycleEngine { - private Library socialPool; + private final Library socialPool; private double epsilon_t = 0; - private double RU = 0.75; - private double RL = 0.25; - private double BETAF = 0.618; - private double BETAL = 0.618; - private double BETAU = 1.382; + private final double RU = 0.75; + private final double RL = 0.25; + private final double BETAF = 0.618; + private final double BETAL = 0.618; + private final double BETAU = 1.382; - private double T = -1; + private final double T; - private double TthR = 0.5; + private final double TthR = 0.5; public ACRComparator(Library lib, int T) { socialPool = lib; diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java index 6b6574bcc081..d4c202c989fc 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java @@ -29,7 +29,7 @@ import net.adaptivebox.goodness.*; import net.adaptivebox.problem.*; public class Library { - private SearchPoint[] libPoints = new SearchPoint[0]; + private final SearchPoint[] libPoints; private int gIndex = -1; public Library(SearchPoint[] points){ diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java index ea37e1e5cd0b..dbd472f043e3 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java @@ -27,7 +27,7 @@ public class SearchPoint extends BasicPoint implements IEncodeEngine { //store the encode information for goodness evaluation //encodeInfo[0]: the sum of constraints (if it equals to 0, then be a feasible point) //encodeInfo[1]: the value of objective function - private double[] encodeInfo = new double[2]; + private final double[] encodeInfo = new double[2]; private double objectiveValue; public SearchPoint(int dim) { diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java index 603648e8428d..bc32c1c8d78b 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java @@ -33,14 +33,14 @@ import net.adaptivebox.knowledge.*; public abstract class ProblemEncoder { //Store the calculated results for the responses - private double[] tempResponseSet; //temp values - private double[] tempLocation; //temp values + private final double[] tempResponseSet; //temp values + private final double[] tempLocation; //temp values //the search space (S) - private DesignSpace designSpace = null; + private final DesignSpace designSpace; // For evaluate the response vector into encoded vector double[2] - private EvalStruct evalStruct = null; + private final EvalStruct evalStruct; protected ProblemEncoder(int paramNum, int targetNum) throws Exception { designSpace = new DesignSpace(paramNum); diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java index 2bebff6f7fda..b473ae0a3807 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java @@ -48,9 +48,9 @@ public class SCAgent { private IGoodnessCompareEngine specComparator; //the coefficients of SCAgent - private int TaoB = 2; + private final int TaoB = 2; //The early version set TaoW as the size of external library (NL), but 4 is often enough - private int TaoW = 4; + private final int TaoW = 4; //The referred external library private Library externalLib; diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java index 1cf1b8592a44..a590a69742f7 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java @@ -22,7 +22,7 @@ package net.adaptivebox.space; public class BasicPoint implements Cloneable, ILocationEngine { //store the location information in the search space (S) - private double[] location; + private final double[] location; public BasicPoint(int dim) { location = new double[dim]; |