Coordinated defense allocation in reach-avoid scenarios with efficient online optimization