Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Understand and use inventory model and take derivative of function for find optimal quanti, Lab Reports of Algorithms and Programming

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

2020/2021

Uploaded on 11/20/2023

ber-ber
ber-ber 🇹🇷

1 document

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LAB REPORT
Aim
The aim of this report is understanding the questions and giving the correct answers to the task given
in the word file in the lab hour and upload engineering report to the Sakai system.
Introduction
One task were given in this assignment.Task is to understand and use inventory model and take
derivative of function for find optimal quantity.
Method
Task1.
clc;
clear;
h=10
K=50
D=10
Qmax=100;
f=[]
v=[]
c=[]
for i=1:Qmax
f(i)=K*D/i
v(i)=i*h/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.1
y=v(i)+f(i)
z=diff(y)
pf3

Partial preview of the text

Download Understand and use inventory model and take derivative of function for find optimal quanti and more Lab Reports Algorithms and Programming in PDF only on Docsity!

LAB REPORT

Aim

The aim of this report is understanding the questions and giving the correct answers to the task given

in the word file in the lab hour and upload engineering report to the Sakai system.

Introduction

One task were given in this assignment.Task is to understand and use inventory model and take

derivative of function for find optimal quantity.

Method

Task1.

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