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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveImprover.cs

    r17592 r17699  
    4040    }
    4141
    42     public ILookupParameter<IEncoding<TEncodedSolution>> EncodingParameter {
    43       get { return (ILookupParameter<IEncoding<TEncodedSolution>>)Parameters["Encoding"]; }
     42    public ILookupParameter<IEncoding> EncodingParameter {
     43      get { return (ILookupParameter<IEncoding>)Parameters["Encoding"]; }
    4444    }
    4545
     
    7272    public SingleObjectiveImprover() {
    7373      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
    74       Parameters.Add(new LookupParameter<IEncoding<TEncodedSolution>>("Encoding", "An item that holds the problem's encoding."));
     74      Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
    7575      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
    7676      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether the problem should be minimized or maximized."));
     
    9090      var maxAttempts = ImprovementAttemptsParameter.ActualValue.Value;
    9191      var sampleSize = SampleSizeParameter.ActualValue.Value;
    92       var solutionContext = ScopeUtil.CreateSolutionContext(ExecutionContext.Scope, encoding);
     92      var solutionContext = ScopeUtil.CreateSolutionContext<TEncodedSolution>(ExecutionContext.Scope, encoding);
    9393
    9494      double quality;
Note: See TracChangeset for help on using the changeset viewer.