[R] Optimization
Ravi Varadhan
rvaradhan at jhmi.edu
Tue Jul 17 15:50:31 CEST 2007
Hi,
Your problem can be solved analytically. Eliminate one of the variables,
say x3, from the problem by using the equality x1 + x2 + x3 = 1. Then solve
for the intersection of the circle (in x1 and x2) defined by the radical
constraint, with the straight line defined by the objective function. There
will be, at most, two intersection points. The extremum has to be one of
these two points, provided they also satisfy the other inequalities (To me,
this sounds an awful lot like a homework problem).
Ravi.
----------------------------------------------------------------------------
-------
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
Fax: (410) 614-9625
Email: rvaradhan at jhmi.edu
Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html
----------------------------------------------------------------------------
--------
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of massimiliano.talarico
Sent: Monday, July 16, 2007 4:50 PM
To: r-help
Subject: [R] Optimization
Dear all,
I need a suggest to obtain the max of this function:
Max x1*0.021986+x2*0.000964+x3*0.02913
with these conditions:
x1+x2+x3=1;
radq((x1*0.114434)^2+(x2*0.043966)^2+(x3*0.100031)^2)=0.04;
x1>=0;
x1<=1;
x2>=0;
x2<=1;
x3>=0;
x3<=1;
Any suggests ?
Thanks in advanced,
Massimiliano
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list