[R] non-linear contrained optimization

Brandon Zicha brandon.zicha at ua.ac.be
Wed Feb 17 16:53:03 CET 2010


All,

I have searched the previous help boards and discovered the problem  
with Rdonlp2 - Specifically, its non-availability. I thought that this  
was my solution, but perhaps there is a better way that you all could  
help me with.  I imagine that this problem is trivial to people such  
as the experts on this mailing list.

I am trying to solve this problem over and over again in a simulation:

I want to find the values of x and y which minimize
f(x,y) = sqrt((z-x)^2+(w-y)^2

subject to the constraints:
0=< sqrt((z2-x)^2+(w2-y)^2) - d2
0=< sqrt((z3-x)^2+(w3-y)^2) - d3
.....
0=< sqrt((zk-x)^2+(wk-y)^2) - dk

where zi, wi, di are known scalars.

I would appreciate any help with how to implement this in R.

Many thanks,

Brandon Z.

University of Antwerp



More information about the R-help mailing list