A theoretical study of the valence transition in Sm1 ? x M x S alloys