Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions linopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
Constraints,
CSRConstraint,
)
from linopy.declarative.build import declarative_model
from linopy.expressions import LinearExpression, QuadraticExpression, merge
from linopy.io import read_netcdf
from linopy.model import Model, Variable, Variables
Expand Down Expand Up @@ -76,4 +77,5 @@
"read_netcdf",
"segments",
"tangent_lines",
"declarative_model",
)
23 changes: 23 additions & 0 deletions linopy/declarative/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
Linopy declarative math interface.

Build a linopy model from a declarative math definition and an xarray dataset of input data, via :func:`declarative_model`.

This directory is adapted from the calliope Apache-2.0 licensed math backend module:
https://github.com/calliope-project/calliope/tree/9916116a06ec8c1feaf3c2606bdb8941b916ce85/src/calliope/backend
"""

from linopy.declarative.build import DeclarativeModelBuilder, declarative_model
from linopy.declarative.helpers import HelperFunction
from linopy.declarative.latex import LatexModelBuilder, latex_math_doc
from linopy.declarative.schema import ConfigModel, MathModel

__all__ = [
"ConfigModel",
"DeclarativeModelBuilder",
"HelperFunction",
"LatexModelBuilder",
"MathModel",
"declarative_model",
"latex_math_doc",
]
Loading
Loading