Text this: Simulating the dynamics of scale-free networks via optimization.