Skip to main content

package to solve separable non linear optimization problems

Project description

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.

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

laptimize-1.0.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

laptimize-1.0.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file laptimize-1.0.1.tar.gz.

File metadata

  • Download URL: laptimize-1.0.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for laptimize-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3bebc978743c99cd9610da1478bd5ab91936ec97da9245453d75e5da473c8a2d
MD5 34512f7b4cea7f16dbe8d11c73a1f0ab
BLAKE2b-256 8bc9f4a345b4c7564a4edde9abe309e7d12720c4d0e20262219e34ce2bdf4a90

See more details on using hashes here.

File details

Details for the file laptimize-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: laptimize-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for laptimize-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa68db1f29bc8cf5138aa861e0f672252d11759d93afc49fbacf4a261acdd4b
MD5 80f7b91fa920052f6162a9ba5d802b3e
BLAKE2b-256 dbe1d3d85e6cf0288ccea83e735488fc09690c426876f99f92adb68b34dc5659

See more details on using hashes here.

Supported by

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