[R] Best Optimization Routines

Paul Smith phhs80 at gmail.com
Thu Feb 15 14:12:19 CET 2018


On Tue, Feb 13, 2018 at 7:55 PM, JamesRyan(Ryan James)/E&P North
America Business Division <rjames at sk.com> wrote:
> I have a set of data, the production of oil from a well.  And an equation to predict that forecast.
>
> The equation requires 5 input variables which are real numbers with upper and lower bounds, 1 input variable which must be an integer and 1 input variable which can be 1 of 2 string variables.
>
> What is the best optimization routine (I am using nlminb) to use in R to determine the best set of inputs and how to I handle the integer and string inputs when optimizing?
>
> I have attached a plot of what I am trying to accomplish as well as my sample code.

If I understand correctly your problem, your equation is linear, and
you have continuous and integer variables (the string input can be
coded as a binary integer variable). Thus, you can use a package to
deal with mixed integer programming:

http://blog.revolutionanalytics.com/2016/12/mixed-integer-programming-in-r-with-the-ompr-package.html

Hope this helps you,

Paul



More information about the R-help mailing list