HW3-solutions

html

School

University of Texas *

*We aren’t endorsed by this school

Course

230

Subject

Industrial Engineering

Date

Apr 3, 2024

Type

html

Pages

7

Report

Uploaded by sjobs3121

Homework 3 for ISEN 355 (System Simulation) (C) 2023 David Eckman Due Date: Upload to Canvas by 5:00pm (CST) on Friday, February 17. Problem 1. (20 points) Consider a distribution center where finished product arrives on inbound trucks, is stored on racks, and is eventually shipped to customers on outbound trucks. Inbound and outbound ships consist of a mix of finished products. For simplicity, assume that product arrives, is stored, and is ordered in full-pallet quantities, thus pallets are never broken down into cases. All inventory for a given product is stored in one area of the rack space; it is not spread throughout the DC. The distribution center has an automated storage and retrieval system (AS/RS) consisting of conveyors that shuttle pallets between the docks and the racks and stacker cranes that move pallets from the conveyor to the appropriate rack space (if storing) and vice versa (if retrieving). The facility has multiple stacker cranes (one for each rack), so the storage of all product from an inbound truck or retrieval of all product for an outbound order almost certainly involves multiple cranes. The stacker cranes are programmed to follow a sequence of storage and retrieval tasks. Suppose that you intend to build a simulation model of the distribution center to aid in making decisions about the facility's AS/RS . (a) (6 points) Come up with three key performance indicators (KPIs) that could measure the efficiency of the AS/RS: 1. One should reflect the efficiency of processing inbound orders. 2. One should reflect the efficiency of processing outbound orders. 3. One should reflect the efficiency of how products travel throughout the DC. Justify your choices. Here are some examples for the three performance metrics. There are many options. 1. The length of time between when an inbound truck starts being unloaded and when the last pallet from that truck is stored on the racks. This is the makespan for the task of unloading an inbound truck. This quantity could be further aggregated (e.g., averaged or summed) over all inbounds trucks for a given day. If this number is high, it means it takes the last pallet a long time to be stored. It does not necessarily mean that we are holding up the inbound truck, preventing it from leaving. Once the last pallet is unloaded, the inbound truck can leave, freeing up the dock. 2. (The retrieval analog of the first KPI.) The length of time between when the first pallet is picked from the racks to stage an outbound order to when the outbound truck is fully loaded. If this number is high, it is taking a long time to prepare outbound orders and load outbound trucks. 3. The total distance traveled by the product on the conveyors and cranes. (Alternatively, the total distance traveled by the stacker cranes, whether carrying product or not.) If the total distance is high, it may suggest that the product is being inefficiently routed through the DC. In parts (b)-(h), various aspects of the system (the DC) are listed. For each, give an example of an operational decision - one that pertains to the AS/RS - for which it would be important to incorporate this aspect into the simulation model. Explain your reasoning. You may NOT use the same operational decision for multiple parts. (b) (2 points) The process by which inbound and outbound orders arrive. Operational Decision: Scheduling dock appointments for inbound and outbound trucks. Explanation of Importance: It's important to understand when inbound and outbound orders arrive so the schedule can be set up to minimize idle time. For instance, if the outbound trucks are available in the morning, they should be
scheduled for morning dock appointments so as not to waste the drivers' time. (c) (2 points) The ability to switch the direction of a conveyor. Operational Decision: Configuring conveyors in the DC. Explanation of Importance: If certain conveyors can have their direction of movement switched on demand, they should be positioned in areas of the DC where this feature would be most beneficial, e.g., where they could boost throughput. (d) (2 points) The acceleration and deceleration of the stacker cranes. Operational Decision: Sequencing retrieval and storage tasks for the stacker cranes. Explanation of Importance: In complex warehousing systems, the sequencing of retrieval/storage tasks for the cranes could be changed dynamically. To help predict where the stacker crane will be at a future time (so that we can assign it a nearby task), we may need to consider not just the average speed of the cranes, but also how quickly they get up to that speed (and slow down). (e) (2 points) The potential breakdown (failure) of a stacker crane. Operational Decision: Investment in more reliable stacker cranes. Explanation of Importance: If we were considering investing in a new, more reliable stacker crane, we would want to understand how frequently the existing model breaks down and estimate how much money is lost per unit of time that a crane is unavailable. (f) (2 points) The composition (mix of products) of inbound and outbound orders. Operational Decision: Configuring and sizing rack spaces. Explanation of Importance: The mix of products on inbound and outbound orders determines the typical amount of each product stored in the DC. These volume numbers would be used to assign rack space to each product. (g) (2 points) The differing weights of pallets of the various products. Operational Decision: Staging of product for an outbound order. Explanation of Importance: The weights of the pallets can affect how an outbound truck can be loaded. For instance, the weight may need to be distributed in a certain way and heavier pallets may not be able to be stacked. Product should be staged in a way that makes it easy to load the outbound truck in the desired way. (h) (2 points) Cross-docking - this occurs when inbound product is directly diverted to fulfill an outbound order without being stored on the racks. Operation Decision: Special use of conveyors for cross-docking. Explanation of Importance: Depending on the distance between the inbound and outbound docks that the product is being moved between for cross-docking, we may want to use the conveyor system to move this product. If we can anticipate these situations, we can prioritize the movement of the cross-docked product to help ensure it does not arrive too late for the outbound truck. Problem 2. (30 points) In this question, you will see how Python can be used to demonstrate some of the probability and statistics concepts we reviewed in lecture. In [ ]: # Import some useful Python packages. import numpy as np import matplotlib.pyplot as plt import scipy.stats You may recall that a Binomial($n$, $p$) random variable takes discrete values of $0, 1, 2, \ldots, n$ where $n$ is the number of independent trials (coin flips, if you will) and $p$ is the success probability of each trial. The Binomial random variable can be interpreted as the number of successful trials (e.g., the number of heads if $p$ is the bias of the coin towards coming up heads). (a) (5 points) Plot the probability mass function (pmf) of a Binomial($n=10$,
$p=0.75$) random variable. Use scipy.stats.binom.pmf() (with the appropriate arguments) to evaluate the pmf at different values of $x$. Here is the documentation for the scipy.stats.binom family of functions. Use plt.stem() (with the appropriate arguments) to plot the pmf with markers and vertical lines. Label the axes of your plot. In [ ]: n = 10 p = 0.75 x = range(0, n + 1) pmf = scipy.stats.binom.pmf(x, n, p) plt.stem(x, pmf) plt.xlabel(r"$x$") plt.ylabel(r"$p_X(x)$") plt.title(r"PMF of Binomial($n=10$, $p=0.75$)") plt.show() (b) (5 points) For the same Binomial($n=10$, $p=0.75$) random variable in part (a), plot its cumulative distribution function (cdf). Use scipy.stats.binom.cdf() (with the appropriate arguments) to evaluate the cdf at different values of $x$. Use plt.step() (with the appropriate arguments) to plot the cdf as a step function. Label the axes of your plot. In [ ]: cdf = scipy.stats.binom.cdf(x, n, p) plt.step(x, cdf, where="post") plt.xlabel(r"$x$") plt.ylabel(r"$F(x)$") plt.title(r"CDF of Binomial($n=10$, $p=0.75$)") plt.show()
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) (3 points) You may recall that for a Binomial($n$, $p$) random variable, its mean is $np$, its variance is $np(1-p)$, and its standard deviation is $\sqrt{np(1-p)}$. Use the functions scipy.stats.binom.mean() , scipy.stats.binom.var() , and scipy.stats.binom.std() (with the appropriate arguments) to confirm this for the Binomial($n=10$, $p=0.75$) random variable from parts (a) and (b). In [ ]: mean = scipy.stats.binom.mean(n, p) mean_stat= n * p var = scipy.stats.binom.var(n, p) var_stat = n * p * (1-p) std = scipy.stats.binom.std(n, p) std_stat = np.sqrt(var_stat) print(f"SciPy Mean = {mean} and Textbook Mean = {mean_stat}.") print(f"SciPy Variance = {var} and Textbook Variance = {var_stat}.") print(f"SciPy Standard Deviation = {round(std, 4)} and Textbook Standard Deviation = {round(std_stat, 4)}.") SciPy Mean = 7.5 and Textbook Mean = 7.5. SciPy Variance = 1.875 and Textbook Variance = 1.875. SciPy Standard Deviation = 1.3693 and Textbook Standard Deviation = 1.3693. You may recall that a Beta($a$, $b$) random variable takes continuous values on the interval $[0, 1]$ where $a > 0$ and $b > 0$ are shape parameters. (d) (6 points) Plot the probability density function (pdf) of a Beta($a$, $b$) random variable for the values $a = 2, 3, 4$ and $b = 2$. (You are to plot a total of three pdfs.) Use x = np.linspace() and scipy.stats.beta.pdf() (with the appropriate arguments) to evaluate the pdf at a fine grid of points (at least 100) in the interval $[0, 1]$. Here is the documentation for the scipy.stats.beta family of functions. Use
plt.plot() (with the appropriate arguments) to plot the pdf. Plot all three curves on the same plot by putting plt.show() at the end of your sequence of plotting commands. Use different colors for the different pdf curves, add a legend, and label the axes of your plot. Comment on how the value of the parameter $a$ influences the shape of the pdf. In [ ]: x = np.linspace(0, 1, 101) # Sequence 0, 0.1, 0.2, ..., 0.99, 1. plt.plot(x, scipy.stats.beta.pdf(x, 2, 2), label="a=2", color='gray') plt.plot(x, scipy.stats.beta.pdf(x, 3, 2), label="a=3", color='pink') plt.plot(x, scipy.stats.beta.pdf(x, 4, 2), label="a=4", color='blue') plt.legend() plt.xlabel("x") plt.ylabel("f(x)") plt.title(r"PDF of Beta($a$, $b=2$)") plt.show() As $a$ increases, the pdf becomes more left-skewed. (e) (5 points) For the same three Beta random variable as in part (d), plot their cumulative distribution functions (cdfs). Use scipy.stats.beta.cdf() (with the appropriate arguments) to evaluate the cdf at different values of $x$. Use plt.plot() (with the appropriate arguments) to plot the cdfs; they should NOT look like step functions since a Beta random variable is continuous. Use different colors for the different cdf curves, add a legend, and label the axes of your plot. In [ ]: plt.plot(x, scipy.stats.beta.cdf(x, 2, 2), label="a=2", color='gray') plt.plot(x, scipy.stats.beta.cdf(x, 3, 2), label="a=3", color='pink')
plt.plot(x, scipy.stats.beta.cdf(x, 4, 2), label="a=4", color='blue') plt.legend() plt.xlabel("x") plt.ylabel("F(x)") plt.title(r"CDF of Beta($a$, $b=2$)") plt.show() For the next three parts, consider only a Beta($a=4$, $b=2$) random variable. (f) (2 points) Use scipy.stats.beta.cdf() (with the appropriate arguments) to compute $P(X > 0.8)$ where $X$ is the Beta random variable. In [ ]: # Create a Beta(a=4, b=2) object to use for the next few parts. beta_f = scipy.stats.beta(a=4, b=2) # P(X > 0.8) = 1 = P(X <= 0.8) = 1 - F(0.8) print(f"P(X > 0.8) = {round(1 - beta_f.cdf(0.8), 4)}.") P(X > 0.8) = 0.2627. (g) (2 points) Use scipy.stats.beta.cdf() (with the appropriate arguments) to compute $P(0.2 \leq X \leq 0.8)$ where $X$ is the Beta random variable. In [ ]: # P(0.2 <= X <= 0.8) = P(X <= 0.8) - P(X <= 0.2) = F(0.8) - F(0.2) print(f"P(0.2 <= X <= 0.8) = {round(beta_f.cdf(0.8) - beta_f.cdf(0.2), 4)}.") P(0.2 <= X <= 0.8) = 0.7306. (h) (2 points) Use scipy.stats.beta.ppf() (with the appropriate arguments) to compute the 90th percentile of $X$. The 90th percentile is the value of $x$ for which $P(X \leq x) = 0.90$. In [ ]:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
# The ppf method gives the qth quantile (equivalent to the 100q percentile). print(f"The 90th percentile is {round(beta_f.ppf(0.9), 4)}.") The 90th percentile is 0.8878.