

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
TASK 1 Modify the inventory model provided in the lecture so that; • differentiate the total cost per time function. • use a search algorithm to find the order quantity for which the derivative of the cost per time function is zero and print it on the console screen. • plot the derivative function as a second method, find the minimum of the cost per time function. Holding cost = 10 $/#T Fixed cost = 50 $ Demand = 10 #/T
Typology: Lab Reports
1 / 3
This page cannot be seen from the preview
Don't miss anything!
clc; clear; h= 10 K= 50 D= 10 Qmax= 100 ; f=[] v=[] c=[] for i= 1 :Qmax f(i)=KD/i v(i)=ih/ 2 c(i)=f(i)+v(i) end for i= 1 :Qmax if c(i+ 1 )>c(i) then printf("optimal quantity= %d total cost= %d \n",i,c(i)) break end end z=[] i= 1 :Qmax k=0. y=v(i)+f(i) z=diff(y)
z($+ 1 )=z($) z=z./k scf( 1 ); plot(i',z) xtitle("derivative of total cost function") xgrid( 2 ) for i= 1 :Qmax if z(i)>= 0 then disp("optimal quantity found with derivative",i) break end end