N=10; %length of horizon k=[5,5,8,9,9,12,12,7,7,6]; %unit production cost h=[1,2,2,1,1,2,2,1,1,2]; %unit inventory cost d=[50,50,50,200,100,100,60,50,50,50]; %demand M=80; %Storage capacity y1=30; %initial inventory in period 1 % % % RESULTS % opcost = 6160 %Optimal Cost % opprod = % Optimal Production Levels 20 100 0 200 180 20 60 50 50 50 opinv = %Optimal Inventory Levels 0 50 0 0 80 0 0 0 0 0