Andiguys

85 Reputation

5 Badges

1 years, 163 days

MaplePrimes Activity


These are replies submitted by Andiguys

@dharr While solving KKT for a different problem, I am unable to obtain a solution for the decision variable w but getting solution for Pn. How should I incorporate it in the KKT optimization syntax? Could you help me determine the optimal w in each case?

restart

with(Optimization); with(plots); with(LinearAlgebra)

_local(Pi)

Pi

(1)

``

`π_m` := proc (Pn, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*((((g*i2-c)*Cr-c+w+Ce)*d+g*i2-c)/(Cr*d+2)-g*i2+c)-Ce*((((g*i2-c)*Cr-c+w+Ce)*d+g*i2-c)/(Cr*d+2)-g*i2+c) end proc

proc (Pn, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*((((g*i2-c)*Cr-c+w+Ce)*d+g*i2-c)/(Cr*d+2)-g*i2+c)-Ce*((((g*i2-c)*Cr-c+w+Ce)*d+g*i2-c)/(Cr*d+2)-g*i2+c) end proc

(2)

``

C1 := Pn <= (Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2))

Pn <= (Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2))

(3)

C2 := (Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2)) <= Pn

(Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2)) <= Pn

(4)

 

NULL

# No equality constraints
#
# Inequality constraints must be of the form f[i](p1) <= 0
#
# Thus
#
# (1) For C1
#     so
      f[1] := (Pn) -> (Cr*Pr*d*upsilon - Cr*d*delta*upsilon + Ce*d*delta + Cr*d*upsilon - c*d*delta + d*delta*w - delta*g*i2 - Ce*d + 2*Pr*upsilon + c*d + c*delta - d*w - 2*delta*upsilon + g*i2 - c + 2*upsilon)/(upsilon*(Cr*d + 2)):
#
# (2) C2
#     so
      f[2] := (Pn) -> (Cr*Pr*d*rho0 - Cr*d*delta*rho0 + Ce*d*delta + Cr*d*rho0 - c*d*delta + d*delta*w - delta*g*i2 - Ce*d + 2*Pr*rho0 + c*d + c*delta - d*w - 2*delta*rho0 + g*i2 - c + 2*rho0)/(rho0*(Cr*d + 2))-Pn:

 

# Lagrangian (we want to maximize `&pi;_m` so to minimize -`&pi;_m`

L := -`&pi;_m`(Pn,w) + add(f[i](Pn)*mu[i], i=1..2):

dLdPn := collect(diff(L, Pn), [Pn]):

KKT_conditions := [
                    seq(mu[i] >= 0, i=1..2),         # Dual feasibility conditions
                    dLdPn = 0,   dLdw = 0,                    # Stationarity condition
                    seq(``(f[i](Pn)) <= 0, i=1..2),  # Primal feasibility conditions
                    add(mu[i]*f[i](Pn) = 0, i=1..2)  # Complementary slackness
                  ]:

# print~(KKT_conditions):


Analysis of dLdp1

with(LargeExpressions):
DLDPn := collect(dLdPn, Pn, Veil[K]);

-2*Pn*K[1]+K[2]

(5)

# Thus dLdp1 = 0 verifies

isolate((5), Pn)

Pn = (1/2)*K[2]/K[1]

(6)

i := 'i'; KS := [seq(K[i] = Unveil[K](K[i]), i = 1 .. LastUsed[K])]

[K[1] = 1/(-1+delta), K[2] = (-delta*mu[2]+Cn+Pr-delta+mu[2]+1)/(-1+delta)]

(7)

beta

beta

(8)

Cs := {seq(beta[i] = subs(Pn = 0, f[i](Pn)), i = 1 .. 2)}

{beta[1] = (Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2)), beta[2] = (Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2))}

(9)

infolevel[solve] := 2; sols := solve({seq(mu[i] >= 0, i = 1 .. 2), seq(Pn-beta[i] = 0, i = 1 .. 2), dLdPn = 0, dLdw = 0}, {Pn, w, seq(mu[i], i = 1 .. 2)})

Main: Entering solver with 6 equations in 4 variables
Main: attempting to solve as a linear system
Main: system cannot be directly solved as a linear system
Main: solving successful - now forming solutions
Main: Exiting solver returning 0 solutions
solve: Warning: no solutions found

 

(10)

