-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 93012fddfa5a3b6f48630714d8215644 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
Changelog | ||
========= | ||
|
||
Here, you'll find notable changes for each version of PREP-SHOT. | ||
|
||
Version 0.1.0 - Jun 24, 2024 | ||
-------------------------------- | ||
|
||
* PREP-SHOT model is released with basic functionality for energy expansion planning. | ||
* Linear programming optimization model for energy systems with multiple zones. | ||
* Support for solvers such as Gurobi, CPLEX, MOSEK, and GLPK via `Pyomo <https://pyomo.readthedocs.io/en/stable/solving_pyomo_models.html>`_. | ||
* Input and output handling with `pandas` and `Xarray`. | ||
|
||
Version 0.1.1 - Jul 11, 2024 | ||
------------------------------- | ||
|
||
Added | ||
+++++ | ||
|
||
* Add an example, expansion of Southeast Asia Mainland power system considering hydropower of Lower Mekong River. | ||
* Update the documentation with a docstring for each function and class. | ||
* Add the `Semantic Versioning Specification <https://semver.org>`_. | ||
|
||
Fixed | ||
+++++ | ||
|
||
Changed | ||
+++++++ | ||
|
||
* Support for solvers such as GUROBI (Commercial), COPT (Commercial), MOSEK (Commercial), and HiGHS (Open source) via `PyOptInterface <https://github.com/metab0t/PyOptInterface>`_. | ||
* Change default solver to HiGHS. | ||
* Change the code comment style to `NumPy <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html>`_. | ||
* Change the code style to `PEP8 <https://pep8.org>`_. | ||
* Categorize constraint definitions based on type (co2, cost, demand, generation, hydro, investment, nondispatchable, storage, transmission) for better organization. | ||
* Split `rule.py` class into serveral smaller, focused classes according to categorized constraint definitions. | ||
* Simplify model by replacing intermediate constraints with direct expressions. | ||
* Extract new modules `solver.py`, `output_data.py`, and `set_up.py` from `run.py` and `utils.py`. | ||
* Remove `parameters.py` into `set_up.py`. | ||
* Refactor and improve comments and function names for clarity and conciseness. | ||
|
||
Deprecated | ||
++++++++++ | ||
|
||
* Removed dependency on `Pyomo <https://pyomo.readthedocs.io/en/stable/solving_pyomo_models.html>`_ due to high memory usage and slow performance for large-scale models. `For you reference <https://metab0t.github.io/PyOptInterface/benchmark.html>`_. | ||
|
||
|
||
Version 0.1.2 - Jul 22, 2024 | ||
------------------------------- | ||
|
||
Added | ||
++++++ | ||
|
||
* Added mathematical notations to the constraint module. | ||
* Added a test script for `prepshot.utils`. | ||
|
||
Fixed | ||
++++++ | ||
|
||
* Fixed the format of the API reference. | ||
* Fix code blocks of documentation. | ||
* Updated `Contribution.rst` to include context on running tests and code style checks. | ||
* Defined explicit data types for inputs and outputs of functions for better type checking and readability. | ||
* Added `pyoptinterface._src.core_ext` to Pylint's extension package allow list to resolve cpp-extension-no-member warning. | ||
|
||
Changed | ||
++++++++ | ||
|
||
* Updated `model.py` to keep necessary decision variables and use expressions for intermediate variables instead of direct determination. | ||
* Refactored `extract_results_non_hydro` in `output_data.py` to extract common features for different variables, simplifying the code. | ||
* Removed definitions of complex sets and opted for simple sets wherever possible to streamline the code. | ||
* Refactor: Organize import order of modules according to PEP 8 guidelines: (1) Grouped standard library imports at the top; (2) Followed by third-party library imports; (3) Local application/library imports at the bottom. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
.. _Contribution: | ||
|
||
Contribution | ||
================= | ||
|
||
We welcome and appreciate contributions for the RPEP-SHOT library. Here are the steps to contribute: | ||
|
||
Development Process | ||
+++++++++++++++++++++++++++++++ | ||
|
||
1. **Create an Issue** | ||
|
||
If you find a bug or have an idea for an improvement or new feature, please create an `issue <https://github.com/PREP-NexT/PREP-SHOT/issues>`_. | ||
|
||
2. **Fork the Repository** | ||
|
||
You can fork the `PREP-SHOT repository <https://github.com/PREP-NexT/PREP-SHOT>`_ on GitHub. | ||
|
||
3. **Create a Branch** | ||
|
||
Create a new branch in your forked repository and name the branch according to the feature or fix you're working on. | ||
|
||
4. **Commit Changes** | ||
|
||
Make changes in your branch. Once you've made improvements or bug fixes to the project, commit the changes with a meaningful commit message. | ||
|
||
5. **Run Tests** | ||
To execute all tests, navigate to the root directory of PREP-SHOT and run: | ||
|
||
.. code:: bash | ||
python -m unittest discover -s tests | ||
To check your code for PEP8 compliance, run: | ||
|
||
.. code:: bash | ||
pylint run.py | ||
pylint prepshot | ||
6. **Start a Pull Request** | ||
|
||
Open a `pull request <https://github.com/PREP-NexT/PREP-SHOT/pulls>`_ from your forked repository to the main PREP-SHOT repository. Describe your changes in the pull request. | ||
|
||
7. **Code Review** | ||
|
||
Maintainers of the PREP-SHOT project will review your code. They may ask for changes or improvements before the code is merged into the main codebase. | ||
|
||
Please ensure that you update tests as necessary when you're contributing code, and follow the coding conventions established in the rest of the project. | ||
|
||
Building Documentation | ||
+++++++++++++++++++++++++++++++ | ||
|
||
The documentation is built using Sphinx. To build the documentation, you need to install the required packages using the following command: | ||
|
||
.. code:: bash | ||
pip install -r docs/requirements.txt | ||
You can build the documentation using the following command: | ||
|
||
.. code:: bash | ||
cd doc | ||
make clean | ||
make html | ||
The documentation will be built in the `doc/build` directory. | ||
|
||
Contributing Guidelines | ||
+++++++++++++++++++++++++++++++ | ||
|
||
PREP-SHOT is written in Python and follows the PEP8 coding standard. Please ensure that your code follows the PEP8 coding standard. You can use the `Pylint <https://pylint.readthedocs.io/en/stable/>`_ tool to check your code for PEP8 compliance. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _Forum: | ||
|
||
Discussion | ||
========== | ||
|
||
We encourage our community to actively participate and engage in discussions. The diverse perspectives and feedback from our users are valuable to us and will help us improve the model and its documentation. | ||
|
||
Check out the `FAQ <https://github.com/orgs/PREP-NexT/discussions/15>`_ page for answers to common questions. | ||
|
||
GitHub Discussions | ||
------------------ | ||
|
||
Users can join us for public discussions on the `Discussions <https://github.com/orgs/PREP-NexT/discussions>`_ page in our GitHub repository. | ||
|
||
- Ask `questions <https://github.com/orgs/PREP-NexT/discussions/categories/q-a>`_ or seek clarifications. | ||
- Share `ideas <https://github.com/orgs/PREP-NexT/discussions/categories/ideas>`_ or best practices. | ||
- `Showcase <https://github.com/orgs/PREP-NexT/discussions/categories/show-and-tell>`_ how you have used the model for your projects and share your experiences. | ||
- Engage in constructive conversations with our community. | ||
|
||
Private Queries | ||
--------------- | ||
|
||
If you have specific questions, feedback, or topics that are not suitable for public discussions, you may directly reach out to `Zhanwei Liu <mailto:liuzhanwei@u.nus.edu>`_. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. _Installation: | ||
|
||
Installation | ||
============ | ||
|
||
This page provides instructions on how to install and use PREP-SHOT. The installation process is divided into the following steps: | ||
|
||
Step 1: Download PREP-SHOT | ||
++++++++++++++++++++++++++ | ||
|
||
Ensure you have downloaded the PREP-SHOT model from the `GitHub repository <https://github.com/PREP-NexT/PREP-SHOT>`_. | ||
|
||
You may either clone the repository using the command: | ||
|
||
.. code-block:: bash | ||
git clone https://github.com/PREP-NexT/PREP-SHOT.git | ||
or download the repository as a zip file `here <https://github.com/PREP-NexT/PREP-SHOT/archive/refs/heads/main.zip>`__. | ||
|
||
Step 2: Install dependencies | ||
++++++++++++++++++++++++++++++ | ||
|
||
Assuming you have already `installed Python <https://www.python.org/downloads/>`_, the ``requirements.txt`` file contains all the dependencies for the project (default install open-source solver `HiGHS`). I also recommend `create a new environment <https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ for PREP-SHOT and installing the dependencies within the new environement. This approach isolates the project and its dependencies, helping to prevent conflicts with other Python projects. | ||
|
||
.. code:: bash | ||
cd PREP-SHOT | ||
conda create -n prep-shot python=3.8 | ||
conda activate prep-shot | ||
pip install -r requirements.txt | ||
Step 3: Run an example (Optional) | ||
++++++++++++++++++++++++++++++++++ | ||
|
||
Once the environment is activated, you can run an example of :ref:`Tutorial` with the following command: | ||
|
||
.. code:: bash | ||
python run.py | ||
You can also run examples using Jupyter notebooks located in the `./example/` directory. | ||
|
||
PREP-SHOT default solve models using open-source solver `HiGHS <https://highs.dev/>`_. also support commercial solvers, including `Gurobi <https://www.gurobi.com/features/academic-named-user-license/>`_, `COPT <https://www.copt.de/>`_ and `MOSEK <https://www.mosek.com/>`_. They offer academic licenses. To use these solvers, you need to install them and modify the solver in the `config.json` file. | ||
|
||
|
||
Step 4: Run your own model | ||
+++++++++++++++++++++++++++ | ||
|
||
You can prepare your input data referring to the example in the `input` and `southeast` folder. The detailed input data are introduced in the :ref:`Tutorial`. After preparing the input data, you can modify the `config.json` file to set the solver and other parameters. Then you can run your model with the following command: | ||
|
||
.. code:: bash | ||
python run.py | ||