knapsack_rational_test(): knapsack_rational() solves the rational knapsack problem. Number of subsets is 128 Object, Profit, Mass, "Profit Density" 0 442.000 41.000 10.780 1 525.000 50.000 10.500 2 511.000 49.000 10.429 3 593.000 59.000 10.051 4 546.000 55.000 9.927 5 564.000 57.000 9.895 6 617.000 60.000 10.283 After reordering by Profit Density: Object, Profit, Mass, "Profit Density" 0 442.000 41.000 10.780 1 525.000 50.000 10.500 2 511.000 49.000 10.429 3 617.000 60.000 10.283 4 593.000 59.000 10.051 5 546.000 55.000 9.927 6 564.000 57.000 9.895 Total mass restriction is 170.000000 Object, Density, Choice, Profit, Mass 0 10.780 1.000 442.000 41.000 1 10.500 1.000 525.000 50.000 2 10.429 1.000 511.000 49.000 3 10.283 0.500 308.500 30.000 4 10.051 0.000 0.000 0.000 5 9.927 0.000 0.000 0.000 6 9.895 0.000 0.000 0.000 Total: 1786.500 170.000 knapsack_rational(): Normal end of execution.