Merged compute_allocation_table() and compute_energy_allocation_table()