Skip to content

Commit

Permalink
Update repository URL; fix type hints in write_solution
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlan committed Feb 16, 2024
1 parent 7ae4944 commit d1ac5ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
name = "vrplib"
version = "1.3.0"
description = "Python library for working with vehicle routing problem instances."
description = "Python library for reading and writing VRP instances."
authors = ["Leon Lan <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https:/leonlan/VRPLIB"
repository = "https:/PyVRP/VRPLIB"

[tool.poetry.dependencies]
python = "^3.8"
Expand Down
11 changes: 7 additions & 4 deletions vrplib/write/write_solution.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from typing import Any, Dict, List, Optional
import os
from typing import Any, Dict, List, Optional, Union


def write_solution(
path: str, routes: List[List[int]], data: Optional[Dict[str, Any]] = None
path: Union[str, os.PathLike],
routes: List[List[int]],
data: Optional[Dict[str, Any]] = None,
):
"""
Writes a VRP solution to file following the VRPLIB convention.
Expand All @@ -14,8 +17,8 @@ def write_solution(
routes
A list of routes, each route denoting the order in which the customers
are visited.
**kwargs
Optional keyword arguments. Each key-value pair is written to the
data
Optional data dictionary. Each key-value pair is written to the
solution file as "{key}: {value}".
"""
for route in routes:
Expand Down

0 comments on commit d1ac5ab

Please sign in to comment.