double SavedCapacityPenaltyOnCdtEdge(CdtEdge cdtEdge, EdgeGeometry edgeGeometry) { if (cdtEdge.ResidualCapacity > 0) { return(0); } double savedDelta; double width = edgeGeometry.LineWidth; if (cdtEdge.ResidualCapacity == cdtEdge.Capacity - width) { savedDelta = width; } else { savedDelta = width + bundlingSettings.EdgeSeparation; } if (savedDelta > -cdtEdge.ResidualCapacity) { savedDelta = -cdtEdge.ResidualCapacity; } return(savedDelta * SdShortestPath.CapacityOverflowPenaltyMultiplier(bundlingSettings)); }
double AddedCapacityPenaltyForCdtEdge(CdtEdge cdtEdge, EdgeGeometry edgeGeometry) { double capacityOverflowMultiplier = SdShortestPath.CapacityOverflowPenaltyMultiplier(bundlingSettings); return(SdShortestPath.CostOfCrossingCdtEdge(capacityOverflowMultiplier, bundlingSettings, edgeGeometry, cdtEdge)); }