FAQ Database Discussion Community

## Optimization in R: Maximizing and Minimizing Many Variables

r,ggplot2,mathematical-optimization,minimize,maximize
I have a dataset with 70 foods and information about each food's nutritional value (protein/oz., fat/oz., cals/oz., etc.), as well as the food's cost/oz. I am trying to figure out--given a set budget in \$--what the best combination of foods (and the amt. of each food) would be to maximize...

## R Team Roster Optimization w/ lpSolve

r,optimization,solver,maximize,lpsolve
I am new to R and have a particular fantasy sports team optimization problem I would like to solve. I have seen other posts use lpSolve for similar problems but I can not seem to wrap my head around the code. Example data table below. Every player is on a...

## Algorithm to find the maximum non-adjacent sum in n-ary tree

algorithm,tree,dynamic-programming,maximize
Given an n-ary tree of integers, the task is to find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should share a common edge in the tree. Example: 1 / \ 2 5 / \ 3 4 Maximum non adjacent sum =...

## Matlab @fminunc objective function optimization

matlab,function,optimization,maximize