From: itatz on 6 Jul 2010 06:34 Hi everyone, I'm trying to use the optimization tool to solve the following minimization problem: min f(x) x s.t. sum(x)=sum(x_start) where f(x) is defined as follows: for i=1:24 C(i)=a(i)*x(i); end f=sum(C); a(i) is a known vector, and x_start is the starting vector (which is also known). I don't know how to put this problem in the optimization tool, since the linear equality constraint is a summation. Moreover, I'm not really sure weather to use fmincon or fminimax as solver. Thank you in advance, Ita
From: John D'Errico on 6 Jul 2010 07:03 "itatz " <ita.atz(a)gmail.com> wrote in message <i0v0rc$cmg$1(a)fred.mathworks.com>... > Hi everyone, > > I'm trying to use the optimization tool to solve the following minimization problem: > > min f(x) > x > > s.t. sum(x)=sum(x_start) > > > where f(x) is defined as follows: > > for i=1:24 > C(i)=a(i)*x(i); > end > > f=sum(C); > > > a(i) is a known vector, and x_start is the starting vector (which is also known). > I don't know how to put this problem in the optimization tool, since the linear equality constraint is a summation. > Moreover, I'm not really sure weather to use fmincon or fminimax as solver. > It matters not what tool you use. No solution exists, since the problem is unbounded as you have described it. You have shown us a simple linear objective function, subject to a single linear equality constraint. Unbounded. John
From: Ita Atz on 6 Jul 2010 08:35 "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <i0v2h8$449$1(a)fred.mathworks.com>... > "itatz " <ita.atz(a)gmail.com> wrote in message <i0v0rc$cmg$1(a)fred.mathworks.com>... > > Hi everyone, > > > > I'm trying to use the optimization tool to solve the following minimization problem: > > > > min f(x) > > x > > > > s.t. sum(x)=sum(x_start) > > > > > > where f(x) is defined as follows: > > > > for i=1:24 > > C(i)=a(i)*x(i); > > end > > > > f=sum(C); > > > > > > a(i) is a known vector, and x_start is the starting vector (which is also known). > > I don't know how to put this problem in the optimization tool, since the linear equality constraint is a summation. > > Moreover, I'm not really sure weather to use fmincon or fminimax as solver. > > > > It matters not what tool you use. No solution exists, > since the problem is unbounded as you have described > it. You have shown us a simple linear objective function, > subject to a single linear equality constraint. > > Unbounded. > > John Hi, thank you for answering. actually I have to add more nonlinear constraint, but mainly I wanted to know how to specify constraints involving sums in the optimization toolbox, where the constraint are to be expressed as Ax=b. Thank you, Ita
From: Steven Lord on 6 Jul 2010 09:20 "Ita Atz" <ita.atz(a)gmail.com> wrote in message news:i0v7uc$sqf$1(a)fred.mathworks.com... > "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message > <i0v2h8$449$1(a)fred.mathworks.com>... >> "itatz " <ita.atz(a)gmail.com> wrote in message >> <i0v0rc$cmg$1(a)fred.mathworks.com>... *snip* > thank you for answering. actually I have to add more nonlinear constraint, > but mainly I wanted to know how to specify constraints involving sums in > the optimization toolbox, where the constraint are to be expressed as > Ax=b. Well, what is sum(x)? sum(x) = 1*x(1)+1*x(2)+1*x(3)+ ... +1*x(end) Now can you take the right side of that equivalence and express it in the form A*x? -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: ggreta Next: Can I define my own variable size in memory other than UINT16,UINT32, etc...? |