Implemented the selection of the first optimal solution.