[R] Basic optimization question (I'm a rookie)

Sarah Goslee @@r@h@go@lee @ending from gm@il@com
Wed Nov 28 00:29:59 CET 2018


Hi,

R is quite good at optimization. Here's a basic tutorial:
https://www.is.uni-freiburg.de/resources/computational-economics/5_OptimizationR.pdf

There are a LOT of possibilities:
https://cran.r-project.org/web/views/Optimization.html

Sarah

On Tue, Nov 27, 2018 at 6:19 PM FAIL PEDIA
<soloparapaginas123456789 using gmail.com> wrote:
>
> Hello, and thanks to anyone who takes the time to read this
>
> I'm trying to learn to properly optimize a function with a constraint using
> R. For example, maximize the area of a terrain with a maximum perimeter.
> For this example the function would be:
>
>      Area <- function(x,y){x*y}
>
> The restriction would be the following function:
>
>      Perimeter <- function(x,y){2*(x+y)}
>
> The idea is to give a desired value to "Perimeter" and get the values of x
> & y that maximize the area and respect the constraint.
>
> I've searched online for some time, and only found a video of a dude that
> plotted the functions toggling the values to find the tangent optimum point
> (something useless, because the idea is to make the optimization more
> efficiently than using a paper and a pencil)
>
> Thanks again, and sorry if this question is silly.
>

-- 
Sarah Goslee (she/her)
http://www.sarahgoslee.com



More information about the R-help mailing list