Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/15 17:17:41 (10 years ago)
Author:
mkommend
Message:

#2174: Further bug fixing in programmable problem.

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  
    179179    <Compile Include="New\Scripts\MultiObjectiveProblemDefinitionScript.cs" />
    180180    <Compile Include="New\Scripts\SingleObjectiveProblemDefinitionScript.cs" />
    181     <Compile Include="OLD_MultiObjectiveProgrammableProblem.cs" />
    182     <Compile Include="OLD_SingleObjectiveProgrammableProblem.cs" />
    183181    <EmbeddedResource Include="New\Scripts\Templates\ScriptTemplates.resx">
    184182      <Generator>ResXFileCodeGenerator</Generator>
     
    195193      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
    196194      <Name>HeuristicLab.Optimization-3.3</Name>
    197       <Private>False</Private>
    198195    </ProjectReference>
    199196  </ItemGroup>
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs

    r11767 r11768  
    2323
    2424namespace HeuristicLab.Problems.Programmable {
    25   public interface IProblemDefinition : INamedItem {
     25  public interface IProblemDefinition {
    2626    IEncoding Encoding { get; }
    2727  }
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveScriptableProblem.cs

    r11767 r11768  
    6363    public MultiObjectiveScriptableProblem()
    6464      : 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 }));
    6666      RegisterEvents();
    6767    }
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs

    r11753 r11768  
    2121
    2222using System;
    23 using HeuristicLab.Common;
    24 using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2623
    2724namespace HeuristicLab.Problems.Programmable {
    28   public abstract class CompiledProblemDefinition : NamedItem, IProblemDefinition {
    29     [Storable(Name = "Encoding")]
     25  public abstract class CompiledProblemDefinition : IProblemDefinition {
    3026    private IEncoding encoding;
    3127    public IEncoding Encoding {
     
    3329      protected set {
    3430        if (value == null) throw new ArgumentNullException("The encoding must not be null.");
    35         if (encoding == value) return;
    3631        encoding = value;
    3732      }
     
    4136    public abstract void Initialize();
    4237
    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() {
    5841      Encoding = encoding;
    5942    }
Note: See TracChangeset for help on using the changeset viewer.