CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
223 stars 111 forks source link

Snapshot during time domain simulation #204

Closed cuihantao closed 2 years ago

cuihantao commented 2 years ago

Discussed in https://github.com/cuihantao/andes/discussions/203

Originally posted by **diodezener** October 20, 2021 Hi Dr. Cui, I'm wondering is it possible to save a "snapshot" of the system during time domain simulation like in PSCAD or PSS/E, which allows a rerun later from the given snapshot in time?
cuihantao commented 2 years ago

A snapshot feature is implemented using dill. Before using, please be aware of the security implications of dill, which is similar to pickle

The snapshot feature can be found in https://github.com/cuihantao/andes/blob/develop/andes/utils/snapshot.py. It is currently on the develop branch. It can be readily integrated into existing ones or used as is.

Use cases can be found at https://github.com/cuihantao/andes/blob/develop/tests/test_snapshot.py.

Please test and let me know @diodezener.