Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/10 11:23:02 (14 years ago)
Author:
svonolfe
Message:

Improved VRP solution view (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs

    r3938 r4015  
    4141      get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["VRPSolution"]; }
    4242    }
     43    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
     44      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
     45    }
     46    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
     47      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
     48    }
    4349    public LookupParameter<DoubleMatrix> CoordinatesParameter {
    4450      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     51    }
     52    public ILookupParameter<DoubleArray> ReadyTimeParameter {
     53      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
     54    }
     55    public ILookupParameter<DoubleArray> DueTimeParameter {
     56      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
     57    }
     58    public ILookupParameter<DoubleArray> ServiceTimeParameter {
     59      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
    4560    }
    4661    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
     
    7388      Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("VRPSolution", "The VRP solutions which should be evaluated."));
    7489      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
     90      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
     91      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
     92      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
     93      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
     94      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
     95
    7596      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the VRP solutions which should be analyzed."));
    7697      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Distance", "The distances of the VRP solutions which should be analyzed."));
     
    101122        solution = new VRPSolution(coordinates, best.Clone() as IVRPEncoding, new DoubleValue(qualities[i].Value),
    102123          new DoubleValue(distances[i].Value), new DoubleValue(overloads[i].Value), new DoubleValue(tardinesses[i].Value),
    103           new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value));
     124          new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value),
     125          DistanceMatrixParameter.ActualValue, UseDistanceMatrixParameter.ActualValue,
     126          ReadyTimeParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue);
    104127        BestSolutionParameter.ActualValue = solution;
    105128        results.Add(new Result("Best VRP Solution", solution));
     
    114137          solution.TravelTime.Value = travelTimes[i].Value;
    115138          solution.VehicleUtilization.Value = vehiclesUtilizations[i].Value;
    116 
    117           if (solution.Quality.Value < solution.Distance.Value) {
    118           }
     139          solution.DistanceMatrix = DistanceMatrixParameter.ActualValue;
     140          solution.UseDistanceMatrix = UseDistanceMatrixParameter.ActualValue;
     141          solution.ReadyTime = ReadyTimeParameter.ActualValue;
     142          solution.DueTime = DueTimeParameter.ActualValue;
     143          solution.ServiceTime = ServiceTimeParameter.ActualValue;
    119144        }
    120145      }
Note: See TracChangeset for help on using the changeset viewer.