Risk-based optimization of adaptable protection measures against natural hazards