knapsack was the term, I was looking for,
now I can feed Google, to get additional input on an suiting algorithm. Also Super Search brought some interesting hits.
Also thanks to BrowserUk and PodMaster for their code contributions. I'll post my final solution earliest after next weekend.