I'm been struggling to solve a part of a model I'm working on. For simplicity's sake, let's assume that the model has to:
- pick
iout ofnitems.x_i to x_n. to minimize costc - revenue
rper item is set at a constant where each product has a certain amount of revenue associated with it. - for the items the model picks, the minimum it can use is 10% of total investment.
- only pick up to 3 items of the population.
If n = 100, and the model decides to pick x1, x3, and x6 then the some of the constraints are:
total = x1 + x3 + x6 (total = sum f xi)
x1 >= 10% * total for i in range: xi >= .1 * total
x3 >= 10% * total
x6 >= 10% * total
let's assume that y_i is the Binary variable used to identify which item is selected. The constraint there would be:
Sum of y_i to y_n <= 3
Revenue constraint:
r == ri * y_i (the problem with this is it doesn't take not account
all of the revenues for all of the items rather it just takes the revenue
for one item based not eh binary and we can't multiple to variables by each other)
The model is a cost minimization where each item x has a cost associated to it c_1 to c_n so the objective function becomes min sum of ci x x_i
I am struggling to solve this. Any thoughts?