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...

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...

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 =...

I am currently practicing a simple function optimization in Matlab and hope you could provide with little assistance / explanation on the following error: %quadramin.m function z=quadramin(param,data); z=data.*(param(1).^2 - param(2).^3)+3; %quadramin_lik.m function quadlik = quadramin_lik(param,data); %pseudo/ad-hoc log-likelihood function quadlik = quadramin(param,data)- 10; %script.m data=trnd(5,6,1); param0=[2,3]; [param_eq,exitflag,output,grad,hessian] = ... fminunc(@(param) quadramin_lik(param,data),param0)...

When I maximize my borderless form, the form covers the entire screen including the taskbar, which I don't want it to do. I'm finding it very difficult to find a solution to my problem on the net, all I've come up with is the below code, which displays the taskbar...

When users resize and adjust the location of my program's window (Winforms), they expect to see the window in that same position, even after closing and reopening the program. What I do is store the form's Width, Height, Location.X and Location.Y properties, and set these back when the program is...