I have a convex polytope described by the intersection of a hypercube and two parallel lower and upper hyperplanes cutting through the hypercube. I want to find the projection of a point onto the polytope.
I read the question Projection of a point onto a convex polyhedra and see that the general problem of finding a projection onto a convex polytope can be solved with quadratic programming.
However, taken alone, projection onto a hypercube or a hyperplane is trivial. For the hypercube, each dimension is defined by a lower+upper bounds and we just pull each dimension within those bounds, which take $O(n)$ time in $n$ dimensions. For the hyperplane just find the projection onto it.
So I'm wondering whether there is simpler method for finding such a projection, maybe somehow combining the two independent projections.
You may want to check out Dykstra's projection algorithm (not to be confused with Dijkstra's algorithm). It precisely does what you want: It is an iterative method to compute the projection onto an intersection of convex sets using the projections onto these sets.
Note, that simply projecting onto the sets alone does not work. Consider the hypercube $[-1,1]^2$ and the hyperplane $\{x: x_1+x_2=1\}$. The projection of $(2,1)$ onto the intersection is $(1,0)$. If one first projects onto the cube, then onto the plane yields $(1/2,1/2)$, which is not the wanted projection.