1. A method for designing a flow network, said method comprising: determining a set of flows, wherein each flow is a communication between a host and a device; assigning a host port and a device port for said each flow, wherein said assignment is based on a current flow cost and a new port assignment cost; determining one or more port groups, wherein a port group comprises one or more flows and ports associated with said one or more flows; and designing a network module for each of said one or more port groups, wherein building comprises determining if said network module comprises a switch, wherein said switch determination is based on in-only flows, out-only flows, and through flows,