In this document, we describe how to get started with TSApp for transmission system analysis using real data from ISOs
Install the library according to the installation instructions and requirements.
The following functionalities are available.
- Fetch the market data from any specified ISO for given day and time.
- Run transmission system analysis for mutiple systems.
- Validate, save, and visualize results.
py311 cli.py --help
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
build Loads the data from specified ISO.
init Initializes transmission system analysis with ISO data. Note the generated UUID, which is required to build and run the analysis
solve Constructs and solves transmission system analysis problems (e.g. opf, pf, qsts).
validate Compares and validates the results obtained from Octave and Python.
The init command initializes the .pkl file in the /tmp/TSApp folder, where the data and results for a given execution will be stored. This command also generates a UUID, which will be used to build and solve the transmission system analysis problems. The command takes the path to Matpower as input, creates a ~/.octaverc file if it does not exist, and adds the required initialization command for Octave startup. Run the command in the root directory of the cloned repo, e.g., path/to/dir/tsapp.
(dpenv) oedi@oedi-VirtualBox:~/TSP/Stable/tsapp$ py311 cli.py init --matpower_path='/home/oedi/matpower7.1'
uuid is: 0ceaa0ce79664e929d1552c57f42e286
The build command retrieves the load shape from the ISO for a specified day and time with several options to customize the data request. The --iso_name option allows you to specify the name of the ISO from which the load data will be fetched. The --start_date_time and --end_date_time options define the start and end date/time for fetching the ISO data. The --uuid_param requires the UUID obtained from the init command. Finally, the --prob_type option specifies the type of problem to be solved, with available choices including pf (power flow), dcpf (DC power flow), opf (optimal power flow), and dcopf (DC optimal power flow). The data fetched will be stored as dataframe in .pkl file in /tmp/TSApp folder.
py311 cli.py build --uuid_param=1ae775e88cbe451aab8d792c662559b2 --prob_type='qsts' --iso_name='caiso' --start_date_time='12/14/23 00:00:00' --end_date_time='12/14/23 6:15:00'
After fetching the required ISO data, the transmission system analysis can be solved using solve command. Depending on the problem type specified (e.g., pf, dcpf, opf, dcopf, qsts, dcqsts), the analysis will be executed to evaluate the power flow or solve for optimal oper flow. On the same ISO data, multiple transmission system analysis problems can be solved. For example, case14 qsts, case9 dcqsts, case118 qsts, and others. Each analysis corresponds to a specific matpower case (tranmission system model), and different problem types like quasi-static time-series (qsts), dcqsts, pf, opf, etc can be applied to analyze the system's behavior under different conditions.
solve command offers several options to customize the analysis. The --ts_case_name option specifies the matpower transmission system case name, while the --uuid_param requires the UUID obtained from the init command. --save_res is used to save the results and --plot_res to plot the results. Additionally, the --bus_id (follows matpower nomenclature) allows to specify a bus ID for plotting the results at a particular bus.
py311 cli.py solve --uuid_param=1ae775e88cbe451aab8d792c662559b2 --prob_type='qsts' --ts_case_name='case30' --save_res=False --bus_id=8 --plot_res=True
This command compares and validates the results obtained from Octave and Python for transmission system analysis. It ensures consistency and accuracy between the two platforms by cross-checking the outputs for the specified problem type. The command provides options as --ts_case_name for Matpower transmission system case, and --uuid_param, --prob_type same as previous commands.
py311 cli.py validate --uuid_param=1ae775e88cbe451aab8d792c662559b2 --prob_type='qsts' --ts_case_name='case14'