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.

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

@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

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.

@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

@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 :-




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


G := g(p)



z := q-G



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

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


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

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


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


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


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])



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])




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:  "




@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.

@Carl Love thankyou so much.

@Carl Love table format for the above file attached below

1 2 3 4 Page 3 of 4