Automatic identification of embedded network rows in large-scale optimization models