Hierarchical optimization of user association and flexible TDD allocation for access and backhaul networks