©
Bag (packet) filling, ver. 4 (2017)
Simulates (Monte Carlo) bag (or packet) filling of discrete items.
2024.Jul.03 12:41:11
L, U g Lower and upper limits on the packet weight. •
μ, σ g Mean and st. dev. for item weight.
a, b g Truncation bounds, lower, upper, for item weight. •
ntr, .seed No. of trials, repeatability. •
Half width σ  (5, sugg.) Half-width, iff non-truncated (see below). •
tol, klasses Tolerance (Gauss. inversion), no. of histogram classes. •
Show values Shows the coordinates of the graph. •

Simulates via Monte Carlo the filling of bags or packets of weight W, such that it is L ≤ W ≤ U, 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 (nLBnUB) = (ceiling(L ⁄ (μ + h σ)), floor(U ⁄ (μh σ))) .
 Other suggested values for μ: small increases; 20.

References: Plate: BagFilling2017

• Wikipedia: Truncated normal distribution

• 1571-12-27: Kepler, Johannes (1630-11-15).

 
 
Valid HTML 4.01! IST http://web.tecnico.ulisboa.pt/~mcasquilho/compute/qc/Fx-bagfill4.php
Created: 2017-12-27 — Last modified: 2017-12-28