All problems
Order-Up-To Level
Problem
Compute the order-up-to level for periodic review: avg_demand * (lead_time + review_period) + z * sigma_demand * sqrt(lead_time + review_period).
Return 0.0 when the protection interval is negative.
Hint
It is the reorder point computed over the combined lead time and review window.
Test cases
case 1
in: [10,4,1,1.65,2]
expected: 57.379024325749306
case 2
in: [5,2,2,0,3]
expected: 20
case 3
in: [2,0,0,1,1]
expected: 0
case 4
in: [3,3,3,1,0.5]
expected: 19.22474487139159
Starter codePython
def order_up_to_level(avg_demand, lead_time, review_period, z, sigma_demand):
# Your code here
pass4 test cases · run your code against them in the editor