Skip to content

Commit

Permalink
fix set_geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathf committed Apr 19, 2024
1 parent df29bf0 commit bd5f0f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ Basic usage
... vroom.Job(1616, location=2),
... vroom.Job(1717, location=3)])
>>> problem_instance.set_geometry()
>>> solution = problem_instance.solve(exploration_level=5, nb_threads=4)
>>> solution.summary.cost
Expand All @@ -65,7 +63,7 @@ Basic usage
'waiting_time', 'location_index', 'id', 'description'],
dtype='object')
>>> solution.routes[["vehicle_id", "type", "arrival", "location_index", "id", "distance"]]
>>> solution.routes[["vehicle_id", "type", "arrival", "location_index", "id"]]
vehicle_id type arrival location_index id
0 47 start 0 0 <NA>
1 47 job 2104 1 1515
Expand Down
4 changes: 2 additions & 2 deletions src/vroom/input/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ def from_json(
if geometry is None:
geometry = servers is not None
if geometry:
self._set_geometry()
self._set_geometry(True)

Check warning on line 110 in src/vroom/input/input.py

View check run for this annotation

Codecov / codecov/patch

src/vroom/input/input.py#L110

Added line #L110 was not covered by tests
instance = Input(servers=servers, router=router)
with open(filepath) as handle:
instance._from_json(handle.read(), geometry)
return instance

def set_geometry(self):
self._geometry = True
return self._set_geometry()
return self._set_geometry(True)

Check warning on line 118 in src/vroom/input/input.py

View check run for this annotation

Codecov / codecov/patch

src/vroom/input/input.py#L117-L118

Added lines #L117 - L118 were not covered by tests

def set_amount_size(self, *amount_sizes: int) -> None:
"""Add amount sizes."""
Expand Down

0 comments on commit bd5f0f3

Please sign in to comment.