A classical pseudo-spin model in one dimension is considered, representing a variation on the Frenkel-Kontorova model to include non-convex interactions, resulting in three competing length scales. An exact algorithm is used numerically to determine the classical ground state as a function of a chemical potential. Approximate arguments suggest that only a first-order transition should occur. However, when the lengths are not rationally related, it is found that the mean lattice spacing appears to vary as a devil's staircase. The plateaux of the staircase correspond to locking to incommensurate structures while there is no locking to the commensurate ones. Most of the locking values observed numerically belong to a series which can be analytically calculated on the basis of simple topological hypotheses which are also consistent with numerical observations.