Changeset 17718 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings
- Timestamp:
- 08/05/20 05:46:07 (4 years ago)
- 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 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 31 … … 56 57 typeof (IAlbaOperator), 57 58 typeof (IVRPCreator), 58 typeof (IMultiVRPOperator) 59 typeof (IMultiVRPOperator), 60 typeof (IMultiVRPMoveOperator) 59 61 }; 60 62 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/GVREncoding.cs
r17714 r17718 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 31 … … 56 57 typeof (IGVROperator), 57 58 typeof (IVRPCreator), 58 typeof (IMultiVRPOperator) 59 typeof (IMultiVRPOperator), 60 typeof (IMultiVRPMoveOperator) 59 61 }; 60 62 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs
r17714 r17718 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 31 … … 56 57 typeof (IPotvinOperator), 57 58 typeof (IVRPCreator), 58 typeof (IMultiVRPOperator) 59 typeof (IMultiVRPOperator), 60 typeof (IMultiVRPMoveOperator) 59 61 }; 60 62 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/PrinsEncoding.cs
r17714 r17718 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 31 … … 56 57 typeof (IPrinsOperator), 57 58 typeof (IVRPCreator), 58 typeof (IMultiVRPOperator) 59 typeof (IMultiVRPOperator), 60 typeof (IMultiVRPMoveOperator) 59 61 }; 60 62 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPEncoding.cs
r17711 r17718 39 39 public void FilterOperators(IVRPProblemInstance instance) { 40 40 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 } 44 49 } 50 ReplaceOperators(operators); 45 51 } 46 52 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/ZhuEncoding.cs
r17714 r17718 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 31 … … 56 57 typeof (IZhuOperator), 57 58 typeof (IVRPCreator), 58 typeof (IMultiVRPOperator) 59 typeof (IMultiVRPOperator), 60 typeof (IMultiVRPMoveOperator) 59 61 }; 60 62 }
Note: See TracChangeset
for help on using the changeset viewer.