generate instances with constraints