Integrated quantity and quality modeling and optimization of a manufacturing system under fractional inspection