Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OMMX adapter for Python-MIP

PyPI - Version

This package provides an adapter for the Python-MIP from/to OMMX

Python-MIP as a solver in OMMX toolchain

sequenceDiagram
    participant U as User
    participant A as Adapter
    participant P as Python-MIP
    U->>A: ommx.Instance
    A->>U: Python-MIP model
    U->>P: Python-MIP model and Parameters for Python-MIP;
    P->>P: Solve with CBC, Gurobi, or other solvers
    P->>U: Optimized model
    U->>A: Optimized model and ommx.Instance
    A->>U: ommx.Solution

Python-MIP as a user interface to create OMMX instance

sequenceDiagram
    participant U as User
    participant A as Adapter
    participant O as Other OMMX toolchain
    U->>A: Python-MIP model
    A->>U: ommx.Instance
    U->>O: ommx.Instance and Parameters for other solver
    O->>O: Solve the instance with other solver using other adapter
    O->>U: ommx.Solution

Usage

ommx-python-mip-adapter can be installed from PyPI as follows:

pip install ommx-python-mip-adapter

Python-MIP can be used through ommx-python-mip-adapter by using the following:

from ommx_python_mip_adapter import OMMXPythonMIPAdapter
from ommx import DecisionVariable, Instance, Sense

x1 = DecisionVariable.integer(1, lower=0, upper=5)
ommx_instance = Instance.from_components(
    decision_variables=[x1],
    objective=x1,
    constraints={},
    sense=Sense.Minimize,
)

# Create `ommx.Solution` from the `mip.Model`
ommx_solution = OMMXPythonMIPAdapter.solve(ommx_instance)

print(ommx_solution)

You can get ommx.Instance from a Python-MIP model as the following:

import mip
import ommx_python_mip_adapter as adapter

model = mip.Model()
x1 = model.add_var(name="1", var_type=mip.INTEGER, lb=0, ub=5)
x2 = model.add_var(name="2", var_type=mip.CONTINUOUS, lb=0, ub=5)
model.objective = -x1 - 2 * x2
model.add_constr(x1 + x2 - 6 <= 0)

ommx_instance = adapter.model_to_instance(model)

print(ommx_instance)

Reference

Metadata

Release files for ommx-python-mip-adapter 3.0.0b9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ommx-python-mip-adapter 3.0.0b9
File Size Uploaded Provenance Actions
ommx_python_mip_adapter-3.0.0b9.tar.gz 14.1 kB With provenance Details for ommx_python_mip_adapter-3.0.0b9.tar.gz

Release files / ommx_python_mip_adapter-3.0.0b9.tar.gz

Download URL ommx_python_mip_adapter-3.0.0b9.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d06f4bec4f92a8e5b603fc03888ce39228bc3386aaeed2808401b936c32e0764
BLAKE2b-256 checksum
How to use checksums
4d4178df11919af4c8dd12a2e73f4bdebd2e37f5fec4ad0c99186e304770ea10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for ommx-python-mip-adapter 3.0.0b9

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for ommx_python_mip_adapter-3.0.0b9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page