An algorithm for linearly constrained piecewise lexicographic programming