JamesRyan(Ryan James)/E&P North America Business Division
2018-Feb-13 19:55 UTC
[R] Best Optimization Routines
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. Thanks, Ryan -------------- next part -------------- A non-text attachment was scrubbed... Name: Rplot.pdf Type: application/pdf Size: 4470 bytes Desc: Rplot.pdf URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20180213/885e45d5/attachment.pdf>
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
JamesRyan(Ryan James)/E&P North America Business Division
2018-Feb-15 22:00 UTC
[R] Best Optimization Routines
Thanks Paul. Appreciate the help. I'll give this a shot. Ryan James D: 713.395.1794 M: 214.843.7301 -----Original Message----- From: Paul Smith [mailto:phhs80 at gmail.com] Sent: Thursday, February 15, 2018 7:12 AM To: Ryan James/E&P North America Business Division/SKI Cc: r-help at r-project.org Subject: Re: [R] Best Optimization Routines 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