Maximizing the net present value of a project subject to materials and capital constraints