Changeset 15585 for branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs
- Timestamp:
- 01/09/18 15:46:53 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs
r15554 r15585 20 20 21 21 /// <summary> 22 /// Updates the residual space for a given bin packing 22 /// Updates the residual space for a given bin packing. 23 23 /// </summary> 24 24 /// <param name="binPacking"></param> … … 26 26 /// <param name="position"></param> 27 27 protected abstract void UpdateResidualSpace(BinPacking3D binPacking, PackingItem item, PackingPosition position); 28 29 /// <summary> 30 /// Adds an extreme point to the bin packing. 31 /// </summary> 32 /// <param name="binPacking"></param> 33 /// <param name="position"></param> 34 /// <returns></returns> 28 35 protected abstract bool AddExtremePoint(BinPacking3D binPacking, PackingPosition position); 29 36 … … 214 221 215 222 /// <summary> 216 /// Returns true, if the given poisition and the related residual space is within the residual space of the given extreme point217 /// </summary> 218 /// <param name="pos"> </param>223 /// Returns true, if the given poisition (pos) and the related residual space is within any residual space of the given extreme point (ep). 224 /// </summary> 225 /// <param name="pos">Given poisition</param> 219 226 /// <param name="rsPos"></param> 220 /// <param name="ep"> </param>227 /// <param name="ep">Given extreme point</param> 221 228 /// <param name="rsEp"></param> 222 229 /// <returns></returns> … … 226 233 227 234 /// <summary> 228 /// Returns true, if the given poisition and the related residual space is within the residual space of the given extreme point229 /// </summary> 230 /// <param name="pos"> </param>235 /// Returns true, if the given poisition (pos) and the related residual space is within the residual space of the given extreme point (ep). 236 /// </summary> 237 /// <param name="pos">Given poisition</param> 231 238 /// <param name="rsPos"></param> 232 /// <param name="ep"> </param>239 /// <param name="ep">Given extreme point</param> 233 240 /// <param name="rsEp"></param> 234 241 /// <returns></returns> 235 242 protected virtual bool IsWithinResidualSpaceOfAnotherExtremePoint(Vector3D pos, ResidualSpace rsPos, PackingPosition ep, ResidualSpace rsEp) { 243 /*old implementation 236 244 return rsEp.Width >= pos.X - ep.X + rsPos.Width 237 245 && rsEp.Height >= pos.Y - ep.Y + rsPos.Height 238 && rsEp.Depth >= pos.Z - ep.Z + rsPos.Depth; 246 && rsEp.Depth >= pos.Z - ep.Z + rsPos.Depth;*/ 247 248 var x = pos.X >= ep.X && pos.X + rsPos.Width <= ep.X + rsEp.Width; 249 var y = pos.Y >= ep.Y && pos.Y + rsPos.Height <= ep.Y + rsEp.Height; 250 var z = pos.Z >= ep.Z && pos.Z + rsPos.Depth <= ep.Z + rsEp.Depth; 251 252 return x && y && z; 239 253 } 240 254
Note: See TracChangeset
for help on using the changeset viewer.