J. ugrir. Engng Res. (1969) 14 (2) 139-146
Optimize
Agricultural by Dynamic
Size Sorting
Product
Operation
Method
Programming TUNG LIANG*
A general dynamic programming method was developed for size sorting agricultural product so that optimization with respect to any decomposable (in dynamical programming sense) objective may be obtained. The theory was applied to solve papaya (a tropical fruit) package weight control problem. The result was significant and the actual mean box weight deviation from the labelled weight can be reduced approximately one-third compared to the present weight deviation as a result of the weight control method practised by the packers now.
1. Introduction Frequently, fruits, nuts or other agricultural products are segregated into several size categories either for marketing or for other purposes. This operation-referred to as size grading-is generally designed to either help bring higher financial returns because of consumer preference for certain sizes and because of the high sales appeal of a fruit display that looks uniform, or help optimize processing operations because uniform size farm products are much easier to be processed with little loss. Size grading standards (such as numbers of grades and their lower and upper limits) should be set up with due consideration of the overall economy of the entire operation. The papaya package weight control problem will be used here as an example to demonstrate the dynamic programming approach to the solution of this general type of problem. 2. Weight control problem Papaya fruit of various weights and sizes coming into packing plant are now sorted into different grades. Fruit of different grades are packed into different boxes and shipped to market. The net weight of each box is labelled at 10 lb for marketing reasons. It is desirable to control actual box net weight to 10 lb so that no fruit is wasted and also no severe shortage occurs. How to sort the fruit population into several grades, such that the weight of the boxes is close to the desired package weight without excessive packing labour cost, is the problem to be solved. The curve in Fig. I represents the weight distribution of an arbitrary fruit population, which is divided into four major subdivisions (or grades) A, B, C and D according to 4, d,, de, d,, and da.
Fig. 1. Weight of an arbitrary fruit population ??Uegartment
of Agricultural
Engineering,
University
of Hawaii,
Honolulu,
139
and its different grades
Hawaii
140
OPTIMIZE
AGRICULTURAL
PRODUCT
SIZE
SORTING
OPERATION
A method is needed to determine 4, d, and d3 optimally such that the difference between the expected weight and the labelled weight of fruit packages for a definite number of fruit is at a minimum. However, the size criteria d,, d, and d3 cannot be determined independently without due consideration to the number of fruit packed per box for each size grade. In other words. the optimal sorting standards and number of fruit per box should be determined simultaneously. Their close relationships are demonstrated in Fig. 2 which shows the average box weight deviation 3-5 r
?? AW
f
$ -
\
\
Grade from
Grade from 0.96- I.04 lb Grade from 0.86-0.96lb
\
1.04-1.40lb
\
\
\
\
x \
1’
:
:
/’
! \
1’ /I
\ \
I.5
//
\
1 \
/
/’
\ 1,;’ ‘L,
1.0” \
1’
1
1 \
P
\ \
0.5 -
//
X
t \
weight
box weight
??
A
2.5
%,.,y *_I 3 0
Fruit box mean
DW Desired
3.0
’
i
’
/
I/ d
\ \
\,
,/I
4,
\ \
\
\
Y \\
,I/
‘\
,I’
/ ’ ,I’ h
9
8
// <
\,
\/
/
/
IO
‘\
,I’ \d II
I
I
12
13
No. of fruit / box
Fig. 2. Box weight versus number of fruit/box at optimal grading standards
from desired weight of three different fruit grades as a function of number of fruit is packed. It clearly demonstrates that improper selection of number of fruit in a box cause serious weight deviation which is very undesirable. Also, the sorting standard or criteria should not be selected without due consideration to the overall box weight deviation for all size grades. This point is demonstrated clearly in Fig. 3, which shows even for two grades only that the weight standard used to separate fruit into two grades affect the overall box weight of both grades. 3. Let
Mathematical
formulation
f, = density distribution of individual fruit weight x (a random variable) and dk = the weight criteria used to define the kth grade fruit DW, = the desired net package weight for kth grade fruit defined by dk-l and dk rk = the difference between the expected weight and the desired net package weight for kth grade fruit fnk= number of fruit per package for size grade k fruit do and d, = criteria for unmarketable fruits.
dk_l
TUNG
141
LlANG I.0
-
??
Smaller
x
Bigger
0.8 ._ 0
size
size
Two sizes
together
52 i .I! ’ 0.6 GS
-
D,-Fruit
D,-
c H
weights
less
Fruit heavier than also unmarketable
than
03
LJ2- Criterion for separating fruits into two sizes
0.2 -
0.7
0.9 D2 criterion
I.0 for
separating
I.1 fruit
Into
I.2 two
grades,
I.3
I.4
lb
Fig. 3. Box weight oersu~ grading criterion
Then the problem is formulated according to Fig. 4. The objective function which is used as a measure of effectiveness for developing optimal solution may be expressed as follows:
Fig. 4. Correspondence
between
dynamic programming
stages and fruit grades
142
OPTIMIZE
AGRICULTURAL
PRODUCT
SIZE
SORTING
OPERATION
where rk =
- DW,
s
at f,dx
dk-1
for k = 1 to N.
The number of decisions for the kth stage is nk and &-I which represent the number of fruit packed and the minimum size of fruit for size grade k. The values of d,, and d, are not decision variables because they are determined by marketing conditions. The values of d,, and “I, are the standards used for determining under- and over-sized fruit, respectively. Let us first simplify
dk
xfZdx for normally distributed x, which may be expressed as: s G-1
4&4 = &jIxexp(-fer)dx Then E&x) may be evaluated as follows: Since
Rearranging terms of the above equation : ~&~~exp(-~~~~]d~~)2=
E,,(x)-~~~prxp(-1~~~dx
TUNG
143
LIANG
where
The general term
may also be evaluated as follows when f, is the density function of a normal distributed variable with parameters (p, (7):
where y = (x - P)/o. It may also be expressed as : fg+#f!+)*
The objective function, then, may be expressed as: N z(&
4,
. . . , d~,_hl,_t&
. . xf%)
=
2 k-1
1 rk(dk
dk-l&k)
-
Dwk
1
where (1)
r,(d,,d,,fn,‘)=
(~Ienp(-f(~)a)-exp(-f~~~~]
+P(~(~)-Q~~)))/(~(f+)
-9f+))-W
rk(dk, dk_l, fnk_) = ~lexp(-f~~)l)-expj-~~~)PJ]
(2)
+P{+(~)-Q(!~)))/[Q(‘~)
-$(+)I-
Define
Qd4 L,fnJ
= r,(d,, dk_l,fnk) +fddk--lffnk--l)
fork =: 1, . . . . N, where
f/c&) = min Qk&, dk+fnJ dx-l,fnt di>da-1
fork = 1, . . ..N. The problem now is decomposed into
N
small optimization problems.
DW,
144
OPTIMIZE
AGRICULTURAL
4.
Calculation
PRODUCT
SIZE
SORTING
OPERATION
and results
A computer program was coded for the solution of this general problem. It can be used by anyone who knows how to use canned programs. However, the objective function in the program has to be replaced by an appropriate one for problems other than the weight control problem presented here. The program may be obtained from the author. Solutions for the papaya population (Solo variety produced in the Puna area, Hawaii Island) normally distributed with mean = 0.928 lb and S.D. = 0.121 lb are graphically presented in Figs 5, 6 and 7. These figures contain information about optimal sorter setting, optimal number of
0.10 -
/’ /’
lb 0.05 -
Box weight deviations for all size grades x \ \ \ __-\ __--__---
0.00.
?? Nas.represent number/box
0.7
0.82
Optimal
Fig. 5. Optimal
0.86
0.96
optimal fruit for different
I. 04
I.40
sorter settings for dividing fruit into 5 sizes, lb
sorter settings, number of fruit/box from desired box;weight
versus box weight deviation
O.lO-
Box weight deviation for all size grades
?? Nos.represent fruit
0.7
I.06
0.72
Optimal sorter settings
Fig. 6. Optimal
optimal number/box
I.40
I.20
for dividing fruit Into 4 grades,
lb
sorter setting, number of fruit/box versus box weight deviation from desired box weight
TUNG
14s
LIANG
fruit per box for each grade and the expected box weight deviation from the desired box weight. Fig. 8 shows that the average box weight deviation is the least if the fruit is sorted into four grades. O.lO-
Boxweight
deviation for 011 size grades
‘b 0.05 -
--
----__
//
/I
-__.
/H
n.r,n
‘Nos.represent optimal fruit number/box
0.7
I.20
I. 06 Optimal sorter settings for dividing
Fig. 7. Optimal
I.40
fruit into 3 grades, lb
sorter setting, number off%t/box versus box weight deviation from desired box weight
3-
1
AT
\
DW L
\ \ \
Expected box weight for the k th grade Desired box weight No.of
total grades
\
?-
\ \ i \ \ \
I-
k\
‘\
y--_
__- ---x
--?t-
I
I
I
I
I
I
2
3
4
5
No. of grades
Fig. 8. Number of grades versus box weight
Sometimes it is necessary to optimize with more restrictions. Results shown in Fig. 9 are obtained by restricting the maximum fruit weight difference in any grade less or equal to 0.2 lb.
146
OPTIMIZE
AGRICULTURAL
PRODUCT
Box weight deviation
0.7
0.82 Optimal
sorter
0.96 setting
fruit
SORTING
OPERATION
for all size grade
I. 20
I.06
for dividing
SIZE
into 5 grades,
I.40 lb
Fig. 9. Optimal sorter setting, number of fruit/box versus box weight deviation from desired box weight (max. fruit weight difference within any grade restricted to less or equal to 0.2 lb)
A
Conventional
B
Dynamic programming method with fruit weight difference restriction
method
C
Dynamic programming method without restriction
Fig. 10 Comparison of box weight deviation (from desired weight) between boxes packed bv the proposed method and the conventionaI one used by packers now
The merit of this method over the ones used by packers now is shown in Fig. IO. The mean box weight is much closer to the desired weight for boxes packed by using the proposed method. This demonstrates that the dynamic programming method can be used to control box weight optimally.