Methods/Applications for solving the generalized cable trench problem