re Exercise for the reader:
In the real world there are soo many variables that I would probably give a mpguino like program/device an accelerometer (because we are on a changing slope) and throttle control, and maybe a hint that the load would be decreasing and have it seek/adjust the most efficient throttle position, then try to make sense out of it
course I don't know what exactly an "ideal clutch" means.