Skip to content

Commit c9ed886

Browse files
authored
Feature/docs2 (#207)
* Improve docs
1 parent 363807c commit c9ed886

15 files changed

Lines changed: 156 additions & 28 deletions

File tree

docs/SUMMARY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- [Home](index.md)
22
- [Getting Started](getting-started.md)
3-
- [Concepts & Math](concepts-and-math/)
3+
- [User Guide](user-guide/)
44
- [Examples](examples/)
5+
- [FAQ](faq/)
56
- [API-Reference](api-reference/)
6-
- [Release Notes](release-notes/)
7-
- [Contribute](contribute.md)
7+
- [Release Notes](release-notes/)

docs/examples/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Examples
2+
3+
Here you can find a collection of examples that demonstrate how to use flixOpt.
4+
5+
We work on improving this gallery. If you have something to share, please contact us!

docs/faq/contribute.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing to the Project
2+
3+
We warmly welcome contributions from the community! This guide will help you get started with contributing to our project.
4+
5+
## Development Setup
6+
1. Clone the repository `git clone https://github.com/flixOpt/flixopt.git`
7+
2. Install the development dependencies `pip install -editable .[dev, docs]`
8+
3. Run `pytest` and `ruff check .` to ensure your code passes all tests
9+
10+
## Documentation
11+
flixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation. To preview the documentation locally, run `mkdocs serve` in the root directory.
12+
13+
## Helpful Commands
14+
- `mkdocs serve` to preview the documentation locally. Navigate to `http://127.0.0.1:8000/` to view the documentation.
15+
- `pytest` to run the test suite (You can also run the provided python script `run_all_test.py`)
16+
- `ruff check .` to run the linter
17+
- `ruff check . --fix` to automatically fix linting issues
18+
19+
---
20+
# Best practices
21+
22+
## Coding Guidelines
23+
24+
- Follow PEP 8 style guidelines
25+
- Write clear, commented code
26+
- Include type hints
27+
- Create or update tests for new functionality
28+
- Ensure 100% test coverage for new code
29+
30+
## Branches
31+
As we start to think flixOpt in **Releases**, we decided to introduce multiple **dev**-branches instead of only one:
32+
Following the **Semantic Versioning** guidelines, we introduced:
33+
- `next/patch`: This is where all pull requests for the next patch release (1.0.x) go.
34+
- `next/minor`: This is where all pull requests for the next minor release (1.x.0) go.
35+
- `next/major`: This is where all pull requests for the next major release (x.0.0) go.
36+
37+
Everything else remains in `feature/...`-branches.
38+
39+
## Pull requests
40+
Every feature or bugfix should be merged into one of the 3 [release branches](#branches), using **Squash and merge** or a regular **single commit**.
41+
At some point, `next/minor` or `next/major` will get merged into `main` using a regular **Merge** (not squash).
42+
*This ensures that Features are kept separate, and the `next/...`branches stay in synch with ``main`.*
43+
44+
## Releases
45+
As stated, we follow **Semantic Versioning**.
46+
Right after one of the 3 [release branches](#branches) is merged into main, a **Tag** should be added to the merge commit and pushed to the main branch. The tag has the form `v1.2.3`.
47+
With this tag, a release with **Release Notes** must be created.
48+
49+
*This is our current best practice*

docs/faq/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Frequently Asked Questions
2+
3+
## Work in progress

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ Working with flixOpt follows a general pattern:
3737
3838
Now that you've installed flixOpt and understand the basic workflow, you can:
3939
40-
- Learn about the [core concepts of flixOpt](concepts-and-math/index.md)
40+
- Learn about the [core concepts of flixOpt](user-guide/index.md)
4141
- Explore some [examples](examples/)
4242
- Check the [API reference](api-reference/index.md) for detailed documentation

docs/index.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,47 @@
1-
# flixOpt: Energy and Material Flow Optimization Framework
1+
# FlixOpt
22

3-
**flixOpt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP).
3+
**FlixOpt** is a Python-based optimization framework designed to tackle energy and material flow problems using mixed-integer linear programming (MILP).
44

5-
It bridges the gap between **high-level energy systems models** like [FINE](https://github.com/FZJ-IEK3-VSA/FINE) used for design and (multi-period) investment decisions and **low-level dispatch optimization tools** used for operation decisions.
5+
It borrows concepts from both [FINE](https://github.com/FZJ-IEK3-VSA/FINE) and [oemof.solph](https://github.com/oemof/oemof-solph).
6+
7+
## Why FlixOpt?
8+
9+
FlixOpt is designed as a general-purpose optimization framework to get your model running quickly, without sacrificing flexibility down the road:
10+
11+
- **Easy to Use API**: FlixOpt provides a Pythonic, object-oriented interface that makes mathematical optimization more accessible to Python developers.
12+
13+
- **Approachable Learning Curve**: Designed to be accessible from the start, with options for more detailed models down the road.
14+
15+
- **Domain Independence**: While frameworks like oemof and FINE excel at energy system modeling with domain-specific components, FlixOpt offers a more general mathematical approach that can be applied across different fields.
16+
17+
- **Extensibility**: Easily add custom constraints or variables to any FlixOpt Model using [linopy](https://github.com/PyPSA/linopy). Tailor any FlixOpt model to your specific needs without loosing the convenience of the framework.
18+
19+
- **Solver Agnostic**: Work with different solvers through a consistent interface.
20+
21+
- **Results File I/O**: Built to analyze results independent of running the optimization.
622

723
<figure markdown>
824
![flixOpt Conceptual Usage](./images/architecture_flixOpt.png)
925
<figcaption>Conceptual Usage and IO operations of flixOpt</figcaption>
1026
</figure>
1127

12-
## 🚀️ Getting Started
13-
14-
See the [Getting Started Guide](getting-started.md) to start using flixOpt.
28+
## Installation
1529

16-
See the [Examples](examples/) section for detailed examples.
30+
```bash
31+
pip install flixopt
32+
```
1733

18-
## ⚙️ How It Works
34+
For more detailed installation options, see the [Getting Started](getting-started.md) guide.
1935

20-
See our [Concepts & Math](concepts-and-math/index.md) to understand the core concepts of flixOpt.
36+
## License
2137

22-
## 🛠️ Compatible Solvers
38+
FlixOpt is released under the MIT License. See [LICENSE](https://github.com/flixopt/flixopt/blob/main/LICENSE) for details.
2339

24-
flixOpt works with various solvers:
40+
## Citation
2541

26-
- [HiGHS](https://highs.dev/) (installed by default)
27-
- [Gurobi](https://www.gurobi.com/)
28-
- [CBC](https://github.com/coin-or/Cbc)
29-
- [GLPK](https://www.gnu.org/software/glpk/)
30-
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer)
31-
32-
## 📝 Citation
33-
34-
If you use flixOpt in your research or project, please cite:
42+
If you use FlixOpt in your research or project, please cite:
3543

3644
- **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
3745
- **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
46+
47+
*A more sophisticated paper is in progress*
File renamed without changes.

docs/concepts-and-math/Mathematical Notation/Effects, Penalty & Objective.md renamed to docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md

File renamed without changes.

docs/concepts-and-math/Mathematical Notation/Flow.md renamed to docs/user-guide/Mathematical Notation/Flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The flow-rate is the main optimization variable of the Flow. It's limited by the size of the Flow and relative bounds \eqref{eq:flow_rate}.
1+
The flow_rate is the main optimization variable of the Flow. It's limited by the size of the Flow and relative bounds \eqref{eq:flow_rate}.
22

33
$$ \label{eq:flow_rate}
44
\text P \cdot \text p^{\text{L}}_{\text{rel}}(\text{t}_{i})

docs/concepts-and-math/Mathematical Notation/LinearConverter.md renamed to docs/user-guide/Mathematical Notation/LinearConverter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ $$
1818

1919
where $\text a$ can be interpreted as the conversion efficiency of the **LinearTransformer**.
2020
#### Piecewise Concersion factors
21-
The conversion efficiency can be defined as a piecewise function.
21+
The conversion efficiency can be defined as a piecewise linear approximation. See [Piecewise](Piecewise.md) for more details.

0 commit comments

Comments
 (0)