function [profit,cost,percent]=inventory(k,c,L,p,s,Q,x,h,l,time) %initialize time, costs, number (demanded,short), time of next demand,order t=0; CH=0; CS=0; CO=0; ND=0; NS=0; TD=exprnd(1/l,1,1); TO=10^10; %ET=(TD,TO); while t