Skip to main content

Linear optimization with N-D labeled arrays in Python

Project description

linopy: Linear optimization with N-D labeled variables

PyPI CI License: GPL v3 doc codecov

linopy is an open-source python package that facilitates linear or mixed-integer optimisation with real world data. It builds a bridge between data analysis packages like xarray & pandas and linear problem solvers like cbc, gurobi (see the full list below). The project aims to make linear programming in python easy, highly-flexible and performant.

Main features

linopy is heavily based on xarray which allows for many flexible data-handling features:

  • Define (arrays of) contnuous or binary variables with coordinates, e.g. time, consumers, etc.
  • Apply arithmetic operations on the variables like adding, substracting, multiplying with all the broadcasting potentials of xarray
  • Apply arithmetic operations on the linear expressions (combination of variables)
  • Group terms of a linear expression by coordinates
  • Get insight into the clear and transparent data model
  • Modify and delete assigned variables and constraints on the fly
  • Use lazy operations for large linear programs with dask
  • Choose from different commercial and non-commercial solvers
  • Fast import and export a linear model using xarray's netcdf IO

Installation

So far linopy is available on the PyPI repository

pip install linopy

Supported solvers

linopy supports the following solvers

Note that these do have to be installed by the user separately.

License

Copyright 2021 Fabian Hofmann

This package is published under license GNU Public License GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linopy-0.0.7-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file linopy-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: linopy-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for linopy-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a2e27ee3c8b3de048957acf77e2edfccf63de7dcbac2b9b2533abdfd7b6158ef
MD5 5dc39b39aab3a45c9351e8633e9414e9
BLAKE2b-256 cf430818e925effc36f0e718e9a66d05ac58463bc1c8c2979237e9d28bc30d24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page