Skip to content
Badr Alghamdi
ToolsLearnReferenceGlossaryField LibraryMethod sheetsWritingAbout
العربية
←Tools

First in first out: the record says oldest, the yard newest

Type the receipts and the picks in the order they happened, and set how many lots a lane will hold. Each receipt takes a lane permanently and a pick takes whatever is on top of the lowest lane still holding something, so the order lots leave in is not the order they arrived in. The page counts the pairs that come out reversed, names the lot the rule puts on top next, and shows the count falling to zero at a height of one.

Live result

At a height of 2 the rule sends 2 pairs out in reverse of the order they arrived in. The lot it puts on top next is A.
At a height of 2 the rule sends 2 pairs out in reverse of the order they arrived in. The lot it puts on top next is A.

The two order rails

Live chart
Receipt order and outgoing order under the stated lane ruleReceipts are numbered in typed order and assigned permanently to a lane by the height of 2. A pick takes the top lot from the lowest numbered lane that still holds something. The upper rail shows receipt order and the lower rail shows outgoing order. Each connector crossing is one reversed pair. The record has 2 reversed pairs and the next lot on top is A.received in this orderlanes1234521435leaves in this orderpairs reversed · 2pairs reversed · 2

Try a record

2lots

How many lots one lane will hold. Above eight this page stops, because the binding question stops being height.

Edit the event record▾

Events

Event 1

Event kind

Your own label for this lot. Spaces at the ends are trimmed, so two lots cannot look identical.

Event 2

Event kind

Your own label for this lot. Spaces at the ends are trimmed, so two lots cannot look identical.

Event 3

Event kind

Your own label for this lot. Spaces at the ends are trimmed, so two lots cannot look identical.

Event 4

Event kind

Your own label for this lot. Spaces at the ends are trimmed, so two lots cannot look identical.

Event 5

Event kind

Your own label for this lot. Spaces at the ends are trimmed, so two lots cannot look identical.

Event 6

Event kind

Every lot

1
Lot
A
Lane
1
Position in the lane
1
Left in the replay
yes
Leaves at
2
2
Lot
B
Lane
1
Position in the lane
2
Left in the replay
no
Leaves at
1
3
Lot
C
Lane
2
Position in the lane
1
Left in the replay
yes
Leaves at
4
4
Lot
D
Lane
2
Position in the lane
2
Left in the replay
yes
Leaves at
3
5
Lot
E
Lane
3
Position in the lane
1
Left in the replay
yes
Leaves at
5
Every lot
ReceivedLotLanePosition in the laneLeft in the replayLeaves at
1A11yes2
2B12no1
3C21yes4
4D22yes3
5E31yes5

The two orders

Height limit
Value
2
Lanes in use
Value
3
Pairs that leave in reverse
Value
2
Lot on top next
Value
A
Outgoing order
Value
B, A, D, C, E
Receipt order
Value
A, B, C, D, E
The two orders
The two ordersValue
Height limit2
Lanes in use3
Pairs that leave in reverse2
Lot on top nextA
Outgoing orderB, A, D, C, E
Receipt orderA, B, C, D, E

How many lots a lane will hold

lots
lots
lots
lots

It does not check the values in between.

How the answer sits across the values sampledA rail of the 8 values sampled, from 1 lot to 8 lots in steps of 1 lot. No other integer in the range leaves how many pairs come out reversed at 2. Every admissible integer in this range was checked.first change1 lotfirst change3 lots2 lotson the page

No other integer in the range leaves how many pairs come out reversed at 2. Every admissible integer in this range was checked.

No other integer in the range leaves how many pairs come out reversed at 2. Every admissible integer in this range was checked.
The answer2
Values sampled1 lot to 8 lots, 8 values, step 1 lot
Holds from2 lots
Holds to2 lots
Nearest value that changes it1 lot and 3 lots
The answer there0 / 4

What an unchanged region does and does not prove is set out in a short lesson.

Every admissible integer in this range was checked. Values outside the range remain unchecked.

Here is the maths

▾

The rule used on this page

Receipts are numbered in the order you type them, starting at one on this page and at zero in the calculation. Each receipt is assigned permanently to a lane, which is its number divided by the height limit and rounded down. A receipt is placed on top of whatever its lane already holds. A pick takes the top lot from the lowest numbered lane that still holds something. A gap made by a pick is never backfilled and no lot is ever moved between lanes. That rule is the page's, it is deliberately small, and it is not taken from either source.
ℓi=⌊ih⌋\ell_i=\left\lfloor\frac{i}{h}\right\rfloorℓi​=⌊hi​⌋
where ℓi\ell_iℓi​ is the lane number in the calculation, iii the receipt number starting at zero, and hhh the height limit.

A worked example

  1. At height 2, receipts A and B enter lane 1, C and D enter lane 2, and E enters lane 3.
  2. The pick takes B from the top of the lowest occupied lane. A is then the lot on top next.
  3. Draining the rule gives B, A, D, C, E.
  4. The pairs B with A and D with C leave in reverse, so the count is 2.

