-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix gas saturation #34
Comments
@alkurbatov It looks like there is currently no way I can iterate through the "Cache m_busy_workers".
Should a begin() and end() be added to Cache for iteration purposes? Or should Cache be able to take a lambda and return the first valid object? |
My current fix relies on PR #50 , so I believe I have to wait til that's resolved to make a PR for this one. But, here's the relevant new code:
|
What do you think about keeping list of assigned gatherers in each geyser object? |
Yes, I do think keeping a list of assigned gatherers per geyser is good. (also a list per mineral-patch will be needed eventually, in order to maintain 2 workers on close-mineral-patches, since sometimes they stray on auto-gather). |
If gas oversaturated, remove from busy_workers and call DistributeWorker. If gas under-saturated and any base is mineral-oversaturated, send one of those mineral workers to that gas.
Since you prefer lambdas, I changed RemoveVespeneHarvester to:
If you want this function (and AssignVespeneHarvester) moved from Hub to Miner, I'll have to add a Hub::GetBusyWorkers that returns a const list reference. |
Checks each refinery for oversaturation, and finds a worker on its way to refinery (not-inside-refinery) to STOP and force OnIdle next turn to be re-distributed to minerals.
Only check vespene workers every 10 frames, to prevent too many vespene workers from being added and oversaturated.
Only check vespene workers every 10 frames, to prevent too many vespene workers from being added and oversaturated.
Only check vespene workers every 7 frames, to prevent too many vespene workers from being added and oversaturated. Also, create functionality for other Plugin-derived classes to run every X turns.
Only check vespene workers every 7 frames, to prevent too many vespene workers from being added and oversaturated. Also, create functionality for other Plugin-derived classes to run every X turns.
Only check vespene workers every 7 frames, to prevent too many vespene workers from being added and oversaturated. Also, create functionality for other Plugin-derived classes to run every X turns.
Only check vespene workers every 7 gameloops, to prevent too many vespene workers from being added and oversaturated. Also, create functionality for other Plugin-derived classes to run every X gameloops.
Only check vespene workers every 7 steps, to prevent too many vespene workers from being added and oversaturated. Also, create functionality for other Plugin-derived classes to run every X steps.
We constantly have too many workers (e.g. 5 instead of 3) gathering the same refinery.
The text was updated successfully, but these errors were encountered: