Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

matlab optimization
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

Report this thread to moderator Post Follow-up to this message
Old Post
Srihari
05-31-05 09:03 AM


Re: matlab optimization
If 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

Report this thread to moderator Post Follow-up to this message
Old Post
Marcelo Marazzi
05-31-05 09:05 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Matlab archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.