SMS: Time-Varying Network Optimization