Managing unavailabilities in a dynamic scenario following an agent-based approach