cinderella

20 Reputation

2 Badges

6 years, 58 days

MaplePrimes Activity


These are questions asked by cinderella


 

restart

N := int((x-Q)^m*f(x), x = Q .. infinity)

int((x-Q)^m*f(x), x = Q .. infinity)

(1)

Cost := a*N

a*(int((x-Q)^m*f(x), x = Q .. infinity))

(2)

Dcost := diff(Cost, Q)

a*(int(-(x-Q)^m*m*f(x)/(x-Q), x = Q .. infinity))

(3)

Val := eval(Dcost, [m = 2, f(x) = 1/5000, co = 25, cs = 15])

-a*infinity

(4)

``


 

Download dummy.mw


 

In this code k=2 and Beta=2 has been cconsidered

Loading Optimization

Loading Student:-MultivariateCalculus

ISO ELASTIC DEM ADD ERROR

y := proc (p, e) options operator, arrow; alpha-beta*p+k*e end proc:

G := g(p):

NULL

g := proc (e) options operator, arrow; (1/2)*mu*e^2 end proc:

 

Lambda := proc (z) options operator, arrow; int((z-u)*phi(u), u = 0 .. z) end proc: 

``

``

NULL

Step 1  Integrated supply chain

THE EXPECTED total PROFIT FUNCTION w r t LINEAR DEMAND

 

PI := proc (p, e, z) options operator, arrow; (p-c)*(y(p, e)-z)-(p-v)*Lambda(z)-g(e) end proc

proc (p, e, z) options operator, arrow; (p-c)*(y(p, e)-z)-(p-v)*Lambda(z)-g(e) end proc

(1)

PI(p, e, z)

(p-c)*(-beta*p+e*k+alpha-z)-(p-v)*(int((z-u)*phi(u), u = 0 .. z))-(1/2)*mu*e^2

(2)

FIRST PUT ALL PARAMETER VALUES AND THEN GO FOR THE DIFFERENTIATION

RUN THE OPTIMALITY AND THE SUBROUTINES FOR DIFFERENT Beta and K values

CASE 1:   Put k = 2 and beta =2

beta

(3)

`` 
Int_Profit := simplify(eval(PI(p, e, z), [k = 2, beta = 2, alpha = 50, mu = 10, c = 5, v = 1, phi(u) = 1/2]))

-2*p^2+(1/4)*(-z^2+8*e-4*z+240)*p-5*e^2+(1/4)*z^2-10*e+5*z-250

(4)

Int_Profit[1][1]

(-2*p^2+(1/4)*(-z^2+8*e-4*z+240)*p-5*e^2+(1/4)*z^2-10*e+5*z-250)[1][1]

(5)

 

Optimization:-NLPSolve(Int_Profit, p = 0 .. 60, e = -1000 .. 30, z = -10000 .. 25, initialpoint = {e = 0, p = 10, z = 0}, maximize)

[230.512568949745969, [e = HFloat(2.274015113534025), p = HFloat(16.370075567375324), z = HFloat(-1.4795080892429795)]]

(6)

NULL

Int_Profit

-2*p^2+(1/4)*(-z^2+8*e-4*z+240)*p-5*e^2+(1/4)*z^2-10*e+5*z-250

(7)

Calculate the Value of q

``

q := z+y(p, e)

-beta*p+e*k+alpha+z

(8)

qopt := simplify(eval(q, [e = 2.27401511353403, p = 16.3700755673753, z = 1.47950808924298, k = 2, beta = 2, alpha = 50, mu = 10, c = 5, v = 1, phi(u) = 1/2]))

23.28738718

(9)

Step 2  Decentralized supply chain

Retailer's profit

 

`#msubsup(mi("Π",fontstyle = "normal"),mi("R"),mi("d"))` := proc (p, e, q, w) options operator, arrow; (p-w)*(y(p, e)-z)-(p-v)*Lambda(z)-g(e) end proc

proc (p, e, q, w) options operator, arrow; (p-w)*(y(p, e)-z)-(p-v)*Lambda(z)-g(e) end proc

(10)

Re_Profit := simplify(eval(`#msubsup(mi("Π",fontstyle = "normal"),mi("R"),mi("d"))`(p, e, q, w), [alpha = 50, beta = 2, k = 2, mu = 10, c = 5, v = 1, phi(u) = 1/2, w = 10]))

-2*p^2+(1/4)*(-z^2+8*e-4*z+280)*p-5*e^2+(1/4)*z^2-20*e+10*z-500

(11)

Optimization:-NLPSolve(Re_Profit, p = 0 .. 60, e = -1000 .. 30, z = -10000 .. 25, initialpoint = {e = 0, p = 10, z = 0}, maximize)

[129.081143396165999, [e = HFloat(1.7075918734530873), p = HFloat(18.537959441958364), z = HFloat(-0.9736548233351249)]]

(12)

 

``

``

Optimal q value for decentralized supply chain

 

qd_opt := simplify(eval(q, [e = 1.70759187345309, p = 18.5379594419584, z = .973654823335125, k = 2, beta = 2, alpha = 50, mu = 10, c = 5, v = 1, phi(u) = 1/2]))

17.31291969

(13)

Manufacture's Profit

 

`#msubsup(mi("Π",fontstyle = "normal"),mi("M"),mi("d"))` := proc (p, e, q) options operator, arrow; (w-c)*qd_opt end proc

proc (p, e, q) options operator, arrow; (w-c)*qd_opt end proc

