{"id":20114929,"url":"https://github.com/vroom-project/pyvroom","last_synced_at":"2025-04-04T12:05:42.039Z","repository":{"id":40559113,"uuid":"438990354","full_name":"VROOM-Project/pyvroom","owner":"VROOM-Project","description":"Vehicle Routing Open-source Optimization Machine","archived":false,"fork":false,"pushed_at":"2025-03-12T09:36:00.000Z","size":340,"stargazers_count":73,"open_issues_count":17,"forks_count":14,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-28T11:06:30.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VROOM-Project.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-16T12:59:41.000Z","updated_at":"2025-03-12T21:23:06.000Z","dependencies_parsed_at":"2024-02-15T12:25:58.745Z","dependency_job_id":"e9d0b2e1-f35a-4bbc-a260-ef7068d2a95e","html_url":"https://github.com/VROOM-Project/pyvroom","commit_stats":{"total_commits":154,"total_committers":8,"mean_commits":19.25,"dds":0.4025974025974026,"last_synced_commit":"7fc9070cbfda901e5eeadefe99ed34c705c1d065"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VROOM-Project%2Fpyvroom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VROOM-Project%2Fpyvroom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VROOM-Project%2Fpyvroom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VROOM-Project%2Fpyvroom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VROOM-Project","download_url":"https://codeload.github.com/VROOM-Project/pyvroom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174406,"owners_count":20896076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:33:09.614Z","updated_at":"2025-04-04T12:05:42.019Z","avatar_url":"https://github.com/VROOM-Project.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python Vehicle Routing Open-source Optimization Machine\n=======================================================\n\n|gh_action| |codecov| |pypi|\n\n.. |gh_action| image:: https://img.shields.io/github/checks-status/VROOM-Project/pyvroom/main\n    :target: https://github.com/VROOM-Project/pyvroom/actions\n.. |codecov| image:: https://img.shields.io/codecov/c/github/VROOM-Project/pyvroom\n    :target: https://codecov.io/gh/VROOM-Project/pyvroom\n.. |pypi| image:: https://img.shields.io/pypi/v/pyvroom\n    :target: https://pypi.org/project/pyvroom\n\n*Good solution, fast... in Python.*\n\nPyvroom is an Python wrapper to the excellent `VROOM\n\u003chttps://github.com/VROOM-Project/vroom\u003e`_ optimization engine for solving\n`vehicle routing problems\n\u003chttps://en.wikipedia.org/wiki/Vehicle_routing_problem\u003e`_.\n\nThe library aims to solve several well-known types of vehicle routing problems,\nincluding:\n\n* Travelling salesman.\n* Capacitated vehicle routing.\n* Routing with time windows.\n* Multi-depot heterogeneous vehicle.\n* Pickup-and-delivery.\n\nVROOM can also solve any mix of the above problem types.\n\nBasic usage\n-----------\n\n.. code:: python\n\n  \u003e\u003e\u003e import vroom\n\n  \u003e\u003e\u003e problem_instance = vroom.Input()\n\n  \u003e\u003e\u003e problem_instance.set_durations_matrix(\n  ...     profile=\"car\",\n  ...     matrix_input=[[0, 2104, 197, 1299],\n  ...                   [2103, 0, 2255, 3152],\n  ...                   [197, 2256, 0, 1102],\n  ...                   [1299, 3153, 1102, 0]],\n  ... )\n\n  \u003e\u003e\u003e problem_instance.add_vehicle([vroom.Vehicle(47, start=0, end=0),\n  ...                               vroom.Vehicle(48, start=2, end=2)])\n\n  \u003e\u003e\u003e problem_instance.add_job([vroom.Job(1414, location=0),\n  ...                           vroom.Job(1515, location=1),\n  ...                           vroom.Job(1616, location=2),\n  ...                           vroom.Job(1717, location=3)])\n\n  \u003e\u003e\u003e solution = problem_instance.solve(exploration_level=5, nb_threads=4)\n\n  \u003e\u003e\u003e solution.summary.cost\n  6411\n\n  \u003e\u003e\u003e solution.routes.columns\n  Index(['vehicle_id', 'type', 'arrival', 'duration', 'setup', 'service',\n         'waiting_time', 'location_index', 'id', 'description'],\n        dtype='object')\n\n  \u003e\u003e\u003e solution.routes[[\"vehicle_id\", \"type\", \"arrival\", \"location_index\", \"id\"]]\n     vehicle_id   type  arrival  location_index    id\n  0          47  start        0               0  \u003cNA\u003e\n  1          47    job     2104               1  1515\n  2          47    job     4207               0  1414\n  3          47    end     4207               0  \u003cNA\u003e\n  4          48  start        0               2  \u003cNA\u003e\n  5          48    job     1102               3  1717\n  6          48    job     2204               2  1616\n  7          48    end     2204               2  \u003cNA\u003e\n\nUsage with a routing engine\n---------------------------\n\n.. code:: python\n\n  \u003e\u003e\u003e import vroom\n\n  \u003e\u003e\u003e problem_instance = vroom.Input(\n  ...     servers={\"auto\": \"valhalla1.openstreetmap.de:443\"},\n  ...     router=vroom._vroom.ROUTER.VALHALLA\n  ... )\n\n  \u003e\u003e\u003e problem_instance.add_vehicle(vroom.Vehicle(1, start=(2.44, 48.81), profile=\"auto\"))\n\n  \u003e\u003e\u003e problem_instance.add_job([\n  ...     vroom.Job(1, location=(2.44, 48.81)),\n  ...     vroom.Job(2, location=(2.46, 48.7)),\n  ...     vroom.Job(3, location=(2.42, 48.6)),\n  ... ])\n\n  \u003e\u003e\u003e sol = problem_instance.solve(exploration_level=5, nb_threads=4)\n  \u003e\u003e\u003e print(sol.summary.duration)\n  4041\n\nInstallation\n------------\n\nPyvroom currently makes binaries for on macOS and Linux. There is also a\nWindows build that can be used, but it is somewhat experimental.\n\nInstallation of the pre-compiled releases should be as simple as:\n\n.. code:: bash\n\n  pip install pyvroom\n\nThe current minimal requirements are as follows:\n\n* Python at least version 3.9.\n* Intel MacOS (or Rosetta2) at least version 14.0.\n* Apple Silicon MacOS at least version 14.0.\n* Windows on AMD64.\n* Linux on x86_64 and Aarch64 given glibc at least version 2.28.\n\nOutside this it might be possible to build your own binaries.\n\nBuilding from source\n====================\n\nBuilding the source distributions requires:\n\n* Download the Pyvroom repository on you local machine:\n\n  .. code:: bash\n\n    git clone --recurse-submodules https://github.com/VROOM-Project/pyvroom\n\n* Install the Python dependencies:\n\n  .. code:: bash\n\n    pip install -r pyvroom/build-requirements.txt\n\n* Install ``asio`` headers, and ``openssl`` and ``crypto`` libraries and headers.\n  For mac, this would be::\n\n    brew install openssl@1.1\n    brew install asio\n\n  For RHEL::\n\n    yum module enable mariadb-devel:10.3\n    yum install -y openssl-devel asio\n\n  For Musllinux::\n\n    apk add asio-dev\n    apk add openssl-dev\n\n* The installation can then be done with:\n\n  .. code:: bash\n\n    pip install pyvroom/\n\nAlternatively it is also possible to install the package from source using\n`Conan \u003chttps://github.com/conan-io/conan\u003e`_. This is also likely the only\noption if installing on Windows.\n\nTo install using Conan, do the following:\n\n.. code:: bash\n\n  cd pyvroom/\n  conan install --build=openssl --install-folder conan_build .\n\nDocumentation\n-------------\n\nThe code is currently only documented with Pydoc. This means that the best way\nto learn Pyvroom for now is to either look at the source code or use ``dir()``\nand ``help()`` to navigate the interface.\n\nIt is also useful to take a look at the\n`VROOM API documentation \u003chttps://github.com/VROOM-Project/vroom/blob/master/docs/API.md\u003e`_.\nThe interface there is mostly the same.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvroom-project%2Fpyvroom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvroom-project%2Fpyvroom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvroom-project%2Fpyvroom/lists"}