(self)
| 367 | ) |
| 368 | |
| 369 | def _depots(self) -> list[Depot]: |
| 370 | num_depots = self.parser.num_depots |
| 371 | depot_idcs = self.parser.depot_idcs() |
| 372 | |
| 373 | contiguous_lower_idcs = np.arange(num_depots) |
| 374 | if num_depots == 0 or (depot_idcs != contiguous_lower_idcs).any(): |
| 375 | msg = """ |
| 376 | Source file should contain at least one depot in the contiguous |
| 377 | lower indices, starting from 1. |
| 378 | """ |
| 379 | raise ValueError(msg) |
| 380 | |
| 381 | coords = self.parser.coords() |
| 382 | return [ |
| 383 | Depot(x=coords[idx][0], y=coords[idx][1]) |
| 384 | for idx in range(num_depots) |
| 385 | ] |
| 386 | |
| 387 | def _clients(self) -> list[Client]: |
| 388 | groups = self.parser.mutually_exclusive_groups() |
no test coverage detected