-
Notifications
You must be signed in to change notification settings - Fork 61
Dev ~ HTTP API Container
Austin Chang edited this page Dec 4, 2019
·
3 revisions
You can deploy the OMF inside a Docker container and access some of its functionality via an HTTP REST API.
Please see this dockerfile and start/deploy via dockerBuild.sh.
All code and tests for this interface is in the omf/scratch/GRIP subdirectory.
The major functionality available via the API is:
- /oneLineGridlab - generate a one line diagram of a GridLAB-D .glm file.
- /milsoftToGridlab - convert a Milsoft Windmil ASCII export (.std & .seq) in to a GridLAB-D .glm.
- /cymeToGridlab - convert an Eaton Cymdist .mdb export in to a GridLAB-D .glm.
- /gridlabRun - run a .glm through GridLAB-D and return the results as JSON.
- /gridlabdToGfm - convert a GridLAB-D to a LANL ANSI General Fragility Model file.
- /runGfm - calculate distribution damage using a LANL ANSI General Fragility Model file.
- /samRun - run NREL SAM with JSON inputs/outputs.
- /transmissionMatToOmt - convert a .mat or .m input in to a JSON .omt transmission circuit format.
- /transmissionPowerflow - run ACOPF for a .omt transmission circuit.
- /transmissionViz - generate an interactive and editable one line diagram of a transmission network.
- /distributionViz - generate an interactive and editable one line diagram of a distribution network.
For the full documentation on the API endpoints please see the docstrings in grip.py.
All of the endpoints are tested via test_grip.py.
The test framework comes with a GUI in HTML (screenshot below) to easily test all the endpoints and inspect the results.