A nonlinear quasiperiodic Kronig-Penney model