mipsolver


Namemipsolver JSON
Version 1.0.10 PyPI version JSON
download
home_pageNone
Summary高性能混合整数规划求解器,现代Python API
upload_time2025-07-28 07:25:44
maintainerNone
docs_urlNone
authorlytreallynb
requires_python>=3.8
licenseNone
keywords optimization linear-programming integer-programming mip solver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MIPSolver

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

## 特性

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

## 安装

```bash
pip install mipsolver
```

## 快速开始

```python
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}")
```



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mipsolver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "optimization, linear-programming, integer-programming, mip, solver",
    "author": "lytreallynb",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/79/f7/1fc59870b2dcdfaed88e6888f6f3b13b0714fc50ed2a105b5eb96f7d7d17/mipsolver-1.0.10.tar.gz",
    "platform": null,
    "description": "# MIPSolver\n\n\u9ad8\u6027\u80fd\u6df7\u5408\u6574\u6570\u89c4\u5212\u6c42\u89e3\u5668\uff0c\u63d0\u4f9b\u73b0\u4ee3Python API\u3002\n\n## \u7279\u6027\n\n- \u9ad8\u6027\u80fdC++\u6c42\u89e3\u5668\u6838\u5fc3\n- \u53cb\u597d\u7684Python API\n- \u652f\u6301\u7ebf\u6027\u89c4\u5212\u548c\u6df7\u5408\u6574\u6570\u89c4\u5212\n- \u8de8\u5e73\u53f0\u652f\u6301\uff08macOS, Windows, Linux\uff09\n\n## \u5b89\u88c5\n\n```bash\npip install mipsolver\n```\n\n## \u5feb\u901f\u5f00\u59cb\n\n```python\nimport mipsolver as mp\n\n# \u521b\u5efa\u6a21\u578b\nmodel = mp.Model(\"example\")\n\n# \u6dfb\u52a0\u53d8\u91cf\nx = model.add_var(name=\"x\", vtype=mp.BINARY)\ny = model.add_var(name=\"y\", vtype=mp.CONTINUOUS, lb=0, ub=10)\n\n# \u8bbe\u7f6e\u76ee\u6807\u51fd\u6570\nmodel.set_objective(3*x + 5*y, mp.MAXIMIZE)\n\n# \u6dfb\u52a0\u7ea6\u675f\nmodel.add_constr(x + 2*y <= 10)\nmodel.add_constr(x >= 0)\n\n# \u6c42\u89e3\nmodel.optimize()\n\n# \u8f93\u51fa\u7ed3\u679c\nprint(f\"\u6700\u4f18\u503c: {model.obj_val}\")\nprint(f\"x = {x.value}\")\nprint(f\"y = {y.value}\")\n```\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\u9ad8\u6027\u80fd\u6df7\u5408\u6574\u6570\u89c4\u5212\u6c42\u89e3\u5668\uff0c\u73b0\u4ee3Python API",
    "version": "1.0.10",
    "project_urls": {
        "Bug Tracker": "https://github.com/lytreallynb/MIPSolver/issues",
        "Documentation": "https://github.com/lytreallynb/MIPSolver#readme",
        "Homepage": "https://github.com/lytreallynb/MIPSolver",
        "Repository": "https://github.com/lytreallynb/MIPSolver.git"
    },
    "split_keywords": [
        "optimization",
        " linear-programming",
        " integer-programming",
        " mip",
        " solver"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e8db51a17de397d43c326dc9965fd50fc8e064b7612bb61f742e8ad64729fff8",
                "md5": "fb2e0b45901d8fabe8092e176b5a3441",
                "sha256": "a61c129cab27657f6a56d9a13fcef1b676a0aef1f8c7e8f176002ef686d61456"
            },
            "downloads": -1,
            "filename": "mipsolver-1.0.10-cp312-cp312-macosx_15_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "fb2e0b45901d8fabe8092e176b5a3441",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 217510,
            "upload_time": "2025-07-28T07:25:42",
            "upload_time_iso_8601": "2025-07-28T07:25:42.714832Z",
            "url": "https://files.pythonhosted.org/packages/e8/db/51a17de397d43c326dc9965fd50fc8e064b7612bb61f742e8ad64729fff8/mipsolver-1.0.10-cp312-cp312-macosx_15_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "79f71fc59870b2dcdfaed88e6888f6f3b13b0714fc50ed2a105b5eb96f7d7d17",
                "md5": "ca0b483e097582b9f4278967577456ff",
                "sha256": "21b700ba55c185e6cb1e6213155e02a957d4749ea0fb8a40e66cbceed567b592"
            },
            "downloads": -1,
            "filename": "mipsolver-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "ca0b483e097582b9f4278967577456ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27522,
            "upload_time": "2025-07-28T07:25:44",
            "upload_time_iso_8601": "2025-07-28T07:25:44.394530Z",
            "url": "https://files.pythonhosted.org/packages/79/f7/1fc59870b2dcdfaed88e6888f6f3b13b0714fc50ed2a105b5eb96f7d7d17/mipsolver-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 07:25:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lytreallynb",
    "github_project": "MIPSolver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mipsolver"
}
        
Elapsed time: 3.27030s