[9563] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[13032] | 3 | * Copyright (C) 2002-2015 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
[9563] | 4 | *
|
---|
| 5 | * This file is part of HeuristicLab.
|
---|
| 6 | *
|
---|
| 7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
| 8 | * it under the terms of the GNU General Public License as published by
|
---|
| 9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 10 | * (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public License
|
---|
| 18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 19 | */
|
---|
| 20 | #endregion
|
---|
| 21 |
|
---|
[13032] | 22 |
|
---|
[9563] | 23 | using System;
|
---|
| 24 | using HeuristicLab.Common;
|
---|
| 25 | using HeuristicLab.Core;
|
---|
[14128] | 26 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
[9563] | 27 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
[14046] | 28 | using HeuristicLab.Problems.BinPacking;
|
---|
[9563] | 29 |
|
---|
| 30 | namespace HeuristicLab.Encodings.PackingEncoding.PackingSequence {
|
---|
[14128] | 31 | [Item("SequenceMove", "An abstract move for a packing sequence encoded solution.")]
|
---|
[9563] | 32 | [StorableClass]
|
---|
[14128] | 33 | public abstract class SequenceMove : Item, IPackingMove<Permutation> {
|
---|
[9563] | 34 | [Storable]
|
---|
[14128] | 35 | public Permutation PackingSequence { get; protected set; }
|
---|
[9563] | 36 |
|
---|
| 37 | [StorableConstructor]
|
---|
| 38 | protected SequenceMove(bool deserializing) : base(deserializing) { }
|
---|
| 39 | protected SequenceMove(SequenceMove original, Cloner cloner)
|
---|
| 40 | : base(original, cloner) {
|
---|
| 41 | if (original.PackingSequence != null)
|
---|
| 42 | this.PackingSequence = cloner.Clone(original.PackingSequence);
|
---|
| 43 | }
|
---|
[14128] | 44 | public SequenceMove(Permutation packingSequence)
|
---|
[9563] | 45 | : base() {
|
---|
| 46 | PackingSequence = packingSequence;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
[14128] | 49 | public abstract Permutation GetSolutionAfterMove();
|
---|
[9563] | 50 | public abstract Type GetMoveAttributeType();
|
---|
| 51 | public abstract SequenceMoveAttribute GetAttribute(double quality);
|
---|
| 52 | public abstract bool BelongsToAttribute (SequenceMoveAttribute attribute, bool hardCriterion);
|
---|
| 53 | }
|
---|
| 54 | } |
---|