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 Distribution

linopy-0.1.tar.gz (342.7 kB view details)

Uploaded Source

Built Distribution

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

linopy-0.1-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file linopy-0.1.tar.gz.

File metadata

  • Download URL: linopy-0.1.tar.gz
  • Upload date:
  • Size: 342.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for linopy-0.1.tar.gz
Algorithm Hash digest
SHA256 486db33053234e0271a19c3a4e8d1ccec087984dc85c87ad730aadf47c002beb
MD5 d2f61ecdc07f6e8b18b94549d282f594
BLAKE2b-256 275aad6f4154c57800f21df0c91b1c327215519c52a6786b0b26b49ad84b99f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: linopy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for linopy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e382be929d34372f5c497eb220c50067e8e111a2775ffa24edbc9d5d9ac40ac5
MD5 cc3f19d73c06aff2587fdc6ad4c1f0c9
BLAKE2b-256 0df227428c4d5717868e75de9f96c78e4b628421ae4eea71c3a6bc54613cdcd7

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