Changeset 15511 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/NMoveAbsoluteAttribute.cs
- Timestamp:
- 12/11/17 23:06:32 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/NMoveAbsoluteAttribute.cs
r15504 r15511 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 32 33 33 34 [Storable] 34 public Dictionary<int, int> OldAssignments { get; private set; }35 public List<Tuple<int, int>> OldAssignments { get; private set; } 35 36 [Storable] 36 37 public double MoveQuality { get; private set; } … … 41 42 public NMoveAbsoluteTabuAttribute(NMove move, IntegerVector assignment, double moveQuality) 42 43 : base() { 43 OldAssignments = new Dictionary<int, int>();44 foreach (var kvp in move.NewAssignments)45 OldAssignments.Add( kvp.Key, assignment[kvp.Key]);44 OldAssignments = new List<Tuple<int, int>>(move.N); 45 foreach (var equip in move.Indices) 46 OldAssignments.Add(Tuple.Create(equip, assignment[equip])); 46 47 MoveQuality = moveQuality; 47 48 }
Note: See TracChangeset
for help on using the changeset viewer.