What kind of algorithm is this, I know pretty much nothing but this is what I'm trying to do in code... I have class 'Item', properties int A
and int B
-- I have multiple lists of List<Item>
with a random amount of Item
in each list, incosistent with any other List. I must choose 1 item from each list to get the highest possible value of the sum Item.A
while conforming that the sum of Item.B
must also be at minimum a certain number. In the future there might also be another property Item.C
to conform to that the sum must be equal to a certain number. I have no idea how to write this :(
So to put it this way;
class Item
int A
int B
int C
I have a 10x different List<Item>
each with a random number of Item inside
We must find the exactly the best combination to have
a) Highest sum of Item.A
b) Constraint that the sum of Item.B must be higher than X
c) Constraint that the sum of Item.C must be equal to X
I have no idea how to code this to be fast and efficient. :(