Changeset 14128 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceCrossover.cs
- Timestamp:
- 07/20/16 14:02:36 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceCrossover.cs
r14046 r14128 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Encodings.PermutationEncoding; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 using HeuristicLab.Problems.BinPacking; … … 29 30 [Item("PackingSequenceCrossover", "An operator which crosses two PackingSequence representations.")] 30 31 [StorableClass] 31 public abstract class PackingSequenceCrossover : PackingSolutionCrossover , IPackingSequenceOperator {32 public abstract class PackingSequenceCrossover : PackingSolutionCrossover<Permutation>, IPackingSequenceOperator { 32 33 33 34 [StorableConstructor] … … 36 37 public PackingSequenceCrossover() 37 38 : base() { 38 39 39 ParentsParameter.ActualName = "PackingSequence"; 40 ChildParameter.ActualName = "PackingSequence"; 40 41 } 41 42 42 public abstract P ackingSequenceEncoding Cross(IRandom random, PackingSequenceEncoding parent1, PackingSequenceEncodingparent2);43 public abstract Permutation Cross(IRandom random, Permutation parent1, Permutation parent2); 43 44 44 45 public override IOperation Apply() { … … 46 47 47 48 ChildParameter.ActualValue = 48 Cross(RandomParameter.ActualValue, parents[0] as PackingSequenceEncoding, parents[1] as PackingSequenceEncoding);49 Cross(RandomParameter.ActualValue, parents[0], parents[1]); 49 50 50 51 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.