Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/24/10 14:52:26 (14 years ago)
Author:
svonolfe
Message:

Added VRPTours analyzer (#1039)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs

    r4185 r4301  
    127127        BestSolutionParameter.ActualValue = solution;
    128128        results.Add(new Result("Best VRP Solution", solution));
    129 
    130         results.Add(new Result("Best TravelTime", new DoubleValue(travelTimes[i].Value)));
    131         results.Add(new Result("Best Distance",  new DoubleValue(distances[i].Value)));
    132         results.Add(new Result("Best VehicleUtilization", new DoubleValue(vehiclesUtilizations[i].Value)));
    133         results.Add(new Result("Best Overload",  new DoubleValue(overloads[i].Value)));
    134         results.Add(new Result("Best Tardiness",  new DoubleValue(tardinesses[i].Value)));
    135129      } else {
    136         if (solution.Quality.Value > qualities[i].Value) {
     130        if (qualities[i].Value <= solution.Quality.Value) {
    137131          solution.Coordinates = coordinates;
    138132          solution.Solution = best.Clone() as IVRPEncoding;
    139133          solution.Quality.Value = qualities[i].Value;
    140           solution.Distance.Value = (results["Best Distance"].Value as DoubleValue).Value = distances[i].Value;
    141           solution.Overload.Value = (results["Best Overload"].Value as DoubleValue).Value = overloads[i].Value;
    142           solution.Tardiness.Value = (results["Best Tardiness"].Value as DoubleValue).Value = tardinesses[i].Value;
    143           solution.TravelTime.Value = (results["Best TravelTime"].Value as DoubleValue).Value = travelTimes[i].Value;
    144           solution.VehicleUtilization.Value = (results["Best VehicleUtilization"].Value as DoubleValue).Value = vehiclesUtilizations[i].Value;
     134          solution.Distance.Value = distances[i].Value;
     135          solution.Overload.Value = overloads[i].Value;
     136          solution.Tardiness.Value = tardinesses[i].Value;
     137          solution.TravelTime.Value = travelTimes[i].Value;
     138          solution.VehicleUtilization.Value = vehiclesUtilizations[i].Value;
    145139          solution.DistanceMatrix = DistanceMatrixParameter.ActualValue;
    146140          solution.UseDistanceMatrix = UseDistanceMatrixParameter.ActualValue;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj

    r4293 r4301  
    106106  </ItemGroup>
    107107  <ItemGroup>
     108    <Compile Include="Analyzers\BestAverageWorstVRPToursAnalyzer.cs" />
     109    <Compile Include="Analyzers\BestAverageWorstVRPToursCalculator.cs" />
     110    <Compile Include="Analyzers\BestVRPToursMemorizer.cs" />
    108111    <Compile Include="Analyzers\BestVRPSolutionAnalyzer.cs" />
    109112    <Compile Include="Encodings\Alba\Crossovers\PermutationCrossover.cs" />
     
    216219  </ItemGroup>
    217220  <ItemGroup>
     221    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
     222      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
     223      <Name>HeuristicLab.Analysis-3.3</Name>
     224    </ProjectReference>
    218225    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    219226      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLabProblemsVehicleRoutingPlugin.cs.frame

    r3938 r4301  
    2828  [Plugin("HeuristicLab.Problems.VehicleRouting", "3.3.0.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.VehicleRouting-3.3.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3031  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3132  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs

    r4268 r4301  
    178178      get { return operators.OfType<BestVRPSolutionAnalyzer>().FirstOrDefault(); }
    179179    }
     180    private BestAverageWorstVRPToursAnalyzer BestAverageWorstVRPToursAnalyzer {
     181      get { return operators.OfType<BestAverageWorstVRPToursAnalyzer>().FirstOrDefault(); }
     182    }
    180183    #endregion
    181184
     
    315318      operators = new List<IOperator>();
    316319      operators.Add(new BestVRPSolutionAnalyzer());
     320      operators.Add(new BestAverageWorstVRPToursAnalyzer());
    317321      ParameterizeAnalyzer();
    318322      operators.AddRange(ApplicationManager.Manager.GetInstances<IVRPOperator>().Cast<IOperator>());
     
    367371      BestVRPSolutionAnalyzer.OverloadParameter.ActualName = Evaluator.OverloadParameter.ActualName;
    368372      BestVRPSolutionAnalyzer.TardinessParameter.ActualName = Evaluator.TardinessParameter.ActualName;
     373      BestVRPSolutionAnalyzer.TravelTimeParameter.ActualName = Evaluator.TravelTimeParameter.ActualName;
     374      BestVRPSolutionAnalyzer.VehiclesUtilizedParameter.ActualName = Evaluator.VehcilesUtilizedParameter.ActualName;
    369375      BestVRPSolutionAnalyzer.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
    370376      BestVRPSolutionAnalyzer.ResultsParameter.ActualName = "Results";
     377
     378      BestAverageWorstVRPToursAnalyzer.DistanceParameter.ActualName = Evaluator.DistanceParameter.ActualName;
     379      BestAverageWorstVRPToursAnalyzer.OverloadParameter.ActualName = Evaluator.OverloadParameter.ActualName;
     380      BestAverageWorstVRPToursAnalyzer.TardinessParameter.ActualName = Evaluator.TardinessParameter.ActualName;
     381      BestAverageWorstVRPToursAnalyzer.TravelTimeParameter.ActualName = Evaluator.TravelTimeParameter.ActualName;
     382      BestAverageWorstVRPToursAnalyzer.VehiclesUtilizedParameter.ActualName = Evaluator.VehcilesUtilizedParameter.ActualName;
     383      BestAverageWorstVRPToursAnalyzer.ResultsParameter.ActualName = "Results";
    371384    }
    372385    private void ParameterizeOperators() {
Note: See TracChangeset for help on using the changeset viewer.