-
Notifications
You must be signed in to change notification settings - Fork 19
How to create a simulator
Changgang Li edited this page Feb 5, 2021
·
1 revision
To creat a simulator, you need first import the stepspy and then create simulator with the STEPS class in stepspy.
Here are some demo codes:
from stepspy import STEPS
# create a default simulator with default log destination (stdout)
simulator1 = STEPS()
# create a non-default simulator with default log destination (stdout)
simulator2 = STEPS(is_default=False)
# create a non-default simulator, and export log to file demo.log
simulator3 = STEPS(is_default=False, log_file="demo.log")
# create a non-default simulator, and disable all logs
simulator4 = STEPS(is_default=False, log_file="blackhole")
STEPS can creat multiple simulators in a single process. This is quite helpful if you want to manipulate data in different simulators and compare the two cases.
Cite STEPS via: Changgang Li, Yue Wu, Hengxu Zhang, Hua Ye, Yutian Liu and Yilu Liu, "STEPS: A Portable Numerical Simulation Toolkit for Electrical Power System Dynamic Studies," in IEEE Transactions on Power Systems, doi: 10.1109/TPWRS.2020.3045102.