Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/25/20 01:23:08 (4 years ago)
Author:
abeham
Message:

#2521: Made encodings non-generic classes (the TEncodedSolution type parameter is not actually used), this will make it considerably easier to port the VRP to the new architecture

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs

    r17698 r17699  
    3232  [Item("AlbaEncoding", "Represents the encoding for Alba encoded solutions.")]
    3333  [StorableType("9ff9f959-31d2-44e5-8a5e-b122220535c2")]
    34   public class AlbaEncoding : Encoding<AlbaEncodedSolution>, IVRPEncoding<AlbaEncodedSolution> {
     34  public class AlbaEncoding : Encoding, IVRPEncoding {
    3535
    3636    [StorableConstructor]
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPEncoding.cs

    r17698 r17699  
    2222using HEAL.Attic;
    2323using HeuristicLab.Optimization;
    24 using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2524
    2625namespace HeuristicLab.Problems.VehicleRouting {
     
    2827  [StorableType("b6674651-cc95-48d8-a2c3-83ee9325def3")]
    2928  public interface IVRPEncoding : IEncoding { }
    30 
    31   [StorableType("7d010ab3-2e01-4383-bb6c-7c47ef9d803f")]
    32   public interface IVRPEncoding<T> : IVRPEncoding, IEncoding<T> where T : class, IVRPEncodedSolution { }
    3329}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs

    r17698 r17699  
    4545  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 110)]
    4646  [StorableType("95137523-AE3B-4638-958C-E86829D54CE3")]
    47   public sealed class VehicleRoutingProblem : SingleObjectiveProblem<AlbaEncoding, AlbaEncodedSolution>, IProblemInstanceConsumer<IVRPData> {
     47  public sealed class VehicleRoutingProblem : SingleObjectiveProblem<IVRPEncoding, IVRPEncodedSolution>, IProblemInstanceConsumer<IVRPData> {
    4848
    4949    public static new Image StaticItemImage {
     
    9797    }
    9898
    99     public override ISingleObjectiveEvaluationResult Evaluate(AlbaEncodedSolution solution, IRandom random, CancellationToken cancellationToken) {
     99    public override ISingleObjectiveEvaluationResult Evaluate(IVRPEncodedSolution solution, IRandom random, CancellationToken cancellationToken) {
    100100      return new SingleObjectiveEvaluationResult(ProblemInstance.Evaluate(solution).Quality);
    101101    }
Note: See TracChangeset for help on using the changeset viewer.