Efficient simulation for complex systems