- Timestamp:
- 06/10/11 16:18:44 (13 years ago)
- Location:
- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3
- Property svn:ignore
-
old new 2 2 bin 3 3 obj 4 HeuristicLab.Problems.Scheduling-3.3.csproj.user
-
- Property svn:ignore
-
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/BestSchedulingSolutionAnalyzer.cs
r6293 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 using System.Text; 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.ScheduleEncoding; 26 27 using HeuristicLab.Optimization; 27 using HeuristicLab. Core;28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common;30 using HeuristicLab.Parameters;31 using HeuristicLab.Data;32 using HeuristicLab.Encodings.SchedulingEncoding;33 30 34 namespace HeuristicLab.Problems.Scheduling .Analyzers{31 namespace HeuristicLab.Problems.Scheduling { 35 32 36 33 [Item("BestSchedulingSolutionAnalyzer", "An operator for analyzing the best solution of Scheduling Problems given in schedule-representation.")] … … 53 50 } 54 51 55 public BestSchedulingSolutionAnalyzer () : base () { 52 public BestSchedulingSolutionAnalyzer() 53 : base() { 56 54 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator.")); 57 55 } … … 59 57 public override IOperation Apply() { 60 58 ItemArray<DoubleValue> qualities = QualityParameter.ActualValue; 61 ItemArray<Schedule> solutions = Schedul ingSolutionParameter.ActualValue;59 ItemArray<Schedule> solutions = ScheduleParameter.ActualValue; 62 60 ResultCollection results = ResultsParameter.ActualValue; 63 61 bool max = MaximizationParameter.ActualValue.Value; … … 79 77 if (bestSolution == null) { 80 78 bestSolution = (Schedule)solutions[i].Clone(); 81 bestSolution.Quality .Value = qualities [i].Value;79 bestSolution.Quality = (DoubleValue)qualities[i].Clone(); 82 80 BestSolutionParameter.ActualValue = bestSolution; 83 81 results.Add(new Result("Best Scheduling Solution", bestSolution)); -
branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/SchedulingAnalyzer.cs
r6293 r6406 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.ScheduleEncoding; 26 26 using HeuristicLab.Operators; 27 27 using HeuristicLab.Optimization; 28 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Data;30 using HeuristicLab.Core;31 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using HeuristicLab.Common;33 using HeuristicLab.Encodings.SchedulingEncoding;34 30 35 namespace HeuristicLab.Problems.Scheduling .Analyzers{36 [Item("Scheduling 31 namespace HeuristicLab.Problems.Scheduling { 32 [Item("SchedulingAnalyzer", "Represents the generalized form of Analyzers for Scheduling Problems.")] 37 33 [StorableClass] 38 34 public abstract class SchedulingAnalyzer : SingleSuccessorOperator, IAnalyzer { … … 62 58 get { return (LookupParameter<Schedule>)Parameters["BestKnownSolution"]; } 63 59 } 64 public ScopeTreeLookupParameter<Schedule> Schedul ingSolutionParameter {65 get { return (ScopeTreeLookupParameter<Schedule>)Parameters[" DecodedSchedulingSolution"]; }60 public ScopeTreeLookupParameter<Schedule> ScheduleParameter { 61 get { return (ScopeTreeLookupParameter<Schedule>)Parameters["Schedule"]; } 66 62 } 67 63 #endregion 68 64 69 public SchedulingAnalyzer () : base() { 65 public SchedulingAnalyzer() 66 : base() { 70 67 Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem.")); 71 68 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the JSSP solutions which should be analyzed.")); 72 Parameters.Add(new ScopeTreeLookupParameter<Schedule>(" DecodedSchedulingSolution", "The solutions from which the best solution has to be chosen from."));69 Parameters.Add(new ScopeTreeLookupParameter<Schedule>("Schedule", "The solutions from which the best solution has to be chosen from.")); 73 70 Parameters.Add(new LookupParameter<Schedule>("BestSolution", "The best JSSP solution.")); 74 71 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best JSSP solution should be stored."));
Note: See TracChangeset
for help on using the changeset viewer.