When's the best time to surge when cycling up a hill?

A simple cycling simulator that calculates the time it takes to cycle up a hill with a surge of power.