Sat Nov 16 12:09:04 2024 knapsack_rational_test(): python version: 3.10.12 numpy version: 1.26.4 Test knapsack_rational(). knapsack_rational_tester(): knapsack_rational() solves the rational knapsack problem. Object, Profit, Mass, "Profit Density" 0 24.000 12.000 2.000 1 13.000 7.000 1.857 2 23.000 11.000 2.091 3 15.000 8.000 1.875 4 16.000 9.000 1.778 After reordering by Profit Density: Object, Profit, Mass, "Profit Density" 0 23.000 11.000 2.091 1 24.000 12.000 2.000 2 15.000 8.000 1.875 3 13.000 7.000 1.857 4 16.000 9.000 1.778 Total mass restriction is 26.000000 Object, Density, Choice, Profit, Mass 0 2.091 1.000 23.000 11.000 1 2.000 1.000 24.000 12.000 2 1.875 0.375 5.625 3.000 3 1.857 0.000 0.000 0.000 4 1.778 0.000 0.000 0.000 Total: 52.625 26.000 knapsack_reorder_test(): knapsack_reorder() reorders knapsack data. Object, Profit, Mass, "Profit Density" 0 24.000 12.000 2.000 1 13.000 7.000 1.857 2 23.000 11.000 2.091 3 15.000 8.000 1.875 4 16.000 9.000 1.778 After reordering by Profit Density: Object, Profit, Mass, "Profit Density" 0 23.000 11.000 2.091 1 24.000 12.000 2.000 2 15.000 8.000 1.875 3 13.000 7.000 1.857 4 16.000 9.000 1.778 knapsack_rational_test(): Normal end of execution. Sat Nov 16 12:09:04 2024