Hi,
I used OpenWorkbench before it became Open Source and it had a fantastic scheduling and leveling algorithm, creating and updating schedules in a much better way than MS Project at that time and until recently has ever been able to do, hence I would recommend to "steal" the algorithm for ProjectLibre.
The OpenWorkbench project is also on SF.net at https://sourceforge.net/projects/openworkbench/, pretty much dead, but the code (a mix of C++ and Java) is available under an Open Source license.
Cheers, Eric