Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/12 13:31:18 (11 years ago)
Author:
abeham
Message:

#1329:

  • Added JSSPData class to problem instances
  • Added problem instance provider for some ORLIB JSSP instances (abz, ft, la01-20)
  • Adapted JSSP to load and export jssp problems
  • Adapted JSSP problem view to derive from ProblemView
  • Added static methods to MakespanEvaluator and MeanTardinessEvaluator
  • Fixed a bug in PRVUniformOnePositionManipulator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs

    r8603 r8882  
    2020#endregion
    2121
     22using System.Linq;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    4142    public MakespanEvaluator() : base() { }
    4243
    43     protected override DoubleValue evaluate(Schedule schedule) {
    44       DoubleValue quality = new DoubleValue(0);
    45       foreach (Resource r in schedule.Resources) {
    46         if (r.TotalDuration > quality.Value) {
    47           quality.Value = r.TotalDuration;
    48         }
    49       }
    50       return quality;
     44    public static double GetMakespan(Schedule schedule) {
     45      return schedule.Resources.Select(r => r.TotalDuration).Max();
     46    }
     47
     48    protected override DoubleValue Evaluate(Schedule schedule) {
     49      return new DoubleValue(GetMakespan(schedule));
    5150    }
    5251
Note: See TracChangeset for help on using the changeset viewer.