A generic framework for NMFS modeling