Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f8446d9
docs: silence HiGHS console output in tutorial notebooks
FBumann May 11, 2026
6d61112
docs: silence HiGHS console output in piecewise tutorials too
FBumann May 11, 2026
8d09ba9
Merge remote-tracking branch 'origin/master' into docs/silence-solver…
FBumann May 13, 2026
ae018a3
docs: fix broken toctree, refresh API reference, and clean up references
FBumann May 13, 2026
fe05bb1
docs: reorganize toctree into basic→advanced sections and rewrite use…
FBumann May 13, 2026
ce7c7b1
docs: fix broken admonitions in notebooks and configure intersphinx
FBumann May 13, 2026
e44cbd3
docs: downgrade coordinate-determination admonition from important to…
FBumann May 13, 2026
c5f9d4d
Revert "docs: downgrade coordinate-determination admonition from impo…
FBumann May 13, 2026
95b7e55
ci: empty commit to retrigger CI
FBumann May 13, 2026
94336ac
docs: rename toctree captions and reorder Examples below Solving
FBumann May 13, 2026
15aa6a4
docs: move Examples directly under User Guide
FBumann May 13, 2026
47db4be
docs: bridge Getting Started → User Guide and rename landing page H1
FBumann May 13, 2026
110ad81
docs: fix malformed first cell of solve-on-remote notebook
FBumann May 13, 2026
55867ac
docs: use markdown links for cross-refs in notebook markdown cells
FBumann May 13, 2026
2caac01
docs: collapse "Where to next" to a single pointer at the User Guide …
FBumann May 13, 2026
6cfa229
docs: restructure api.rst — task-oriented top, classes under the hood…
FBumann May 13, 2026
8e3885b
docs: add docstrings for properties surfaced in api.rst autosummary t…
FBumann May 13, 2026
a7efef2
docs: surface PWL_METHOD / PWL_CONVEXITY type aliases in api.rst
FBumann May 13, 2026
d4b20d3
docs: dissolve the api.rst Advanced umbrella; each item gets a natura…
FBumann May 13, 2026
1e33edd
docs: keep page TOC depth 2; expand right-side TOC to L2 site-wide
FBumann May 13, 2026
8954437
docs: rename "Classes and types" → "Other classes and types"
FBumann May 13, 2026
4c64672
docs: standardise H3 subgroup vocabulary across api.rst class sections
FBumann May 13, 2026
db02982
docs: revert show_toc_level=2 in book-theme options
FBumann May 13, 2026
91777fb
docs: restructure api.rst as Model-first and tighten the curated surface
FBumann May 13, 2026
955ef0b
docs: move piecewise construction helpers into the Piecewise section
FBumann May 13, 2026
2455b6c
docs: harmonise Variables container labels with Variable; fix preambl…
FBumann May 13, 2026
d949ec2
fix: api reference link
FBumann May 18, 2026
dda45c3
Merge branch 'master' into docs/reorganize-toctree
FBumann May 18, 2026
c189984
docs: add working-with-solvers notebook for the stateful Solver API
FBumann May 18, 2026
d4d662a
docs(solvers): drop hardcoded SolverReport coverage list
FBumann May 18, 2026
3c8c53a
docs(solvers): strip stray notebook outputs
FBumann May 18, 2026
87c32d6
docs(solvers): trim redundant cells, silence HiGHS logs
FBumann May 18, 2026
0f9f254
docs(solvers): surface the stateful Solver API in api.rst
FBumann May 18, 2026
5c03449
docs(solvers): rename notebook to using-solvers
FBumann May 18, 2026
1052c9d
docs(solvers): align notebook style with sibling notebooks
FBumann May 18, 2026
670aaf2
docs(solvers): restructure notebook around the common-case flow
FBumann May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
685 changes: 538 additions & 147 deletions doc/api.rst

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/benchmark.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _benchmark:

Benchmarks
==========
Performance comparison
======================


Linopy's performance scales well with the problem size. Its overall speed is comparable with the famous `JuMP <https://jump.dev/>`_ package written in `Julia <https://julialang.org/>`_. It even outperforms `JuMP` in total memory efficiency when it comes to large models. Compared to `Pyomo <https://pyomo.org>`_, the common optimization package in python, one can expect
Expand Down
10 changes: 10 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@
autosummary_generate = True
autodoc_typehints = "none"

# Intersphinx — resolve :class:`xarray.DataArray`, :func:`numpy.ndarray`, etc.
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/docs", None),
"xarray": ("https://docs.xarray.dev/en/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"dask": ("https://docs.dask.org/en/stable", None),
}

# Napoleon configurations

