Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/13 15:03:41 (11 years ago)
Author:
jhelm
Message:

#1966: Fixed some problems in MCV-move operators; Added parts of potvin-encoding implementation;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/Moves/ThreeWay/Moves/SingleItemRotationMove.cs

    r9440 r9473  
    4848
    4949    public override MultiComponentVectorEncoding GetVectorAfterMove() {
    50       var result = new MultiComponentVectorEncoding();
    51       result.PackingInformations = new ItemList<PackingInformation>(this.MultiComponentVector.PackingInformations);
    52       result.PackingInformations[ItemIndex].Rotated = !result.PackingInformations[ItemIndex].Rotated;
     50      return GetVectorAfterMove (MultiComponentVector, ItemIndex);
     51    }
     52    public static MultiComponentVectorEncoding GetVectorAfterMove(MultiComponentVectorEncoding multiComponentVector, int itemIndex) {
     53      var result = multiComponentVector.Clone(new Cloner()) as MultiComponentVectorEncoding;
     54      result.PackingInformations[itemIndex].Rotated = !result.PackingInformations[itemIndex].Rotated;
    5355      return result;
    5456    }
     
    5759      return typeof(SingleItemRotationMoveAttribute);
    5860    }
     61
     62    public override string ToString() {
     63      return "RM(i=" + ItemIndex+")";
     64    }
    5965  }
    6066}
Note: See TracChangeset for help on using the changeset viewer.