Resources, competition and selfing: their influence on reproductive system evolution