Code Comments
Programming Forum and web based access to our favorite programming groups.Hello everyone: Here is an optimization problem, maximize y subject to: x(2)*y-x(1)+2*x(2)<=0; x(2)*y+x(1)-4*x(2)<=0; x(3)*y-x(1)+1*x(3)<=0; x(3)*y+x(1)-3*x(3)<=0; 0.222*x(3)*y-x(2)+0.333*x(3)<=0; 0.5*x(3)*y+x(2)-1*x(3)<=0; x(1)+x(2)+x(3)=1; x(1)>0; x(2)>0; x(3)>0; The solution to the above problem when solved using GRG based solver in excel is y=0.838 x(1)=0.538 x(2)=0.170 x(3)=0.292 My question is how give initial points to above problem just guess "y" when using optimization toolbox or is it necessary to mention x(1), x(2) and x(3) in initial guess if so how to mention it Thanx in advance
Post Follow-up to this messageIf I understand your question correctly, the answer is yes, one needs to supply an initial guess to *all* the unknowns - in your case to the x's and y. One way to do this is to call "y" x(4): maximize x(4) subject to x(2)*x(4)-x(1)+2*x(2)<=0, etc and thus your unknown is the vector x = [x(1), ..., x(4)]. Please see the doc for examples on how to pass the initial guess (it's very easy). -marcelo Srihari wrote: > Hello everyone: > Here is an optimization problem, > > maximize y > > subject to: > > x(2)*y-x(1)+2*x(2)<=0; > x(2)*y+x(1)-4*x(2)<=0; > x(3)*y-x(1)+1*x(3)<=0; > x(3)*y+x(1)-3*x(3)<=0; > 0.222*x(3)*y-x(2)+0.333*x(3)<=0; > 0.5*x(3)*y+x(2)-1*x(3)<=0; > x(1)+x(2)+x(3)=1; > x(1)>0; > x(2)>0; > x(3)>0; > > The solution to the above problem when solved using GRG based solver > in excel is > y=0.838 > x(1)=0.538 > x(2)=0.170 > x(3)=0.292 > > My question is how give initial points to above problem just guess > "y" when using optimization toolbox or is it necessary to mention > x(1), x(2) and x(3) in initial guess if so how to mention it > > Thanx in advance
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.