1
$\begingroup$

Let $T>0$, $H>0$, $D$, and $No>0$ are known parameter.

Let $\{p_1,p_2,\cdots, p_T\}$ are the optimization variables.

Let $\{w_1,w_2,\cdots, w_T\}$ are known parameters.

Now, I want to perform the following optimization

minimize $\sum_{t=1}^Tp_t$

subject to $\sum_{t=1}^Tw_t\log_2\left(1+\frac{Hp_t}{w_t No}\right)=Do$

I want to express $P_t$ as a function of other parameters.

I want to do it as follows

W = Array[w, T];
P = Array[p, T];

Expr = Total[W Log2[1 + H P/(W No)]];

Assuming[H > 0 && No > 0 && T > 0 && Do > 0, Simplify[Minimize[{Total[P], Expr == Do}, P]]]

How to denote $W$ and $P$ so that I can perform the optimization and express $P_t$ as a function of other system parameters?

$\endgroup$
4
  • 1
    $\begingroup$ N and D are already defined in Mathematica, you shouldn't use them for variables. More constructively, if you put in your known values for H, N, T, D, and the w_i, the minimisation you've written should work. $\endgroup$ Commented Oct 13, 2017 at 9:14
  • $\begingroup$ @AnotherShruggingPhysicist, Thank you very much. But I need to express $p_t$ in a symbolic form. $\endgroup$ Commented Oct 13, 2017 at 9:31
  • $\begingroup$ Since this is a frequent issue: Do you just want $p_t$ in symbolic form or do you really need it in symbolic form? $\endgroup$ Commented Oct 13, 2017 at 17:13
  • $\begingroup$ @HenrikSchumacher, I really need it in symbolic form. Can you help me out? $\endgroup$ Commented Oct 16, 2017 at 2:45

1 Answer 1

1
$\begingroup$

If you are really interested in a symbolic solution, I would propose to investigate the KKT-conditions for this optimization problem. Here a quick script that generates them for $T=5$ variables. (\[Lambda] is a Lagrange multiplier.)

Off[Part::partd]
T = 5;
W = Table[w[[i]], {i, 1, T}];
P = Table[p[[i]], {i, 1, T}];
F = P \[Function] Evaluate[Total[P]];
DF = P \[Function] Evaluate[D[F[P], {P, 1}]];
G = p \[Function] Evaluate[Total[W + Log[1 + c P/W]]];
DG = p \[Function] Evaluate[D[G[P], {P, 1}]];
eq = Join[DF[P] + \[Lambda] DG[P], {G[P] - c0}];
Thread[eq == 0]

enter image description here

These can be simplified a bit; moreover, I eleminated \[Lambda]:

eq2 = Join[Table[w[[i]] + c p[[i]] + c \[Lambda], {i, 1, T}], eq[[{-1}]]];
lambdasol = Solve[Total[eq2[[1 ;; T]]] == 0, \[Lambda]][[1]];
p1sol = Solve[eq2[[-1]] == 0, p[[1]]][[1]] /. ConditionalExpression[bla_, blubb_] :> bla;
eq3 = T eq2[[1 ;; T-1]] /. lambdasol /. p1sol // Expand;
Thread[eq3 == 0]

enter image description here

Multiplying everything by with the nasty denominator would produce T-1 polynomial equations of order T in the T-1variables p[[2]],...,p[[T]]. Good luck with solving them!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.