From: shama shahbaz on 25 Feb 2010 07:44 hi i have an objective function with constraints as below (c0^2+c1^2+c2^2)(0.0765)+0.0916(c0*c1)-0.0916(c1*c2)-0.021(c0*c2) subject to (c0^2+c1^2+c2^c3)=1 i don't how to solve it using minimize because it contain '=' constraint. can anybody tell me how to solve it Thankyou
From: dh on 25 Feb 2010 17:36 Hi, the variable c3 in the constrain does not appear in your function. maybe the constrain should read: (c0^2+c1^2+c2^2)=1. The your problem would be written: Minimize[{(c0^2+c1^2+c2^2)(0.0765)+0.0916(c0*c1)-0.0916(c1*c2)-0.021(c0*c2), (c0^2+c1^2+c2^2)==1 },{c0,c1,c2} ] Daniel On 25.02.2010 13:44, shama shahbaz wrote: > hi i have an objective function with constraints as below > (c0^2+c1^2+c2^2)(0.0765)+0.0916(c0*c1)-0.0916(c1*c2)-0.021(c0*c2) > subject to > (c0^2+c1^2+c2^c3)=1 > i don't how to solve it using minimize because it contain '=' constraint. > can anybody tell me how to solve it > Thankyou > > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh(a)metrohm.com> Internet:<http://www.metrohm.com>
From: Patrick Scheibe on 25 Feb 2010 20:02 Hi, if you want an equality, then you have to use "equal" (==) and not Set (=) eq = (c0^2 + c1^2 + c2^2) (0.0765) + 0.0916 (c0*c1) - 0.0916 (c1*c2) - 0.021 (c0*c2); constr = (c0^2 + c1^2 + c2^c3) == 1; Minimize[{eq, constr}, {c0, c1, c2, c3}] Cheers Patrick Am Feb 25, 2010 um 1:44 PM schrieb shama shahbaz: > hi i have an objective function with constraints as below > (c0^2+c1^2+c2^2)(0.0765)+0.0916(c0*c1)-0.0916(c1*c2)-0.021(c0*c2) > subject to > (c0^2+c1^2+c2^c3)=1 > i don't how to solve it using minimize because it contain '=' > constraint. > can anybody tell me how to solve it > Thankyou > >
|
Pages: 1 Prev: Installing Mathematica 7 in Linux (ferora 12 x86_64) Next: Functions |