Generic inventory model and controller