Optimal resolution of the transport problem from a flow into a RCPSP with routing