Cmin_name := (Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2)); Cmax_name := (Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2)); Complementary_Slackness := mu[1]*(Cmin_name-Pn), mu[2]*(Pn-Cmax_name); L2 := -`&pi;_m`(Pn, w)+add(Complementary_Slackness); dL2dPn := diff(L2, Pn); dL2dw := diff(L2, w); dL2dPn := map(simplify, %, size)

mu[1]*((Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2))-Pn), mu[2]*(Pn-(Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2)))

 

-1+(Pn-Pr)/(1-delta)+(Pn-Cn)/(1-delta)-mu[1]+mu[2]

 

alpha*((((g*i2-c)*Cr-c+w+Ce)*d+g*i2-c)/(Cr*d+2)-g*i2+c)-(Pr-w-Crm)*alpha*d/(Cr*d+2)+Ce*d/(Cr*d+2)+mu[1]*(d*delta-d)/(rho0*(Cr*d+2))-mu[2]*(d*delta-d)/(upsilon*(Cr*d+2))

 

-((c-w-Ce)*d+g*i2-c)*alpha/(Cr*d+2)+(-Pr+w+Crm)*alpha*d/(Cr*d+2)+Ce*d/(Cr*d+2)+mu[1]*d*(-1+delta)/(rho0*(Cr*d+2))-mu[2]*d*(-1+delta)/(upsilon*(Cr*d+2))

(11)

SC_CS_sols := solve({dL2dw, op(`~`[`=`]([Complementary_Slackness], 0)), dL2dPn = 0}, {Pn, seq(mu[i], i = 1 .. 2)})

Main: Entering solver with 4 equations in 3 variables

Main: attempting to solve as a linear system
Main: attempting to solve as a polynomial system
Main: Polynomial solver successful. Exiting solver returning 1 solution

 

"numelems([SC_CS_sols]);    #` And those solutions are charecterized by`    map(s -> if eval(lambda[1], s) = 0 then              if eval(lambda[2], s) = 0 then                "Pn belongs to interval (LowerBound, UpperBound)"             else               "Pn is equal to the UpperBound"              end if           else             "Pn is equal to the LowerBound"            end if           , [SC_CS_sols]);  "

2

 

["Pn is equal to the LowerBound", "Pn is equal to the LowerBound"]

(12)

SC_CS_sols

{Pn = (Cr*Pr*d*rho0-Cr*d*delta*rho0+Ce*d*delta+Cr*d*rho0-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*rho0+c*d+c*delta-d*w-2*delta*rho0+g*i2-c+2*rho0)/(rho0*(Cr*d+2)), mu[1] = -rho0*(Ce*alpha*d+Crm*alpha*d-Pr*alpha*d-alpha*c*d+2*alpha*d*w-alpha*g*i2+Ce*d+alpha*c)/(d*(-1+delta)), mu[2] = 0}, {Pn = (Cr*Pr*d*upsilon-Cr*d*delta*upsilon+Ce*d*delta+Cr*d*upsilon-c*d*delta+d*delta*w-delta*g*i2-Ce*d+2*Pr*upsilon+c*d+c*delta-d*w-2*delta*upsilon+g*i2-c+2*upsilon)/(upsilon*(Cr*d+2)), mu[1] = 0, mu[2] = upsilon*(Ce*alpha*d+Crm*alpha*d-Pr*alpha*d-alpha*c*d+2*alpha*d*w-alpha*g*i2+Ce*d+alpha*c)/(d*(-1+delta))}

(13)

"w"??????""

w

(14)

Download q_w.mw

@dharr At the moment, I am finding it difficult to interpret the parameters that appear inside the square root in the solution. Would it be possible to simplify or reorganize the expression under the root so that the individual parameters and their roles are easier to understand?

Download Inside_root.mw

@dharr Thanks a lot.

@dharr can you help with above error?? DATA substitution error

@sand15 
Showing error while substituting DATA.
"Error, invalid input: `union` received [delta = .6, tau = .6, Ce = 0.5e-1, C0 = 0.8e-1, Cn = .4, Crm = .1, Cr = 0.5e-1, rho0 = .5, i2 = 0.5e-1, alpha = .8], which is not valid for its 2nd argument"

new_Q_solve_sand15.mw

Suppose I get a numerical solution after substituting the data. How can I identify which analytical solution (Pn = …, Pr = …, and w = …) this numerical result corresponds to?

@sand15 

OOPS! I mistakenly substituted i2 in the data — that was unprofessional on my part. Sorry for the inconvenience; I’ve now corrected it.

I’d like to zoom in more on the positive side of the y-axis. Also, is it possible to make the blue objective (OBJ) line dotted for values where i2 > k? This would help visualize what happens when the condition isn’t satisfied — similar to how the example figure shows the dotted blue line after the threshold and the red line before it.

