Regime shifts in shallow lakes: palaeoecological and agent-based model approaches