napoleon_google_docstring = False
Expand Down
38 changes: 31 additions & 7 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,55 @@ This package is published under MIT license.
creating-expressions
creating-constraints
coordinate-alignment
manipulating-models

.. toctree::
:hidden:
:maxdepth: 2
:caption: Examples

transport-tutorial
migrating-from-pyomo

.. toctree::
:hidden:
:maxdepth: 2
:caption: Advanced Features

sos-constraints
piecewise-linear-constraints
manipulating-models
testing-framework
transport-tutorial
infeasible-model

.. toctree::
:hidden:
:maxdepth: 2
:caption: Solving

using-solvers
solve-on-remote
solve-on-oetc
gpu-acceleration
migrating-from-pyomo
gurobi-double-logging

.. toctree::
:hidden:
:maxdepth: 2
:caption: Troubleshooting

infeasible-model
gurobi-double-logging

.. toctree::
:hidden:
:maxdepth: 2
:caption: Benchmarking
:caption: Comparisons

benchmark
syntax

.. toctree::
:hidden:
:maxdepth: 2
:caption: References
:caption: Reference

api
release_notes
Expand Down
56 changes: 52 additions & 4 deletions doc/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,58 @@
Overview
========

Welcome to the User Guide for Linopy. This guide is designed to help you understand and effectively use Linopy's features to solve your optimization problems, complementing the ``Getting Started`` section.
In :doc:`Getting Started <prerequisites>` you installed linopy, built
a first scalar model, and saw N-D variables on coordinates. The User
Guide reopens each of those pieces in depth and adds the rest of the
modelling surface.

In the following sections, we will take a closer look at how to create and manipulate models, variables, and constraints, and how to solve these models to find optimal solutions. Each section includes detailed explanations and code examples to help you understand the concepts and apply them to your own projects.
Each page is a runnable Jupyter notebook — read it top to bottom, or
use it as a reference once you know what you're looking for.

If you are completely new to Linopy, consider to first have a look at the `Getting Started` section.

Let's get started!
Core building blocks
--------------------

The four notebooks below cover the model object you'll interact with
most. Read them in order the first time; come back to them whenever
you're unsure what a particular operator or argument does.

- :doc:`creating-variables` — declaring decision variables, with bounds
and coordinates. Continuous, integer, binary, and semi-continuous.
- :doc:`creating-expressions` — combining variables into linear (and
quadratic) expressions; arithmetic, broadcasting, ``sum``,
``groupby``, ``rolling``, ``where``.
- :doc:`creating-constraints` — turning expressions into ``≤`` / ``≥``
/ ``==`` constraints, and the ``CSRConstraint`` memory-efficient
alternative.
- :doc:`coordinate-alignment` — how linopy lines up operands that live
on different coordinates, and how to control it with ``join``.

After these four you can build any LP/MIP/QP linopy supports.


Working with an existing model
------------------------------

Once you've built a model, you'll often want to inspect it, change a
bound, swap a constraint, or copy it for what-if analysis.

- :doc:`manipulating-models` — modifying or removing variables and
constraints in place; ``Model.copy()``; ``fix`` / ``relax`` for
variables.


Where to go next
----------------

- **Examples** — end-to-end problem walkthroughs:
:doc:`transport-tutorial`, :doc:`migrating-from-pyomo`.
- **Advanced features** — :doc:`sos-constraints`,
:doc:`piecewise-linear-constraints`, and the
:doc:`testing-framework` for asserting structural properties of a
model.
- **Solving** — :doc:`solve-on-remote` (SSH),
:doc:`solve-on-oetc` (OET Cloud), :doc:`gpu-acceleration` (cuPDLPx).
- **Troubleshooting** — :doc:`infeasible-model` (diagnosing infeasible
problems), :doc:`gurobi-double-logging` (and other solver quirks).
- **Reference** — the full :doc:`api` listing.
3 changes: 3 additions & 0 deletions doc/using-solvers.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../examples/using-solvers.ipynb"
}
10 changes: 10 additions & 0 deletions examples/create-a-model-with-coordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@
"source": [
"Alright! Now you learned how to set up linopy variables and expressions with coordinates. In the User Guide, which follows, we are going to see, how the representation of variables with coordinates allows us to formulate more advanced operations."
]
},
{
"cell_type": "markdown",
"id": "4db583af",
"metadata": {},
"source": [
"## Where to next\n",
"\n",
"You've now seen the full path from declaring variables on coordinates to solving the model. The [User Guide overview](user-guide.rst) reopens each piece in depth and points you at every topic from here."
]
}
],
"metadata": {
Expand Down
Loading