Added a validation of demand vs capacity