高性能混合整数规划求解器,现代Python API
Project description
MIPSolver
高性能混合整数规划求解器,提供现代化Python API。
安装
pip install mipsolver
快速开始
import mipsolver as mp
# 创建优化模型
model = mp.Model("example")
# 添加变量
x = model.add_var(vtype=mp.BINARY, name="x")
y = model.add_var(vtype=mp.BINARY, name="y")
# 设置目标函数
model.set_objective(5*x + 8*y, mp.MAXIMIZE)
# 添加约束
model.add_constr(2*x + 4*y <= 10, "capacity")
# 求解
model.optimize()
# 获取结果
print(f"最优值: {model.obj_val}")
print(f"x = {x.value}, y = {y.value}")
特性
- 🚀 高性能C++求解器核心
- 🐍 现代化Python API
- 📊 支持二进制、整数和连续变量
- 📁 MPS文件格式支持
- 🌐 跨平台兼容性
- 💻 完整类型提示支持
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mipsolver-1.0.0.tar.gz
(28.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mipsolver-1.0.0.tar.gz.
File metadata
- Download URL: mipsolver-1.0.0.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcd86247fa3d27e8c61826a80a154a6f96afcbaddb2429fc64977820a126ad75
|
|
| MD5 |
3fa7350bcbcb49538a70b01ed4b39a3e
|
|
| BLAKE2b-256 |
d8c6a002f8c2ce9ecb0b106c18dd2ed65f96227653874f83a29cd971e5dd3384
|
File details
Details for the file mipsolver-1.0.0-cp312-cp312-macosx_15_0_arm64.whl.
File metadata
- Download URL: mipsolver-1.0.0-cp312-cp312-macosx_15_0_arm64.whl
- Upload date:
- Size: 216.5 kB
- Tags: CPython 3.12, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d16569f4800733f59842ac6c51429b818b5e0d3488ea868de7c1221e1da0568d
|
|
| MD5 |
dbbaf61cfc35677ec60777ee26d55447
|
|
| BLAKE2b-256 |
47b818a86954f0a490763d7e9e87f19a06695fff08b494caa508eeb9fb5f80f9
|