Closed ScottJDaley closed 4 years ago
Example of multiple inputs and multiple outputs resulting in the issue
another repro:
produce 60 iron plate and 60 iron rods from 60 resource.* without refineries
There are two ways to solve this problem. The easy way is to divide sources proportionally across all sinks of that item. But that results in a lot of unnecessary crossing edges in the graphviz.
Another way is to try and match large sources with large sinks, fully consuming them if possible.
Opted for easy solution for now.
The edge value is based on the total amount required by the recipe on the receiving end for an item. If multiple edges are pointing to the same recipe for the same item, they will both have the total instead of the proportional amount.
I don't thinking taking the min of target and source recipe amount works in some edge cases either. May need to add variables or do something complicated here.