Compartmental analysis and its use in management and quantitative economics