Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblems.cs @ 13345

Last change on this file since 13345 was 13345, checked in by mkommend, 7 years ago

#2521: refactored programmable problem

File size: 7.5 KB
Line 
1#region License Information
2
3/* HeuristicLab
4 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
5 *
6 * This file is part of HeuristicLab.
7 *
8 * HeuristicLab is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * HeuristicLab is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#endregion
23
24using HeuristicLab.Common;
25using HeuristicLab.Core;
26using HeuristicLab.Encodings.BinaryVectorEncoding;
27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
28
29namespace HeuristicLab.Problems.Programmable {
30  [Item("Binary Vector Programmable Problem (single-objective)", "Represents a binary vector single-objective problem that can be programmed with a script.")]
31  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
32  [StorableClass]
33  public sealed class SingleObjectiveBinaryVectorProgrammableProblem : SingleObjectiveProgrammableProblem<BinaryVectorEncoding, BinaryVector> {
34
35    [StorableConstructor]
36    private SingleObjectiveBinaryVectorProgrammableProblem(bool deserializing) : base(deserializing) { }
37    private SingleObjectiveBinaryVectorProgrammableProblem(SingleObjectiveBinaryVectorProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
38    public SingleObjectiveBinaryVectorProgrammableProblem()
39      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.BinaryVectorEncoding", "BinaryVectorEncoding", "BinaryVector")) { }
40
41    public override IDeepCloneable Clone(Cloner cloner) {
42      return new SingleObjectiveBinaryVectorProgrammableProblem(this, cloner);
43    }
44  }
45  /*
46  [Item("Integer Vector Programmable Problem (single-objective)", "Represents an integer vector single-objective problem that can be programmed with a script.")]
47  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
48  [StorableClass]
49  public sealed class SingleObjectiveIntegerVectorProgrammableProblem : SingleObjectiveProgrammableProblem<IntegerVectorEncoding, IntegerVector> {
50
51    [StorableConstructor]
52    private SingleObjectiveIntegerVectorProgrammableProblem(bool deserializing) : base(deserializing) { }
53    private SingleObjectiveIntegerVectorProgrammableProblem(SingleObjectiveIntegerVectorProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
54    public SingleObjectiveIntegerVectorProgrammableProblem()
55      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.IntegerVectorEncoding", "IntegerVectorEncoding", "IntegerVector")) { }
56
57    public override IDeepCloneable Clone(Cloner cloner) {
58      return new SingleObjectiveIntegerVectorProgrammableProblem(this, cloner);
59    }
60  }
61
62  [Item("Real Vector Programmable Problem (single-objective)", "Represents a real vector single-objective problem that can be programmed with a script.")]
63  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
64  [StorableClass]
65  public sealed class SingleObjectiveRealVectorProgrammableProblem : SingleObjectiveProgrammableProblem<RealVectorEncoding, RealVector> {
66
67    [StorableConstructor]
68    private SingleObjectiveRealVectorProgrammableProblem(bool deserializing) : base(deserializing) { }
69    private SingleObjectiveRealVectorProgrammableProblem(SingleObjectiveRealVectorProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
70    public SingleObjectiveRealVectorProgrammableProblem()
71      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.RealVectorEncoding", "RealVectorEncoding", "RealVector")) { }
72
73    public override IDeepCloneable Clone(Cloner cloner) {
74      return new SingleObjectiveRealVectorProgrammableProblem(this, cloner);
75    }
76  }
77
78  [Item("Permutation Programmable Problem (single-objective)", "Represents a permutation single-objective problem that can be programmed with a script.")]
79  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
80  [StorableClass]
81  public sealed class SingleObjectivePermutationProgrammableProblem : SingleObjectiveProgrammableProblem<PermutationEncoding, Permutation> {
82
83    [StorableConstructor]
84    private SingleObjectivePermutationProgrammableProblem(bool deserializing) : base(deserializing) { }
85    private SingleObjectivePermutationProgrammableProblem(SingleObjectivePermutationProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
86    public SingleObjectivePermutationProgrammableProblem()
87      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.PermutationEncoding", "PermutationEncoding", "Permutation")) { }
88
89    public override IDeepCloneable Clone(Cloner cloner) {
90      return new SingleObjectivePermutationProgrammableProblem(this, cloner);
91    }
92  }
93
94  [Item("Symbolic Expression Tree Programmable Problem (single-objective)", "Represents a symbolic expression tree single-objective problem that can be programmed with a script.")]
95  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
96  [StorableClass]
97  public sealed class SingleObjectiveSymbolicExpressionTreeProgrammableProblem : SingleObjectiveProgrammableProblem<SymbolicExpressionTreeEncoding, SymbolicExpressionTree> {
98
99    [StorableConstructor]
100    private SingleObjectiveSymbolicExpressionTreeProgrammableProblem(bool deserializing) : base(deserializing) { }
101    private SingleObjectiveSymbolicExpressionTreeProgrammableProblem(SingleObjectiveSymbolicExpressionTreeProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
102    public SingleObjectiveSymbolicExpressionTreeProgrammableProblem()
103      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "SymbolicExpressionTreeEncoding", "SymbolicExpressionTree")) { }
104
105    public override IDeepCloneable Clone(Cloner cloner) {
106      return new SingleObjectiveSymbolicExpressionTreeProgrammableProblem(this, cloner);
107    }
108  }
109
110  [Item("Linear Linkage Programmable Problem (single-objective)", "Represents a linear linkage single-objective problem that can be programmed with a script.")]
111  [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)]
112  [StorableClass]
113  public sealed class SingleObjectiveLinearLinkageProgrammableProblem : SingleObjectiveProgrammableProblem<LinearLinkageEncoding, LinearLinkage> {
114
115    [StorableConstructor]
116    private SingleObjectiveLinearLinkageProgrammableProblem(bool deserializing) : base(deserializing) { }
117    private SingleObjectiveLinearLinkageProgrammableProblem(SingleObjectiveLinearLinkageProgrammableProblem original, Cloner cloner) : base(original, cloner) { }
118    public SingleObjectiveLinearLinkageProgrammableProblem()
119      : base(string.Format(ScriptTemplates.CompiledSingleObjectiveProblemDefinition, "HeuristicLab.Encodings.LinearLinkageEncoding", "LinearLinkageEncoding", "LinearLinkage")) { }
120
121    public override IDeepCloneable Clone(Cloner cloner) {
122      return new SingleObjectiveLinearLinkageProgrammableProblem(this, cloner);
123    }
124  }*/
125}
Note: See TracBrowser for help on using the repository browser.