Simulating the dynamics of individual adaptation to floods