Constrained KP hierarchy and bi-Hamiltonian structures