Scheduling, contracting, and capacity planning in project-based supply chains