idinn


Nameidinn JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryInventory dynamics–informed neural networks for solving single-sourcing and dual-sourcing problems.
upload_time2024-04-26 22:39:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2021 Jiawei Li, Thomas Asikis, Ioannis Fragkos, and Lucas Boettcher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords dynamic control neural networks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # idinn: Inventory-Dynamics Control with Neural Networks

[<img src="https://gitlab.com/ComputationalScience/idinn/-/raw/main/docs/_static/youtube.png" align="center" width="60%" size="auto" alt="youtube">](https://www.youtube.com/watch?v=hUBfTWV6tWQ)

`idinn` implements **i**nventory **d**ynamics–**i**nformed **n**eural **n**etworks for solving single-sourcing and dual-sourcing problems. Neural network controllers and inventory dynamics are implemented into customizable objects with PyTorch backend to enable users to find the optimal neural controllers for the user-specified inventory systems.

## Installation

The package can be installed form PyPI. To do that, run

```
pip install idinn
```

Or, if you want to inspect the source code and edit locally, run

```
git clone https://gitlab.com/ComputationalScience/idinn.git
cd idinn
pip install -e .
```

## Example Usage

```python
import torch
from idinn.sourcing_model import SingleSourcingModel
from idinn.controller import SingleSourcingNeuralController

# Initialize the sourcing model and the neural controller
sourcing_model = SingleSourcingModel(
    lead_time=0,
    holding_cost=5,
    shortage_cost=495,
    batch_size=32,
    init_inventory=10,
    demand_distribution="uniform",
    demand_low=1,
    demand_high=4
)
controller = SingleFullyConnectedNeuralController(
    hidden_layers=[2],
    activation=torch.nn.CELU(alpha=1)
)
# Train the neural controller
controller.train(
    sourcing_model=sourcing_model,
    sourcing_periods=50,
    validation_sourcing_periods=1000,
    epochs=5000,
    tensorboard_writer=torch.utils.tensorboard.SummaryWriter(),
    seed=1,
)
# Simulate and plot the results
controller.plot(sourcing_model=sourcing_model, sourcing_periods=100)
# Calculate the optimal order quantity for applications
controller.forward(current_inventory=10, past_orders=[1, 5])
```

## Documentation

For tutorials and documentation, please refer to our [documentation](https://inventory-optimization.readthedocs.io/en/latest/).

## Papers using `idinn`

* Böttcher, Lucas, Thomas Asikis, and Ioannis Fragkos. "Control of Dual-Sourcing Inventory Systems Using Recurrent Neural Networks." [INFORMS Journal on Computing](https://pubsonline.informs.org/doi/abs/10.1287/ijoc.2022.0136) 35.6 (2023): 1308-1328.

## Contributors

* [Jiawei Li](https://github.com/iewaij)
* [Thomas Asikis](https://gitlab.com/asikist)
* [Ioannis Fragkos](https://gitlab.com/ioannis.fragkos1)
* [Lucas Böttcher](https://gitlab.com/lucasboettcher)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "idinn",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "dynamic control, neural networks",
    "author": null,
    "author_email": "Jiawei Li <sud.concept0x@icloud.com>, Thomas Asikis <thomas.asikis@uzh.ch>, Ioannis Fragkos <fragkos@rsm.nl>, Lucas Boettcher <l.boettcher@fs.de>",
    "download_url": "https://files.pythonhosted.org/packages/ae/82/085fdc4f669bafcf4685ad3ddb03e7f2fc6c36c80b22064537e47d2159c7/idinn-0.1.4.tar.gz",
    "platform": null,
    "description": "# idinn: Inventory-Dynamics Control with Neural Networks\n\n[<img src=\"https://gitlab.com/ComputationalScience/idinn/-/raw/main/docs/_static/youtube.png\" align=\"center\" width=\"60%\" size=\"auto\" alt=\"youtube\">](https://www.youtube.com/watch?v=hUBfTWV6tWQ)\n\n`idinn` implements **i**nventory **d**ynamics\u2013**i**nformed **n**eural **n**etworks for solving single-sourcing and dual-sourcing problems. Neural network controllers and inventory dynamics are implemented into customizable objects with PyTorch backend to enable users to find the optimal neural controllers for the user-specified inventory systems.\n\n## Installation\n\nThe package can be installed form PyPI. To do that, run\n\n```\npip install idinn\n```\n\nOr, if you want to inspect the source code and edit locally, run\n\n```\ngit clone https://gitlab.com/ComputationalScience/idinn.git\ncd idinn\npip install -e .\n```\n\n## Example Usage\n\n```python\nimport torch\nfrom idinn.sourcing_model import SingleSourcingModel\nfrom idinn.controller import SingleSourcingNeuralController\n\n# Initialize the sourcing model and the neural controller\nsourcing_model = SingleSourcingModel(\n    lead_time=0,\n    holding_cost=5,\n    shortage_cost=495,\n    batch_size=32,\n    init_inventory=10,\n    demand_distribution=\"uniform\",\n    demand_low=1,\n    demand_high=4\n)\ncontroller = SingleFullyConnectedNeuralController(\n    hidden_layers=[2],\n    activation=torch.nn.CELU(alpha=1)\n)\n# Train the neural controller\ncontroller.train(\n    sourcing_model=sourcing_model,\n    sourcing_periods=50,\n    validation_sourcing_periods=1000,\n    epochs=5000,\n    tensorboard_writer=torch.utils.tensorboard.SummaryWriter(),\n    seed=1,\n)\n# Simulate and plot the results\ncontroller.plot(sourcing_model=sourcing_model, sourcing_periods=100)\n# Calculate the optimal order quantity for applications\ncontroller.forward(current_inventory=10, past_orders=[1, 5])\n```\n\n## Documentation\n\nFor tutorials and documentation, please refer to our [documentation](https://inventory-optimization.readthedocs.io/en/latest/).\n\n## Papers using `idinn`\n\n* B\u00f6ttcher, Lucas, Thomas Asikis, and Ioannis Fragkos. \"Control of Dual-Sourcing Inventory Systems Using Recurrent Neural Networks.\" [INFORMS Journal on Computing](https://pubsonline.informs.org/doi/abs/10.1287/ijoc.2022.0136) 35.6 (2023): 1308-1328.\n\n## Contributors\n\n* [Jiawei Li](https://github.com/iewaij)\n* [Thomas Asikis](https://gitlab.com/asikist)\n* [Ioannis Fragkos](https://gitlab.com/ioannis.fragkos1)\n* [Lucas B\u00f6ttcher](https://gitlab.com/lucasboettcher)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 Jiawei Li, Thomas Asikis, Ioannis Fragkos, and Lucas Boettcher  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Inventory dynamics\u2013informed neural networks for solving single-sourcing and dual-sourcing problems.",
    "version": "0.1.4",
    "project_urls": {
        "Documentation": "https://inventory-optimization.readthedocs.io",
        "Homepage": "https://gitlab.com/ComputationalScience/idinn",
        "Issues": "https://gitlab.com/ComputationalScience/idinn/-/issues"
    },
    "split_keywords": [
        "dynamic control",
        " neural networks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a34cc185a96d0854005c3d5ff80818c341e998fe4c286fa5275ddf56075a490b",
                "md5": "64561119ec77f11d77af78ff98d94744",
                "sha256": "bf46224cfa7d9e1dcf7bdc4fc9e9dac9c476f23d30371ef33883dd99428a0c56"
            },
            "downloads": -1,
            "filename": "idinn-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64561119ec77f11d77af78ff98d94744",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10369,
            "upload_time": "2024-04-26T22:38:57",
            "upload_time_iso_8601": "2024-04-26T22:38:57.871449Z",
            "url": "https://files.pythonhosted.org/packages/a3/4c/c185a96d0854005c3d5ff80818c341e998fe4c286fa5275ddf56075a490b/idinn-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae82085fdc4f669bafcf4685ad3ddb03e7f2fc6c36c80b22064537e47d2159c7",
                "md5": "3179f8bf0523072d2a6d1c4509f2bba0",
                "sha256": "07f771074879e7af10044ff95948d737d604cb035d7d54015ed5b5bada6035ed"
            },
            "downloads": -1,
            "filename": "idinn-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "3179f8bf0523072d2a6d1c4509f2bba0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 633418,
            "upload_time": "2024-04-26T22:39:00",
            "upload_time_iso_8601": "2024-04-26T22:39:00.194091Z",
            "url": "https://files.pythonhosted.org/packages/ae/82/085fdc4f669bafcf4685ad3ddb03e7f2fc6c36c80b22064537e47d2159c7/idinn-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 22:39:00",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "ComputationalScience",
    "gitlab_project": "idinn",
    "lcname": "idinn"
}
        
Elapsed time: 0.23731s