Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/20 16:38:33 (4 years ago)
Author:
mkommend
Message:

#2521: Added first version of problem results.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/Problems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/Problems/Problem.cs

    r17570 r17612  
    3939    }
    4040
    41 
     41    [Storable]
     42    public ResultCollection Results { get; } = new ResultCollection();
    4243
    4344    [StorableConstructor]
    4445    protected Problem(StorableConstructorFlag _) : base(_) { }
    45     protected Problem(Problem original, Cloner cloner) : base(original, cloner) { }
     46    protected Problem(Problem original, Cloner cloner) : base(original, cloner) {
     47      Results = cloner.Clone(original.Results);
     48    }
    4649    public Problem() : base() { }
    4750
     
    157160
    158161
    159     protected virtual void ParameterizeOperators() {
    160 
    161     }
     162    protected virtual void ParameterizeOperators() { }
    162163
    163164
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs

    r17226 r17612  
    4040  [Creatable(CreatableAttribute.Categories.Problems, Priority = 120)]
    4141  [StorableType("9F18A098-A8B8-4F70-93CF-79FF1496AC8A")]
    42   public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
    43     public string Filename { get; set; }
     42  public sealed class UserDefinedProblem : Problem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
    4443
    4544    public static new Image StaticItemImage {
     
    170169    private void OnOperatorsChanged() {
    171170      EventHandler handler = OperatorsChanged;
    172       if (handler != null) handler(this, EventArgs.Empty);
    173     }
    174     public event EventHandler Reset;
    175     private void OnReset() {
    176       EventHandler handler = Reset;
    177171      if (handler != null) handler(this, EventArgs.Empty);
    178172    }
Note: See TracChangeset for help on using the changeset viewer.