Effort calculation with effort = tech.research_unit_count * tech.research_unit_energy fails to correctly tell a research with 30t x1000 using 1x of each sci pack is less effort than a time 70t x400 using 2x red/green 1x blue/purple
I'd change the formula to
effort = tech.research_unit_count * tech.research_unit_energy * each(research_unit_ingredients.amount)
or as code
local sum_ingredients = 0
for _,ingredient in pairs (tech.research_unit_ingredients) do
sum_ingredients = sum_ingredients + ingredient.amount
end
local effort = tech.research_unit_count * tech.research_unit_energy * sum_ingredients