Skip to content

Commit 5c2c12d

Browse files
committed
Add installation guideline
1 parent 5da157e commit 5c2c12d

File tree

2 files changed

+68
-7
lines changed

2 files changed

+68
-7
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,40 @@
66
# PowNet: Unit Commitment / Economic Dispatch model in Python
77
PowNet is a least-cost optimization model for simulating the Unit Commitment and Economic Dispatch (UC/ED) of large-scale (regional to country) power systems. In PowNet, a power system is represented by a set of nodes that include power plants, high-voltage substations, and import/export stations (for cross-border systems). The model schedules and dispatches the electricity supply from power plant units to meet hourly electricity demand in substations at a minimum cost. It considers the techno-economic constraints of both generating units and high-voltage transmission network. The power flow calculation is based on a Direct Current (DC) network (with N-1 criterion), which provides a reasonable balance between modelling accuracy and data and computational requirements. PowNet can easily integrate information about variable renewable resources (e.g., hydro, wind, solar) into the UC/ED process. For example, it can be linked with models that estimate the electricity supply available from renewable resources as a function of the climatic conditions. In addition, PowNet has provision to account for the effect of droughts on the generation of dispatchable thermal units (e.g., coal, oil, gas-fired units) that depend on freshwater availability. These features facilitate the application of PowNet to problems in the water-energy nexus domain that investigate the impact of water availability on electricity supply and demand.
88

9-
A quick start tutorial is provided here: https://pownet.readthedocs.io/en/latest/pages/quickstarter.html
10-
119
Read the PowNet Documentation here: https://pownet.readthedocs.io/en/latest
1210

11+
12+
## Installation
13+
14+
Download or clone the PowNet 2.0 repository to your local machine. For example: if we want to clone to "C://user/pownet",
15+
16+
```
17+
git clone https://github.com/your-username/pownet.git C://user/pownet
18+
```
19+
20+
Next, open a terminal and navigate to the directory where you cloned the repository:
21+
22+
```
23+
cd C://user/pownet
24+
```
25+
26+
The following step is highly recommended: creating a virtual environment to manage dependencies. If using Conda, you can create an envrionment named "pownet":
27+
28+
```
29+
conda create --name pownet
30+
conda activate pownet
31+
```
32+
33+
Now, you can install this PowNet package using pip, which is a manager for Python packages:
34+
35+
```
36+
pip install -e .
37+
```
38+
39+
This command installs the package in "editable" mode (-e) using pyproject.toml that is located in the root directory of PowNet. The editable mode allows you to edit PowNet codebase when you need to modify or implement new features. The pyproject.toml file specifies the dependencies required to run PowNet.
40+
41+
A quick start tutorial to run a simple case study is provided here: https://pownet.readthedocs.io/en/latest/pages/quickstarter.html
42+
1343
## Overview of PowNet
1444

1545
![overview_pownet](./docs/overview_pownet.png)

docs/source/pages/quickstarter.rst

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,38 @@
33
============================
44
This tutorial demonstrates how to use PowNet 2.0 to simulate a dummy power system over a 24-hour horizon for two simulation days.
55

6-
1. Model Overview
6+
1. Installation
7+
-----------------
8+
Download or clone the PowNet 2.0 repository to your local machine. For example: if we want to clone to "C://user/pownet",
9+
10+
.. code-block:: python
11+
12+
git clone https://github.com/your-username/pownet.git C://user/pownet
13+
14+
Next, open a terminal and navigate to the directory where you cloned the repository:
15+
16+
.. code-block:: python
17+
18+
cd C://user/pownet
19+
20+
The following step is highly recommended: creating a virtual environment to manage dependencies. If using Conda, you can create an envrionment named "pownet":
21+
22+
.. code-block:: python
23+
24+
conda create --name pownet
25+
conda activate pownet
26+
27+
Now, you can install this PowNet package using pip, which is a manager for Python packages:
28+
29+
.. code-block:: python
30+
31+
pip install -e .
32+
33+
This command installs the package in "editable" mode (-e) using pyproject.toml that is located in the root directory of PowNet. The editable mode allows you to edit PowNet codebase when you need to modify or implement new features. The pyproject.toml file specifies the dependencies required to run PowNet.
34+
35+
Now you have PowNet 2.0 installed and ready to use! You can proceed with the rest of this tutorial to run your first simulation using a small case study.
36+
37+
2. Model Overview
738
-----------------
839

940
The dummy power system includes a variety of generation sources and a single buyer.
@@ -22,7 +53,7 @@ The dummy power system includes a variety of generation sources and a single buy
2253
Supplier pBiomass
2354

2455

25-
2. Setup
56+
3. Setup
2657
----------
2758

2859
* **Input Folder:** Define the directory containing the power system models (`input_folder`). This folder may contain multiple subdirectories. Ensure the `input_folder` contains a subdirectory named `model_name` with the necessary model data, which is a set of CSV files.
@@ -34,7 +65,7 @@ The dummy power system includes a variety of generation sources and a single buy
3465
* `steps_to_run`: Specify the number of simulation steps (e.g., 2 for a two-day simulation).
3566
* `solver`: Select the optimization solver ('gurobi' or 'highs').
3667

37-
3. Code Example
68+
4. Code Example
3869
---------------
3970

4071
The following code has already been made available in the the `scripts` folder as `run_quickstart.py`. However, the code is also presented here.
@@ -92,13 +123,13 @@ The following code has already been made available in the the `scripts` folder a
92123
main()
93124
94125
95-
4. Running the Simulation
126+
5. Running the Simulation
96127
-------------------------
97128

98129
1. **Save:** Save the code above as a Python file (e.g., `run_tutorial.py`).
99130
2. **Run:** Execute the script from your terminal using `python run_pownet.py`.
100131

101-
5. Outputs
132+
6. Outputs
102133
----------
103134

104135
* **Results:** Simulation results will be saved in the specified `output_folder`.

0 commit comments

Comments
 (0)