op-research


Nameop-research JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/Rehan-stack/op-research
Summarypackage for solving operational research problems
upload_time2022-12-27 16:43:23
maintainer
docs_urlNone
authorrehan ahmed
requires_python>=3.10,<4.0
licenseMIT
keywords op-research operational-research simplex-method two-phase method math
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OP-Research

A unified collection of algrithms for solving operational research problems in an effiecient way

#### Purpose of the Package
The purpose of the package is to provide a collection of tools to solve operation research problems and help researchers.
### Features
The current implementation uses two phase method and is able to identify case for Infeasible solution, Unbounded solution, Degeneracy and Alternate Solution. In case of Infeasible solution and Unbounded solution it raises an ValueError and in case of Degeneracy and Alternate Solution it gives a warning and returns a optimum solution.

The constraints right hand side should be positive and all variables should hold non-negativity conditions.

## Rules for constraint representation:

Each variable should have coefficient if it is in constraint i.e x_1 is not allowd instead use 1x_1. Note that it is not necessary to represent each variable in a constraint, but if a variable is there then it should have a coefficient.
Only single spaces should be used.
For a variable x_i i should be an integer in [1, num_vars], where num_vars is number of variables
Objective function should be a tuple with first element as objective ie to maximize or minimize and second element should value that is to be optimized.

Simplex solution solver
The package can be found on pypi hence you can install it using pip

## Installation
```
pip install op_research
```
### Usage

```
>>> from op_research import Simplex
>>> objective = ('maximize', '7x_1 + 4x_2')
>>> constraints = ['5x_1 + 2x_2 = 7', '1x_1 + 8x_2 >= 9', '3x_1 + 4x_2 <= 8']
>>> Lp_system = Simplex(num_vars=2, constraints=constraints, objective_function=objective)
>>> print(Lp_system.solution)
{'x_1': Fraction(6, 7), 'x_2': Fraction(19, 14)}
```


## Contribution
Contributions are welcome Notice a bug let us know. Thanks

### Author
Main Maintainer: Rehan Ahmed

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Rehan-stack/op-research",
    "name": "op-research",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "op-research,operational-research,simplex-method,two-phase method,math",
    "author": "rehan ahmed",
    "author_email": "rehanahmedahmed007@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/49/a3/62d5008d39cdca25e229264bf05bc5314a8847706f2f682a515cdd3addd3/op_research-0.0.2.tar.gz",
    "platform": null,
    "description": "# OP-Research\n\nA unified collection of algrithms for solving operational research problems in an effiecient way\n\n#### Purpose of the Package\nThe purpose of the package is to provide a collection of tools to solve operation research problems and help researchers.\n### Features\nThe current implementation uses two phase method and is able to identify case for Infeasible solution, Unbounded solution, Degeneracy and Alternate Solution. In case of Infeasible solution and Unbounded solution it raises an ValueError and in case of Degeneracy and Alternate Solution it gives a warning and returns a optimum solution.\n\nThe constraints right hand side should be positive and all variables should hold non-negativity conditions.\n\n## Rules for constraint representation:\n\nEach variable should have coefficient if it is in constraint i.e x_1 is not allowd instead use 1x_1. Note that it is not necessary to represent each variable in a constraint, but if a variable is there then it should have a coefficient.\nOnly single spaces should be used.\nFor a variable x_i i should be an integer in [1, num_vars], where num_vars is number of variables\nObjective function should be a tuple with first element as objective ie to maximize or minimize and second element should value that is to be optimized.\n\nSimplex solution solver\nThe package can be found on pypi hence you can install it using pip\n\n## Installation\n```\npip install op_research\n```\n### Usage\n\n```\n>>> from op_research import Simplex\n>>> objective = ('maximize', '7x_1 + 4x_2')\n>>> constraints = ['5x_1 + 2x_2 = 7', '1x_1 + 8x_2 >= 9', '3x_1 + 4x_2 <= 8']\n>>> Lp_system = Simplex(num_vars=2, constraints=constraints, objective_function=objective)\n>>> print(Lp_system.solution)\n{'x_1': Fraction(6, 7), 'x_2': Fraction(19, 14)}\n```\n\n\n## Contribution\nContributions are welcome Notice a bug let us know. Thanks\n\n### Author\nMain Maintainer: Rehan Ahmed\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "package for solving operational research problems",
    "version": "0.0.2",
    "split_keywords": [
        "op-research",
        "operational-research",
        "simplex-method",
        "two-phase method",
        "math"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "28cb8fd5eb6beca2159833730ddee960",
                "sha256": "d932d37dc6ab281216e85d0fbd8787f6efb310012ca8173ccd99e7416e7bd9ea"
            },
            "downloads": -1,
            "filename": "op_research-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28cb8fd5eb6beca2159833730ddee960",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 4127,
            "upload_time": "2022-12-27T16:43:21",
            "upload_time_iso_8601": "2022-12-27T16:43:21.413266Z",
            "url": "https://files.pythonhosted.org/packages/a6/42/e0bf3e0075da197f8d50225047193248f73fb0615483c0ca32c032e1f77d/op_research-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "c7770a7040580cbae50d8c68597621f5",
                "sha256": "3b46958935956ca5088f7cf4d38fc209280e45534205a6775393e64f86e5b081"
            },
            "downloads": -1,
            "filename": "op_research-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c7770a7040580cbae50d8c68597621f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 4088,
            "upload_time": "2022-12-27T16:43:23",
            "upload_time_iso_8601": "2022-12-27T16:43:23.111541Z",
            "url": "https://files.pythonhosted.org/packages/49/a3/62d5008d39cdca25e229264bf05bc5314a8847706f2f682a515cdd3addd3/op_research-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-27 16:43:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Rehan-stack",
    "github_project": "op-research",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "op-research"
}
        
Elapsed time: 0.03036s