Optimization of repeater combinations using integer programming