Changeset 17697 for branches/2521_ProblemRefactoring
- Timestamp:
- 07/23/20 23:27:28 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs
r17612 r17697 199 199 op.QualityVariableName = Evaluator.QualityParameter.ActualName; 200 200 } 201 foreach (var op in Operators.OfType<ISingleObjectiveImprovementOperator>()) { 202 op.SolutionParameter.ActualName = Encoding.Name; 203 op.SolutionParameter.Hidden = true; 204 } 205 foreach (var op in Operators.OfType<ISingleObjectivePathRelinker>()) { 206 op.ParentsParameter.ActualName = Encoding.Name; 207 op.ParentsParameter.Hidden = true; 208 } 201 209 } 202 210 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman/3.3/TSP.cs
r17695 r17697 163 163 164 164 public static ITSPData GetDataFromInstance(TSPData input) { 165 ITSPData tspData = null;165 ITSPData tspData; 166 166 if (input.Dimension <= DistanceMatrixSizeLimit) { 167 167 tspData = new MatrixTSPData(input.Name, input.GetDistanceMatrix(), input.Coordinates) { Description = input.Description }; … … 208 208 209 209 private void InitializeOperators() { 210 Operators.Add(new TSPImprovementOperator()); 211 Operators.Add(new TSPMultipleGuidesPathRelinker()); 212 Operators.Add(new TSPPathRelinker()); 213 Operators.Add(new TSPSimultaneousPathRelinker()); 214 215 Operators.Add(new TSPAlleleFrequencyAnalyzer()); 210 var ops = new List<IItem>() { new TSPImprovementOperator(), new TSPMultipleGuidesPathRelinker(), 211 new TSPPathRelinker(), new TSPSimultaneousPathRelinker(), new TSPAlleleFrequencyAnalyzer() }; 216 212 foreach (var op in ApplicationManager.Manager.GetInstances<ITSPMoveEvaluator>()) { 217 Encoding.ConfigureOperator(op); 218 Operators.Add(op); 219 } 220 ParameterizeOperators(); 221 } 222 223 private void ParameterizeOperators() { 213 ops.Add(op); 214 } 215 Encoding.ConfigureOperators(ops); 216 Operators.AddRange(ops); 217 } 218 219 protected override void ParameterizeOperators() { 220 base.ParameterizeOperators(); 221 Parameterize(); 222 } 223 224 private void Parameterize() { 224 225 foreach (var op in Operators.OfType<TSPAlleleFrequencyAnalyzer>()) { 225 226 op.MaximizationParameter.ActualName = MaximizationParameter.Name; … … 238 239 op.TSPTourParameter.Hidden = true; 239 240 } 240 foreach (var op in Operators.OfType<ISingleObjectiveImprovementOperator>()) {241 op.SolutionParameter.ActualName = Encoding.Name;242 op.SolutionParameter.Hidden = true;243 }244 foreach (ISingleObjectivePathRelinker op in Operators.OfType<ISingleObjectivePathRelinker>()) {245 op.ParentsParameter.ActualName = Encoding.Name;246 op.ParentsParameter.Hidden = true;247 }248 foreach (ISolutionSimilarityCalculator op in Operators.OfType<ISolutionSimilarityCalculator>()) {249 op.SolutionVariableName = Encoding.Name;250 op.QualityVariableName = Evaluator.QualityParameter.ActualName;251 }252 241 } 253 242 }
Note: See TracChangeset
for help on using the changeset viewer.