Description Usage Arguments Details Value Author(s) References See Also Examples
A fixed number of popcorn kernels are cooked are heated at the same temperature. This simulation returns the number of
kernels that are edible when the pot is left on the stove for a given number of T
seconds.
1 | popcorn(T=120)
|
T |
the number of seconds that the pot is left on the stove. The default amount, if not provided, is 120 seconds. |
This function simulates the number of edible popcorn kernels that are made when cooking a fixed number of kernels at the same heat setting
for a given amount of T
seconds.
Time durations less than 77 seconds are not supported. A vector (list) of time values is not permitted, since the goal is to perform sequential
experimentation to determine the optimum time, with the fewest number of function calls.
Returns the number of edible popcorn kernels. Random noise is added for some realism.
Kevin Dunn, <kgdunn@gmail.com>
Please see Chapter 5 of the following book: Kevin Dunn, 2010 to 2019, Process Improvement using Data, https://learnche.org/pid
1 2 3 4 5 6 7 8 9 10 11 | # Cooking for a very short duration is not supported.
# For example, popcorn(T=50) will fail
# Cooking from 77 seconds onwards is supported
popcorn(T=120)
# What happens if we leave the pot on the stove for too long?
popcorn(T=500)
# Can you find the optimum time to cook on the stove
# using the fewest number of function calls?
|
[1] 75
[1] 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.