Scalable Offline Optimization of Industrial Wireless Sensor Networks