Changeset 11768 for branches/ProgrammableProblem
- Timestamp:
- 01/15/15 17:17:41 (10 years ago)
- Location:
- branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
r11753 r11768 179 179 <Compile Include="New\Scripts\MultiObjectiveProblemDefinitionScript.cs" /> 180 180 <Compile Include="New\Scripts\SingleObjectiveProblemDefinitionScript.cs" /> 181 <Compile Include="OLD_MultiObjectiveProgrammableProblem.cs" />182 <Compile Include="OLD_SingleObjectiveProgrammableProblem.cs" />183 181 <EmbeddedResource Include="New\Scripts\Templates\ScriptTemplates.resx"> 184 182 <Generator>ResXFileCodeGenerator</Generator> … … 195 193 <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project> 196 194 <Name>HeuristicLab.Optimization-3.3</Name> 197 <Private>False</Private>198 195 </ProjectReference> 199 196 </ItemGroup> -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs
r11767 r11768 23 23 24 24 namespace HeuristicLab.Problems.Programmable { 25 public interface IProblemDefinition : INamedItem{25 public interface IProblemDefinition { 26 26 IEncoding Encoding { get; } 27 27 } -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveScriptableProblem.cs
r11767 r11768 63 63 public MultiObjectiveScriptableProblem() 64 64 : base() { 65 Parameters.Add(new FixedValueParameter< SingleObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name }));65 Parameters.Add(new FixedValueParameter<MultiObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new MultiObjectiveProblemDefinitionScript() { Name = Name })); 66 66 RegisterEvents(); 67 67 } -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs
r11753 r11768 21 21 22 22 using System; 23 using HeuristicLab.Common;24 using HeuristicLab.Core;25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;26 23 27 24 namespace HeuristicLab.Problems.Programmable { 28 public abstract class CompiledProblemDefinition : NamedItem, IProblemDefinition { 29 [Storable(Name = "Encoding")] 25 public abstract class CompiledProblemDefinition : IProblemDefinition { 30 26 private IEncoding encoding; 31 27 public IEncoding Encoding { … … 33 29 protected set { 34 30 if (value == null) throw new ArgumentNullException("The encoding must not be null."); 35 if (encoding == value) return;36 31 encoding = value; 37 32 } … … 41 36 public abstract void Initialize(); 42 37 43 [StorableConstructor] 44 protected CompiledProblemDefinition(bool deserializing) : base(deserializing) { } 45 protected CompiledProblemDefinition(CompiledProblemDefinition original, Cloner cloner) 46 : base(original, cloner) { 47 this.encoding = cloner.Clone(original.encoding); 48 } 49 public override IDeepCloneable Clone(Cloner cloner) { 50 throw new InvalidOperationException("ProblemScript instances cannot be cloned."); 51 } 52 53 public CompiledProblemDefinition() { } 54 protected CompiledProblemDefinition(IEncoding encoding) : this(encoding, "ProblemDefinition") { } 55 protected CompiledProblemDefinition(IEncoding encoding, string name) : this(encoding, name, string.Empty) { } 56 protected CompiledProblemDefinition(IEncoding encoding, string name, string description) 57 : base(name, description) { 38 protected CompiledProblemDefinition() { } 39 protected CompiledProblemDefinition(IEncoding encoding) 40 : base() { 58 41 Encoding = encoding; 59 42 }
Note: See TracChangeset
for help on using the changeset viewer.