We consider a special case of the unbounded knapsack problem that is characterized by a set of simple inequalities that relate item weights to item costs. We present an algorithm for this special case with time complexity linear in the number of items.
Zukerman, M., Jia, L., Neame, T., & Woeginger, G. J. (2001). A polynomially solvable special case of the unbounded knapsack problem. Operations Research Letters, 29(1), 13-16. https://doi.org/10.1016/S0167-6377(01)00076-1