What a reversed pair is

Two lots form a reversed pair when their order in the full outgoing sequence is the reverse of their order in the receipt sequence. The number this page reports is a count of pairs, not a count of lots that came out in the wrong place and not a count of moves anybody would have to make. In the worked example four lots are involved across two pairs, and the answer is two.

Nothing here counts a relocation

The rule never moves a lot to reach another one, so there is no relocation to count and this page reports none.

The two answers move independently

The pair count and the lot the rule puts on top next are different answers about the same record. On six receipts with a pick after the third and another after the fifth, heights three and four both give six reversed pairs while the next lot changes. The sweep watches the count and the finding names both.

Check it yourself

Set the height to 6 and leave the sweep at 1 to 8 in steps of 1. The answer holds from 5 through 8, because five receipts already fit in one lane and raising the ceiling of a lane that is not full changes nothing. Then set the height to 1. The count is zero, and it is zero only there.

Counting the crossings on the chart

Every place two connectors cross is one reversed pair, and the marked crossings stop at twelve. Where three connectors meet at one point the marks sit on top of each other, so read the number from the table rather than from the drawing.

The calculation domain

The calculation accepts a height limit from 1 to 8 and 1 to 100 events with lot names up to 80 characters. This page offers 4 to 14 events and shorter names because the chart draws one cell for every receipt.

Boundary

It replays the events you typed under the one lane rule stated on this page. It does not determine how a real yard is laid out, whether a lot can be reached, or what an inventory record ought to assume.

Source anchors

Auburn University, an open dissertation on block stacked warehouses. United States Government Accountability Office, inventory system requirements. The first describes lots placed on one another on a floor and what that does to reaching them. The second sets out first in first out as an assumption an inventory record makes rather than a description of a yard. The rule on this page is the page's own and every event on it comes from your own typing.

Calculation version

1.0.0

The whole record prints. Your browser can save it as a PDF instead of printing it.

This page will never prescribe an order for taking lots out, count the moves anybody would have to make, lay out a floor, or call the lot it names next the lot that should be issued. It describes what its own stated rule produces from the events you typed. It does not determine that a lot is accessible, safe, conforming, released or within its shelf life.

Related

  • Pallet patterns: the bottom carton decides between two layer buildsA carton and a pallet deck give you two ways to build a layer: one with every corner standing on the corner below it, one with the layers turned so they tie into each other. The turned pattern fits one more carton to a layer and covers the whole deck. Then the stack goes up, the bottom carton carries everything above it, and the turned pattern runs out of strength three layers earlier.
  • Intermediate maximum: the yard peaks before clearance endsCleared boxes arrive in the yard faster than trucks take them away, so the pile peaks while clearance is still running. The height of that peak and the day it lands both move with one rate.

Stack order record

First in first out: the record says oldest, the yard newest

Accepted inputs

Height limit
2
Event 1
Receipt A
Event 2
Receipt B
Event 3
Receipt C
Event 4
Receipt D
Event 5
Receipt E
Event 6
Pick

All results

Height limit
2
Lanes in use
3
Pairs that leave in reverse
2
Lot on top next
A
Lots already picked in the replay
B
Outgoing order
B, A, D, C, E
Receipt order
A, B, C, D, E
Lot record 1
A, 1, 1, 2, yes
Lot record 2
B, 1, 2, 1, no
Lot record 3
C, 2, 1, 4, yes
Lot record 4
D, 2, 2, 3, yes
Lot record 5
E, 3, 1, 5, yes

Sweep of How many lots a lane will hold

The assumption
How many lots a lane will hold
Values sampled
1 to 8, 8
The answer
2
Holds across
2 to 2 lots
Nearest change
1 lots, 0 and 3 lots, 4
Reading the boundary
The sweep samples only the values you entered. Between samples the answer is not checked, so read the boundary as observed, not proven.

Record fields

Calculation version
1.0.0
Boundary
It replays the events you typed under the one lane rule stated on this page. It does not determine how a real yard is laid out, whether a lot can be reached, or what an inventory record ought to assume.
Calculation trace
Number every receipt in typed order and assign it permanently to a lane from the height limit. Replay every pick from the top of the lowest numbered occupied lane. Drain the same rule to form the full outgoing order. Count every pair whose outgoing positions reverse its receipt positions. Name the top lot in the lowest numbered lane that remains occupied.
Source anchor
Auburn University, an open dissertation on block stacked warehouses. United States Government Accountability Office, inventory system requirements.

This page will never prescribe an order for taking lots out, count the moves anybody would have to make, lay out a floor, or call the lot it names next the lot that should be issued. It describes what its own stated rule produces from the events you typed. It does not determine that a lot is accessible, safe, conforming, released or within its shelf life.

Badr Alghamdi · badralghamdi.com/tools/the-stack-says-otherwise

Badr Alghamdi

Request a consultationLinkedInGitHubRSS