MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / data

Method data

pyvrp/read.py:351–367  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

349 self.parser = parser
350
351 def data(self) -> ProblemData:
352 clients = self._clients()
353 depots = self._depots()
354 vehicle_types = self._vehicle_types()
355 distance_matrices = self._distance_matrices()
356 groups = self._groups()
357
358 return ProblemData(
359 clients=clients,
360 depots=depots,
361 vehicle_types=vehicle_types,
362 distance_matrices=distance_matrices,
363 # VRPLIB instances typically do not have a duration data field, and
364 # instead assume duration == distance.
365 duration_matrices=distance_matrices,
366 groups=groups,
367 )
368
369 def _depots(self) -> list[Depot]:
370 num_depots = self.parser.num_depots

Callers 1

readFunction · 0.45

Calls 6

_clientsMethod · 0.95
_depotsMethod · 0.95
_vehicle_typesMethod · 0.95
_distance_matricesMethod · 0.95
_groupsMethod · 0.95
ProblemDataClass · 0.85

Tested by

no test coverage detected