Optimal energy allocation to ovaries after spawning