Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISolutionContext.cs @ 17699

Last change on this file since 17699 was 17577, checked in by abeham, 5 years ago

#2521: remove scope-based contexts, add helper methods to ScopeUtil, adapt operators

File size: 2.3 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System.Collections.Generic;
23using HEAL.Attic;
24using HeuristicLab.Core;
25
26namespace HeuristicLab.Optimization {
27  //TODO discuss renaming to solution scope?
28  [StorableType("383A35EB-03C9-473D-A20B-EE34E00BC174")]
29  public interface ISolutionContext : IItem {
30
31    bool IsEvaluated { get; }
32    IEnumerable<KeyValuePair<string, object>> AdditionalData { get; }
33    IEncodedSolution EncodedSolution { get; }
34
35    IEvaluationResult EvaluationResult { get; }
36
37
38    //TODO: make methods generic for get/set additional data
39    void SetAdditionalData(string identifier, object o);
40    object GetAdditionalData(string identifier);
41  }
42
43  public interface ISolutionContext<TEncodedSolution> : ISolutionContext
44    where TEncodedSolution : class, IEncodedSolution {
45    new TEncodedSolution EncodedSolution { get; }
46  }
47
48  [StorableType("3A5CA150-1122-4D13-B65D-55D7EC86198F")]
49  public interface ISingleObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution>
50      where TEncodedSolution : class, IEncodedSolution {
51    //TODO discuss with abeham hiding of base property
52    new ISingleObjectiveEvaluationResult EvaluationResult { get; set; }
53  }
54
55  [StorableType("3110C8C1-11FE-4A24-9B4E-E2EB3B97CBE9")]
56  public interface IMultiObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution>
57      where TEncodedSolution : class, IEncodedSolution {
58    new IMultiObjectiveEvaluationResult EvaluationResult { get; set; }
59  }
60
61}
Note: See TracBrowser for help on using the repository browser.