|
Bag filling, ver. 3
(2013)
Simulates (Monte Carlo) bag filling of discrete items. |
|
|
wL,
wU |
g |
Lower and upper limits on
the bag weight. • |
μ, σ |
g |
Mean and st. dev. for i_weight, item weight. |
a, b |
g |
Truncation bounds, lower, upper,
for i_weight. • |
ntr, .seed |
|
No. of trials, repeatability. • |
Half width |
σ (5, sugg.) |
Half-width, iff non-truncated (see below). • |
tol, klasses |
|
Tolerance, no. of histogram classes. • |
Show values |
|
Shows the coordinates of the graph. • |
Simulates via Monte Carlo
the filling of bags of weight W, such that it is
wL ≤ W ≤ wU,
with discrete items (such as bags of oranges),
each item following a Truncated Gaussian,
with given μ and σ, in (a, b).
Makes a graph of
fW for the variable
W = Σ(i=1..n)wi.
Note that n too is a (dependent) random variable.
If truncation is not desired, supply any a = b
(such as both 0). Then, half width, h, is used, permitting
to determine the range of items, n, to fill in each bag, i.e., in
(nLB, nUB) =
(ceiling(L ⁄ (μ + h σ)), floor(U ⁄ (μ − h σ))) .
|
| References: |
Plate: BagFilling2013 |
• Wikipedia: Truncated normal distribution
• 1914-11-08: Dantzig, George Bernard
(2005-05-13). |