laptimize - Linear Approximated Programming for Optimization
laptimize is a python package to solve separable non convex optimization problems which is based on branch and bound algorithm developed by James E.Falk (1972) of The George Washington University. It has been proven that it can generate global solution for large class of nonlinear programming problems in a finite number of steps. In many practical cases Nonlinear optimization problems are hard to solve and only limited methods are implemented. Many such problems, can be approximated arbitrarily closely by separable problems if all functions are piecewise linear. The laptimize python package will find a global optimum to these latter problems.
Installation
pip install laptimize
Dependencies
laptimize requires Python >= 3.6
NumPy (>= 1.19.2)
Pandas (>= 1.1.3)
PuLP (>= 2.3)
Examples
Refer Examples directory for more examples
problem type which laptimize can applies
Separable linear/non-linear convex/non-convex minimization objective function
Minimize:
F0(x1, x2) = 12x1 + 7x2 - x2^2
Subject to separable linear/non-linear convex/non-convex constraint with '<=' inequality
convex polygon
F1(x1, X2) = 2x1 + x2 - 0 <= 0
non convex constraint
F2(x1, X2) = -2x1^4 -x2 +2 <= 0
0 <= x1 <= 2, 0 <= x1 <= 3
Example Code
from laptimize.solver import Solver
example_1 = {'objective': {'x1': lambda x: 12 * x, 'x2': lambda x: 7 * x - x ** 2},
'constraint_1': {'x1': lambda x: -2 * (x ** 4), 'x2': lambda x: -x, 'value': -2},
'constraint_2': {'x1': lambda x: 2 * x, 'x2': lambda x: x, 'value': 3},
'capacity': {'x1': [0, 2], 'x2': [0, 3]}}
solution = Solver(example_1, partition_len=0.5).solve()
print(solution)
Comments, bug reports, patches and suggestions are welcome.
- Comments and suggestions: https://github.com/uichathurika/laptimize/discussions
- Bug reports: https://github.com/uichathurika/laptimize/issues
- Patches: https://github.com/uichathurika/laptimize/pulls
Metadata
Release files for laptimize 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| laptimize-1.0.1.tar.gz | 10.1 kB | Without provenance | Details for laptimize-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| laptimize-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for laptimize-1.0.1-py3-none-any.whl |
Total release size: 28.9 kB
Release files / laptimize-1.0.1.tar.gz
| Download URL | laptimize-1.0.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bebc978743c99cd9610da1478bd5ab91936ec97da9245453d75e5da473c8a2d
|
|
BLAKE2b-256 checksum How to use checksums |
8bc9f4a345b4c7564a4edde9abe309e7d12720c4d0e20262219e34ce2bdf4a90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.8
|
Release files / laptimize-1.0.1-py3-none-any.whl
| Download URL | laptimize-1.0.1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7aa68db1f29bc8cf5138aa861e0f672252d11759d93afc49fbacf4a261acdd4b
|
|
BLAKE2b-256 checksum How to use checksums |
dbe1d3d85e6cf0288ccea83e735488fc09690c426876f99f92adb68b34dc5659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.8
|
Security for laptimize 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.