MANUTTM

30 Reputation

4 Badges

1 years, 257 days

MaplePrimes Activity


These are replies submitted by MANUTTM

@tomleslie range of i is from 0 to 0.8 , which taken care by constraint eq3 and eq3a. If value of i is between 0 and 0.8 then complex number is not generated. But i think maple is not reading that constraint. How can i solve it? Is it possible to give range and constraint at the same time in NLPsolve?

@tomleslie Thankyou for your reply. Actually i had mad all changes you suggested still i am not getting solution. Pls find my modified worsheet. And pls help if possible. Thankyou.

Find_optimum_i_and_q.mw

I have changed Each constraint by spliting into two simple inequalities. And changed the objective function mistake of sqrt(-i). But still i am not getting the optimum value of i and q which maximize TBCI. It is showing error "Error, (in Optimization:-NLPSolve) could not store HFloat(3233180.1691675433)-HFloat(HFloat(infinity))*I in a floating-point rtable".

Can anyone help me to solve it?

I am attaching the modified worksheet hereFind_optimum_i_and_q.mw

@Carl Love F(z) is cumulative distribution function. Where z = Q-G,
g := (p) -> a - b*p:
G := g(p)

cdf of uniform distribution with range [-3500,1500].

@Carl Love Can we get new w value from that equation by substituting q optimum to the above equation?

@Carl Love Question is highlighted in red in file.buyback_policy_of_manufacturer.mw

Example graph

@Carl Love Yes they are equation can we add that inside the loop? to get optimum? if not how to ensure that the above relationship is satisfied?

@Carl Love i have use double while loop but its showing error. buyback_policy_of_manufacturer.mw

@Carl Love w and q are related with a function given below. Can we add that inside the loop so that w cant take upper limit because q and w are inversely proportional (Condition given inside the maple file - highlighted in red Question.mw)

@Carl Love Q and q are same but given different notation for different cases.

I have another question similar to previous one here, I have 4 decision variable (p,Q,w and y). Where p and q are from the function E1., and w and y from the function E2. Please help me to solve the 2 equation simultaneously to get optimum decision variables. I am attaching the file below :-

``

``

restart

with(plots); with(DEtools); with(LinearAlgebra); with(linalg); with(Student:-MultivariateCalculus); with(Optimization); with(Statistics); with(VectorCalculus)

 

"#`Price dependent demand`    g(p) := a-b*p ;"

proc (p) options operator, arrow, function_assign; VectorCalculus:-`+`(a, VectorCalculus:-`-`(VectorCalculus:-`*`(b, p))) end proc

(1)

G := g(p)

-b*p+a

(2)

z := q-G

b*p-a+q

(3)

Lambda := int((z-u)*f(u), u = A .. z)

int((b*p-a+q-u)*f(u), u = A .. b*p-a+q)

(4)

Phi := int((u-z)*f(u), u = z .. B)

int((-b*p+a-q+u)*f(u), u = b*p-a+q .. B)

(5)

Er := proc (p, q) options operator, arrow; (p-w)*G-`λr`*((w-y)*(Q-G)+(p-y+s)*Phi) end proc

proc (p, q) options operator, arrow; VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(p, VectorCalculus:-`-`(w)), G), VectorCalculus:-`-`(VectorCalculus:-`*`(`λr`, VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(w, VectorCalculus:-`-`(y)), VectorCalculus:-`+`(Q, VectorCalculus:-`-`(G))), VectorCalculus:-`*`(VectorCalculus:-`+`(VectorCalculus:-`+`(p, VectorCalculus:-`-`(y)), s), Phi))))) end proc

(6)

Em := proc (w, y) options operator, arrow; (w-c)*Q-5000*`λm`*(y-w)*(Q-G+Phi) end proc

proc (w, y) options operator, arrow; VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(w, VectorCalculus:-`-`(c)), Q), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(`λm`, 5000), VectorCalculus:-`+`(y, VectorCalculus:-`-`(w))), VectorCalculus:-`+`(VectorCalculus:-`+`(Q, VectorCalculus:-`-`(G)), Phi)))) end proc

(7)

E1 := eval(Er(p, q), [c = 20, a = 100000, b = 1500, v = 10, s = 5, f(u) = 1/5000, A = -3500, B = 1500, `λr` = 1])

(p-w)*(-1500*p+100000)-(w-y)*(Q+1500*p-100000)-(p-y+5)*(-(3/10)*p*(101500-1500*p-q)-(1/5000)*q*(101500-1500*p-q)+2030225-(1/10000)*(1500*p+q-100000)^2-30000*p-20*q)

(8)

E2 := eval(Em(w, y), [c = 20, a = 100000, b = 1500, v = 10, s = 5, f(u) = 1/5000, A = -3500, B = 1500, `λr` = 1])

(w-20)*Q-5000*`λm`*(y-w)*(-28500*p+Q+1930225-(3/10)*p*(101500-1500*p-q)-(1/5000)*q*(101500-1500*p-q)-(1/10000)*(1500*p+q-100000)^2-20*q)

(9)

NULL

l := {0, 1, .2, .6, 1.4, 1.8}

Parse:-ConvertTo1D, "invalid left hand side of multiple assignment"

Error, invalid left hand side of multiple assignment

"  for lambdam in l  do:   Inialize w=20, y=10      Etemp:=eval(E1):  Soln:=NLPSolve(Etemp, p=5..500, q=10000..30000, maximize):  ptemp:=rhs(Soln[2][1]):  qtemp:=rhs(Soln[2][2]): Pitemp:=Soln[1]:   subs([q=qtemp,p=ptemp],E2) :  Emanf:=eval(E2):  Soln1:=NLPSolve(Emanf, w=30..60,y=5..50 maximize): wtemp:=rhs(Soln1[2][1]):  ytemp:=rhs(Soln1[2][1]):    substitute wtemp, ytemp in E1:  find ptemp and q temp:  again sustititute qtemp and ptemp in E2:  Find optimum w:  continue cycle  terminate when (w final - w previous) <0.05      print(lambda, ptemp,qtemp, wtemp, ytemp)  end do:  "

 

``

Download buyback_policy_of_manufacturer.mw

@Carl Love I am extremely sorry. but that question consist of 4 variables which i parellelly working on. That question is all about when the manufacturer follows a buyback policy? I am extremely sorry i didnt know i can use the same id to ask 2 questions at a time. Please help me with this question. 

@Carl Love I have changed epsilon substitutution but i can't execute the algorithm properly inside the loop can you please help? I am again attaching the file by making changes.Please help.
maple_question.mw

@Carl Love thankyou so much.

@Carl Love table format for the above file attached below

1 2 3 4 Page 3 of 4