Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/05/20 05:46:07 (4 years ago)
Author:
abeham
Message:

#2521: completed port of VRP (needs testing though)

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

Legend:

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

    r17714 r17718  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
     
    5657          typeof (IAlbaOperator),
    5758          typeof (IVRPCreator),
    58           typeof (IMultiVRPOperator)
     59          typeof (IMultiVRPOperator),
     60          typeof (IMultiVRPMoveOperator)
    5961      };
    6062    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/GVREncoding.cs

    r17714 r17718  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
     
    5657          typeof (IGVROperator),
    5758          typeof (IVRPCreator),
    58           typeof (IMultiVRPOperator)
     59          typeof (IMultiVRPOperator),
     60          typeof (IMultiVRPMoveOperator)
    5961      };
    6062    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs

    r17714 r17718  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
     
    5657          typeof (IPotvinOperator),
    5758          typeof (IVRPCreator),
    58           typeof (IMultiVRPOperator)
     59          typeof (IMultiVRPOperator),
     60          typeof (IMultiVRPMoveOperator)
    5961      };
    6062    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/PrinsEncoding.cs

    r17714 r17718  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
     
    5657          typeof (IPrinsOperator),
    5758          typeof (IVRPCreator),
    58           typeof (IMultiVRPOperator)
     59          typeof (IMultiVRPOperator),
     60          typeof (IMultiVRPMoveOperator)
    5961      };
    6062    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPEncoding.cs

    r17711 r17718  
    3939    public void FilterOperators(IVRPProblemInstance instance) {
    4040      DiscoverOperators();
    41       var operators = instance.FilterOperators(Operators);
    42       foreach (var op in Operators.Except(operators).ToList()) {
    43         RemoveOperator(op);
     41      var operators = instance.FilterOperators(Operators).ToList();
     42      foreach (var op in operators.OfType<IMultiVRPOperator>().ToList()) {
     43        var subOps = instance.FilterOperators(op.Operators).ToList();
     44        if (subOps.Count == 0) operators.Remove(op);
     45        else {
     46          foreach (var dm in op.Operators.Except(subOps).ToList())
     47            op.RemoveOperator(dm);
     48        }
    4449      }
     50      ReplaceOperators(operators);
    4551    }
    4652
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/ZhuEncoding.cs

    r17714 r17718  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3031
     
    5657          typeof (IZhuOperator),
    5758          typeof (IVRPCreator),
    58           typeof (IMultiVRPOperator)
     59          typeof (IMultiVRPOperator),
     60          typeof (IMultiVRPMoveOperator)
    5961      };
    6062    }
Note: See TracChangeset for help on using the changeset viewer.