The formation of partial misfit dislocations during heteroepitaxy