Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PersistenceOverhaul/HeuristicLab.Problems.Scheduling/3.3/Analyzers/SchedulingAnalyzer.cs @ 13905

Last change on this file since 13905 was 13368, checked in by ascheibe, 9 years ago

#2520 added guids to storable classes

File size: 3.8 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2015 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 HeuristicLab.Common;
23using HeuristicLab.Core;
24using HeuristicLab.Data;
25using HeuristicLab.Encodings.ScheduleEncoding;
26using HeuristicLab.Operators;
27using HeuristicLab.Optimization;
28using HeuristicLab.Parameters;
29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
30
31namespace HeuristicLab.Problems.Scheduling {
32  [Item("SchedulingAnalyzer", "Represents the generalized form of Analyzers for Scheduling Problems.")]
33  [StorableClass("180B2815-2F1A-41FF-A3B0-D084E981528A")]
34  public abstract class SchedulingAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
35    public virtual bool EnabledByDefault {
36      get { return true; }
37    }
38
39    [StorableConstructor]
40    protected SchedulingAnalyzer(bool deserializing) : base(deserializing) { }
41    protected SchedulingAnalyzer(SchedulingAnalyzer original, Cloner cloner)
42      : base(original, cloner) {
43    }
44
45    #region Parameter Properties
46    public LookupParameter<BoolValue> MaximizationParameter {
47      get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
48    }
49    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
50      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
51    }
52    public LookupParameter<Schedule> BestSolutionParameter {
53      get { return (LookupParameter<Schedule>)Parameters["BestSolution"]; }
54    }
55    public ValueLookupParameter<ResultCollection> ResultsParameter {
56      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
57    }
58    public LookupParameter<DoubleValue> BestKnownQualityParameter {
59      get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
60    }
61    public LookupParameter<Schedule> BestKnownSolutionParameter {
62      get { return (LookupParameter<Schedule>)Parameters["BestKnownSolution"]; }
63    }
64    public ScopeTreeLookupParameter<Schedule> ScheduleParameter {
65      get { return (ScopeTreeLookupParameter<Schedule>)Parameters["Schedule"]; }
66    }
67    #endregion
68
69    public SchedulingAnalyzer()
70      : base() {
71      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem."));
72      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the JSSP solutions which should be analyzed."));
73      Parameters.Add(new ScopeTreeLookupParameter<Schedule>("Schedule", "The solutions from which the best solution has to be chosen from."));
74      Parameters.Add(new LookupParameter<Schedule>("BestSolution", "The best JSSP solution."));
75      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best JSSP solution should be stored."));
76      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this JSSP instance."));
77      Parameters.Add(new LookupParameter<Schedule>("BestKnownSolution", "The best known solution of this JSSP instance."));
78    }
79  }
80}
Note: See TracBrowser for help on using the repository browser.