Skip to main content

高性能混合整数规划求解器,现代Python API

Project description

MIPSolver

高性能混合整数规划求解器,提供现代Python API。

特性

  • 🚀 高性能C++求解器核心
  • 🐍 友好的Python API
  • 📊 支持线性规划和混合整数规划
  • 🔧 跨平台支持(macOS, Windows, Linux)

安装

pip install mipsolver

快速开始

import mipsolver as mp

# 创建模型
model = mp.Model("example")

# 添加变量
x = model.add_var(name="x", vtype=mp.BINARY)
y = model.add_var(name="y", vtype=mp.CONTINUOUS, lb=0, ub=10)

# 设置目标函数
model.set_objective(3*x + 5*y, mp.MAXIMIZE)

# 添加约束
model.add_constr(x + 2*y <= 10)
model.add_constr(x >= 0)

# 求解
model.optimize()

# 输出结果
print(f"最优值: {model.obj_val}")
print(f"x = {x.value}")
print(f"y = {y.value}")

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mipsolver-1.0.7-cp312-cp312-win_amd64.whl (260.7 kB view details)

Uploaded CPython 3.12Windows x86-64

mipsolver-1.0.7-cp312-cp312-macosx_15_0_arm64.whl (217.4 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file mipsolver-1.0.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mipsolver-1.0.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 260.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for mipsolver-1.0.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8d812e2ef18872a4d244e11a099e0f8cc8a44db808d63835035b77de8012065a
MD5 7e2d07eb93516e6bc468e9d8f15a55ca
BLAKE2b-256 a58a7323791534d49846cb2a8defe93dce664ce7857475d042e7cead77337d10

See more details on using hashes here.

File details

Details for the file mipsolver-1.0.7-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for mipsolver-1.0.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 83f197f1d961a285ab2f7e7b32e7ea613ffbc12fea1d14c52658c994462c0db3
MD5 f048e1854cd440349d34cde0550a742f
BLAKE2b-256 357b4b28818ae7fbfc563c55f99a65c040d5d7b139c96192115f8560205f11fe

See more details on using hashes here.

Supported by

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