Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "convex optimization problem"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:6+3 =



Original Message (ID '224113') By samaneh:
In Response To 'Re: convex optimization problem' --------- Dear Bill, Thanks for your email. S2 is a desicion variable that we want to find it from this optimization problem. So we do not know it. The procedure for find it could be like this: after finding s1= argmin (c1(s1),s1)as a optimal solution of c1, in second step we want to find s2 which is s2=argminC2(y2, S1) I correct some mistakes which already done, here is the new codes: but it dose not work well. I attach the original problem, may be to put in mathematica I make a mistake. I would be grateful if you please guide me. thanks Clear[x, s1]; Remove[c1] h1 = 0.5; b1 = 10; \[Mu] = 10; \[Sigma] = 5; l1 = 5; l2 = 5; h2 = 0.5; \[Mu]1 = (l1 + 1)*\[Mu]; \[Sigma]1 = Sqrt[l1 + 1]*\[Sigma]; \[Mu]2 = (l2 + 1)*\[Mu]; \[Sigma]2 = Sqrt[l2 + 1]*\[Sigma]; \[Mu]3 = (l2)*\[Mu]; \[Sigma]3 = Sqrt[l2]*\[Sigma]; c1 = Integrate[ h1*(s1 - x)*PDF[NormalDistribution[\[Mu]1, \[Sigma]1], x], {x, 0, s1}] + Integrate[(b1 + h1 + h2)*(x - s1)* PDF[NormalDistribution[\[Mu]1, \[Sigma]1], x], {x, s1, Infinity}] NMinimize[c1, s1] w = NArgMin[c1, s1]; Print["s1=", w]; cost1 = NMinValue[c1, s1]; Print["cost1=", cost1]; c2 = h2*(s2 - \[Mu]2) + cost1 - Integrate[ cost1*PDF[NormalDistribution[\[Mu]3, \[Sigma]3], u], {u, s2 - w, Infinity}] + h1*Integrate[(s2 - u - x)* PDF[NormalDistribution[\[Mu]1, \[Sigma]1], x]* PDF[NormalDistribution[\[Mu]3, \[Sigma]3], u], {x, 0, s2 - u} {u, s2 - w, Infinity}] + (b1 + h1 + h2)* Integrate[(x - s2 + u)* PDF[NormalDistribution[\[Mu]1, \[Sigma]1], x]* PDF[NormalDistribution[\[Mu]3, \[Sigma]3], u], {x, s2 - u, Infinity} {u, s2 - w, Infinity}] NMinimize[c2, s2] some error: Integrate::ilim: Invalid integration variable or limit(s) in {u x,0,(s2-u) \[Infinity]}. >> Integrate::ilim: Invalid integration variable or limit(s) in {u x,(-80.9637+s2) (s2-u),\[Infinity]}. >> Integrate::ilim: Invalid integration variable or limit(s) in {u x,0,(s2-u) \[Infinity]}. >>