[R] Nonlinear integer programming (again)
Hans W Borchers
hwborchers at gmail.com
Mon Feb 16 11:12:40 CET 2015
Zwick, Rebecca J <RZwick <at> ETS.ORG> writes:
> Oddly, Excel's Solver will produce a solution to such problems but
> (1) I don't trust it and
> (2) it cannot handle a large number of constraints.
> [...]
> My question is whether there is an R package that can handle this problem.
There are not many free integer (nonlinear) programming (IP, INLP)
solvers available. You could send your problem to one of the MINLP
solvers at NEOS:
http://neos.mcs.anl.gov/neos/solvers/
[See the list of relevant NEOS solvers (commercial and free) on this page:
http://www.neos-guide.org/content/mixed-integer-nonlinear-programming]
You can also use the 'rneos' package to send your request to one of
these Web services, but most of the time I find it easier to directly
fill the solver template. Please note that you have to format your
problem and data according to the solver's needs, i.e. likely in AMLP
or GAMS syntax.
If you intend to solve such problems more often, I'd suggest to
download one of the commercial solvers with academic licenses (e.g.,
Knitro, Gurobi, ...) and to install a corresponding R package to
access the solver. For more information see the Optimization task
view.
I would *never* trust Excel for these kinds of problems...
By the way, I may not correctly understand your objective, but perhaps
you can formulate it as maximizing a quadratic function (with
constraints).
More information about the R-help
mailing list