Construction of nearly conservative multivalue numerical methods for Hamiltonian problems