Corrected sheet: A_no_error_worksheet_sand15.mw



Need plot like below sample: 

@sand15 Thankyou made changes accordingly.

I plotted the objective function, but the line is not visible because it appears flat (a straight line) on the graph. How can I rescale or adjust the y-axis so that the variation in the line becomes visible?

Download A_no_error_worksheet_sand15.mw

@sand15 

Thank you for taking the time to review my worksheet and for sharing the corrected version. I went through your file carefully.

After modifying some substitution values and parameters in the data, I noticed that in your version, the positive part of the objective function is shown as a blue line in the plot, whereas the red line does not appear.

Once again, thank you for your guidance, I’ll also make sure to format the loops properly and switch to the 1D input mode as you suggested.

Download A_no_error_worksheet_sand15.mw

@dharr I have solved it using KKT Condition, but lamda is zero. Is it right???

restart

with(Optimization); with(plots); with(LinearAlgebra)

_local(Pi)

Pi

(1)

NULL

Pi := proc (Pn, Pr, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))-Ce*rho0*(1-(Pn-Pr)/(1-delta)) end proc

proc (Pn, Pr, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))-Ce*rho0*(1-(Pn-Pr)/(1-delta)) end proc

(2)

NULL

NULL

C1 := (((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1) <= w

(((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1) <= w

(3)

L := Pi(Pn, Pr, w)-lambda*((((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1)-w)

(Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))-Ce*rho0*(1-(Pn-Pr)/(1-delta))-lambda*((((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1)-w)

(4)

K1 := diff(L, Pn) = 0; K2 := diff(L, Pr) = 0; K3 := diff(L, w) = 0; K4 := diff(lambda*((((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1)-w), lambda) = 0

1-(Pn-Pr)/(1-delta)-(Pn-Cn)/(1-delta)+(1/2)*(Pr-w-Crm)*alpha*((Cr*i2-Cr*tau)/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))*Cr/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))^2)*(1-(Pn-Pr)/(1-delta))/tau-(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)/(1-delta)+Ce*rho0/(1-delta)-lambda*Cr*rho0/(delta-1) = 0

 

(Pn-Cn)/(1-delta)+alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))+(1/2)*(Pr-w-Crm)*alpha*((-Cr*i2+Cr*tau)/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))+((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))*Cr/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))^2)*(1-(Pn-Pr)/(1-delta))/tau+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)/(1-delta)-Ce*rho0/(1-delta)+lambda*Cr*rho0/(delta-1) = 0

 

-alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))+(1/2)*(Pr-w-Crm)*alpha*(2*delta-2)*(1-(Pn-Pr)/(1-delta))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))+lambda = 0

 

(((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1)-w = 0

(5)

sol := solve({K1, K2, K3, K4}, {Pn, Pr, lambda, w})

{Pn = (4*alpha*rho0^2*tau+Crm*alpha*rho0-alpha*delta*rho0+alpha*i2*rho0-alpha*rho0*tau+Ce*rho0+alpha*rho0+Cn)/(alpha*rho0+1), Pr = (4*alpha*rho0^2*tau+Crm*alpha*rho0+alpha*i2*rho0-alpha*rho0*tau+Ce*rho0+Cn+delta-1)/(alpha*rho0+1), lambda = 0, w = 4*rho0*tau+i2-tau}

(6)
 

``

Download Q_1.mw

@dharr 

The above solution was obtained when I solved the following objective function with a constraint, but it appears to be incorrect.

Could you please help me solve the objective function under the condition that the constraint is binding? I would also like to know the KKT condition under which the objective function is maximized and the optimal values of Pn, Pr, and w are obtained.

restart

with(Optimization); with(plots); with(LinearAlgebra)

_local(Pi)

Pi

(1)

``

Pi := proc (Pn, Pr, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))-Ce*rho0*(1-(Pn-Pr)/(1-delta)) end proc

proc (Pn, Pr, w) options operator, arrow; (Pn-Cn)*(1-(Pn-Pr)/(1-delta))+(Pr-w-Crm)*alpha*(1/2+(1/2)*(((-2*delta+2)*tau^2+((-Pn+Pr-delta+1)*Cr+(2*delta-2)*(w+i2))*tau+Cr*i2*(Pn-Pr+delta-1))/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))-i2)/tau)*(1-(Pn-Pr)/(1-delta))-Ce*rho0*(1-(Pn-Pr)/(1-delta)) end proc

