public static void FindOptimalGraphToSatisfyFixedNodes( this ProductionGraph graph, IReadOnlyCollection <ProductionNode> nodeGroup) { foreach (ProductionNode node in nodeGroup.Where(n => n.RateType == RateType.Auto)) { node.ResetSolvedRate(); } OptimiseNodeGroup(nodeGroup); graph.UpdateLinkThroughputs(); }
public static void FindOptimalGraphToSatisfyFixedNodes(this ProductionGraph graph) { foreach (ProductionNode node in graph.Nodes.Where(n => n.RateType == RateType.Auto)) { node.ResetSolvedRate(); } foreach (var nodeGroup in graph.GetConnectedComponents()) { OptimiseNodeGroup(nodeGroup); } graph.UpdateLinkThroughputs(); }