- Timestamp:
- 11/23/15 22:18:35 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblems.cs
r13350 r13351 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Encodings.BinaryVectorEncoding; 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 … … 49 50 public override IDeepCloneable Clone(Cloner cloner) { 50 51 return new MultiObjectiveBinaryVectorProgrammableProblem(this, cloner); 52 } 53 } 54 55 [Item("Multi Solution Programmable Problem (multi-objective)", "Represents a multi solution multi-objective problem that can be programmed with a script.")] 56 [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)] 57 [StorableClass] 58 public sealed class MultiObjectiveMultiSolutionProgrammableProblem : MultiObjectiveProgrammableProblem<MultiEncoding, MultiSolution> { 59 60 [StorableConstructor] 61 private MultiObjectiveMultiSolutionProgrammableProblem(bool deserializing) : base(deserializing) { } 62 private MultiObjectiveMultiSolutionProgrammableProblem(MultiObjectiveMultiSolutionProgrammableProblem original, Cloner cloner) : base(original, cloner) { } 63 64 public MultiObjectiveMultiSolutionProgrammableProblem() 65 : base() { 66 var codeTemplate = ScriptTemplates.CompiledSingleObjectiveProblemDefinition_Template; 67 codeTemplate = codeTemplate.Replace(ENCODING_NAMESPACE, "HeuristicLab.Encodings.BinaryVectorEncoding"); 68 codeTemplate = codeTemplate.Replace(ENCODING_CLASS, "MultiEncoding"); 69 codeTemplate = codeTemplate.Replace(SOLUTION_CLASS, "MultiSolution"); 70 ProblemScript.Code = codeTemplate; 71 } 72 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new MultiObjectiveMultiSolutionProgrammableProblem(this, cloner); 51 76 } 52 77 } -
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblems.cs
r13350 r13351 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Encodings.BinaryVectorEncoding; 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 … … 49 50 public override IDeepCloneable Clone(Cloner cloner) { 50 51 return new SingleObjectiveBinaryVectorProgrammableProblem(this, cloner); 52 } 53 } 54 55 [Item("Multi Solution Programmable Problem (single-objective)", "Represents a multi solution single-objective problem that can be programmed with a script.")] 56 [Creatable(CreatableAttribute.Categories.Problems, Priority = 100)] 57 [StorableClass] 58 public sealed class SingleObjectiveMultiSolutionProgrammableProblem : SingleObjectiveProgrammableProblem<MultiEncoding, MultiSolution> { 59 60 [StorableConstructor] 61 private SingleObjectiveMultiSolutionProgrammableProblem(bool deserializing) : base(deserializing) { } 62 private SingleObjectiveMultiSolutionProgrammableProblem(SingleObjectiveMultiSolutionProgrammableProblem original, Cloner cloner) : base(original, cloner) { } 63 64 public SingleObjectiveMultiSolutionProgrammableProblem() 65 : base() { 66 var codeTemplate = ScriptTemplates.CompiledSingleObjectiveProblemDefinition_Template; 67 codeTemplate = codeTemplate.Replace(ENCODING_NAMESPACE, "HeuristicLab.Encodings.BinaryVectorEncoding"); 68 codeTemplate = codeTemplate.Replace(ENCODING_CLASS, "MultiEncoding"); 69 codeTemplate = codeTemplate.Replace(SOLUTION_CLASS, "MultiSolution"); 70 ProblemScript.Code = codeTemplate; 71 } 72 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new SingleObjectiveMultiSolutionProgrammableProblem(this, cloner); 51 76 } 52 77 }
Note: See TracChangeset
for help on using the changeset viewer.