diff --git a/src/eva2/server/go/operators/mutation/MutateEAMixer.java b/src/eva2/server/go/operators/mutation/MutateEAMixer.java index 1644f1bc..aa0e7c13 100644 --- a/src/eva2/server/go/operators/mutation/MutateEAMixer.java +++ b/src/eva2/server/go/operators/mutation/MutateEAMixer.java @@ -49,6 +49,16 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable { this.m_Mutators.setWeightsLabel("Weigths"); } + + /** + * Create a mutation mixer with equal weights of the given mutation operators. + * @param mutators + */ + public MutateEAMixer(InterfaceMutation[] mutators) { + this.m_Mutators = new PropertyMutationMixer(mutators); + this.m_UseSelfAdaption = false; + } + public MutateEAMixer(MutateEAMixer mutator) { this.m_Mutators = (PropertyMutationMixer)mutator.m_Mutators.clone(); this.m_UseSelfAdaption = mutator.m_UseSelfAdaption; @@ -150,7 +160,7 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable { * @return description */ public static String globalInfo() { - return "This mmeta-mutation operator allows you to combine multiple alternative mutation operators."; + return "This meta-mutation operator allows you to combine multiple alternative mutation operators."; } /** Choose the set of mutators. diff --git a/src/eva2/server/go/problems/MatlabProblem.java b/src/eva2/server/go/problems/MatlabProblem.java index 19e886c4..043d1d47 100644 --- a/src/eva2/server/go/problems/MatlabProblem.java +++ b/src/eva2/server/go/problems/MatlabProblem.java @@ -52,6 +52,7 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf public MatlabProblem(MatlabProblem o) { // this.matlab = o.matlab; + this.m_Template=null; this.handler = o.handler; this.runnable = o.runnable; this.allowSingleRunnable = o.allowSingleRunnable; @@ -99,7 +100,7 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf ((InterfaceDataTypeDouble)this.m_Template).SetDoubleRange(range); } } else { - m_Template = new GAIndividualIntegerData(); + if (m_Template == null) m_Template = new GAIndividualIntegerData(); int intLen = 1+((getProblemDimension()-1)/32); int lastIntCodingBits = getProblemDimension()-((intLen-1)*32); if (lastIntCodingBits > 32) System.err.println("ERROR in MatlabProblem:initTemplate");