Skip to content

Commit 31b21d3

Browse files
committed
update readme with quickstart
1 parent 61e42d0 commit 31b21d3

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

README.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# PyGridSim
1515

16-
PyGridSim is a package with the goal of simulating OpenDSS circuits on Python. PyGridSim uses a functional interface to allow users to efficiently generate circuits of various scopes.
16+
PyGridSim is a package that allows user to simulating OpenDSS circuits with Python. PyGridSim uses a functional interface to allow users to efficiently generate circuits of various scopes.
1717

1818
- Documentation: https://amzhao.github.io/PyGridSim
1919
- Homepage: https://github.com/amzhao/PyGridSim
@@ -22,7 +22,7 @@ PyGridSim is a package with the goal of simulating OpenDSS circuits on Python. P
2222

2323
PyGridSim allows user to create circuits with the amount of customization they desire. Thus, users can either fully specify each component they add to the circuit, or lean on library-provided parameter sets. PyGridSim supports the batch creation of every circuit component, emphasizing scalability and efficiently in building large circuits.
2424

25-
# Install
25+
# Installation
2626

2727
## Requirements
2828

@@ -72,8 +72,44 @@ git checkout stable
7272
make install
7373
```
7474

75-
# What's next?
75+
# Quick Start
76+
Users of PyGridSim have the option between creating a fully customized circuit and using PyGridSim-provided parameters to build their circuit. Consider the simplest circuit: one source, one load, and a line connecting them. The following code snippet demonstrates how to model and print results on this circuit on PyGridSim with both methods.
77+
78+
## Customized Circuit Creation
79+
```python
80+
circuit = PyGridSim()
81+
82+
# Add Custom Source and Load
83+
circuit.add_load_nodes(params={"kV": 0.12, "kW": 1, "kvar": 1})
84+
circuit.update_source(params={"kV": 0.5})
85+
86+
# Add Line
87+
circuit.add_lines([("source", "load0")], params={"length": 1})
88+
89+
# Solve and Print Results
90+
circuit.solve()
91+
print(circuit.results(["Voltages", "Losses"]))
92+
circuit.clear()
93+
```
94+
95+
## Defaults-Based Circuit Creation
96+
```python
97+
circuit = PyGridSim()
98+
99+
# Add Custom Source and Load
100+
circuit.add_load_nodes(load_type="house")
101+
circuit.update_source(source_type="turbine")
102+
103+
# Add Line
104+
circuit.add_lines([("source", "load0")], line_type="lv")
105+
106+
# Solve and Print Results
107+
circuit.solve()
108+
print(circuit.results(["Voltages", "Losses"]))
109+
circuit.clear()
110+
```
111+
112+
# Resources
76113

77114
For more details about **PyGridSim** and all its possibilities
78-
and features, please check the [documentation site](
79-
TODO: gitbool link).
115+
and features, please check the [Gitbook page for PyGridSim](https://dtail.gitbook.io/pygridsim)

0 commit comments

Comments
 (0)