代写代考 python assignment

python assignment

Suppose a coffee shop takes orders both in person, and via an app.

Copyright By PowCoder代写 加微信 powcoder

(1) When you order in-person, you get in a (single) line, place an order at one of the registers, at which point the order goes into a second queue to be made, while the person waits for their drink. Orders on the app go directly into the second queue, with higher priority than in-person customers, and app-based people do not wait in the store for them (we will assume they just pick up the orders the instant they become available).

(2) Customers arrive in the store according to a nonhomogeneous poisson process with the observed data (generated) below. Likewise for orders arriving on the app.

(3) The coffee shop only has room for 25 customers; if the store is full, or if there are more than ten (in-store) customers waiting to order, arriving (in-store) customers will leave without placing an order.

(4) The revenue from in-store customer $i$ is $Y_i \sim gamma(5, 0.1)$) (i.e. scale=1/0.1), while the revenue from an app order $Y_i \sim gamma(5, 0.3)$.

(5) The shop has 10 employees, who can either work at the counter or as baristas. The amount of time it takes employee $k$ to checkout customer $i$ is $A_i \sim gamma(5, 5000)$ and the amount of time it takes for a barista to make an order is $d_i \sim gamma(5, 7500)$.

(6) All arrivals before closing time are served.

(7) Occasionally, there is an accident in the store (someone spills a coffee, etc). One of the checkout employees must cancel the order they are currently taking, and go on and clean it up. When they come back, they start taking the order from the very beginning. Accidents arrive according to a homogeneous poisson process with intensity $\lambda=30$, and the clean-up time for each one is a deterministic $\frac{1}{700}$ units of time.

(8) Checkout counter workers need to be paid $50$ USD for the day, baristas need to be paid $100 USD$ for the day.

Find the optimal arrangement of the employees each day to maximize profits. Use n=1000 simulations of each configuration, and use common random numbers.

np.random.seed(42)
in_store = np.sort(np.concatenate([beta.rvs(0.1, 1 ,size=40),
beta.rvs(10, 10, size=50),
beta.rvs(1, 1, size=50)]))

app = np.sort(np.concatenate([beta.rvs(0.25, 2 ,size=20),
beta.rvs(50, 50, size=30),
beta.rvs(1,1, size=20)]))

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com