1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using System.Collections.ObjectModel;
|
---|
25 | using System.Drawing;
|
---|
26 | using System.Linq;
|
---|
27 | using HeuristicLab.Common;
|
---|
28 | using HeuristicLab.Core;
|
---|
29 | using HeuristicLab.Data;
|
---|
30 | using HeuristicLab.Encodings.RealVectorEncoding;
|
---|
31 | using HeuristicLab.Optimization;
|
---|
32 | using HeuristicLab.Parameters;
|
---|
33 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
34 | using HeuristicLab.PluginInfrastructure;
|
---|
35 |
|
---|
36 | namespace HeuristicLab.Problems.TestFunctions {
|
---|
37 | [Item("Single Objective Test Function", "Test function with real valued inputs and a single objective.")]
|
---|
38 | [StorableClass]
|
---|
39 | [Creatable("Problems")]
|
---|
40 | public sealed class SingleObjectiveTestFunctionProblem : ParameterizedNamedItem, ISingleObjectiveProblem {
|
---|
41 | [Storable]
|
---|
42 | private StrategyVectorCreator strategyVectorCreator;
|
---|
43 | [Storable]
|
---|
44 | private StrategyVectorCrossover strategyVectorCrossover;
|
---|
45 | [Storable]
|
---|
46 | private StrategyVectorManipulator strategyVectorManipulator;
|
---|
47 |
|
---|
48 | public override Image ItemImage {
|
---|
49 | get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
|
---|
50 | }
|
---|
51 |
|
---|
52 | #region Parameter Properties
|
---|
53 | public ValueParameter<BoolValue> MaximizationParameter {
|
---|
54 | get { return (ValueParameter<BoolValue>)Parameters["Maximization"]; }
|
---|
55 | }
|
---|
56 | IParameter ISingleObjectiveProblem.MaximizationParameter {
|
---|
57 | get { return MaximizationParameter; }
|
---|
58 | }
|
---|
59 | public ValueParameter<DoubleMatrix> BoundsParameter {
|
---|
60 | get { return (ValueParameter<DoubleMatrix>)Parameters["Bounds"]; }
|
---|
61 | }
|
---|
62 | public ValueParameter<IntValue> ProblemSizeParameter {
|
---|
63 | get { return (ValueParameter<IntValue>)Parameters["ProblemSize"]; }
|
---|
64 | }
|
---|
65 | public ValueParameter<IRealVectorCreator> SolutionCreatorParameter {
|
---|
66 | get { return (ValueParameter<IRealVectorCreator>)Parameters["SolutionCreator"]; }
|
---|
67 | }
|
---|
68 | IParameter IProblem.SolutionCreatorParameter {
|
---|
69 | get { return SolutionCreatorParameter; }
|
---|
70 | }
|
---|
71 | public ValueParameter<ISingleObjectiveTestFunctionProblemEvaluator> EvaluatorParameter {
|
---|
72 | get { return (ValueParameter<ISingleObjectiveTestFunctionProblemEvaluator>)Parameters["Evaluator"]; }
|
---|
73 | }
|
---|
74 | IParameter IProblem.EvaluatorParameter {
|
---|
75 | get { return EvaluatorParameter; }
|
---|
76 | }
|
---|
77 | public OptionalValueParameter<ISingleObjectiveTestFunctionProblemSolutionsVisualizer> VisualizerParameter {
|
---|
78 | get { return (OptionalValueParameter<ISingleObjectiveTestFunctionProblemSolutionsVisualizer>)Parameters["Visualizer"]; }
|
---|
79 | }
|
---|
80 | IParameter IProblem.VisualizerParameter {
|
---|
81 | get { return VisualizerParameter; }
|
---|
82 | }
|
---|
83 | public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
|
---|
84 | get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
|
---|
85 | }
|
---|
86 | IParameter ISingleObjectiveProblem.BestKnownQualityParameter {
|
---|
87 | get { return BestKnownQualityParameter; }
|
---|
88 | }
|
---|
89 | #endregion
|
---|
90 |
|
---|
91 | #region Properties
|
---|
92 | public BoolValue Maximization {
|
---|
93 | get { return MaximizationParameter.Value; }
|
---|
94 | set { MaximizationParameter.Value = value; }
|
---|
95 | }
|
---|
96 | public DoubleMatrix Bounds {
|
---|
97 | get { return BoundsParameter.Value; }
|
---|
98 | set { BoundsParameter.Value = value; }
|
---|
99 | }
|
---|
100 | public IntValue ProblemSize {
|
---|
101 | get { return ProblemSizeParameter.Value; }
|
---|
102 | set { ProblemSizeParameter.Value = value; }
|
---|
103 | }
|
---|
104 | public IRealVectorCreator SolutionCreator {
|
---|
105 | get { return SolutionCreatorParameter.Value; }
|
---|
106 | set { SolutionCreatorParameter.Value = value; }
|
---|
107 | }
|
---|
108 | ISolutionCreator IProblem.SolutionCreator {
|
---|
109 | get { return SolutionCreatorParameter.Value; }
|
---|
110 | }
|
---|
111 | public ISingleObjectiveTestFunctionProblemEvaluator Evaluator {
|
---|
112 | get { return EvaluatorParameter.Value; }
|
---|
113 | set { EvaluatorParameter.Value = value; }
|
---|
114 | }
|
---|
115 | ISingleObjectiveEvaluator ISingleObjectiveProblem.Evaluator {
|
---|
116 | get { return EvaluatorParameter.Value; }
|
---|
117 | }
|
---|
118 | IEvaluator IProblem.Evaluator {
|
---|
119 | get { return EvaluatorParameter.Value; }
|
---|
120 | }
|
---|
121 | public ISingleObjectiveTestFunctionProblemSolutionsVisualizer Visualizer {
|
---|
122 | get { return VisualizerParameter.Value; }
|
---|
123 | set { VisualizerParameter.Value = value; }
|
---|
124 | }
|
---|
125 | ISolutionsVisualizer IProblem.Visualizer {
|
---|
126 | get { return VisualizerParameter.Value; }
|
---|
127 | }
|
---|
128 | public DoubleValue BestKnownQuality {
|
---|
129 | get { return BestKnownQualityParameter.Value; }
|
---|
130 | set { BestKnownQualityParameter.Value = value; }
|
---|
131 | }
|
---|
132 | private List<IOperator> operators;
|
---|
133 | public IEnumerable<IOperator> Operators {
|
---|
134 | get { return operators; }
|
---|
135 | }
|
---|
136 | #endregion
|
---|
137 |
|
---|
138 | [StorableConstructor]
|
---|
139 | private SingleObjectiveTestFunctionProblem(bool deserializing) : base() { }
|
---|
140 | public SingleObjectiveTestFunctionProblem()
|
---|
141 | : base() {
|
---|
142 | UniformRandomRealVectorCreator creator = new UniformRandomRealVectorCreator();
|
---|
143 | AckleyEvaluator evaluator = new AckleyEvaluator();
|
---|
144 |
|
---|
145 | Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as most test functions are minimization problems.", new BoolValue(evaluator.Maximization)));
|
---|
146 | Parameters.Add(new ValueParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension.", evaluator.Bounds));
|
---|
147 | Parameters.Add(new ValueParameter<IntValue>("ProblemSize", "The dimension of the problem.", new IntValue(2)));
|
---|
148 | Parameters.Add(new ValueParameter<IRealVectorCreator>("SolutionCreator", "The operator which should be used to create new TSP solutions.", creator));
|
---|
149 | Parameters.Add(new ValueParameter<ISingleObjectiveTestFunctionProblemEvaluator>("Evaluator", "The operator which should be used to evaluate TSP solutions.", evaluator));
|
---|
150 | Parameters.Add(new OptionalValueParameter<ISingleObjectiveTestFunctionProblemSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize TSP solutions."));
|
---|
151 | Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance.", new DoubleValue(evaluator.BestKnownQuality)));
|
---|
152 |
|
---|
153 | strategyVectorCreator = new StrategyVectorCreator();
|
---|
154 | strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
|
---|
155 | strategyVectorCrossover = new StrategyVectorCrossover();
|
---|
156 | strategyVectorManipulator = new StrategyVectorManipulator();
|
---|
157 |
|
---|
158 | creator.RealVectorParameter.ActualName = "Point";
|
---|
159 | ParameterizeSolutionCreator();
|
---|
160 | ParameterizeEvaluator();
|
---|
161 | ParameterizeVisualizer();
|
---|
162 |
|
---|
163 | Initialize();
|
---|
164 | }
|
---|
165 |
|
---|
166 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
167 | SingleObjectiveTestFunctionProblem clone = (SingleObjectiveTestFunctionProblem)base.Clone(cloner);
|
---|
168 | clone.Initialize();
|
---|
169 | return clone;
|
---|
170 | }
|
---|
171 |
|
---|
172 | #region Events
|
---|
173 | public event EventHandler SolutionCreatorChanged;
|
---|
174 | private void OnSolutionCreatorChanged() {
|
---|
175 | if (SolutionCreatorChanged != null)
|
---|
176 | SolutionCreatorChanged(this, EventArgs.Empty);
|
---|
177 | }
|
---|
178 | public event EventHandler EvaluatorChanged;
|
---|
179 | private void OnEvaluatorChanged() {
|
---|
180 | if (EvaluatorChanged != null)
|
---|
181 | EvaluatorChanged(this, EventArgs.Empty);
|
---|
182 | }
|
---|
183 | public event EventHandler VisualizerChanged;
|
---|
184 | private void OnVisualizerChanged() {
|
---|
185 | if (VisualizerChanged != null)
|
---|
186 | VisualizerChanged(this, EventArgs.Empty);
|
---|
187 | }
|
---|
188 | public event EventHandler OperatorsChanged;
|
---|
189 | private void OnOperatorsChanged() {
|
---|
190 | if (OperatorsChanged != null)
|
---|
191 | OperatorsChanged(this, EventArgs.Empty);
|
---|
192 | }
|
---|
193 | private void ProblemSizeParameter_ValueChanged(object sender, EventArgs e) {
|
---|
194 | ProblemSize.ValueChanged += new EventHandler(ProblemSize_ValueChanged);
|
---|
195 | ProblemSize_ValueChanged(null, EventArgs.Empty);
|
---|
196 | }
|
---|
197 | private void ProblemSize_ValueChanged(object sender, EventArgs e) {
|
---|
198 | if (ProblemSize.Value < 1) ProblemSize.Value = 1;
|
---|
199 | ParameterizeSolutionCreator();
|
---|
200 | strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize.Value));
|
---|
201 | strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize.Value)));
|
---|
202 | }
|
---|
203 | private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
|
---|
204 | ParameterizeSolutionCreator();
|
---|
205 | SolutionCreator_RealVectorParameter_ActualNameChanged(null, EventArgs.Empty);
|
---|
206 | }
|
---|
207 | private void SolutionCreator_RealVectorParameter_ActualNameChanged(object sender, EventArgs e) {
|
---|
208 | ParameterizeEvaluator();
|
---|
209 | ParameterizeOperators();
|
---|
210 | ParameterizeVisualizer();
|
---|
211 | }
|
---|
212 | private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
|
---|
213 | ParameterizeEvaluator();
|
---|
214 | UpdateMoveEvaluators();
|
---|
215 | Maximization.Value = Evaluator.Maximization;
|
---|
216 | BoundsParameter.Value = Evaluator.Bounds;
|
---|
217 | if (ProblemSize.Value < Evaluator.MinimumProblemSize)
|
---|
218 | ProblemSize.Value = Evaluator.MinimumProblemSize;
|
---|
219 | else if (ProblemSize.Value > Evaluator.MaximumProblemSize)
|
---|
220 | ProblemSize.Value = Evaluator.MaximumProblemSize;
|
---|
221 | BestKnownQuality = new DoubleValue(Evaluator.BestKnownQuality);
|
---|
222 | Evaluator_QualityParameter_ActualNameChanged(null, EventArgs.Empty);
|
---|
223 | }
|
---|
224 | private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
|
---|
225 | ParameterizeOperators();
|
---|
226 | }
|
---|
227 | private void VisualizerParameter_ValueChanged(object sender, EventArgs e) {
|
---|
228 | ParameterizeVisualizer();
|
---|
229 | }
|
---|
230 | private void BoundsParameter_ValueChanged(object sender, EventArgs e) {
|
---|
231 | Bounds.ToStringChanged += new EventHandler(Bounds_ToStringChanged);
|
---|
232 | Bounds_ToStringChanged(null, EventArgs.Empty);
|
---|
233 | }
|
---|
234 | private void Bounds_ToStringChanged(object sender, EventArgs e) {
|
---|
235 | if (Bounds.Columns != 2 || Bounds.Rows < 1)
|
---|
236 | Bounds = new DoubleMatrix(1, 2);
|
---|
237 | }
|
---|
238 | private void Bounds_ItemChanged(object sender, EventArgs<int, int> e) {
|
---|
239 | if (e.Value2 == 0 && Bounds[e.Value, 1] <= Bounds[e.Value, 0])
|
---|
240 | Bounds[e.Value, 1] = Bounds[e.Value, 0] + 0.1;
|
---|
241 | if (e.Value2 == 1 && Bounds[e.Value, 0] >= Bounds[e.Value, 1])
|
---|
242 | Bounds[e.Value, 0] = Bounds[e.Value, 1] - 0.1;
|
---|
243 | }
|
---|
244 | private void MoveGenerator_AdditiveMoveParameter_ActualNameChanged(object sender, EventArgs e) {
|
---|
245 | string name = ((ILookupParameter<AdditiveMove>)sender).ActualName;
|
---|
246 | foreach (IAdditiveRealVectorMoveOperator op in Operators.OfType<IAdditiveRealVectorMoveOperator>()) {
|
---|
247 | op.AdditiveMoveParameter.ActualName = name;
|
---|
248 | }
|
---|
249 | }
|
---|
250 | private void SphereEvaluator_Parameter_ValueChanged(object sender, EventArgs e) {
|
---|
251 | SphereEvaluator eval = (Evaluator as SphereEvaluator);
|
---|
252 | if (eval != null) {
|
---|
253 | foreach (ISphereMoveEvaluator op in Operators.OfType<ISphereMoveEvaluator>()) {
|
---|
254 | op.C = eval.C;
|
---|
255 | op.Alpha = eval.Alpha;
|
---|
256 | }
|
---|
257 | }
|
---|
258 | }
|
---|
259 | private void RastriginEvaluator_Parameter_ValueChanged(object sender, EventArgs e) {
|
---|
260 | RastriginEvaluator eval = (Evaluator as RastriginEvaluator);
|
---|
261 | if (eval != null) {
|
---|
262 | foreach (IRastriginMoveEvaluator op in Operators.OfType<IRastriginMoveEvaluator>()) {
|
---|
263 | op.A = eval.A;
|
---|
264 | }
|
---|
265 | }
|
---|
266 | }
|
---|
267 | private void strategyVectorCreator_BoundsParameter_ValueChanged(object sender, EventArgs e) {
|
---|
268 | strategyVectorManipulator.BoundsParameter.Value = strategyVectorCreator.BoundsParameter.Value;
|
---|
269 | }
|
---|
270 | private void strategyVectorCreator_StrategyParameterParameter_ActualNameChanged(object sender, EventArgs e) {
|
---|
271 | string name = strategyVectorCreator.StrategyParameterParameter.ActualName;
|
---|
272 | strategyVectorCrossover.ParentsParameter.ActualName = name;
|
---|
273 | strategyVectorCrossover.StrategyParameterParameter.ActualName = name;
|
---|
274 | strategyVectorManipulator.StrategyParameterParameter.ActualName = name;
|
---|
275 | }
|
---|
276 | #endregion
|
---|
277 |
|
---|
278 | #region Helpers
|
---|
279 | [StorableHook(HookType.AfterDeserialization)]
|
---|
280 | private void Initialize() {
|
---|
281 | InitializeOperators();
|
---|
282 | ProblemSizeParameter.ValueChanged += new EventHandler(ProblemSizeParameter_ValueChanged);
|
---|
283 | ProblemSize.ValueChanged += new EventHandler(ProblemSize_ValueChanged);
|
---|
284 | BoundsParameter.ValueChanged += new EventHandler(BoundsParameter_ValueChanged);
|
---|
285 | Bounds.ToStringChanged += new EventHandler(Bounds_ToStringChanged);
|
---|
286 | Bounds.ItemChanged += new EventHandler<EventArgs<int, int>>(Bounds_ItemChanged);
|
---|
287 | SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
|
---|
288 | SolutionCreator.RealVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_RealVectorParameter_ActualNameChanged);
|
---|
289 | EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
|
---|
290 | Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
|
---|
291 | VisualizerParameter.ValueChanged += new EventHandler(VisualizerParameter_ValueChanged);
|
---|
292 | strategyVectorCreator.BoundsParameter.ValueChanged += new EventHandler(strategyVectorCreator_BoundsParameter_ValueChanged);
|
---|
293 | strategyVectorCreator.StrategyParameterParameter.ActualNameChanged += new EventHandler(strategyVectorCreator_StrategyParameterParameter_ActualNameChanged);
|
---|
294 | }
|
---|
295 | private void InitializeOperators() {
|
---|
296 | operators = new List<IOperator>();
|
---|
297 | operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
|
---|
298 | operators.Add(strategyVectorCreator);
|
---|
299 | operators.Add(strategyVectorCrossover);
|
---|
300 | operators.Add(strategyVectorManipulator);
|
---|
301 | UpdateMoveEvaluators();
|
---|
302 | ParameterizeOperators();
|
---|
303 | InitializeMoveGenerators();
|
---|
304 | }
|
---|
305 | private void InitializeMoveGenerators() {
|
---|
306 | foreach (IAdditiveRealVectorMoveOperator op in Operators.OfType<IAdditiveRealVectorMoveOperator>()) {
|
---|
307 | if (op is IMoveGenerator) {
|
---|
308 | op.AdditiveMoveParameter.ActualNameChanged += new EventHandler(MoveGenerator_AdditiveMoveParameter_ActualNameChanged);
|
---|
309 | }
|
---|
310 | }
|
---|
311 | }
|
---|
312 | private void UpdateMoveEvaluators() {
|
---|
313 | foreach (ISingleObjectiveTestFunctionMoveEvaluator op in Operators.OfType<ISingleObjectiveTestFunctionMoveEvaluator>().ToList())
|
---|
314 | operators.Remove(op);
|
---|
315 | foreach (ISingleObjectiveTestFunctionMoveEvaluator op in ApplicationManager.Manager.GetInstances<ISingleObjectiveTestFunctionMoveEvaluator>())
|
---|
316 | if (op.EvaluatorType == Evaluator.GetType()) {
|
---|
317 | operators.Add(op);
|
---|
318 | #region Synchronize evaluator specific parameters with the parameters of the corresponding move evaluators
|
---|
319 | if (op is ISphereMoveEvaluator) {
|
---|
320 | SphereEvaluator e = (Evaluator as SphereEvaluator);
|
---|
321 | e.AlphaParameter.ValueChanged += new EventHandler(SphereEvaluator_Parameter_ValueChanged);
|
---|
322 | e.CParameter.ValueChanged += new EventHandler(SphereEvaluator_Parameter_ValueChanged);
|
---|
323 | ISphereMoveEvaluator em = (op as ISphereMoveEvaluator);
|
---|
324 | em.C = e.C;
|
---|
325 | em.Alpha = e.Alpha;
|
---|
326 | } else if (op is IRastriginMoveEvaluator) {
|
---|
327 | RastriginEvaluator e = (Evaluator as RastriginEvaluator);
|
---|
328 | e.AParameter.ValueChanged += new EventHandler(RastriginEvaluator_Parameter_ValueChanged);
|
---|
329 | IRastriginMoveEvaluator em = (op as IRastriginMoveEvaluator);
|
---|
330 | em.A = e.A;
|
---|
331 | }
|
---|
332 | #endregion
|
---|
333 | }
|
---|
334 | ParameterizeOperators();
|
---|
335 | OnOperatorsChanged();
|
---|
336 | }
|
---|
337 | private void ParameterizeSolutionCreator() {
|
---|
338 | SolutionCreator.LengthParameter.Value = new IntValue(ProblemSize.Value);
|
---|
339 | }
|
---|
340 | private void ParameterizeEvaluator() {
|
---|
341 | Evaluator.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
342 | }
|
---|
343 | private void ParameterizeVisualizer() {
|
---|
344 | if (Visualizer != null) {
|
---|
345 | Visualizer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
|
---|
346 | Visualizer.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
347 | }
|
---|
348 | }
|
---|
349 | private void ParameterizeOperators() {
|
---|
350 | foreach (IRealVectorCrossover op in Operators.OfType<IRealVectorCrossover>()) {
|
---|
351 | op.ParentsParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
352 | op.ChildParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
353 | op.BoundsParameter.ActualName = BoundsParameter.Name;
|
---|
354 | }
|
---|
355 | foreach (IRealVectorManipulator op in Operators.OfType<IRealVectorManipulator>()) {
|
---|
356 | op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
357 | op.BoundsParameter.ActualName = BoundsParameter.Name;
|
---|
358 | }
|
---|
359 | foreach (IRealVectorMoveOperator op in Operators.OfType<IRealVectorMoveOperator>()) {
|
---|
360 | op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
361 | }
|
---|
362 | foreach (IRealVectorMoveGenerator op in Operators.OfType<IRealVectorMoveGenerator>()) {
|
---|
363 | op.BoundsParameter.ActualName = BoundsParameter.Name;
|
---|
364 | }
|
---|
365 | foreach (ISingleObjectiveTestFunctionAdditiveMoveEvaluator op in Operators.OfType<ISingleObjectiveTestFunctionAdditiveMoveEvaluator>()) {
|
---|
366 | op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
|
---|
367 | op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
|
---|
368 | }
|
---|
369 | }
|
---|
370 | #endregion
|
---|
371 | }
|
---|
372 | }
|
---|