Prev: Creating a matrix of strings?
Next: Simulink
From: kay on 16 Apr 2010 10:00 "Steven Lord" <slord(a)mathworks.com> wrote in message <hq9p7u$p7$1(a)fred.mathworks.com>... > > "kay " <kfederer.yusof(a)gmail.com> wrote in message > news:hq9aql$t40$1(a)fred.mathworks.com... > > "Yi Cao" <y.cao(a)cranfield.ac.uk> wrote in message > > <hq9774$23d$1(a)fred.mathworks.com>... > >> Hi Kay, > >> > >> I assume you are using fmincon. lb and ub are correct. However, c seems > >> does nothing. > >> > >> Since 10 <= x(2), so P/x(2) <= 1000, and P/x(2) - 2*x(4) <= 998, then > >> (P/x(2) - 2*x(4))*x(3) <= 249.5, therefore, c always negative. > >> > >> Is this the case? > > > > dear Yi, thank u for your reply.. > > i just realized that i've mistakenly wrote the wrong equation for the > > volume. now that the result is acceptable but changing the start point > > gives me different result. > > so, actually what is the best guess to start my point with? for example > > since my boundary limitations are as i stated earlier, is it better if i > > give the start point of [20 20 1 5] which arethe values that are close to > > my boundary ..or do i just have to give [1 1 1 1] instead? > > Choosing a "good" starting point can sometimes be difficult, but if you can > do so (say by using what you know of the background behind the problem) it > can help the optimizer. > > But looking at your starting point of [20 20 1 5], and the bounds you posted > in your first message: > > > 10<= x(1)<=15 > > 10<=x(2)<=15 > > 0.1<=x(3)<=0.25 > > 1.0<=x(4)<=2.5 > > _None_ of the elements in your starting point are within the bounds you > specified for the problem! A starting point of [1 1 1 1] would put one > element (the last) barely within the bounds, but at the very least, I'd > choose a point within the bounds as the starting point. For example, let's > make the starting point midway between the bounds. > > lb = [10 10 0.1 1.0]; > ub = [15 15 0.25 2.5]; > x0 = (lb+ub)/2; > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > ohh.. i chose [20 20 1 5] because initially, my design's dimension are: width=x(1)=20 height=x(2)=20 thickness =x(3)=1 radius x(4)=5 i thought the optimization program will calculate from that initial dimension until it gives the optimized value that is within the specified bound. that's what i understand but it seems that im wrong..another thing, i expect to see the iteration ranging from that value until the optimized one but the output somehow confuses me. what does the maximum constraints really mean? p/s: please help me with another fmincon optimization problem.the topic is there in the thread..i would really appreciate if someone can help me.it's urgent
From: Yi Cao on 16 Apr 2010 11:04
"kay " <kfederer.yusof(a)gmail.com> wrote in message > > i thought the optimization program will calculate from that initial dimension until it gives the optimized value that is within the specified bound. that's what i understand but it seems that im wrong..another thing, i expect to see the iteration ranging from that value until the optimized one but the output somehow confuses me. what does the maximum constraints really mean? > p/s: please help me with another fmincon optimization problem.the topic is there in the thread..i would really appreciate if someone can help me.it's urgent Either you did not specify your bounds correctly or you did not provide right initial values. Yi |