My thought is that you essentially create a virtual queue of SCV production and MULE calldowns at the earliest possible times (given the players CCs and Orbital production). Then when new production is added you ignore this virtual queue for purposes of ordering, but you still calculate the minerals and supply available based on it. Then finding the timing for the new production should be basically the same, just find the earliest time after the last non-virtual action that has the correct resources, but you need an extra check to make sure that this won't delay SCV production. If that check fails, then move the new production after the next SCV production. I hope that explanation makes sense.
You also would have to consider if/when to stop virtual SCV production. 16 per base would probably be reasonable, and resume virtual production if a new base finishes (if that doesn't make it too complicated).
This would be useful for planning macro builds to ensure that worker production is not getting delayed without having to fiddle with the timeline.
I'm not sure if Chronoboost would be a useful feature here, so I don't know if typical Protoss builds are constantly Chronoboosting worker production (I don't play Protoss).
I may try to take a crack at this, at least for the Terran side, but my JS/TS is rusty.
My thought is that you essentially create a virtual queue of SCV production and MULE calldowns at the earliest possible times (given the players CCs and Orbital production). Then when new production is added you ignore this virtual queue for purposes of ordering, but you still calculate the minerals and supply available based on it. Then finding the timing for the new production should be basically the same, just find the earliest time after the last non-virtual action that has the correct resources, but you need an extra check to make sure that this won't delay SCV production. If that check fails, then move the new production after the next SCV production. I hope that explanation makes sense.
You also would have to consider if/when to stop virtual SCV production. 16 per base would probably be reasonable, and resume virtual production if a new base finishes (if that doesn't make it too complicated).
This would be useful for planning macro builds to ensure that worker production is not getting delayed without having to fiddle with the timeline.
I'm not sure if Chronoboost would be a useful feature here, so I don't know if typical Protoss builds are constantly Chronoboosting worker production (I don't play Protoss).
I may try to take a crack at this, at least for the Terran side, but my JS/TS is rusty.