andes.utils.snapshot#
Utility functions for saving and loading snapshots.
Code Examples:
Setup base case and save the snapshot for once:
import andes
ss = andes.run(andes.get_case("ieee14/ieee14_linetrip.xlsx"))
ss.Toggle.u.v[:] = 0 # turn off line trips for the base case
xy = ss.TDS.init()
andes.utils.snapshot.save_ss("ieee14_snapshot.pkl", ss)
2. For every scenario afterwards, load the snapshot and apply disturbances:
import andes
ss = andes.utils.snapshot.load_ss("ieee14_snapshot.pkl")
# apply specific disturbances
ss.GENROU.omega.v[0] = 1.02
ss.TDS.run()
Functions