Network Inspection
The gat inspect command provides diagnostic tools for examining network structure, validating data quality, and debugging power system models before running analysis.
Overview
gat inspect helps you:
- Validate imports — Verify network data was imported correctly
- Debug issues — Find missing generators, disconnected buses, or data problems
- Explore models — Understand network topology before running analysis
- Script automation — Export network data as JSON for custom workflows
Commands
gat inspect summary
Show high-level network statistics:
Output includes:
- Bus count and voltage level distribution
- Branch count by type (lines, transformers)
- Generator count and total capacity (MW)
- Load count and total demand (MW)
- Network connectivity status
Example output:
Network Summary
───────────────
Buses: 14
Branches: 20 (17 lines, 3 transformers)
Generators: 5 (total capacity: 772 MW)
Loads: 11 (total demand: 259 MW)
Status: Connected (1 island)
gat inspect generators
List all generators with their bus assignments and limits:
# List all generators
# Filter by bus
# Output as JSON
Options:
--bus <BUS>— Filter generators by bus ID--format <FORMAT>— Output format:table(default) orjson
Example output:
Generators
──────────
ID Bus Pmin (MW) Pmax (MW) Qmin (MVAr) Qmax (MVAr) Status
─── ─── ───────── ───────── ────────── ────────── ──────
G1 1 0.0 332.4 -10.0 10.0 Online
G2 2 0.0 140.0 -40.0 50.0 Online
G3 3 0.0 100.0 0.0 40.0 Online
gat inspect branches
List all branches with their endpoints and parameters:
Output includes:
- Branch ID and type (line/transformer)
- From/to bus IDs
- Impedance parameters (R, X, B)
- Rating and flow limits
- Tap ratio (for transformers)
gat inspect power-balance
Show power balance analysis comparing generation capacity to load:
Example output:
Power Balance Analysis
──────────────────────
Total Generation Capacity: 772.4 MW
Total Load Demand: 259.0 MW
Reserve Margin: 198% (513.4 MW)
Status: Adequate capacity for base case
This is useful for quick sanity checks before running OPF or reliability analysis.
gat inspect json
Export network data as JSON for scripting and automation:
# Compact JSON
# Pretty-printed JSON
# Pipe to jq for processing
|
Options:
--pretty— Pretty-print the JSON output with indentation
Use cases:
- Integration with Python/Julia scripts
- Custom analysis pipelines
- Data validation workflows
- Documentation generation
Diagnostic Workflows
Validate an Import
After importing a MATPOWER or PSS/E file, verify the data:
# Import the file
# Check the summary
# Verify generator data
# Check power balance
Debug Convergence Issues
When power flow doesn't converge, inspect the network:
# Check for adequate generation
# Look for generators with unusual limits
|
# Export full data for detailed analysis
Pre-flight Check Before Analysis
Before running OPF or contingency analysis:
# Quick validation
# If everything looks good, proceed
Related Commands
- Power Flow — Run power flow analysis
- OPF — Optimal power flow
- Convert — Convert between formats
- Import — Import network data