Free cookie consent management tool by TermsFeed Policy Generator

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

#2521: worked on VRP

File:
1 edited

Legend:

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

    r17699 r17704  
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.PluginInfrastructure;
     30using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5455    static AlbaEncoding() {
    5556      encodingSpecificOperatorTypes = new List<Type>() {
    56           typeof (IAlbaOperator)
     57          typeof (IAlbaOperator),
     58          typeof (IVRPCreator),
     59          typeof (IMultiVRPOperator)
    5760      };
    5861    }
     
    6366      var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
    6467
     68      foreach (var op in newOperators.OfType<IMultiVRPOperator>().ToList()) {
     69        op.SetOperators(Operators.Concat(newOperators));
     70        if (!op.Operators.Any()) newOperators.Remove(op);
     71      }
     72      foreach (var op in Operators.OfType<IMultiVRPOperator>()) {
     73        op.SetOperators(newOperators);
     74      }
    6575      ConfigureOperators(newOperators);
    6676      foreach (var @operator in newOperators)
Note: See TracChangeset for help on using the changeset viewer.