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 problem 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.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

laptimize-1.0.0-py3-none-any.whl (18.8 kB view hashes)

Uploaded Python 3

Supported by

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