TDcoSim advanced usage
September 2, 2020 ยท View on GitHub
Importing TDcoSim
TDcoSim can be imported and used like a normal Python module. Note that package name is in lower case.
import tdcosim
Using TDcoSim within your script
The basic steps to write your own co-simulation program are as follows:
-
Setup desired T+D or T+D+DER system by making necessary entries in the config file.
-
Import necessary classes.
from tdcosim.report import generateReport from tdcosim.global_data import GlobalData from tdcosim.procedure.procedure import Procedure -
Read the config file and initialize the T&D system.
GlobalData.set_config('config.json') GlobalData.set_TDdata() -
Create a procedure object for the simulation and call simuate() method.
procedure = Procedure() procedure.simulate() -
Generate report after simuate() exits.
generateReport(tdcosim.GlobalData,fname='report.xlsx')
\pagebreak