Multibunch and multiparticle simulation code with an alternative approach to wakefield effects