This function takes in a list representation of distance matrix and create a network structure to be solved.
treated_control_net(n_t, n_c, dist_list, controls = 1)
This function returns a list of five vectors: startn, endn, ucap, cost, b.
Number of treated subjects.
Number of controls.
A list representation of the distance matrix.
Number of controls matched to each treated.
dist_list is a list consisting of the following three elements: start_n: the starting nodes for all edges, end_n: the ending nodes for all edges, d: distance of all treated-control edges. Function create_dist_list in this package constructs such a list representation given a user-specified distance function.