Algorithm to assign producers to consumers with respect to connections
I'm not sure I understand the problem statement, but it looks like this can be modelled as a network flow problem.  Here's how.  First, create a new source vertex $s_0$.  Then, for each producer $p$, if its capacity is $c_p$,  and add an edge $s_0 \to p$ with capacity $c_p$.  Do that for every producer, then look for a max flow in the resulting flow graph.