I am trying to create the optimal network model for the supply and demand of a product within a country. The product can be produced internally at one of 10 nodes, imported via one of four ports, or imported via one of 10 border crossings. Each internal production node, port, and border crossing has as an assigned annual capacity at a node. The demand areas are city centers, of which there are 13 (also nodes). Each city center also has an assigned annual demand. All of the parts of the system are connected via a road network that includes distance and time attributes.
I want to solve for something like: In order to minimze distance, the demand of City 1 should be met via supply from Port 1 using Route A and from Border Crossing 1 using Route B. The demand of City 2 should be met via Internal Production node 1 using Route C. And so on. It should solve so that a City could recieve product shipments from as many or as few supply nodes as necessary to meet demand optimally. But after the supply from a particular node reaches zero, it can no longer be used. Then repeat the procedure in order to minimze time and potentially cost.
Is something like this possible? Any recommendations? Thanks!