× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I don't there's any need to know total number of cases...

Simply hard code a number between 1-10 into your code...
for each package generate a random number between 1 and 10.

If the numbers match, inspect that package.

You'll average a 10% inspection rate.

Charles


On Wed, Jan 30, 2013 at 4:36 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

You'll need a random number generator that returns a number based on
"from" and "to" parameters.

Do you know the total number of "cases" per day? Can you identify each one
sequentially? Do you need to generate a list of case sequence numbers?

total_cases = 100;
inspect_cases = total_cases / 10;

for i = 1 to inspect_cases;
inspect_this = random(1:total_cases);
(store inspect_this somewhere)
endfor;

If your random() function ever returns a duplicate value, you'll need to
discard it and decrement "i".

-Nathan



----- Original Message -----
From: Bill Reger <billr@xxxxxxxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Cc:
Sent: Wednesday, January 30, 2013 9:09 AM
Subject: Random selection of 10%

We would like to audit 10% of the Cases that flow down the shipping
conveyor - checking that the contents of the Case matched what was
(supposedly) packed.

Now obviously we could count each Case and pull every 10th Case for audit.
But it would not take long for someone to figure this out - and if they
were so inclined - only short Cases other than the 10th in line.

Is there an algorithm/logic that we could employ to randomly pull Cases
that would equate to 10% over the course of a day but not be every 10th
Case? (My logic brain is on strike today and I can't think of a way to
design this.)

Bill
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.