lp-ip-craft
Linear programming (LP) and mixed-integer linear programming (MILP) in Python,
solved by a native Rust engine: a bounded-variable dual revised simplex on a
sparse LU factorization, presolve, cuts and branch-and-bound. Every returned
point is evaluated independently of the solver (objective, row activities,
bound and integrality violations), and lp_residuals checks LP duals.
Install
python -m pip install lp-ip-craft
Wheels (abi3, CPython 3.10 or newer) cover Linux x86_64, Windows x64 and macOS x86_64/arm64 and need no compiler. On other platforms pip builds the source distribution, which needs Rust 1.85 or newer. The package depends on nothing else at run time.
Example
from lp_ip_craft import Model, solve
# maximize 5x + 4y subject to 6x + 4y <= 24, x + 2y <= 6, 0 <= x, y <= 10, integer
model = Model(
objective=[5.0, 4.0], sense="maximize",
lower=[0.0, 0.0], upper=[10.0, 10.0],
row_lower=[float("-inf"), float("-inf")], row_upper=[24.0, 6.0],
indptr=[0, 2, 4], indices=[0, 1, 0, 1], values=[6.0, 4.0, 1.0, 2.0], # A in CSR form
kinds=["integer", "integer"],
)
result = solve(model, backend="native")
print(result.status, result.candidate, result.evaluation.objective, result.best_bound)
# optimal [4.0, 0.0] 20.0 20.0
Pass backend="native": the default backend="dummy" only evaluates a start
point. Options sets the tolerances and the numerical width (threads,
1 to 8); NativeOptions holds the engine's controls, including time, node
and iteration limits, and rejects unknown names. solve_batch solves
independent models with up to 16 workers. evaluate and lp_residuals
check points and duals from any solver.
Limits
- A MIP needs finite bounds on all variables, continuous ones included, as
given or derived by root inference (which runs with
presolveon). - Linear objectives only: no QP or MIQP.
optimaland the gap are numerical findings under the stated tolerances. For hard industrial MIPs, compare against a mature solver such as HiGHS.
More
- Repository and the source build;
the Rust crates are
lp-ip-craftandlp-ip-craft-native - AI agent guide: modelling, options, results, MPS import and the job API
- Changelog
- Shared solver-selection guide
and ecosystem overview:
when black-box optimization (fcmaes) or SQP (SQP-craft) fits better, and
durable shell/MCP jobs through the
lp-ip-job-worker(built from source)
MIT license.
Metadata
Release files for lp-ip-craft 0.29.0
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 | |
|---|---|---|---|---|
| lp_ip_craft-0.29.0.tar.gz | 265.2 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| lp_ip_craft-0.29.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| lp_ip_craft-0.29.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| lp_ip_craft-0.29.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| lp_ip_craft-0.29.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 3.7 MB
Release files / lp_ip_craft-0.29.0.tar.gz
| Download URL | lp_ip_craft-0.29.0.tar.gz |
|---|---|
| Size | 265.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d9b7a54b260e8308cf3ba1e51ab69eb2ff62ca7f3b03f0f0ee72dc60063558e
|
|
BLAKE2b-256 checksum How to use checksums |
e221e726af9d1ef5de3ebaa4b48a26edbb2d0de589fecd177af9a5c2edcf555d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lp_ip_craft-0.29.0-cp310-abi3-win_amd64.whl
| Download URL | lp_ip_craft-0.29.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 788.2 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
464c95b882d60d7a52b0578254e002a4774ec4892cec0c0f258322474b11c0b3
|
|
BLAKE2b-256 checksum How to use checksums |
5af88636111a39755df31c673d9184471177f5b90cb24d8ff725f61b0aa31864
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lp_ip_craft-0.29.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lp_ip_craft-0.29.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 937.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
eb54cc77d3eea7f83f8c2f15ad018fa5d515f102580060aee3b513e0c73c7c8f
|
|
BLAKE2b-256 checksum How to use checksums |
eda41c5ae1e4f544f5fe3797040d78b43505681da6b678ec970b3133d8ef6a18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lp_ip_craft-0.29.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | lp_ip_craft-0.29.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 823.4 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c6496e571fb73f7c5ff05d31b2e59d5ec612e60fecacf17d99ae3db4c072481a
|
|
BLAKE2b-256 checksum How to use checksums |
c338f2c169b0fbd2a42f76be10d3807092e13aefad4889800aa4c8a18ab6cd25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lp_ip_craft-0.29.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | lp_ip_craft-0.29.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 861.7 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9dc2d3fd323d60132a670a6432b29b388b964572702ddf65556d208e6a583f30
|
|
BLAKE2b-256 checksum How to use checksums |
65de0f7d1decb6d1470bb4aaa646180114e35c5e859306c7140d857c6fb90587
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for lp-ip-craft 0.29.0
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.