A general approach for solving the Resource-Constrained Project and Multi-Project Scheduling Problem