Across peaks of inspired productive days, I get lost inbetween valleys of foggy unfocused wandering.
Some years ago, I begin recording the daily fluctuations of concrete output and work hours, which unsurprisingly maps to the Hand-Eye Dilemma that one would find in the creative rhythms of artists.

I find myself doing design, when a developer, and programming when I should be designing. Atop the creative rhythms, the daily logs reveal a form of stamina that I use to allocate blocks of time to any one task, knowing when the stamina runs out and by when the task must be completed.

Years passed, and each morning, I am told what I should do, that which is most likely to yield the most concrete output per work hour, based on previous patterns of productivity.
It is not optimizing toward longer work hours, but to help me navigate these peaks & valleys by assigning me a task most likely to convert to the optimal amount of concrete work per focus hour.

I sometimes wonder weather it has helped me reach optimal productivity, or has kept me from getting there.
Do you mean a "prediction of how much time I should spend on each task"?
If so, yes, I basically calculate the recent average spent on each task, and find the offset against the past few days. It gives me a list of tasks which I can sort and get the next task that has the highest chance of being what I should be doing the next day. I run this for a number of day, always appending the forecasted task, and so I get a short term forecast of the next 14 days or so.