- Timestamp:
- 12/14/15 19:52:46 (9 years ago)
- Location:
- branches/HeuristicLab.BinPacking
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj
r13028 r13461 120 120 <Private>False</Private> 121 121 </Reference> 122 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">123 <Private>False</Private>124 </Reference>125 122 <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 126 123 <Private>False</Private> … … 145 142 <Reference Include="System" /> 146 143 <Reference Include="System.Core" /> 147 <Reference Include="System.Data" />148 144 <Reference Include="System.Drawing" /> 149 145 <Reference Include="System.Windows.Forms" /> 150 <Reference Include="System.Xml" />151 146 </ItemGroup> 152 147 <ItemGroup> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs.frame
r13161 r13461 29 29 [PluginFile("HeuristicLab.Problems.BinPacking.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginFile("PackingPlanVisualizations.dll", PluginFileType.Assembly)] 31 [PluginDependency("HeuristicLab.Common", "3.3")]32 [PluginDependency("HeuristicLab.Common.Resources", "3.3")]33 31 [PluginDependency("HeuristicLab.Core", "3.3")] 34 [PluginDependency("HeuristicLab.Persistence", "3.3")] 32 [PluginDependency("HeuristicLab.Core.Views", "3.3")] 33 [PluginDependency("HeuristicLab.Optimization.Views", "3.3")] 34 [PluginDependency("HeuristicLab.Problems.BinPacking", "3.3")] 35 [PluginDependency("HeuristicLab.MainForm", "3.3")] 36 [PluginDependency("HeuristicLab.Collections", "3.3")] 37 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 38 [PluginDependency("HeuristicLab.Optimization", "3.3")] 35 39 [PluginDependency("HeuristicLab.SharpDX", "2.6.3")] 36 40 public class HeuristicLabProblemsBinPackingViewsPlugin : PluginBase { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.Designer.cs
r13032 r13461 49 49 private void InitializeComponent() { 50 50 this.packingPlan3D1 = new PackingPlanVisualizations.PackingPlan3D(); 51 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();52 51 this.SuspendLayout(); 53 //54 // nameTextBox55 //56 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);57 this.errorProvider.SetIconPadding(this.nameTextBox, 2);58 52 // 59 53 // packingPlan3D1 … … 73 67 this.Name = "CuboidPackingShapeView"; 74 68 this.Size = new System.Drawing.Size(351, 299); 75 this.Controls.SetChildIndex(this.nameLabel, 0);76 this.Controls.SetChildIndex(this.nameTextBox, 0);77 this.Controls.SetChildIndex(this.infoLabel, 0);78 69 this.Controls.SetChildIndex(this.packingPlan3D1, 0); 79 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();80 70 this.ResumeLayout(false); 81 71 this.PerformLayout(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingItemView.cs
r13032 r13461 27 27 [View("View for a cuboid packing item.")] 28 28 [Content(typeof(CuboidPackingItem), true)] 29 public partial class CuboidPackingItemView : NamedItemView {29 public partial class CuboidPackingItemView : ItemView { 30 30 public CuboidPackingItemView() { 31 31 InitializeComponent(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.Designer.cs
r13032 r13461 49 49 private void InitializeComponent() { 50 50 this.packingPlan3D1 = new PackingPlanVisualizations.PackingPlan3D(); 51 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();52 51 this.SuspendLayout(); 53 //54 // nameTextBox55 //56 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);57 this.errorProvider.SetIconPadding(this.nameTextBox, 2);58 52 // 59 53 // packingPlan3D1 … … 73 67 this.Name = "CuboidPackingShapeView"; 74 68 this.Size = new System.Drawing.Size(351, 299); 75 this.Controls.SetChildIndex(this.nameLabel, 0);76 this.Controls.SetChildIndex(this.nameTextBox, 0);77 this.Controls.SetChildIndex(this.infoLabel, 0);78 69 this.Controls.SetChildIndex(this.packingPlan3D1, 0); 79 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();80 70 this.ResumeLayout(false); 81 71 this.PerformLayout(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/CuboidPackingShapeView.cs
r13032 r13461 27 27 [View("View for a cuboid shape.")] 28 28 [Content(typeof(CuboidPackingShape), true)] 29 public partial class CuboidPackingShapeView : NamedItemView {29 public partial class CuboidPackingShapeView : ItemView { 30 30 public CuboidPackingShapeView() { 31 31 InitializeComponent(); … … 45 45 } else { 46 46 Redraw(Content); 47 Content.Name = "XX";48 47 packingPlan3D1.StartRendering(); 49 48 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/RectangularPackingItemView.Designer.cs
r13032 r13461 46 46 private void InitializeComponent() { 47 47 this.packingPlan2D = new PackingPlanVisualizations.PackingPlan2D(); 48 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();49 48 this.SuspendLayout(); 50 //51 // nameTextBox52 //53 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);54 this.errorProvider.SetIconPadding(this.nameTextBox, 2);55 49 // 56 50 // packingPlan2D … … 70 64 this.Name = "PackingPlanView"; 71 65 this.Size = new System.Drawing.Size(351, 299); 72 this.Controls.SetChildIndex(this.nameLabel, 0);73 this.Controls.SetChildIndex(this.nameTextBox, 0);74 this.Controls.SetChildIndex(this.infoLabel, 0);75 66 this.Controls.SetChildIndex(this.packingPlan2D, 0); 76 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();77 67 this.ResumeLayout(false); 78 68 this.PerformLayout(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/RectangularPackingItemView.cs
r13032 r13461 27 27 [View("View for a rectangular packing item.")] 28 28 [Content(typeof(RectangularPackingItem), true)] 29 public partial class RectangularPackingItemView : NamedItemView {29 public partial class RectangularPackingItemView : ItemView { 30 30 public RectangularPackingItemView() { 31 31 InitializeComponent(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/RectangularPackingShapeView.Designer.cs
r13032 r13461 46 46 private void InitializeComponent() { 47 47 this.packingPlan2D = new PackingPlanVisualizations.PackingPlan2D(); 48 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();49 48 this.SuspendLayout(); 50 //51 // nameTextBox52 //53 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);54 this.errorProvider.SetIconPadding(this.nameTextBox, 2);55 49 // 56 50 // packingPlan2D … … 70 64 this.Name = "PackingPlanView"; 71 65 this.Size = new System.Drawing.Size(351, 299); 72 this.Controls.SetChildIndex(this.nameLabel, 0);73 this.Controls.SetChildIndex(this.nameTextBox, 0);74 this.Controls.SetChildIndex(this.infoLabel, 0);75 66 this.Controls.SetChildIndex(this.packingPlan2D, 0); 76 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();77 67 this.ResumeLayout(false); 78 68 this.PerformLayout(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Shapes/RectangularPackingShapeView.cs
r13032 r13461 27 27 [View("View for a rectangular shape.")] 28 28 [Content(typeof(RectangularPackingShape), true)] 29 public partial class RectangularPackingShapeView : NamedItemView {29 public partial class RectangularPackingShapeView : ItemView { 30 30 public RectangularPackingShapeView() { 31 31 InitializeComponent(); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceInversionManipulator.cs
r13032 r13461 33 33 [StorableConstructor] 34 34 protected PackingSequenceInversionManipulator(bool deserializing) : base(deserializing) { } 35 protected PackingSequenceInversionManipulator(PackingSequence Manipulator original, Cloner cloner) : base(original, cloner) { }35 protected PackingSequenceInversionManipulator(PackingSequenceInversionManipulator original, Cloner cloner) : base(original, cloner) { } 36 36 public PackingSequenceInversionManipulator() 37 37 : base() { 38 38 EncodedSolutionParameter.ActualName = "PackingSequence"; 39 39 } 40 40 public override IDeepCloneable Clone(Cloner cloner) { … … 44 44 protected override void Manipulate(IRandom random, PackingSequenceEncoding individual) { 45 45 InversionManipulator.Apply(random, individual.PackingSequence); 46 } 46 } 47 47 } 48 48 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceScrambleManipulator.cs
r13032 r13461 32 32 [StorableConstructor] 33 33 protected PackingSequenceScrambleManipulator(bool deserializing) : base(deserializing) { } 34 protected PackingSequenceScrambleManipulator(PackingSequence Manipulator original, Cloner cloner) : base(original, cloner) { }34 protected PackingSequenceScrambleManipulator(PackingSequenceScrambleManipulator original, Cloner cloner) : base(original, cloner) { } 35 35 public PackingSequenceScrambleManipulator() 36 36 : base() { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r13460 r13461 155 155 <Reference Include="System.Drawing" /> 156 156 <Reference Include="System.IO.Compression" /> 157 <Reference Include="System.IO.Compression.FileSystem" />158 157 <Reference Include="System.Windows.Forms" /> 159 158 </ItemGroup> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Interfaces/IPackingShape.cs
r13032 r13461 23 23 24 24 namespace HeuristicLab.Problems.BinPacking.Interfaces { 25 public interface IPackingShape : I NamedItem {25 public interface IPackingShape : IItem { 26 26 } 27 27 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingBin/CuboidPackingBin.cs
r13032 r13461 31 31 [StorableClass] 32 32 public class CuboidPackingBin : CuboidPackingShape, IPackingBin { 33 34 public CuboidPackingBin(int width, int height, int depth) : base (width, height, depth) {}33 34 public CuboidPackingBin(int width, int height, int depth) : base(width, height, depth) { } 35 35 36 36 [StorableConstructor] … … 42 42 return new CuboidPackingBin(this, cloner); 43 43 } 44 public CuboidPackingBin() : base() {45 44 public CuboidPackingBin() 45 : base() { 46 46 } 47 47 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingBin/RectangularPackingBin.cs
r13032 r13461 32 32 33 33 public RectangularPackingBin(int width, int height) : base(width, height) { } 34 public RectangularPackingBin() : base() { 34 public RectangularPackingBin() 35 : base() { 35 36 36 37 } … … 40 41 protected RectangularPackingBin(RectangularPackingBin original, Cloner cloner) 41 42 : base(original, cloner) { 42 } 43 } 43 44 public override IDeepCloneable Clone(Cloner cloner) { 44 45 return new RectangularPackingBin(this, cloner); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/CuboidPackingItem.cs
r13032 r13461 51 51 } 52 52 public CuboidPackingItem() : base() { 53 54 53 } 55 54 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/RectangularPackingItem.cs
r13032 r13461 31 31 [Item("RectangularPackingItem", "Represents a rectangular packing-item for bin-packing problems.")] 32 32 [StorableClass] 33 public class RectangularPackingItem : RectangularPackingShape, IPackingItem {33 public class RectangularPackingItem : RectangularPackingShape, IPackingItem { 34 34 35 35 public RectangularPackingBin TargetBin { get; set; } … … 50 50 return new RectangularPackingItem(this, cloner); 51 51 } 52 public RectangularPackingItem() : base() { 52 public RectangularPackingItem() 53 : base() { 53 54 } 54 55 55 56 public RectangularPackingItem(int width, int height, RectangularPackingBin targetBin) : base(width, height) { this.TargetBin = new RectangularPackingBin(targetBin.Width, targetBin.Height); } 56 57 57 58 public void AddTargetBinMeasures(int[] targetBinMeasures) { 58 59 TargetBin = new RectangularPackingBin(targetBinMeasures[0], targetBinMeasures[1]); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs.frame
r13032 r13461 29 29 [PluginFile("HeuristicLab.Problems.BinPacking-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Common", "3.3")] 31 [PluginDependency("HeuristicLab.Common.Resources", "3.3")]32 31 [PluginDependency("HeuristicLab.Core", "3.3")] 32 [PluginDependency("HeuristicLab.Data", "3.3")] 33 [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")] 34 [PluginDependency("HeuristicLab.Collections", "3.3")] 35 [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")] 36 [PluginDependency("HeuristicLab.Optimization", "3.3")] 37 [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")] 38 [PluginDependency("HeuristicLab.Parameters", "3.3")] 33 39 [PluginDependency("HeuristicLab.Persistence", "3.3")] 40 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 34 41 public class HeuristicLabProblemsBinPackingPlugin : PluginBase { 35 42 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RegularIdenticalBinPackingProblem.cs
r13460 r13461 47 47 48 48 #region Parameter Properties 49 public ValueParameter<B> PackingBinMeasuresParameter {50 get { return ( ValueParameter<B>)Parameters["PackingBinMeasures"]; }51 } 52 public ConstrainedValueParameter<IPackingSolutionDecoder> PackingSolutionDecoderParameter {53 get { return ( ConstrainedValueParameter<IPackingSolutionDecoder>)Parameters["PackingSolutionDecoder"]; }49 public IValueParameter<B> PackingBinMeasuresParameter { 50 get { return (IValueParameter<B>)Parameters["PackingBinMeasures"]; } 51 } 52 public IConstrainedValueParameter<IPackingSolutionDecoder> PackingSolutionDecoderParameter { 53 get { return (IConstrainedValueParameter<IPackingSolutionDecoder>)Parameters["PackingSolutionDecoder"]; } 54 54 } 55 55 #endregion -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs
r13032 r13461 31 31 [StorableClass] 32 32 public abstract class CuboidPackingShape : PackingShape<ThreeDimensionalPacking>, IRegularPackingShape, IComparable<CuboidPackingShape> { 33 #region Properties 33 #region Properties 34 34 /// <summary> 35 35 /// Describes the size on the X-axis … … 62 62 } 63 63 public override bool Encloses(ThreeDimensionalPacking checkedPosition, PackingShape<ThreeDimensionalPacking> checkedShape) { 64 return Encloses(checkedPosition, (CuboidPackingShape) 64 return Encloses(checkedPosition, (CuboidPackingShape)checkedShape); 65 65 } 66 66 private bool Encloses(ThreeDimensionalPacking checkedPosition, CuboidPackingShape checkedShape) { 67 67 return Encloses(new CuboidDiagonal(this), new CuboidDiagonal(checkedPosition, checkedShape)); 68 } 68 } 69 69 private bool Encloses(CuboidDiagonal c1, CuboidDiagonal c2) { 70 70 return (c1.x1 <= c2.x1 && … … 84 84 private bool Overlaps(CuboidDiagonal c1, CuboidDiagonal c2) { 85 85 return !(c1.x1 > c2.x2 || 86 c1.y1 > c2.y2 || 86 c1.y1 > c2.y2 || 87 87 c1.z1 > c2.z2 || 88 88 c1.x2 < c2.x1 || … … 98 98 } 99 99 } 100 #endregion 100 #endregion 101 101 102 public CuboidPackingShape(int width, int height, int depth) : base () { 102 protected CuboidPackingShape(int width, int height, int depth) 103 : base() { 103 104 this.Width = width; 104 105 this.Height = height; … … 108 109 public override void InitializeFromMeasures(int[] measures) { 109 110 if (measures.Length != 3) 110 throw new InvalidOperationException("Nr of measures does not fit shape-dimension."); 111 throw new InvalidOperationException("Nr of measures does not fit shape-dimension."); 111 112 this.Width = measures[0]; 112 113 this.Height = measures[1]; … … 125 126 this.Depth = original.Depth; 126 127 } 127 public CuboidPackingShape() : base(){ } 128 129 protected CuboidPackingShape() : base() { } 128 130 129 131 public override string ToString() { … … 136 138 //Using "Clustered-Area-Height"-comparison as descr 137 139 138 int result = (this.Width * this.Depth).CompareTo (other.Width * other.Depth); 139 140 if (result == 0) 141 result = this.MultipliedMeasures.CompareTo(other.MultipliedMeasures); 142 //if (result == 0) { 143 // result = this.Depth.CompareTo(other.Depth) + this.Width.CompareTo(other.Width); 144 // if (result == 0) { 145 // result = this.Width.CompareTo(other.Width); 146 if (result == 0) 147 result = this.Height.CompareTo(other.Height); 148 // } 149 //} 140 int result = (this.Width * this.Depth).CompareTo(other.Width * other.Depth); 141 142 if (result == 0) 143 result = this.MultipliedMeasures.CompareTo(other.MultipliedMeasures); 144 if (result == 0) 145 result = this.Height.CompareTo(other.Height); 150 146 return result; 151 } 147 } 152 148 153 149 public int CompareTo(object obj) { 154 if (obj.GetType() .Equals(this.GetType()))150 if (obj.GetType() == this.GetType()) 155 151 return this.CompareTo((CuboidPackingShape)obj); 156 152 else return 0; 157 153 } 158 154 159 #endregion 155 #endregion 160 156 161 157 private struct CuboidDiagonal { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/PackingShape.cs
r13032 r13461 30 30 [Item("PackingShape", "Represents an abstract shape to describe the measures and the positioning of objects related to bin-packing problems.")] 31 31 [StorableClass] 32 public abstract class PackingShape<D> : NamedItem, IPackingShape 33 where D: class, IPackingDimensions 34 { 32 public abstract class PackingShape<D> : Item, IPackingShape 33 where D : class, IPackingDimensions { 35 34 public static Type PositionType { 36 35 get { return typeof(D); } … … 45 44 public abstract D Origin { get; } 46 45 47 p ublicPackingShape(int[] measures) {46 protected PackingShape(int[] measures) { 48 47 InitializeFromMeasures(measures); 49 48 } 50 public PackingShape() {51 49 52 }50 protected PackingShape() { } 53 51 54 52
Note: See TracChangeset
for help on using the changeset viewer.