(14)

M_Profit := simplify(eval(`#msubsup(mi("Π",fontstyle = "normal"),mi("M"),mi("d"))`(p, e, q), [qd_opt = 17.31291969, alpha = 50, beta = 2, k = 2, mu = 10, c = 5, v = 1, phi(u) = 1/2, w = 10]))

86.56459845

(15)

Total Wholesale Profit

`#msup(mi("Π",fontstyle = "normal"),mi("d"))` := proc (p, e, q) options operator, arrow; M_Profit+R_Profit end proc

proc (p, e, q) options operator, arrow; M_Profit+R_Profit end proc

(16)

Whole_Profit := eval(`#msup(mi("Π",fontstyle = "normal"),mi("d"))`(p, e, q), [M_Profit = 86.56459845, R_Profit = 129.08114339616599])

215.6457418

(17)

step 3 find the t value

t := (In_Profit-R_Profit)/(w-c)

(In_Profit-R_Profit)/(w-c)

(18)

 

topt := eval(t, [w = 10, c = 5, In_Profit = 230.512568949745969, R_Profit = 129.08114339616599])

20.28628510

(19)

 

Hence range of t is 17.31 to 20.28

 

 

 


 

Download Code_1.mw


 

restart

PI := proc (p, e, q) options operator, arrow; p*S(p, e, q)+v*(q-S(p, e, q))-w*q-g(e)+(w-c)*q end proc

proc (p, e, q) options operator, arrow; p*S(p, e, q)+v*(q-S(p, e, q))-w*q-g(e)+(w-c)*q end proc

(1)

S := proc (p, e, q) options operator, arrow; q-(int(F(x), x = 0 .. q)) end proc

proc (p, e, q) options operator, arrow; q-(int(F(x), x = 0 .. q)) end proc

(2)

NULL

PI(p, e, q)

p*(q-(int(F(x), x = 0 .. q)))+v*(int(F(x), x = 0 .. q))-w*q-g(e)+(w-c)*q

(3)

g := proc (e) options operator, arrow; (1/2)*mu*e^2 end proc

proc (e) options operator, arrow; (1/2)*mu*e^2 end proc

(4)

``

F := proc (x) options operator, arrow; int(f(x), x = 0 .. q) end proc

proc (x) options operator, arrow; int(f(x), x = 0 .. q) end proc

(5)

P := proc (p, e, q) options operator, arrow; simplify(eval(PI(p, e, q), [alpha = 50, w = 10, mu = 10, c = 5, v = 1, f(x) = 1/2])) end proc

proc (p, e, q) options operator, arrow; simplify(eval(PI(p, e, q), [alpha = 50, w = 10, mu = 10, c = 5, v = 1, f(x) = 1/2])) end proc

(6)

Diff_p := diff(P(p, e, q), p)

q-(1/2)*q^2

(7)

Diff_e := diff(P(p, e, q), e)

-10*e

(8)

Diff_z := diff(P(p, e, q), q)

-p*q+p+q-5

(9)

``

``


 

Download Profit_code.mw

 

 

 


 

restart

p := (alpha+c*(beta-k^2/mu)+z-Lambda(z))/(2*beta-k^2/mu)

(alpha+c*(beta-k^2/mu)+z-Lambda(z))/(2*beta-k^2/mu)

(1)

x := simplify((p-c)/(p-v))

mu*(beta*c+Lambda(z)-alpha-z)/(Lambda(z)*mu+((-c+2*v)*beta-z-alpha)*mu+k^2*(c-v))

(2)

``

xx := p-c-(p-v)*x

(alpha+c*(beta-k^2/mu)+z-Lambda(z))/(2*beta-k^2/mu)-c-((alpha+c*(beta-k^2/mu)+z-Lambda(z))/(2*beta-k^2/mu)-v)*mu*(beta*c+Lambda(z)-alpha-z)/(Lambda(z)*mu+((-c+2*v)*beta-z-alpha)*mu+k^2*(c-v))

(3)

Lambda := proc (z) options operator, arrow; int((z-u)*phi(u), u = 0 .. z) end proc

proc (z) options operator, arrow; int((z-u)*phi(u), u = 0 .. z) end proc

(4)

``yy := eval(xx, [alpha = 50, mu = 10, c = 5, v = 1, beta = 2, k = 2, phi(u) = 1/2])

100/9+(5/18)*z-(5/72)*z^2-10*(136/9+(5/18)*z-(5/72)*z^2)*(-40+(1/4)*z^2-z)/((5/2)*z^2-544-10*z)

(5)

``

zvalue := solve(yy, z)

z

(6)

yy

100/9+(5/18)*z-(5/72)*z^2-10*(136/9+(5/18)*z-(5/72)*z^2)*(-40+(1/4)*z^2-z)/((5/2)*z^2-544-10*z)

(7)

``


 

Download Dummy_Code.mw


 

restart

``

Lambda := proc (z) options operator, arrow; int((z-u)*phi(u), u = 0 .. z) end proc

proc (z) options operator, arrow; int((z-u)*phi(u), u = 0 .. z) end proc

(1)

k := diff(Lambda(z), z)

int(phi(u), u = 0 .. z)

(2)

k

int(phi(u), u = 0 .. z)

(3)

m := subs(phi(z) = 1/2, k)

int(phi(u), u = 0 .. z)

(4)

``

``


 

Download dummy2.mw

1 2 3 Page 2 of 3