logistics_or_gym


Namelogistics_or_gym JSON
Version 0.10.0 PyPI version JSON
download
home_pagehttps://github.com/HublyGroup/logistics-or-gym
Summaryor-problems formulated as gym environments to solve logisitcal-problems
upload_time2023-10-08 15:28:44
maintainer
docs_urlNone
authorhadisdev
requires_python>=3.10,<3.12
licenseMIT
keywords logistics-or-gym or gym logistics logistics-or or-gym
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Tests Workflow](https://github.com/HublyGroup/logistics-or-gym/actions/workflows/python-app.yml/badge.svg?kill_cache=1)
 [![PyPI version](https://badge.fury.io/py/logistics-or-gym.svg?kill_cache=1)](https://badge.fury.io/py/logistics-or-gym?kill_cache=1)

![Logo](img/4x/logo2.png#gh-dark-mode-only)
![LogoBlack](img/4x/logo-black.png#gh-light-mode-only)

# Introduction
Logistics-OR-gym is a "collection" of Open AI Gym environments ment to simualte logistical problems such as routing, 
container filling and supply chain 
# Install
You can install the envs using pypi
````shell
pip install logistics-or-gym
````
Python versions supported are: >=3.10 <3.12

# Available Environments
## Routing
### Heterogeneous Capacitated Vehicle Routing Problem (HCVRP)
HCVRP simulates routing problems when the number of vehicles is >=1 (This means it also covers the case for CVRP if only
that is needed) and different speeds. This implementation follows the one from:
````cite
@article{Li2021,
   abstract = {Existing deep reinforcement learning (DRL) based methods for solving the capacitated vehicle routing problem (CVRP) intrinsically cope with homogeneous vehicle fleet, in which the fleet is assumed as repetitions of a single vehicle. Hence, their key to construct a solution solely lies in the selection of the next node (customer) to visit excluding the selection of vehicle. However, vehicles in real-world scenarios are likely to be heterogeneous with different characteristics that affect their capacity (or travel speed), rendering existing DRL methods less effective. In this paper, we tackle heterogeneous CVRP (HCVRP), where vehicles are mainly characterized by different capacities. We consider both min-max and min-sum objectives for HCVRP, which aim to minimize the longest or total travel time of the vehicle(s) in the fleet. To solve those problems, we propose a DRL method based on the attention mechanism with a vehicle selection decoder accounting for the heterogeneous fleet constraint and a node selection decoder accounting for the route construction, which learns to construct a solution by automatically selecting both a vehicle and a node for this vehicle at each step. Experimental results based on randomly generated instances show that, with desirable generalization to various problem sizes, our method outperforms the state-of-the-art DRL method and most of the conventional heuristics, and also delivers competitive performance against the state-of-the-art heuristic method, i.e., SISR. Additionally, the results of extended experiments demonstrate that our method is also able to solve CVRPLib instances with satisfactory performance.},
   author = {Jingwen Li and Yining Ma and Ruize Gao and Zhiguang Cao and Andrew Lim and Wen Song and Jie Zhang},
   doi = {10.1109/TCYB.2021.3111082},
   journal = {IEEE Transactions on Cybernetics},
   keywords = {Computer architecture,Decoding,Deep reinforcement learning (DRL),Optimization,Reinforcement learning,Routing,Search problems,Vehicle routing,heterogeneous CVRP (HCVRP),min-max objective,min-sum objective.},
   month = {10},
   publisher = {Institute of Electrical and Electronics Engineers Inc.},
   title = {Deep Reinforcement Learning for Solving the Heterogeneous Capacitated Vehicle Routing Problem},
   url = {http://arxiv.org/abs/2110.02629 http://dx.doi.org/10.1109/TCYB.2021.3111082},
   year = {2021},
}
````
To use the environment simply use the gym library to create it:
````python
import gymnasium as gym
gym.make("hcvrp-v0")
````
The arguments you can pass are: 
````python
n_vehicles=3, 
n_nodes=50
````

There will be more arguments later. All fields are public so in the meantime just rewrite the properties

# TODO
- [X] HCVRP
- [ ] Container filling (3D binpacking)
- [ ] Dynamic HCVRP (For delivery)
- [ ] Supply Chain Management (Not yet decided on which ones)
# Credit

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HublyGroup/logistics-or-gym",
    "name": "logistics_or_gym",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<3.12",
    "maintainer_email": "",
    "keywords": "logistics-or-gym,or,gym,logistics,logistics-or,or-gym",
    "author": "hadisdev",
    "author_email": "hadi.salameh@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/61/cf/3a46d90eedf02dcfe5293b55b81ae5531d45fa4669038242913c77a12720/logistics_or_gym-0.10.0.tar.gz",
    "platform": null,
    "description": "\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![Tests Workflow](https://github.com/HublyGroup/logistics-or-gym/actions/workflows/python-app.yml/badge.svg?kill_cache=1)\n [![PyPI version](https://badge.fury.io/py/logistics-or-gym.svg?kill_cache=1)](https://badge.fury.io/py/logistics-or-gym?kill_cache=1)\n\n![Logo](img/4x/logo2.png#gh-dark-mode-only)\n![LogoBlack](img/4x/logo-black.png#gh-light-mode-only)\n\n# Introduction\nLogistics-OR-gym is a \"collection\" of Open AI Gym environments ment to simualte logistical problems such as routing, \ncontainer filling and supply chain \n# Install\nYou can install the envs using pypi\n````shell\npip install logistics-or-gym\n````\nPython versions supported are: >=3.10 <3.12\n\n# Available Environments\n## Routing\n### Heterogeneous Capacitated Vehicle Routing Problem (HCVRP)\nHCVRP simulates routing problems when the number of vehicles is >=1 (This means it also covers the case for CVRP if only\nthat is needed) and different speeds. This implementation follows the one from:\n````cite\n@article{Li2021,\n   abstract = {Existing deep reinforcement learning (DRL) based methods for solving the capacitated vehicle routing problem (CVRP) intrinsically cope with homogeneous vehicle fleet, in which the fleet is assumed as repetitions of a single vehicle. Hence, their key to construct a solution solely lies in the selection of the next node (customer) to visit excluding the selection of vehicle. However, vehicles in real-world scenarios are likely to be heterogeneous with different characteristics that affect their capacity (or travel speed), rendering existing DRL methods less effective. In this paper, we tackle heterogeneous CVRP (HCVRP), where vehicles are mainly characterized by different capacities. We consider both min-max and min-sum objectives for HCVRP, which aim to minimize the longest or total travel time of the vehicle(s) in the fleet. To solve those problems, we propose a DRL method based on the attention mechanism with a vehicle selection decoder accounting for the heterogeneous fleet constraint and a node selection decoder accounting for the route construction, which learns to construct a solution by automatically selecting both a vehicle and a node for this vehicle at each step. Experimental results based on randomly generated instances show that, with desirable generalization to various problem sizes, our method outperforms the state-of-the-art DRL method and most of the conventional heuristics, and also delivers competitive performance against the state-of-the-art heuristic method, i.e., SISR. Additionally, the results of extended experiments demonstrate that our method is also able to solve CVRPLib instances with satisfactory performance.},\n   author = {Jingwen Li and Yining Ma and Ruize Gao and Zhiguang Cao and Andrew Lim and Wen Song and Jie Zhang},\n   doi = {10.1109/TCYB.2021.3111082},\n   journal = {IEEE Transactions on Cybernetics},\n   keywords = {Computer architecture,Decoding,Deep reinforcement learning (DRL),Optimization,Reinforcement learning,Routing,Search problems,Vehicle routing,heterogeneous CVRP (HCVRP),min-max objective,min-sum objective.},\n   month = {10},\n   publisher = {Institute of Electrical and Electronics Engineers Inc.},\n   title = {Deep Reinforcement Learning for Solving the Heterogeneous Capacitated Vehicle Routing Problem},\n   url = {http://arxiv.org/abs/2110.02629 http://dx.doi.org/10.1109/TCYB.2021.3111082},\n   year = {2021},\n}\n````\nTo use the environment simply use the gym library to create it:\n````python\nimport gymnasium as gym\ngym.make(\"hcvrp-v0\")\n````\nThe arguments you can pass are: \n````python\nn_vehicles=3, \nn_nodes=50\n````\n\nThere will be more arguments later. All fields are public so in the meantime just rewrite the properties\n\n# TODO\n- [X] HCVRP\n- [ ] Container filling (3D binpacking)\n- [ ] Dynamic HCVRP (For delivery)\n- [ ] Supply Chain Management (Not yet decided on which ones)\n# Credit\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "or-problems formulated as gym environments to solve logisitcal-problems",
    "version": "0.10.0",
    "project_urls": {
        "Homepage": "https://github.com/HublyGroup/logistics-or-gym",
        "Repository": "https://github.com/HublyGroup/logistics-or-gym"
    },
    "split_keywords": [
        "logistics-or-gym",
        "or",
        "gym",
        "logistics",
        "logistics-or",
        "or-gym"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae3dceae2d3fd27d7a48487a03f7cadbfcaa7ba2e349b28d6435b955c970a0f2",
                "md5": "a1a5050e1a377ebf0e53797662809839",
                "sha256": "9f2451d7a0fc3d550aca6ac0b631b18160d4e104009b37870693aad162e1da1c"
            },
            "downloads": -1,
            "filename": "logistics_or_gym-0.10.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a1a5050e1a377ebf0e53797662809839",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<3.12",
            "size": 7577,
            "upload_time": "2023-10-08T15:28:43",
            "upload_time_iso_8601": "2023-10-08T15:28:43.193255Z",
            "url": "https://files.pythonhosted.org/packages/ae/3d/ceae2d3fd27d7a48487a03f7cadbfcaa7ba2e349b28d6435b955c970a0f2/logistics_or_gym-0.10.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61cf3a46d90eedf02dcfe5293b55b81ae5531d45fa4669038242913c77a12720",
                "md5": "537a4a6c56f742812f010f312016a377",
                "sha256": "e77fa8317af33a130a27b3e42ba1ba4bff624b652f0d8e65745edc58a37a9134"
            },
            "downloads": -1,
            "filename": "logistics_or_gym-0.10.0.tar.gz",
            "has_sig": false,
            "md5_digest": "537a4a6c56f742812f010f312016a377",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<3.12",
            "size": 5936,
            "upload_time": "2023-10-08T15:28:44",
            "upload_time_iso_8601": "2023-10-08T15:28:44.744613Z",
            "url": "https://files.pythonhosted.org/packages/61/cf/3a46d90eedf02dcfe5293b55b81ae5531d45fa4669038242913c77a12720/logistics_or_gym-0.10.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-08 15:28:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HublyGroup",
    "github_project": "logistics-or-gym",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "logistics_or_gym"
}
        
Elapsed time: 0.18606s