Multi-scale agent-based model of competence phenotype in Bacillus subtilis