@solvice/routing 0.18.2-beta.0 → 0.19.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runs.d.ts +58 -53
- package/dist/v3.d.ts +64 -59
- package/package.json +1 -1
package/dist/runs.d.ts
CHANGED
|
@@ -210,7 +210,7 @@ export interface components {
|
|
|
210
210
|
* Format: int64
|
|
211
211
|
* @description Trigger threshold in seconds (strict `>` — the break fires when the
|
|
212
212
|
* accumulator exceeds this). EU 561/2006 drive rule: `16200` (4 h 30).
|
|
213
|
-
* Must be `> 0` and
|
|
213
|
+
* Must be `> 0` and at most 2,147,483,647.
|
|
214
214
|
* @example 14400
|
|
215
215
|
*/
|
|
216
216
|
threshold_s: number;
|
|
@@ -239,7 +239,7 @@ export interface components {
|
|
|
239
239
|
/**
|
|
240
240
|
* @description Not supported on V3: a windowed break is taken wherever the
|
|
241
241
|
* vehicle is when it starts, so a `location` here is rejected with
|
|
242
|
-
* HTTP 400 `not_supported`.
|
|
242
|
+
* HTTP 400 `not_supported`.
|
|
243
243
|
*/
|
|
244
244
|
location?: null | components["schemas"]["Place"];
|
|
245
245
|
/** @description The window bounding the break's **start**. */
|
|
@@ -330,7 +330,7 @@ export interface components {
|
|
|
330
330
|
* shifts only `per_route`. Default `0`. Use it to minimise distinct
|
|
331
331
|
* vehicles; use `per_route` to price each working day. Not accepted on
|
|
332
332
|
* `shifts[].costs`. When any vehicle has a non-zero rate and any vehicle
|
|
333
|
-
* has several shifts, the
|
|
333
|
+
* has several shifts, the request is solved as a whole rather than split into parts, which can make a large request slower.
|
|
334
334
|
* @example 400
|
|
335
335
|
*/
|
|
336
336
|
per_used_vehicle?: number | null;
|
|
@@ -375,7 +375,7 @@ export interface components {
|
|
|
375
375
|
* cannot see — typically the driver labour for the unload itself
|
|
376
376
|
* (`service_duration_s` × the hourly rate). Without it, a reload that
|
|
377
377
|
* consumes only *slack* is free in the objective: it adds no route
|
|
378
|
-
* duration, so the solver
|
|
378
|
+
* duration, so the solver may insert one to displace time that
|
|
379
379
|
* `objective.costs.per_wait_hour` would otherwise charge as idle, parking
|
|
380
380
|
* the vehicle at a depot for no capacity benefit.
|
|
381
381
|
* @example 38.66
|
|
@@ -467,8 +467,8 @@ export interface components {
|
|
|
467
467
|
* each other. The solver adds `per_entry` to the objective each time a
|
|
468
468
|
* route enters a group from a job outside it, the first entry included;
|
|
469
469
|
* entering from the shift's start or from a reload is free. Keeping each
|
|
470
|
-
* group in one visit minimises
|
|
471
|
-
*
|
|
470
|
+
* group in one visit minimises how often a route comes back to an area it
|
|
471
|
+
* already served. Presence of this object enables the feature; omit
|
|
472
472
|
* it to disable.
|
|
473
473
|
* @example {
|
|
474
474
|
* "distance_metric": "straight_line",
|
|
@@ -542,7 +542,7 @@ export interface components {
|
|
|
542
542
|
* this prices the vehicle that did, so a task rated badly everywhere is
|
|
543
543
|
* the first one dropped when capacity runs out. It lives in the cost tier,
|
|
544
544
|
* below `priority`, and adds to `preferences`, `drop_cost` and travel.
|
|
545
|
-
*
|
|
545
|
+
* A request that sets it is solved as a whole rather than split into parts, which can make a large request slower.
|
|
546
546
|
*/
|
|
547
547
|
assignment_costs?: components["schemas"]["AssignmentCost"][] | null;
|
|
548
548
|
/**
|
|
@@ -705,10 +705,8 @@ export interface components {
|
|
|
705
705
|
* - `osm`: OpenStreetMap free-flow times. No traffic, so
|
|
706
706
|
* `travel.departure_time` is rejected with 400.
|
|
707
707
|
* - `tomtom_real_time`: TomTom live traffic at the moment of the request.
|
|
708
|
-
* **Not
|
|
709
|
-
* `
|
|
710
|
-
* profile; at most 100 distinct locations; up to ~25 s of matrix fetch at
|
|
711
|
-
* 100 locations.
|
|
708
|
+
* **Not available:** a request that sets it is rejected with 403
|
|
709
|
+
* `feature_not_enabled`. Use `tomtom`.
|
|
712
710
|
* - `straight_line`: great-circle distance at `travel.speed_kmh`, no road
|
|
713
711
|
* network. `travel.departure_time`, `options.polyline` and any vehicle
|
|
714
712
|
* `profile` other than `car` are rejected with 400.
|
|
@@ -758,8 +756,8 @@ export interface components {
|
|
|
758
756
|
* rank, and a date with no shift adds none. Unserved tasks pay nothing;
|
|
759
757
|
* the charge never outranks `priority` and cannot be combined with
|
|
760
758
|
* `drop_cost`. Absent or `0` = off; a single-date request is charged
|
|
761
|
-
* nothing.
|
|
762
|
-
*
|
|
759
|
+
* nothing. Like `assignment_costs`, a request that sets it, even on one
|
|
760
|
+
* date, is solved as a whole rather than split into parts. Reported as `score.components.delay`. A positive
|
|
763
761
|
* rate below `0.00001` is rejected, as is a rate whose total over the
|
|
764
762
|
* later workdays exceeds `21474.83647` (`out_of_range`).
|
|
765
763
|
* @example 5
|
|
@@ -942,7 +940,9 @@ export interface components {
|
|
|
942
940
|
};
|
|
943
941
|
/**
|
|
944
942
|
* PlanStopReload
|
|
945
|
-
* @description A reload at a depot: the next trip starts there.
|
|
943
|
+
* @description A reload at a depot: the next trip starts there. It sits between two
|
|
944
|
+
* task stops, or first on a shift with a non-zero `initial_load`: the unload
|
|
945
|
+
* before the first job.
|
|
946
946
|
*/
|
|
947
947
|
PlanStopReload: {
|
|
948
948
|
/**
|
|
@@ -1133,8 +1133,8 @@ export interface components {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
/**
|
|
1135
1135
|
* @description A hard constraint between tasks, selected by `type`: `sequence`,
|
|
1136
|
-
* `tag_order`, `same_vehicle`, `same_day`, `same_route`,
|
|
1137
|
-
* `time_lag`, `compatible_vehicles` or `all_or_none`.
|
|
1136
|
+
* `consecutive`, `tag_order`, `same_vehicle`, `same_day`, `same_route`,
|
|
1137
|
+
* `synchronized`, `time_lag`, `compatible_vehicles` or `all_or_none`.
|
|
1138
1138
|
* Each type carries only its own fields; any other `type` is rejected with
|
|
1139
1139
|
* HTTP 400.
|
|
1140
1140
|
*
|
|
@@ -1351,8 +1351,8 @@ export interface components {
|
|
|
1351
1351
|
/**
|
|
1352
1352
|
* Format: int64
|
|
1353
1353
|
* @description Maximum spread between the synchronized instants in seconds
|
|
1354
|
-
* (`0` = exact simultaneity). Required. A negative value, or one
|
|
1355
|
-
*
|
|
1354
|
+
* (`0` = exact simultaneity). Required. A negative value, or one above
|
|
1355
|
+
* 2,147,483,647, is rejected with HTTP 400 `out_of_range`.
|
|
1356
1356
|
*/
|
|
1357
1357
|
max_spread_s: number;
|
|
1358
1358
|
/**
|
|
@@ -1381,7 +1381,7 @@ export interface components {
|
|
|
1381
1381
|
*
|
|
1382
1382
|
* Jobs only: if a tag named here selects a **shipment**, the request is
|
|
1383
1383
|
* rejected with HTTP 400 (a shipment's two legs already carry their own
|
|
1384
|
-
* hard precedence, which tag ordering
|
|
1384
|
+
* hard precedence, which tag ordering does not combine with). Drop the
|
|
1385
1385
|
* tag from the shipment.
|
|
1386
1386
|
*/
|
|
1387
1387
|
RelationTagOrder: {
|
|
@@ -1413,13 +1413,14 @@ export interface components {
|
|
|
1413
1413
|
/**
|
|
1414
1414
|
* Format: int64
|
|
1415
1415
|
* @description Upper bound on `t(to) − t(from)` in seconds. Absent = unbounded.
|
|
1416
|
-
*
|
|
1416
|
+
* From −2,147,483,648 to 2,147,483,647 and `>= min_s` (HTTP 400
|
|
1417
|
+
* otherwise).
|
|
1417
1418
|
*/
|
|
1418
1419
|
max_s?: number | null;
|
|
1419
1420
|
/**
|
|
1420
1421
|
* Format: int64
|
|
1421
|
-
* @description Lower bound on `t(to) − t(from)` in seconds. Default `0`.
|
|
1422
|
-
*
|
|
1422
|
+
* @description Lower bound on `t(to) − t(from)` in seconds. Default `0`. From
|
|
1423
|
+
* −2,147,483,648 to 2,147,483,647.
|
|
1423
1424
|
* @default 0
|
|
1424
1425
|
*/
|
|
1425
1426
|
min_s?: number | null;
|
|
@@ -1768,7 +1769,7 @@ export interface components {
|
|
|
1768
1769
|
load_after?: null | components["schemas"]["Quantities"];
|
|
1769
1770
|
/**
|
|
1770
1771
|
* @description Stop location `[longitude, latitude]` (GeoJSON order). Absent on
|
|
1771
|
-
* every `break` stop,
|
|
1772
|
+
* every `break` stop, and on
|
|
1772
1773
|
* `start`/`end` stops for a genuinely open end (no configured
|
|
1773
1774
|
* coordinate for that end of the shift). A virtual (location-less) job
|
|
1774
1775
|
* has no coordinate of its own and reports its nearest located
|
|
@@ -2272,8 +2273,8 @@ export interface components {
|
|
|
2272
2273
|
ScoreComponents: {
|
|
2273
2274
|
/**
|
|
2274
2275
|
* Format: double
|
|
2275
|
-
* @description Cost of the serving vehicle's `assignment_costs[].cost
|
|
2276
|
-
*
|
|
2276
|
+
* @description Cost of the serving vehicle's `assignment_costs[].cost`, in currency
|
|
2277
|
+
* units.
|
|
2277
2278
|
*/
|
|
2278
2279
|
assignment: number;
|
|
2279
2280
|
/**
|
|
@@ -2365,7 +2366,7 @@ export interface components {
|
|
|
2365
2366
|
/**
|
|
2366
2367
|
* Format: double
|
|
2367
2368
|
* @description The price of the time window each task was served in, in currency
|
|
2368
|
-
* units (`time_windows[].
|
|
2369
|
+
* units (`time_windows[].choice_cost`).
|
|
2369
2370
|
*/
|
|
2370
2371
|
window_choice: number;
|
|
2371
2372
|
/**
|
|
@@ -2437,9 +2438,9 @@ export interface components {
|
|
|
2437
2438
|
* no-op. It multiplies the vehicle's own rate (the shift's
|
|
2438
2439
|
* `service_factor` if set, else the vehicle's): effective service time =
|
|
2439
2440
|
* `service_duration_s / (shift_or_vehicle_factor * factor)`. Same
|
|
2440
|
-
* direction and `[0.001, 5]` range as `vehicles[].service_factor`.
|
|
2441
|
-
* `proficiency.durationModifier` multiplied duration
|
|
2442
|
-
*
|
|
2441
|
+
* direction and `[0.001, 5]` range as `vehicles[].service_factor`.
|
|
2442
|
+
* Migrating from V2: `proficiency.durationModifier` multiplied duration
|
|
2443
|
+
* instead, so send `1 / durationModifier` here.
|
|
2443
2444
|
* @example 1.25
|
|
2444
2445
|
*/
|
|
2445
2446
|
factor: number;
|
|
@@ -2523,12 +2524,14 @@ export interface components {
|
|
|
2523
2524
|
* @description Load already on the vehicle at shift start (pre-loaded), per
|
|
2524
2525
|
* dimension. Occupies capacity on the first trip only — flushed at the
|
|
2525
2526
|
* first reload — so it reduces first-trip room per dimension, enforced
|
|
2526
|
-
* by the per-trip capacity constraint.
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
*
|
|
2530
|
-
*
|
|
2531
|
-
* the
|
|
2527
|
+
* by the per-trip capacity constraint. A value above the capacity in that
|
|
2528
|
+
* dimension is rejected with HTTP 400 (`out_of_range`). The capacity is
|
|
2529
|
+
* resolved per dimension: the shift's capacity when it defines the
|
|
2530
|
+
* dimension, otherwise the vehicle's. If the vehicle has a capacity map
|
|
2531
|
+
* that omits the dimension, the capacity is `0`; if the vehicle has no
|
|
2532
|
+
* capacity map and the shift does not define the dimension, it is
|
|
2533
|
+
* unlimited. At capacity, the vehicle has no room until it unloads, so
|
|
2534
|
+
* the solver may start the route with a reload at one of `reloads`.
|
|
2532
2535
|
*/
|
|
2533
2536
|
initial_load?: null | components["schemas"]["Quantities"];
|
|
2534
2537
|
/**
|
|
@@ -2757,7 +2760,7 @@ export interface components {
|
|
|
2757
2760
|
* this prices the vehicle that did, so a task rated badly everywhere is
|
|
2758
2761
|
* the first one dropped when capacity runs out. It lives in the cost tier,
|
|
2759
2762
|
* below `priority`, and adds to `preferences`, `drop_cost` and travel.
|
|
2760
|
-
*
|
|
2763
|
+
* A request that sets it is solved as a whole rather than split into parts, which can make a large request slower.
|
|
2761
2764
|
*/
|
|
2762
2765
|
assignment_costs?: components["schemas"]["AssignmentCost"][] | null;
|
|
2763
2766
|
/** @description Delivery leg (load off). */
|
|
@@ -3106,10 +3109,10 @@ export interface components {
|
|
|
3106
3109
|
/**
|
|
3107
3110
|
* @description How the best plan improved during the search, oldest first: the
|
|
3108
3111
|
* starting plan, every improvement (thinned to at most 500 entries), and
|
|
3109
|
-
* the final plan, which equals `summary.score` (it can equal, or
|
|
3110
|
-
*
|
|
3111
|
-
*
|
|
3112
|
-
*
|
|
3112
|
+
* the final plan, which equals `summary.score` (it can equal, or be
|
|
3113
|
+
* slightly worse than, the entry before it). Present on every solve;
|
|
3114
|
+
* absent on evaluate, which does not search. A large request that is
|
|
3115
|
+
* solved in parts has the final entry alone.
|
|
3113
3116
|
*/
|
|
3114
3117
|
search_progress?: components["schemas"]["SearchProgressPoint"][] | null;
|
|
3115
3118
|
/** @description Aggregate statistics for the solve run. */
|
|
@@ -3462,8 +3465,8 @@ export interface components {
|
|
|
3462
3465
|
/**
|
|
3463
3466
|
* Format: date-time
|
|
3464
3467
|
* @description Latest allowed start of service (RFC 3339 instant, UTC offset
|
|
3465
|
-
* required)
|
|
3466
|
-
*
|
|
3468
|
+
* required). Service starts after any windowed break taken on arrival.
|
|
3469
|
+
* Hard unless `per_late_hour` prices lateness.
|
|
3467
3470
|
* @example 2026-07-01T12:00:00+02:00
|
|
3468
3471
|
*/
|
|
3469
3472
|
to: string;
|
|
@@ -3567,7 +3570,7 @@ export interface components {
|
|
|
3567
3570
|
* @description The constraint that refused the task on at least one vehicle (or
|
|
3568
3571
|
* `all_or_none`, for a task its group holds back), in the vocabulary of
|
|
3569
3572
|
* the evaluate violations' `code`. A task lists one reason
|
|
3570
|
-
* per constraint, once each, in
|
|
3573
|
+
* per constraint, once each, in the order the `code` values are listed. Absent on the
|
|
3571
3574
|
* single reason of a `time_limit` or `priced_out` task, which names no
|
|
3572
3575
|
* constraint.
|
|
3573
3576
|
*/
|
|
@@ -3609,7 +3612,9 @@ export interface components {
|
|
|
3609
3612
|
* vehicle, named in `constraint`, once each, `unreachable` first
|
|
3610
3613
|
* (`unknown` when no constraint was recorded); a task that fits but
|
|
3611
3614
|
* whose `all_or_none` group holds it back has the one reason
|
|
3612
|
-
* `all_or_none
|
|
3615
|
+
* `all_or_none`, and one whose all-or-none `synchronized`/`time_lag`
|
|
3616
|
+
* group cannot be placed together has `synchronized` and/or `time_lag`.
|
|
3617
|
+
* Otherwise there is one reason with no `constraint`.
|
|
3613
3618
|
*/
|
|
3614
3619
|
reasons: components["schemas"]["UnassignedReason"][];
|
|
3615
3620
|
/**
|
|
@@ -3624,7 +3629,7 @@ export interface components {
|
|
|
3624
3629
|
task: string;
|
|
3625
3630
|
};
|
|
3626
3631
|
/**
|
|
3627
|
-
* @description A vehicle
|
|
3632
|
+
* @description A vehicle available to serve tasks.
|
|
3628
3633
|
* @example {
|
|
3629
3634
|
* "capacity": {
|
|
3630
3635
|
* "volume": 20,
|
|
@@ -3724,9 +3729,9 @@ export interface components {
|
|
|
3724
3729
|
* this vehicle multiplies whichever applies: effective service time =
|
|
3725
3730
|
* `service_duration_s / (shift_or_vehicle_factor * task_factor)`.
|
|
3726
3731
|
*
|
|
3727
|
-
* V2
|
|
3728
|
-
* `0.8` = 20% faster)
|
|
3729
|
-
*
|
|
3732
|
+
* Migrating from V2: `durationModifier` went the other way (it multiplied
|
|
3733
|
+
* duration, `0.8` = 20% faster), so send `1 / durationModifier` as the
|
|
3734
|
+
* task's `service_factors[].factor`.
|
|
3730
3735
|
* @default 1
|
|
3731
3736
|
*/
|
|
3732
3737
|
service_factor?: number | null;
|
|
@@ -3812,7 +3817,7 @@ export interface components {
|
|
|
3812
3817
|
* `free_start_travel`/`free_end_travel`, or absent on an open start or
|
|
3813
3818
|
* end, is exempt. Absent = no cap. Must be > 0: `0` would make every
|
|
3814
3819
|
* leg too long rather than mean "no cap", so it is rejected with HTTP
|
|
3815
|
-
* 400 `out_of_range`, as is a value
|
|
3820
|
+
* 400 `out_of_range`, as is a value above 2,147,483,647. A
|
|
3816
3821
|
* breach is reported as `max_leg_travel`.
|
|
3817
3822
|
* @example 3600
|
|
3818
3823
|
*/
|
|
@@ -3869,7 +3874,7 @@ export interface components {
|
|
|
3869
3874
|
/**
|
|
3870
3875
|
* @description A capability a vehicle or shift provides, at a proficiency level:
|
|
3871
3876
|
* `{ "name": "gas", "level": 3 }`. Always an object; a bare string is
|
|
3872
|
-
* rejected
|
|
3877
|
+
* rejected with HTTP 400.
|
|
3873
3878
|
* @example {
|
|
3874
3879
|
* "level": 3,
|
|
3875
3880
|
* "name": "gas"
|
|
@@ -3908,7 +3913,7 @@ export interface components {
|
|
|
3908
3913
|
* `period_limit` and `quota` are route-level; `sequence` and `shipment`
|
|
3909
3914
|
* are on the stop; `unreachable`, `max_leg_travel` and `capacity` can be
|
|
3910
3915
|
* either. `unknown`
|
|
3911
|
-
* means
|
|
3916
|
+
* means a stop was refused without a specific constraint being named
|
|
3912
3917
|
* (not expected in practice).
|
|
3913
3918
|
*/
|
|
3914
3919
|
code: components["schemas"]["ConstraintCode"];
|
|
@@ -3952,8 +3957,8 @@ export interface components {
|
|
|
3952
3957
|
* shift is charged on its own part. An empty, non-exempt shift pays for its whole share, so pair the
|
|
3953
3958
|
* term with `costs.per_route` or `per_used_vehicle` only when both are meant.
|
|
3954
3959
|
* See `vehicles[].workload_weight` to give a part-time vehicle a smaller
|
|
3955
|
-
* share.
|
|
3956
|
-
*
|
|
3960
|
+
* share. Like `assignment_costs`, a request that sets the term is solved as
|
|
3961
|
+
* a whole rather than split into parts.
|
|
3957
3962
|
*/
|
|
3958
3963
|
WorkloadShare: {
|
|
3959
3964
|
/**
|
package/dist/v3.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface paths {
|
|
|
34
34
|
put?: never;
|
|
35
35
|
/**
|
|
36
36
|
* Solve a vehicle routing problem
|
|
37
|
-
* @description Assigns the jobs and shipments in `problem` to the vehicles' shifts and returns the routes, the `plan` they follow and any tasks left unassigned, each with the reasons. The request is validated first: an invalid one is rejected with a 400 whose `errors[]` says what to fix. Travel times and distances for the request's locations are then looked up, and the search runs for up to `options.time_limit_s` seconds (default 150 ms plus 4 ms per task; maximum 60). Send a previous result's `plan` to re-optimize starting from it. `POST /v3/routing/evaluate` and `POST /v3/routing/suggest` take the same `problem`.
|
|
37
|
+
* @description Assigns the jobs and shipments in `problem` to the vehicles' shifts and returns the routes, the `plan` they follow and any tasks left unassigned, each with the reasons. The request is validated first: an invalid one is rejected with a 400 whose `errors[]` says what to fix. Travel times and distances for the request's locations are then looked up, and the search runs for up to `options.time_limit_s` seconds (default 150 ms plus 4 ms per task; maximum 60). A problem of more than 400 tasks (jobs and shipments together) is a 400: submit one of up to 10,000 tasks to `POST /v3/routing/runs`, which takes the same body. Send a previous result's `plan` to re-optimize starting from it. `POST /v3/routing/evaluate` and `POST /v3/routing/suggest` take the same `problem`.
|
|
38
38
|
*/
|
|
39
39
|
post: operations["solve"];
|
|
40
40
|
delete?: never;
|
|
@@ -248,7 +248,7 @@ export interface components {
|
|
|
248
248
|
* Format: int64
|
|
249
249
|
* @description Trigger threshold in seconds (strict `>` — the break fires when the
|
|
250
250
|
* accumulator exceeds this). EU 561/2006 drive rule: `16200` (4 h 30).
|
|
251
|
-
* Must be `> 0` and
|
|
251
|
+
* Must be `> 0` and at most 2,147,483,647.
|
|
252
252
|
* @example 14400
|
|
253
253
|
*/
|
|
254
254
|
threshold_s: number;
|
|
@@ -277,7 +277,7 @@ export interface components {
|
|
|
277
277
|
/**
|
|
278
278
|
* @description Not supported on V3: a windowed break is taken wherever the
|
|
279
279
|
* vehicle is when it starts, so a `location` here is rejected with
|
|
280
|
-
* HTTP 400 `not_supported`.
|
|
280
|
+
* HTTP 400 `not_supported`.
|
|
281
281
|
*/
|
|
282
282
|
location?: null | components["schemas"]["Place"];
|
|
283
283
|
/** @description The window bounding the break's **start**. */
|
|
@@ -368,7 +368,7 @@ export interface components {
|
|
|
368
368
|
* shifts only `per_route`. Default `0`. Use it to minimise distinct
|
|
369
369
|
* vehicles; use `per_route` to price each working day. Not accepted on
|
|
370
370
|
* `shifts[].costs`. When any vehicle has a non-zero rate and any vehicle
|
|
371
|
-
* has several shifts, the
|
|
371
|
+
* has several shifts, the request is solved as a whole rather than split into parts, which can make a large request slower.
|
|
372
372
|
* @example 400
|
|
373
373
|
*/
|
|
374
374
|
per_used_vehicle?: number | null;
|
|
@@ -413,7 +413,7 @@ export interface components {
|
|
|
413
413
|
* cannot see — typically the driver labour for the unload itself
|
|
414
414
|
* (`service_duration_s` × the hourly rate). Without it, a reload that
|
|
415
415
|
* consumes only *slack* is free in the objective: it adds no route
|
|
416
|
-
* duration, so the solver
|
|
416
|
+
* duration, so the solver may insert one to displace time that
|
|
417
417
|
* `objective.costs.per_wait_hour` would otherwise charge as idle, parking
|
|
418
418
|
* the vehicle at a depot for no capacity benefit.
|
|
419
419
|
* @example 38.66
|
|
@@ -564,8 +564,8 @@ export interface components {
|
|
|
564
564
|
* each other. The solver adds `per_entry` to the objective each time a
|
|
565
565
|
* route enters a group from a job outside it, the first entry included;
|
|
566
566
|
* entering from the shift's start or from a reload is free. Keeping each
|
|
567
|
-
* group in one visit minimises
|
|
568
|
-
*
|
|
567
|
+
* group in one visit minimises how often a route comes back to an area it
|
|
568
|
+
* already served. Presence of this object enables the feature; omit
|
|
569
569
|
* it to disable.
|
|
570
570
|
* @example {
|
|
571
571
|
* "distance_metric": "straight_line",
|
|
@@ -728,7 +728,7 @@ export interface components {
|
|
|
728
728
|
* this prices the vehicle that did, so a task rated badly everywhere is
|
|
729
729
|
* the first one dropped when capacity runs out. It lives in the cost tier,
|
|
730
730
|
* below `priority`, and adds to `preferences`, `drop_cost` and travel.
|
|
731
|
-
*
|
|
731
|
+
* A request that sets it is solved as a whole rather than split into parts, which can make a large request slower.
|
|
732
732
|
*/
|
|
733
733
|
assignment_costs?: components["schemas"]["AssignmentCost"][] | null;
|
|
734
734
|
/**
|
|
@@ -891,10 +891,8 @@ export interface components {
|
|
|
891
891
|
* - `osm`: OpenStreetMap free-flow times. No traffic, so
|
|
892
892
|
* `travel.departure_time` is rejected with 400.
|
|
893
893
|
* - `tomtom_real_time`: TomTom live traffic at the moment of the request.
|
|
894
|
-
* **Not
|
|
895
|
-
* `
|
|
896
|
-
* profile; at most 100 distinct locations; up to ~25 s of matrix fetch at
|
|
897
|
-
* 100 locations.
|
|
894
|
+
* **Not available:** a request that sets it is rejected with 403
|
|
895
|
+
* `feature_not_enabled`. Use `tomtom`.
|
|
898
896
|
* - `straight_line`: great-circle distance at `travel.speed_kmh`, no road
|
|
899
897
|
* network. `travel.departure_time`, `options.polyline` and any vehicle
|
|
900
898
|
* `profile` other than `car` are rejected with 400.
|
|
@@ -944,8 +942,8 @@ export interface components {
|
|
|
944
942
|
* rank, and a date with no shift adds none. Unserved tasks pay nothing;
|
|
945
943
|
* the charge never outranks `priority` and cannot be combined with
|
|
946
944
|
* `drop_cost`. Absent or `0` = off; a single-date request is charged
|
|
947
|
-
* nothing.
|
|
948
|
-
*
|
|
945
|
+
* nothing. Like `assignment_costs`, a request that sets it, even on one
|
|
946
|
+
* date, is solved as a whole rather than split into parts. Reported as `score.components.delay`. A positive
|
|
949
947
|
* rate below `0.00001` is rejected, as is a rate whose total over the
|
|
950
948
|
* later workdays exceeds `21474.83647` (`out_of_range`).
|
|
951
949
|
* @example 5
|
|
@@ -1169,7 +1167,9 @@ export interface components {
|
|
|
1169
1167
|
};
|
|
1170
1168
|
/**
|
|
1171
1169
|
* PlanStopReload
|
|
1172
|
-
* @description A reload at a depot: the next trip starts there.
|
|
1170
|
+
* @description A reload at a depot: the next trip starts there. It sits between two
|
|
1171
|
+
* task stops, or first on a shift with a non-zero `initial_load`: the unload
|
|
1172
|
+
* before the first job.
|
|
1173
1173
|
*/
|
|
1174
1174
|
PlanStopReload: {
|
|
1175
1175
|
/**
|
|
@@ -1366,8 +1366,8 @@ export interface components {
|
|
|
1366
1366
|
};
|
|
1367
1367
|
/**
|
|
1368
1368
|
* @description A hard constraint between tasks, selected by `type`: `sequence`,
|
|
1369
|
-
* `tag_order`, `same_vehicle`, `same_day`, `same_route`,
|
|
1370
|
-
* `time_lag`, `compatible_vehicles` or `all_or_none`.
|
|
1369
|
+
* `consecutive`, `tag_order`, `same_vehicle`, `same_day`, `same_route`,
|
|
1370
|
+
* `synchronized`, `time_lag`, `compatible_vehicles` or `all_or_none`.
|
|
1371
1371
|
* Each type carries only its own fields; any other `type` is rejected with
|
|
1372
1372
|
* HTTP 400.
|
|
1373
1373
|
*
|
|
@@ -1584,8 +1584,8 @@ export interface components {
|
|
|
1584
1584
|
/**
|
|
1585
1585
|
* Format: int64
|
|
1586
1586
|
* @description Maximum spread between the synchronized instants in seconds
|
|
1587
|
-
* (`0` = exact simultaneity). Required. A negative value, or one
|
|
1588
|
-
*
|
|
1587
|
+
* (`0` = exact simultaneity). Required. A negative value, or one above
|
|
1588
|
+
* 2,147,483,647, is rejected with HTTP 400 `out_of_range`.
|
|
1589
1589
|
*/
|
|
1590
1590
|
max_spread_s: number;
|
|
1591
1591
|
/**
|
|
@@ -1614,7 +1614,7 @@ export interface components {
|
|
|
1614
1614
|
*
|
|
1615
1615
|
* Jobs only: if a tag named here selects a **shipment**, the request is
|
|
1616
1616
|
* rejected with HTTP 400 (a shipment's two legs already carry their own
|
|
1617
|
-
* hard precedence, which tag ordering
|
|
1617
|
+
* hard precedence, which tag ordering does not combine with). Drop the
|
|
1618
1618
|
* tag from the shipment.
|
|
1619
1619
|
*/
|
|
1620
1620
|
RelationTagOrder: {
|
|
@@ -1646,13 +1646,14 @@ export interface components {
|
|
|
1646
1646
|
/**
|
|
1647
1647
|
* Format: int64
|
|
1648
1648
|
* @description Upper bound on `t(to) − t(from)` in seconds. Absent = unbounded.
|
|
1649
|
-
*
|
|
1649
|
+
* From −2,147,483,648 to 2,147,483,647 and `>= min_s` (HTTP 400
|
|
1650
|
+
* otherwise).
|
|
1650
1651
|
*/
|
|
1651
1652
|
max_s?: number | null;
|
|
1652
1653
|
/**
|
|
1653
1654
|
* Format: int64
|
|
1654
|
-
* @description Lower bound on `t(to) − t(from)` in seconds. Default `0`.
|
|
1655
|
-
*
|
|
1655
|
+
* @description Lower bound on `t(to) − t(from)` in seconds. Default `0`. From
|
|
1656
|
+
* −2,147,483,648 to 2,147,483,647.
|
|
1656
1657
|
* @default 0
|
|
1657
1658
|
*/
|
|
1658
1659
|
min_s?: number | null;
|
|
@@ -2001,7 +2002,7 @@ export interface components {
|
|
|
2001
2002
|
load_after?: null | components["schemas"]["Quantities"];
|
|
2002
2003
|
/**
|
|
2003
2004
|
* @description Stop location `[longitude, latitude]` (GeoJSON order). Absent on
|
|
2004
|
-
* every `break` stop,
|
|
2005
|
+
* every `break` stop, and on
|
|
2005
2006
|
* `start`/`end` stops for a genuinely open end (no configured
|
|
2006
2007
|
* coordinate for that end of the shift). A virtual (location-less) job
|
|
2007
2008
|
* has no coordinate of its own and reports its nearest located
|
|
@@ -2173,8 +2174,8 @@ export interface components {
|
|
|
2173
2174
|
ScoreComponents: {
|
|
2174
2175
|
/**
|
|
2175
2176
|
* Format: double
|
|
2176
|
-
* @description Cost of the serving vehicle's `assignment_costs[].cost
|
|
2177
|
-
*
|
|
2177
|
+
* @description Cost of the serving vehicle's `assignment_costs[].cost`, in currency
|
|
2178
|
+
* units.
|
|
2178
2179
|
*/
|
|
2179
2180
|
assignment: number;
|
|
2180
2181
|
/**
|
|
@@ -2266,7 +2267,7 @@ export interface components {
|
|
|
2266
2267
|
/**
|
|
2267
2268
|
* Format: double
|
|
2268
2269
|
* @description The price of the time window each task was served in, in currency
|
|
2269
|
-
* units (`time_windows[].
|
|
2270
|
+
* units (`time_windows[].choice_cost`).
|
|
2270
2271
|
*/
|
|
2271
2272
|
window_choice: number;
|
|
2272
2273
|
/**
|
|
@@ -2338,9 +2339,9 @@ export interface components {
|
|
|
2338
2339
|
* no-op. It multiplies the vehicle's own rate (the shift's
|
|
2339
2340
|
* `service_factor` if set, else the vehicle's): effective service time =
|
|
2340
2341
|
* `service_duration_s / (shift_or_vehicle_factor * factor)`. Same
|
|
2341
|
-
* direction and `[0.001, 5]` range as `vehicles[].service_factor`.
|
|
2342
|
-
* `proficiency.durationModifier` multiplied duration
|
|
2343
|
-
*
|
|
2342
|
+
* direction and `[0.001, 5]` range as `vehicles[].service_factor`.
|
|
2343
|
+
* Migrating from V2: `proficiency.durationModifier` multiplied duration
|
|
2344
|
+
* instead, so send `1 / durationModifier` here.
|
|
2344
2345
|
* @example 1.25
|
|
2345
2346
|
*/
|
|
2346
2347
|
factor: number;
|
|
@@ -2424,12 +2425,14 @@ export interface components {
|
|
|
2424
2425
|
* @description Load already on the vehicle at shift start (pre-loaded), per
|
|
2425
2426
|
* dimension. Occupies capacity on the first trip only — flushed at the
|
|
2426
2427
|
* first reload — so it reduces first-trip room per dimension, enforced
|
|
2427
|
-
* by the per-trip capacity constraint.
|
|
2428
|
-
*
|
|
2429
|
-
*
|
|
2430
|
-
*
|
|
2431
|
-
*
|
|
2432
|
-
* the
|
|
2428
|
+
* by the per-trip capacity constraint. A value above the capacity in that
|
|
2429
|
+
* dimension is rejected with HTTP 400 (`out_of_range`). The capacity is
|
|
2430
|
+
* resolved per dimension: the shift's capacity when it defines the
|
|
2431
|
+
* dimension, otherwise the vehicle's. If the vehicle has a capacity map
|
|
2432
|
+
* that omits the dimension, the capacity is `0`; if the vehicle has no
|
|
2433
|
+
* capacity map and the shift does not define the dimension, it is
|
|
2434
|
+
* unlimited. At capacity, the vehicle has no room until it unloads, so
|
|
2435
|
+
* the solver may start the route with a reload at one of `reloads`.
|
|
2433
2436
|
*/
|
|
2434
2437
|
initial_load?: null | components["schemas"]["Quantities"];
|
|
2435
2438
|
/**
|
|
@@ -2671,7 +2674,7 @@ export interface components {
|
|
|
2671
2674
|
* this prices the vehicle that did, so a task rated badly everywhere is
|
|
2672
2675
|
* the first one dropped when capacity runs out. It lives in the cost tier,
|
|
2673
2676
|
* below `priority`, and adds to `preferences`, `drop_cost` and travel.
|
|
2674
|
-
*
|
|
2677
|
+
* A request that sets it is solved as a whole rather than split into parts, which can make a large request slower.
|
|
2675
2678
|
*/
|
|
2676
2679
|
assignment_costs?: components["schemas"]["AssignmentCost"][] | null;
|
|
2677
2680
|
/** @description Delivery leg (load off). */
|
|
@@ -3173,10 +3176,10 @@ export interface components {
|
|
|
3173
3176
|
/**
|
|
3174
3177
|
* @description How the best plan improved during the search, oldest first: the
|
|
3175
3178
|
* starting plan, every improvement (thinned to at most 500 entries), and
|
|
3176
|
-
* the final plan, which equals `summary.score` (it can equal, or
|
|
3177
|
-
*
|
|
3178
|
-
*
|
|
3179
|
-
*
|
|
3179
|
+
* the final plan, which equals `summary.score` (it can equal, or be
|
|
3180
|
+
* slightly worse than, the entry before it). Present on every solve;
|
|
3181
|
+
* absent on evaluate, which does not search. A large request that is
|
|
3182
|
+
* solved in parts has the final entry alone.
|
|
3180
3183
|
*/
|
|
3181
3184
|
search_progress?: components["schemas"]["SearchProgressPoint"][] | null;
|
|
3182
3185
|
/** @description Aggregate statistics for the solve run. */
|
|
@@ -3215,10 +3218,10 @@ export interface components {
|
|
|
3215
3218
|
* @description Max ranked `insertions` in each `suggestions[]` entry, `1` to `10`;
|
|
3216
3219
|
* default 5. It caps the insertions per entry, not the number of
|
|
3217
3220
|
* entries: every task outside `plan` still gets its entry. Values outside
|
|
3218
|
-
* the range are a 400, never clamped. It also sets
|
|
3219
|
-
*
|
|
3220
|
-
*
|
|
3221
|
-
*
|
|
3221
|
+
* the range are a 400, never clamped. It also sets how widely a unit of
|
|
3222
|
+
* several stops is searched (such a unit is never searched exhaustively):
|
|
3223
|
+
* each stop after the unit's first keeps at most
|
|
3224
|
+
* `max(8, 4 × max_insertions)` partial placements. A single-stop task has every
|
|
3222
3225
|
* feasible position considered unless `time_limit_s` runs out first.
|
|
3223
3226
|
* @default 5
|
|
3224
3227
|
* @example 5
|
|
@@ -3245,7 +3248,7 @@ export interface components {
|
|
|
3245
3248
|
* }
|
|
3246
3249
|
*/
|
|
3247
3250
|
SuggestReason: {
|
|
3248
|
-
/** @description Branch on this. Open set
|
|
3251
|
+
/** @description Branch on this. Open set: accept values you do not know. */
|
|
3249
3252
|
code: components["schemas"]["SuggestReasonCode"];
|
|
3250
3253
|
/**
|
|
3251
3254
|
* @description `code` as an English sentence, for people and logs. Do not parse it.
|
|
@@ -3825,8 +3828,8 @@ export interface components {
|
|
|
3825
3828
|
/**
|
|
3826
3829
|
* Format: date-time
|
|
3827
3830
|
* @description Latest allowed start of service (RFC 3339 instant, UTC offset
|
|
3828
|
-
* required)
|
|
3829
|
-
*
|
|
3831
|
+
* required). Service starts after any windowed break taken on arrival.
|
|
3832
|
+
* Hard unless `per_late_hour` prices lateness.
|
|
3830
3833
|
* @example 2026-07-01T12:00:00+02:00
|
|
3831
3834
|
*/
|
|
3832
3835
|
to: string;
|
|
@@ -3930,7 +3933,7 @@ export interface components {
|
|
|
3930
3933
|
* @description The constraint that refused the task on at least one vehicle (or
|
|
3931
3934
|
* `all_or_none`, for a task its group holds back), in the vocabulary of
|
|
3932
3935
|
* the evaluate violations' `code`. A task lists one reason
|
|
3933
|
-
* per constraint, once each, in
|
|
3936
|
+
* per constraint, once each, in the order the `code` values are listed. Absent on the
|
|
3934
3937
|
* single reason of a `time_limit` or `priced_out` task, which names no
|
|
3935
3938
|
* constraint.
|
|
3936
3939
|
*/
|
|
@@ -3972,7 +3975,9 @@ export interface components {
|
|
|
3972
3975
|
* vehicle, named in `constraint`, once each, `unreachable` first
|
|
3973
3976
|
* (`unknown` when no constraint was recorded); a task that fits but
|
|
3974
3977
|
* whose `all_or_none` group holds it back has the one reason
|
|
3975
|
-
* `all_or_none
|
|
3978
|
+
* `all_or_none`, and one whose all-or-none `synchronized`/`time_lag`
|
|
3979
|
+
* group cannot be placed together has `synchronized` and/or `time_lag`.
|
|
3980
|
+
* Otherwise there is one reason with no `constraint`.
|
|
3976
3981
|
*/
|
|
3977
3982
|
reasons: components["schemas"]["UnassignedReason"][];
|
|
3978
3983
|
/**
|
|
@@ -4001,7 +4006,7 @@ export interface components {
|
|
|
4001
4006
|
warnings: components["schemas"]["RequestIssue"][];
|
|
4002
4007
|
};
|
|
4003
4008
|
/**
|
|
4004
|
-
* @description A vehicle
|
|
4009
|
+
* @description A vehicle available to serve tasks.
|
|
4005
4010
|
* @example {
|
|
4006
4011
|
* "capacity": {
|
|
4007
4012
|
* "volume": 20,
|
|
@@ -4101,9 +4106,9 @@ export interface components {
|
|
|
4101
4106
|
* this vehicle multiplies whichever applies: effective service time =
|
|
4102
4107
|
* `service_duration_s / (shift_or_vehicle_factor * task_factor)`.
|
|
4103
4108
|
*
|
|
4104
|
-
* V2
|
|
4105
|
-
* `0.8` = 20% faster)
|
|
4106
|
-
*
|
|
4109
|
+
* Migrating from V2: `durationModifier` went the other way (it multiplied
|
|
4110
|
+
* duration, `0.8` = 20% faster), so send `1 / durationModifier` as the
|
|
4111
|
+
* task's `service_factors[].factor`.
|
|
4107
4112
|
* @default 1
|
|
4108
4113
|
*/
|
|
4109
4114
|
service_factor?: number | null;
|
|
@@ -4189,7 +4194,7 @@ export interface components {
|
|
|
4189
4194
|
* `free_start_travel`/`free_end_travel`, or absent on an open start or
|
|
4190
4195
|
* end, is exempt. Absent = no cap. Must be > 0: `0` would make every
|
|
4191
4196
|
* leg too long rather than mean "no cap", so it is rejected with HTTP
|
|
4192
|
-
* 400 `out_of_range`, as is a value
|
|
4197
|
+
* 400 `out_of_range`, as is a value above 2,147,483,647. A
|
|
4193
4198
|
* breach is reported as `max_leg_travel`.
|
|
4194
4199
|
* @example 3600
|
|
4195
4200
|
*/
|
|
@@ -4246,7 +4251,7 @@ export interface components {
|
|
|
4246
4251
|
/**
|
|
4247
4252
|
* @description A capability a vehicle or shift provides, at a proficiency level:
|
|
4248
4253
|
* `{ "name": "gas", "level": 3 }`. Always an object; a bare string is
|
|
4249
|
-
* rejected
|
|
4254
|
+
* rejected with HTTP 400.
|
|
4250
4255
|
* @example {
|
|
4251
4256
|
* "level": 3,
|
|
4252
4257
|
* "name": "gas"
|
|
@@ -4285,7 +4290,7 @@ export interface components {
|
|
|
4285
4290
|
* `period_limit` and `quota` are route-level; `sequence` and `shipment`
|
|
4286
4291
|
* are on the stop; `unreachable`, `max_leg_travel` and `capacity` can be
|
|
4287
4292
|
* either. `unknown`
|
|
4288
|
-
* means
|
|
4293
|
+
* means a stop was refused without a specific constraint being named
|
|
4289
4294
|
* (not expected in practice).
|
|
4290
4295
|
*/
|
|
4291
4296
|
code: components["schemas"]["ConstraintCode"];
|
|
@@ -4329,8 +4334,8 @@ export interface components {
|
|
|
4329
4334
|
* shift is charged on its own part. An empty, non-exempt shift pays for its whole share, so pair the
|
|
4330
4335
|
* term with `costs.per_route` or `per_used_vehicle` only when both are meant.
|
|
4331
4336
|
* See `vehicles[].workload_weight` to give a part-time vehicle a smaller
|
|
4332
|
-
* share.
|
|
4333
|
-
*
|
|
4337
|
+
* share. Like `assignment_costs`, a request that sets the term is solved as
|
|
4338
|
+
* a whole rather than split into parts.
|
|
4334
4339
|
*/
|
|
4335
4340
|
WorkloadShare: {
|
|
4336
4341
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvice/routing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0-beta.0",
|
|
4
4
|
"description": "TypeScript client for the Solvice V3 routing API, generated from its OpenAPI spec.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.solvice.io/guides/platform/sdks/typescript",
|