* ProblemData( * clients: list[Client], * depots: list[Depot], * vehicle_types: list[VehicleType], * distance_matrices: list[numpy.ndarray[int]], * duration_matrices: list[numpy.ndarray[int]], * groups: list[ClientGroup] = [], * ) * * Creates a problem data instance. This instance contains all information * needed to solve the vehicle routing problem. * * .. not
| 61 | * because the referenced index is out of range. |
| 62 | */ |
| 63 | class ProblemData |
| 64 | { |
| 65 | // Validates the consistency of the constructed instance. |
| 66 | void validate() const; |
| 67 | |
| 68 | public: |
| 69 | /** |
| 70 | * Client( |
| 71 | * x: float, |
| 72 | * y: float, |
| 73 | * delivery: list[int] = [], |
| 74 | * pickup: list[int] = [], |
| 75 | * service_duration: int = 0, |
| 76 | * tw_early: int = 0, |
| 77 | * tw_late: int = np.iinfo(np.int64).max, |
| 78 | * release_time: int = 0, |
| 79 | * prize: int = 0, |
| 80 | * required: bool = True, |
| 81 | * group: int | None = None, |
| 82 | * *, |
| 83 | * name: str = "", |
| 84 | * ) |
| 85 | * |
| 86 | * Simple data object storing all client data as properties. See also |
| 87 | * :doc:`../setup/concepts` for further information about these properties. |
| 88 | * |
| 89 | * Parameters |
| 90 | * ---------- |
| 91 | * x |
| 92 | * Horizontal coordinate of this client, that is, the 'x' part of the |
| 93 | * client's (x, y) location tuple. This can for example be a longitude |
| 94 | * value. |
| 95 | * y |
| 96 | * Vertical coordinate of this client, that is, the 'y' part of the |
| 97 | * client's (x, y) location tuple. This can for example be a latitude |
| 98 | * value. |
| 99 | * delivery |
| 100 | * The amounts this client demands from the depot. |
| 101 | * pickup |
| 102 | * The amounts this client ships back to the depot. |
| 103 | * service_duration |
| 104 | * Amount of time a vehicle needs to spend at this client before |
| 105 | * resuming its route. Service should start (but not necessarily end) |
| 106 | * within the [:py:attr:`~tw_early`, :py:attr:`~tw_late`] interval. |
| 107 | * Default 0. |
| 108 | * tw_early |
| 109 | * Earliest time at which this client may be visited to start service. |
| 110 | * Default 0. |
| 111 | * tw_late |
| 112 | * Latest time at which this client may be visited to start service. |
| 113 | * Unconstrained if not provided. |
| 114 | * release_time |
| 115 | * Earliest time at which this client is released, that is, the earliest |
| 116 | * time at which a vehicle may leave the depot on a trip to visit this |
| 117 | * client. Default 0. |
| 118 | * prize |
| 119 | * Prize collected by visiting this client. Default 0. If this client |
| 120 | * is not required, the prize needs to be sufficiently large to offset |
no outgoing calls