Nawazish13fpm

20 Reputation

One Badge

2 years, 164 days

MaplePrimes Activity


These are questions asked by Nawazish13fpm

Dear Maple community, 

I'm trying to solve a complex expression by taking its first-order derivative and finding the optimal solution. As a result, I'm getting a rootOf expression, which is further not solved by using explicit or allvalues APIs provided in the maple. Can you guys help me where I'm going wrong?

I'm attaching my code file as well for
 

restart

U[d] := Zeta[n]*(2^(2/3)*(theta[n]*lambda*A*beta[n])^(2/3)/(4*beta[n])-delta[n]*`λA`+U[n]+alpha[n])+Zeta[g]*(U[g]-delta[g](1-lambda)*A+tau*A+R+(-2*A*theta[g]*(lambda-1)*beta[g])^(2/3)/(4*beta[g]))+tau*A-A

Zeta[n]*((1/4)*2^(2/3)*(theta[n]*lambda*A*beta[n])^(2/3)/beta[n]-delta[n]*`λA`+U[n]+alpha[n])+Zeta[g]*(U[g]-delta[g](1-lambda)*A+tau*A+R+(1/4)*(-2*A*theta[g]*(lambda-1)*beta[g])^(2/3)/beta[g])+tau*A-A

(1)

FOC := diff(U[d], A)

(1/6)*Zeta[n]*2^(2/3)*theta[n]*lambda/(theta[n]*lambda*A*beta[n])^(1/3)+Zeta[g]*(-delta[g](1-lambda)+tau-(1/3)*theta[g]*(lambda-1)/(-2*A*theta[g]*(lambda-1)*beta[g])^(1/3))+tau-1

(2)

evala(simplify(FOC))

(1/6)*2^(2/3)*(theta[n]*lambda*A*beta[n])^(2/3)*Zeta[n]/(A*beta[n])-(1/6)*Zeta[g]*(-2^(2/3)*(-A*theta[g]*(lambda-1)*beta[g])^(2/3)+6*delta[g](1-lambda)*A*beta[g]-6*tau*A*beta[g])/(A*beta[g])+tau-1

(3)

NULL

NULL

xyz := solve(FOC = 0, A, explicit)

RootOf(-Zeta[n]*theta[n]*lambda*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)+3*delta[g](1-lambda)*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)*Zeta[g]-3*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)*tau*Zeta[g]+(theta[n]*lambda*_Z*beta[n])^(1/3)*lambda*Zeta[g]*theta[g]-3*tau*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)-(theta[n]*lambda*_Z*beta[n])^(1/3)*Zeta[g]*theta[g]+3*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3))

(4)

allvalues(xyz)

RootOf(-Zeta[n]*theta[n]*lambda*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)+3*delta[g](1-lambda)*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)*Zeta[g]-3*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)*tau*Zeta[g]+(theta[n]*lambda*_Z*beta[n])^(1/3)*lambda*Zeta[g]*theta[g]-3*tau*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3)-(theta[n]*lambda*_Z*beta[n])^(1/3)*Zeta[g]*theta[g]+3*(theta[n]*lambda*_Z*beta[n])^(1/3)*2^(1/3)*(-_Z*lambda*beta[g]*theta[g]+_Z*beta[g]*theta[g])^(1/3))

(5)

NULL

Download RootOf_Maple2.mw

reference. 

I've attached a maple file (.mw). After solving the first order condition of SW expression, I tried to obtain an optimal point for en. To do that I used solve API, and obtained a solution in rootof. I want to comment on the relationship of en with other parameters like A, theta, zeta, etc. Therefore, I want to understand the interpretation of rootof and how analytically I can simplify it further if possible.

restart

SW := (1/6)*a*(8*sqrt(epsilon[n]*theta[n]*a)*Zeta[n]+3*a*tau-3*a)+(1/3)*e[n]*(-beta[n]*e[n]^2+3*delta[n]*A+4*sqrt(e[n]*theta[n]*A))

(1/6)*a*(8*(varepsilon[n]*theta[n]*a)^(1/2)*Zeta[n]+3*a*tau-3*a)+(1/3)*e[n]*(-beta[n]*e[n]^2+3*delta[n]*A+4*(e[n]*theta[n]*A)^(1/2))

(1)

``

NULL

Opt_effort_FOC := diff(SW, e[n])

-(1/3)*beta[n]*e[n]^2+delta[n]*A+(4/3)*(e[n]*theta[n]*A)^(1/2)+(1/3)*e[n]*(-2*beta[n]*e[n]+2*theta[n]*A/(e[n]*theta[n]*A)^(1/2))

(2)

``

NULL

solve(Opt_effort_FOC = 0, e[n])

RootOf(-A^3*delta[n]*theta[n]^2-2*A^2*_Z*theta[n]^2+_Z^4*beta[n])^2/(theta[n]*A)

(3)

NULL

``

Download RootOf_maple.mw

Is there any chance to sort the array in maple and add the non-zero values? PFA the screenshot. I actually intend to add the non-zero values (leaving behind the dumX entries). How can I add the numerical values only?

Does maple software support Benders decomposition technique for Mixed Integer Linear Programming? If no, how we can implement it in maple? Any suggestions. 

Thank you

As the LPsolve package returns the solution points in a list format, how we can analyze the list if we're having a large instance problem? By large instance, I mean that there are around 1500+ variables in the linear programming model. 

Also, I have attached the screenshot of the output in this thread. To perform further analysis, I want to fetch the value of the DQV, QF, and UQT variables. But since the list contains the values as an expression, for example DQV[0, 0, 0, 0] = 0. In such cases, I cannot perform mathematical operations for the solution points results.

Also, if I can delete the DQV[0,0,0,0] from the expression mentioned above, I'll end with the numeric values list, which can then be converted into an array and make things easier for me. But currently, I'm struggling to delete the DQV part of the expression in one go (manually deletion for each expression, it's very time consuming to delete for 1500 variables).

Please suggest to me some approach to deal with this issue.

 

I am thanking you.

Regards

Page 1 of 1