We consider a key issue in hinterland container navigation in ports, such as Rotterdam and Antwerp, namely the barge handling problem: how to optimize the alignment of barge and terminal operations in a port. We make a major step in solving the barge handling problem for practical settings. Specifically, we consider restricted opening times of terminals, unbalanced networks, the presence of sea vessels, and closing times of containers. Consequently, at a terminal a barge faces time dependency in: (1) the waiting time until the start of handling and (2) the handling time itself. The concept of waiting profiles which we introduced in an earlier paper only deals with (1). To deal with (1) and (2) together we introduce a more comprehensive concept, namely that of service-time profile. To establish how well our approach works, we evaluate the performance of our distributed planning approach extensively by means of simulation. We compare our results with those based on centralized planning by using an off-line benchmark resembling it. We show that the Multi-Agent system that we introduce enables barge and terminal operators to align their operations efficiently. Hence, it can be seen as a promising solution approach for solving the barge handling problem, since it enables (competing) companies to collaborate in a competitive way.