(2)

``

NULL

C1 := (((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1) <= w

(((Cr+4*tau)*delta-4*tau+(Pn-Pr-1)*Cr)*rho0+(delta-1)*(i2-tau))/(delta-1) <= w

(3)
 

``

Download Q_1.mw

@dharr 

How can we simultaneously solve three equations of the form:
w=f(Pn,Pr)
Pn=g(w,Pr)
Pr=h(Pn,w)

so that we obtain standalone expressions for w, Pn and Pr?

restart

with(Optimization); with(plots); with(LinearAlgebra)

_local(D)

D

(1)
 

D := 1-(Pn-Pr)/(1-delta)

1-(Pn-Pr)/(1-delta)

(2)

N := 2*delta*tau*(i2-tau+w)-2*tau*(i2-tau+w)+Cr*(i2-tau)*(Pn-Pr+delta-1); M := (4*delta-4)*tau+Cr*(Pn-Pr+delta-1)

2*delta*tau*(i2-tau+w)-2*tau*(i2-tau+w)+Cr*(i2-tau)*(Pn-Pr+delta-1)

 

(4*delta-4)*tau+Cr*(Pn-Pr+delta-1)

(3)

A := Cr*(M*(i2-tau)-N)/(tau*M^2); B := (delta-1)/M; lambda := alpha*D*(rho0*M/(1-delta)-Pr+w+Crm)

Cr*(((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))*(i2-tau)-2*delta*tau*(i2-tau+w)+2*tau*(i2-tau+w)-Cr*(i2-tau)*(Pn-Pr+delta-1))/(tau*((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))^2)

 

(delta-1)/((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))

 

alpha*(1-(Pn-Pr)/(1-delta))*(rho0*((4*delta-4)*tau+Cr*(Pn-Pr+delta-1))/(1-delta)-Pr+w+Crm)

(4)

w := Pr-Crm-rho0*M/(1-delta)+lambda/(alpha*D); Pn := Cn+(1-delta)*(1-alpha*rho0-(Pr-w-Crm)*alpha*A+lambda*A)-(Pr-w-Crm)*alpha*rho0-Ce*rho0; Pr := Pn-(1-delta)*(1-alpha*rho0-(Pr-w-Crm)*alpha*A-lambda*A)-(Pr-w-Crm)*alpha*rho0-Ce*rho0

w

 

Error, recursive assignment

 

Error, recursive assignment

 
 

``

Download Simultaneously_solve.mw

@sand15 Thank you for the detailed clarification. I now understand that the FOC applies regardless of whether the maximum lies on the boundary or not, and that in constrained problems the maximum may occur at the boundary even if the FOC is not satisfied there. Your explanation cleared up my confusion.

@sand15 

I agree that there is no interior maximum.

However, after rearranging the constraint by isolating w on one side, I obtain the following form of the constraint.


C1:=  -w < -(((Cr + 4*tau)*rho0 + i2 - tau)*delta + (-4*tau + (-1 + Pn - Pr)*Cr)*rho0 - i2 + tau)/(-1 + delta)

 In this case, when the constraint is binding, what would be the optimal values of Pn,Pr, and w that maximize the objective function? could you please indicate the analytical equations?

@sand15 
 

Apologies, i1 = (2*rho0 - 1)*tau + i2,   i1 is between [0,1]

If I understand correctly, the maximum occurs on the boundary. In that case, what are the analytical first-order/optimality equations for Pn, Pr​, and w?

                                                        OR 

In the unconstrained case, the Hessian has a zero in one of its principal minors and Determinant zero

When the constraint is binding, the Lagrangian Hessian also has a zero in one of the minors, and its determinant is zero.

So, does this imply that in both cases there is no maximum solution?

 

@sand15 
I am working on maximizing an objective function with three decision variables: Pn, Pr and w. I want to understand the difference between cases where the constraint is binding versus not binding. Specifically, when the constraint is binding, what are the analytical optimal values of Pn​, Pr and w? Also, under what conditions do we get optimal values, and what will be the value of the KKT multiplier μ?

 Data = [C0 = 0.02, Ce = 0.05, Cr = 0.05, alpha=0.9, delta = 0.7, i2 = 0.1, rho0 = 0.5, tau = 0.05, Cn=0.1, Crm=0.05] Any missing DATA you can assume.

Note: Pn, Pr and w should be between 0 and 1

1 2 3 4 5 6 7 Last Page 1 of 10