Optimal Synthesis of Network with Weighted Constraints for Multiple Sources and Sinks