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

FAIL PEDIA @olop@r@p@gin@@123456789 @ending from gm@il@com
Wed Nov 28 00:02:33 CET 2018


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.

	[[alternative HTML version deleted]]



More information about the R-help mailing list