This function takes as inputs two networks and one penalty lambda, and constructs one two-part network out of them.
stitch_two_nets(net1, net2, lambda, controls = 1, overflow = FALSE)
A list of five vectors: startn, endn, ucap, cost, b.
A list of five vectors: startn, endn, ucap, cost, b.
A penalty.
Number of controls matched to each treated.
A logical value indicating if overflow protection is turned on.
This function returns a list of five vectors: startn, endn, ucap, cost, b.
This function is of limited interest to users. Once overflow is set to TRUE, each cotnrol in the first network will be directly connected to the sink at a large cost, so that the network flow problem is feasible as long as the first part is feasible.