Changeset 7615 for branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.VariableNeighborhoodSearch
- Timestamp:
- 03/15/12 09:11:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.VariableNeighborhoodSearch/3.3/VariableNeighborhoodSearch.cs
r7268 r7615 302 302 } 303 303 private void UpdateShakingOperators() { 304 IMultiNeighborhoodShakingOperator oldShakingOperator = ShakingOperator; 305 IMultiNeighborhoodShakingOperator defaultShakingOperator = Problem.Operators.OfType<IMultiNeighborhoodShakingOperator>().FirstOrDefault(); 304 306 ShakingOperatorParameter.ValidValues.Clear(); 305 foreach (IMultiNeighborhoodShakingOperator op in Problem.Operators.OfType<IMultiNeighborhoodShakingOperator>() ) {307 foreach (IMultiNeighborhoodShakingOperator op in Problem.Operators.OfType<IMultiNeighborhoodShakingOperator>().OrderBy(op => op.Name)) { 306 308 ShakingOperatorParameter.ValidValues.Add(op); 307 309 op.CurrentNeighborhoodIndexParameter.ActualName = "CurrentNeighborhoodIndex"; 308 310 op.NeighborhoodCountParameter.ActualName = "NeighborhoodCount"; 311 } 312 if (oldShakingOperator != null) { 313 IMultiNeighborhoodShakingOperator shakingOperator = ShakingOperatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldShakingOperator.GetType()); 314 if (shakingOperator != null) ShakingOperator = shakingOperator; 315 else oldShakingOperator = null; 316 } 317 if (oldShakingOperator == null && defaultShakingOperator != null) { 318 ShakingOperator = defaultShakingOperator; 309 319 } 310 320 }
Note: See TracChangeset
for help on using the changeset viewer.