Changeset 14046 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/Moves/MultiComponentVectorTabuMaker.cs
- Timestamp:
- 07/12/16 19:34:31 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/Moves/MultiComponentVectorTabuMaker.cs
r13032 r14046 25 25 using HeuristicLab.Parameters; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Problems.BinPacking.Interfaces; 27 using HeuristicLab.Problems.BinPacking; 28 28 29 29 30 namespace HeuristicLab.Encodings.PackingEncoding.MultiComponentVector { 30 31 [Item("Multi component tabu maker", "Declares a given single grouping move as tabu, by adding its attributes to the tabu list and also store the solution quality or the move quality (whichever is better).")] 31 32 [StorableClass] 32 public class MultiComponentVectorTabuMaker : TabuMaker, IMultiComponentVectorMoveOperator {33 public class MultiComponentVectorTabuMaker : TabuMaker, IMultiComponentVectorMoveOperator { 33 34 public ILookupParameter<IPackingMove> PackingMoveParameter { 34 35 get { return (ILookupParameter<IPackingMove>)Parameters["PackingMove"]; } … … 43 44 public MultiComponentVectorTabuMaker() 44 45 : base() { 45 46 Parameters.Add(new LookupParameter<IPackingMove>("PackingMove", "The move to evaluate.")); 46 47 Parameters.Add(new LookupParameter<MultiComponentVectorEncoding>("MultiComponentVector", "The solution to evaluate.")); 47 48 } … … 55 56 MultiComponentVectorEncoding solution = MultiComponentVectorParameter.ActualValue; 56 57 double baseQuality = moveQuality; 57 if (maximization && quality > moveQuality || !maximization && quality < moveQuality) 58 if (maximization && quality > moveQuality || !maximization && quality < moveQuality) 58 59 baseQuality = quality; // we make an uphill move, the lower bound is the solution quality 59 60 60 61 MultiComponentVectorMove mcvMove = move as MultiComponentVectorMove; 61 62 if (mcvMove != null)
Note: See TracChangeset
for help on using the changeset viewer.