\BinContainerPackingBin

A class representative of a single bin to put @see Item into.

Summary

Methods
Properties
Constants
__construct()
getId()
getLength()
getHeight()
getBreadth()
getVolume()
getWeight()
getFittedItems()
getIterableFittedItems()
getTotalFittedVolume()
putItems()
putItem()
jsonSerialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setFittedItems()
putItemPosition()
$id
$length
$breadth
$height
$volume
$weight
$fittedItems
$totalFittedVolume
$totalFittedWeight
N/A

Properties

$id

$id : mixed

Type

mixed — The bin's id.

$length

$length : float

Type

float — The bin's length.

$breadth

$breadth : float

Type

float — The bin's breadth.

$height

$height : float

Type

float — The bin's height.

$volume

$volume : float

Type

float — The bin's volume.

$weight

$weight : float

Type

float — The bin's weight.

$fittedItems

$fittedItems : iterable

Type

iterable — The fitted item(s) inside the bin.

$totalFittedVolume

$totalFittedVolume : float

Type

float — The total fitted bin's volume.

$totalFittedWeight

$totalFittedWeight : float

Type

float — The total fitted bin's weight.

Methods

__construct()

__construct(mixed  $id, float  $length, float  $height, float  $breadth, float  $weight) : mixed

Parameters

mixed $id

The identifier of the bin.

float $length

The length of the bin.

float $height

The height of the bin.

float $breadth

The breadth of the bin.

float $weight

The weight of the bin.

Returns

mixed —

getId()

getId() : mixed

The bin's id getter.

Returns

mixed —

The bin's id.

getLength()

getLength() : float

The bin's length getter.

Returns

float —

The bin's length.

getHeight()

getHeight() : float

The bin's height getter.

Returns

float —

The bin's height.

getBreadth()

getBreadth() : float

The bin's breadth getter.

Returns

float —

The bin's breadth.

getVolume()

getVolume() : float

Get the bin's volume.

Returns

float —

The bin's volume.

getWeight()

getWeight() : float

The bin's weight getter.

Returns

float —

The bin's weight.

getFittedItems()

getFittedItems() : iterable

The bin's fitted items getter.

Returns

iterable —

The bin's fitted items.

getIterableFittedItems()

getIterableFittedItems() : \ArrayIterator

Returns

\ArrayIterator —

getTotalFittedVolume()

getTotalFittedVolume() : float

Get the bin's total fitted volume.

Returns

float —

The fitted bin's volume.

putItems()

putItems(array  $items) : bool

Parameters

array $items

Returns

bool —

putItem()

putItem(\BinContainerPacking\Item  $item) : bool

装箱

Parameters

\BinContainerPacking\Item $item

Returns

bool —

jsonSerialize()

jsonSerialize() : array

The json serialize method.

Returns

array —

The resulted object.

setFittedItems()

setFittedItems(\BinContainerPacking\Item  $item) : void

Parameters

\BinContainerPacking\Item $item

putItemPosition()

putItemPosition(\BinContainerPacking\Item  $item, array  $position) : bool

按位置装箱

Parameters

\BinContainerPacking\Item $item

The item to put into.

array $position

The starting position.

Returns

bool —

The flag indicates whether the item can fit into the bin or not, return true if the item can fit into the bin, otherwise false.