# Download THE DISTRIBUTER'S THREE-DIMENSIONAL PALLET-PACKING PROBLEM: A HUMAN INTELLIGENCE-BASED HEURISTIC APPROACH PDF

Title THE DISTRIBUTER'S THREE-DIMENSIONAL PALLET-PACKING PROBLEM: A HUMAN INTELLIGENCE-BASED HEURISTIC APPROACH 5.2 MB 135
##### Document Text Contents
Page 68

FUNCTION COMPLAYERLIST(i j);

This function is required for the compiler built in function QSORT().
It returns the difference between the values i and j.

FUNCTION PACKLAYERO;

If LAYERTHICKNESS=0 do {PACKINGS; RETURN;};
Initialize the first and only node to the layer's X and Z values:

SCRAPFIRST.CUMX=PX;SCRAPFIRST.CUMZ=0;
Perform an infinite loop unless 'Q' is typed to quit {

Check the keyboard input, if 'Q' is hit, exit the loop and RETURN;
To find the gap with the least Z value in the layer call FINDSMALLEST();

SITUATION-1:
If there is no box on both sides of the gap do {

Calculate the gap's X and Z dimensions;
To find the most suitable boxes to the gap found, by looking at;

the X-dimension of the gap: LENX,
layerthickness of the gap: LAYERTHICKNESS,
maximum available thickness to the gap: REMAINPY,
maximum available Z dimension to the gap: LPZ;
call FINDBOX(LENX, LAYERTHICKNESS, REMAINPY, LPZ,
LPZ);

Check on the boxes found by the FINDBOX() function by calling
CHECKFOUNDO;

If the packing of the layer is finished, exit the loop;
If the edge of the layer is evened, go to the first line of the next loop;
Add a new node to the linked list showing the topology of the edge of the

currently being packed layer after packing a new box, and set all
the necessary variables and pointers properly;

To check the hundred percent packing condition,
call VOLUMECHECKO;

}

A-4