[R] Solving an optimization problem: selecting an "optimal" subset
Dimitri Shvorob
dimitri.shvorob at gmail.com
Sat Jan 30 01:15:20 CET 2010
Given vector of numbers x, I wish to select an n-subset with sum closest to
fixed value s. Can anyone advise me how to approach this, in R?
I have considered Rcplex package, which handles integer/binary
linear/quadratic optimization problems, but have difficulty setting up the
quadratic form for [sum(x) - s]^2.
(Dynamic programming over [0, sum(x)]? A genetic algorithm? Can anyone
contribute a binary GA optimization sample?)
Thank you.
--
View this message in context: http://n4.nabble.com/Solving-an-optimization-problem-selecting-an-optimal-subset-tp1446084p1446084.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list