Optimizing the flow of vessels through locks by improving the operational management of locks