Net palette weight and optimization

import numpy as np # Some typical pallet sizes in the EU (Source: Wikipedia, "Pallet") # width (mm), length (mm), height (mm), pallet weight (kg), max load (kg) pallets_eu = """ 800,1200,145,22.5,2490 1200,1200,144,33,1470 1000,1200,144,29,1920 800,600,144,9.5,500 """ rows = pallets_eu.split('\n')[1:-1] data = np.array([list(map(float, row.split(','))) for row in rows]) vol_m3 = (data[:,0] * data[:,1] * data[:,2]) / 10**9 max_load = data[:,-1] density = data[:,-2] / vol_m3 metric = max_load / density print(list(map(lambda x: float("%.2f" % x), metric))) # [15.4, 9.24, 11.44, 3.64] # The first pallet type has the most beneficial characteristics. # Given the first pallet type, how many pallets would fit in a truck with known dimensions and how much would their total weight be (fill weight without goods)? Assume that 3 stacked pallets approximate the truck height. truck_length_m = 13.6 truck_height_m = 2.45 truck_width_m = 2.45 pallets_in_length = truck_length_m // (data[0,1] / 1000) pallets_in_width = truck_width_m // (data[0,0] / 1000) pallets_in_height = 3 total_pallets = pallets_in_length * pallets_in_width * pallets_in_height total_pallets_weight_kg = total_pallets * data[0, -2] print(total_pallets, total_pallets_weight_kg) # 99, 2227.5 # A 13.6m-long truck would carry 99 pallets weighting 2227.5kg per trip. # Could pallet weight optimization reduce freight cost and emissions? # Idea: Collected plastics could be used to produce lightweight plastic pallets. # According to Wikipedia, these weigh 1.4 - 6.8kg or 14kg.