@solvice/routing 0.17.1-beta.0 → 0.17.3-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/README.md +32 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +25 -1
- package/dist/runs.d.ts +4141 -0
- package/dist/runs.js +5 -0
- package/dist/v3.d.ts +175 -84
- package/package.json +2 -2
package/dist/runs.js
ADDED
package/dist/v3.d.ts
CHANGED
|
@@ -302,13 +302,14 @@ export interface components {
|
|
|
302
302
|
ConstraintCode: string;
|
|
303
303
|
/**
|
|
304
304
|
* @description What running a vehicle costs, in the request's currency
|
|
305
|
-
* (`objective.currency` is only a label).
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* resolves on its own: the shift's value,
|
|
309
|
-
* fleet's, else the default. Nothing is added
|
|
310
|
-
* every field is reported under the same
|
|
311
|
-
* level. `0` means priced at zero; absent
|
|
305
|
+
* (`objective.currency` is only a label). `objective.costs` prices the fleet
|
|
306
|
+
* and `vehicles[].costs` replaces a field for one vehicle; `shifts[].costs`
|
|
307
|
+
* is the same without `per_used_vehicle` (schema `ShiftCosts`), and replaces
|
|
308
|
+
* a field for one shift. Each field resolves on its own: the shift's value,
|
|
309
|
+
* else the vehicle's, else the fleet's, else the default. Nothing is added
|
|
310
|
+
* on top of a fleet rate, and every field is reported under the same
|
|
311
|
+
* `score.components` key at every level. `0` means priced at zero; absent
|
|
312
|
+
* means inherit.
|
|
312
313
|
*
|
|
313
314
|
* Rates are rounded to the internal grid (1/100 000 of a currency unit per
|
|
314
315
|
* second or per metre); a nonzero rate too small to represent is rejected.
|
|
@@ -335,9 +336,11 @@ export interface components {
|
|
|
335
336
|
/**
|
|
336
337
|
* Format: double
|
|
337
338
|
* @description Flat charge for each used shift (a route with at least one task),
|
|
338
|
-
* reported in `score.components.routes`. Default `0`.
|
|
339
|
-
*
|
|
340
|
-
*
|
|
339
|
+
* reported in `score.components.routes`. Default `0`. The higher it is,
|
|
340
|
+
* the more travel the solver accepts to avoid opening another route. It
|
|
341
|
+
* counts shifts, not vehicles: a vehicle that works five days pays it five
|
|
342
|
+
* times, so it does not prefer one vehicle on two shifts over two vehicles
|
|
343
|
+
* on one shift each; use `per_used_vehicle` for that.
|
|
341
344
|
* @example 50
|
|
342
345
|
*/
|
|
343
346
|
per_route?: number | null;
|
|
@@ -357,6 +360,18 @@ export interface components {
|
|
|
357
360
|
* @example 0.2
|
|
358
361
|
*/
|
|
359
362
|
per_travel_km?: number | null;
|
|
363
|
+
/**
|
|
364
|
+
* Format: double
|
|
365
|
+
* @description Flat charge once per vehicle that serves at least one task, however
|
|
366
|
+
* many of its shifts it works. Reported in `score.components.vehicles`.
|
|
367
|
+
* Adds to `per_route`: the vehicle's first used shift pays both, later
|
|
368
|
+
* shifts only `per_route`. Default `0`. Use it to minimise distinct
|
|
369
|
+
* vehicles; use `per_route` to price each working day. Not accepted on
|
|
370
|
+
* `shifts[].costs`. When any vehicle has a non-zero rate and any vehicle
|
|
371
|
+
* has several shifts, the problem solves without decomposition.
|
|
372
|
+
* @example 400
|
|
373
|
+
*/
|
|
374
|
+
per_used_vehicle?: number | null;
|
|
360
375
|
/**
|
|
361
376
|
* Format: double
|
|
362
377
|
* @description Per hour spent waiting for a time window to open, reported in
|
|
@@ -716,6 +731,17 @@ export interface components {
|
|
|
716
731
|
* Not applied by decomposition: a problem that sets it solves monolithically.
|
|
717
732
|
*/
|
|
718
733
|
assignment_costs?: components["schemas"]["AssignmentCost"][] | null;
|
|
734
|
+
/**
|
|
735
|
+
* @description Whether a break may pause this job's service. With `true`, a `fixed`
|
|
736
|
+
* break, a `windowed` break or a duty-`triggered` break that falls
|
|
737
|
+
* inside the service pauses it: the work resumes when the break ends,
|
|
738
|
+
* the job departs the break's length later, and the stop reports the
|
|
739
|
+
* paused seconds in `break_s`. A drive-`triggered` break never pauses a
|
|
740
|
+
* job (it counts driving time only). Default `false`: the whole service
|
|
741
|
+
* moves after the break, or the break is taken before the job starts.
|
|
742
|
+
* @example true
|
|
743
|
+
*/
|
|
744
|
+
break_interruptible?: boolean | null;
|
|
719
745
|
/**
|
|
720
746
|
* @description Quantity delivered at this visit: comes off the vehicle here, having
|
|
721
747
|
* been loaded at a depot. Direction is carried by the field itself, never
|
|
@@ -742,7 +768,9 @@ export interface components {
|
|
|
742
768
|
* On a shipment the drop cost applies to the pair, charged once.
|
|
743
769
|
*
|
|
744
770
|
* Must be finite, `>= 0` and at most `1e9`; combined with `priority` it
|
|
745
|
-
* is rejected with HTTP 400 (`conflicting_fields`).
|
|
771
|
+
* is rejected with HTTP 400 (`conflicting_fields`). Also rejected with
|
|
772
|
+
* HTTP 400 (`not_supported`) while a positive `objective.per_delay_workday` is set,
|
|
773
|
+
* since a droppable task could be dropped to avoid its delay charge.
|
|
746
774
|
* @example 25
|
|
747
775
|
*/
|
|
748
776
|
drop_cost?: number | null;
|
|
@@ -877,8 +905,9 @@ export interface components {
|
|
|
877
905
|
* (the summed `priority` of the required tasks left unassigned is
|
|
878
906
|
* minimised), then **minimise cost** — the `costs` rates plus every priced
|
|
879
907
|
* preference, reported as `score.cost`. There is no separate vehicle-count
|
|
880
|
-
* step: to use fewer
|
|
881
|
-
*
|
|
908
|
+
* step: to use fewer routes, price them with `costs.per_route`
|
|
909
|
+
* (per used shift); to use fewer distinct vehicles when they work several
|
|
910
|
+
* shifts, price them with `costs.per_used_vehicle` (once per vehicle).
|
|
882
911
|
* @example {
|
|
883
912
|
* "costs": {
|
|
884
913
|
* "per_route_hour": 35,
|
|
@@ -902,6 +931,22 @@ export interface components {
|
|
|
902
931
|
currency?: string | null;
|
|
903
932
|
/** @description Job-proximity cluster cohesion. See the `Grouping` schema. */
|
|
904
933
|
grouping?: null | components["schemas"]["Grouping"];
|
|
934
|
+
/**
|
|
935
|
+
* Format: double
|
|
936
|
+
* @description ASAP scheduling: money charged for each served task per workday its
|
|
937
|
+
* shift lies after the earliest workday in the request, in the request's
|
|
938
|
+
* currency. A workday is a distinct calendar date, in the shift's own UTC
|
|
939
|
+
* offset, on which at least one shift starts; shifts on one date share a
|
|
940
|
+
* rank, and a date with no shift adds none. Unserved tasks pay nothing;
|
|
941
|
+
* the charge never outranks `priority` and cannot be combined with
|
|
942
|
+
* `drop_cost`. Absent or `0` = off; a single-date request is charged
|
|
943
|
+
* nothing. A problem that sets it, even on one date, solves without
|
|
944
|
+
* decomposition, like `assignment_costs`. Reported as `score.components.delay`. A positive
|
|
945
|
+
* rate below `0.00001` is rejected, as is a rate whose total over the
|
|
946
|
+
* later workdays exceeds `21474.83647` (`out_of_range`).
|
|
947
|
+
* @example 5
|
|
948
|
+
*/
|
|
949
|
+
per_delay_workday?: number | null;
|
|
905
950
|
/**
|
|
906
951
|
* Format: double
|
|
907
952
|
* @description Cost per hour of lateness: the default rate for every task window
|
|
@@ -1354,7 +1399,8 @@ export interface components {
|
|
|
1354
1399
|
* Hard. Overlapping `all_or_none` relations chain: one on A and B plus
|
|
1355
1400
|
* one on B and C serve all three together or none of them. A group with
|
|
1356
1401
|
* a task in a vehicle's locked prefix (`plan.routes[].locked_count`) is
|
|
1357
|
-
* exempt.
|
|
1402
|
+
* exempt. A member that could be served but is held back because
|
|
1403
|
+
* another cannot reports `all_or_none` in `unassigned[].reasons`.
|
|
1358
1404
|
*
|
|
1359
1405
|
* Every task must also be named by a `synchronized` or `time_lag`
|
|
1360
1406
|
* relation; a task named by neither is rejected with HTTP 400.
|
|
@@ -1858,6 +1904,19 @@ export interface components {
|
|
|
1858
1904
|
* @example 2026-07-01T08:10:00+02:00
|
|
1859
1905
|
*/
|
|
1860
1906
|
arrival: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* Format: int32
|
|
1909
|
+
* @description Seconds of driver break taken inside this stop's service, pausing it:
|
|
1910
|
+
* a `fixed`, `windowed` or `triggered` break that fell mid-service on a
|
|
1911
|
+
* job with `break_interruptible: true`. Such a break gets no `break`
|
|
1912
|
+
* stop of its own; its time is counted here and in the route's
|
|
1913
|
+
* `time.break_s`. The stop reconciles as
|
|
1914
|
+
* `departure - service_start == service_s + setup + break_s`, where
|
|
1915
|
+
* setup is the unscaled `setup_duration_s` when paid, else 0. Present on
|
|
1916
|
+
* `job` stops only, when non-zero.
|
|
1917
|
+
* @example 3600
|
|
1918
|
+
*/
|
|
1919
|
+
break_s?: number | null;
|
|
1861
1920
|
/**
|
|
1862
1921
|
* Format: date-time
|
|
1863
1922
|
* @description Departure. On `end` when the route finishes, after any depot
|
|
@@ -1934,10 +1993,10 @@ export interface components {
|
|
|
1934
1993
|
* On task stops, the **effective** on-site service time, not the
|
|
1935
1994
|
* nominal `service_duration_s` from the request: it already has the
|
|
1936
1995
|
* serving vehicle's `service_factor` applied. `departure -
|
|
1937
|
-
* service_start - service_s` is the stop's setup time: the
|
|
1938
|
-
* `setup_duration_s` (unscaled) for the first stop of a run at
|
|
1939
|
-
* location (setup is charged when the previous stop is
|
|
1940
|
-
* for a co-located successor.
|
|
1996
|
+
* service_start - service_s - break_s` is the stop's setup time: the
|
|
1997
|
+
* request's `setup_duration_s` (unscaled) for the first stop of a run at
|
|
1998
|
+
* the same location (setup is charged when the previous stop is
|
|
1999
|
+
* elsewhere), and 0 for a co-located successor.
|
|
1941
2000
|
*
|
|
1942
2001
|
* On `reload`, the depot's handling time (`departure - service_start
|
|
1943
2002
|
* == service_s`). On `start`/`end`, the depot handling time applied
|
|
@@ -1952,7 +2011,9 @@ export interface components {
|
|
|
1952
2011
|
/**
|
|
1953
2012
|
* Format: date-time
|
|
1954
2013
|
* @description When service starts: `arrival + wait_s` plus the duration of any
|
|
1955
|
-
*
|
|
2014
|
+
* break taken on arrival here (a `windowed` one; on a
|
|
2015
|
+
* `break_interruptible` job also a `fixed` or duty-`triggered` one that
|
|
2016
|
+
* falls in the wait). On task and `reload` stops only.
|
|
1956
2017
|
* @example 2026-07-01T09:00:00+02:00
|
|
1957
2018
|
*/
|
|
1958
2019
|
service_start?: string | null;
|
|
@@ -2006,6 +2067,7 @@ export interface components {
|
|
|
2006
2067
|
* @example {
|
|
2007
2068
|
* "components": {
|
|
2008
2069
|
* "assignment": 0,
|
|
2070
|
+
* "delay": 0,
|
|
2009
2071
|
* "distance": 1.69,
|
|
2010
2072
|
* "drop_costs": 0,
|
|
2011
2073
|
* "grouping": 0,
|
|
@@ -2017,6 +2079,7 @@ export interface components {
|
|
|
2017
2079
|
* "tag_preference": 0,
|
|
2018
2080
|
* "target": 0,
|
|
2019
2081
|
* "time": 57.1536,
|
|
2082
|
+
* "vehicles": 0,
|
|
2020
2083
|
* "waiting": 0,
|
|
2021
2084
|
* "window_choice": 0,
|
|
2022
2085
|
* "workload_share": 0
|
|
@@ -2062,6 +2125,7 @@ export interface components {
|
|
|
2062
2125
|
* charges lands in exactly one of them.
|
|
2063
2126
|
* @example {
|
|
2064
2127
|
* "assignment": 0,
|
|
2128
|
+
* "delay": 0,
|
|
2065
2129
|
* "distance": 1.69,
|
|
2066
2130
|
* "drop_costs": 0,
|
|
2067
2131
|
* "grouping": 0,
|
|
@@ -2073,6 +2137,7 @@ export interface components {
|
|
|
2073
2137
|
* "tag_preference": 0,
|
|
2074
2138
|
* "target": 0,
|
|
2075
2139
|
* "time": 57.1536,
|
|
2140
|
+
* "vehicles": 0,
|
|
2076
2141
|
* "waiting": 0,
|
|
2077
2142
|
* "window_choice": 0,
|
|
2078
2143
|
* "workload_share": 0
|
|
@@ -2085,6 +2150,13 @@ export interface components {
|
|
|
2085
2150
|
* default assignment cost), in currency units.
|
|
2086
2151
|
*/
|
|
2087
2152
|
assignment: number;
|
|
2153
|
+
/**
|
|
2154
|
+
* Format: double
|
|
2155
|
+
* @description Cost of delay, in currency units (`objective.per_delay_workday`): each
|
|
2156
|
+
* served task pays the rate once per workday its shift lies after the
|
|
2157
|
+
* earliest workday in the request.
|
|
2158
|
+
*/
|
|
2159
|
+
delay: number;
|
|
2088
2160
|
/**
|
|
2089
2161
|
* Format: double
|
|
2090
2162
|
* @description Distance cost, in currency units: each route's distance priced at
|
|
@@ -2128,7 +2200,7 @@ export interface components {
|
|
|
2128
2200
|
reloads: number;
|
|
2129
2201
|
/**
|
|
2130
2202
|
* Format: double
|
|
2131
|
-
* @description
|
|
2203
|
+
* @description Shift cost, in currency units: `costs.per_route` once per used shift,
|
|
2132
2204
|
* at the shift's, vehicle's or fleet's rate.
|
|
2133
2205
|
*/
|
|
2134
2206
|
routes: number;
|
|
@@ -2150,6 +2222,13 @@ export interface components {
|
|
|
2150
2222
|
* `costs.per_route_hour` (shift, vehicle or fleet).
|
|
2151
2223
|
*/
|
|
2152
2224
|
time: number;
|
|
2225
|
+
/**
|
|
2226
|
+
* Format: double
|
|
2227
|
+
* @description Vehicle cost, in currency units: `costs.per_used_vehicle` once per
|
|
2228
|
+
* vehicle that serves a task, however many of its shifts it works, at the
|
|
2229
|
+
* vehicle's or fleet's rate.
|
|
2230
|
+
*/
|
|
2231
|
+
vehicles: number;
|
|
2153
2232
|
/**
|
|
2154
2233
|
* Format: double
|
|
2155
2234
|
* @description Cost of waiting for time windows to open, in currency units: each
|
|
@@ -2281,8 +2360,10 @@ export interface components {
|
|
|
2281
2360
|
* @description Costs for this shift only. Each field set here replaces the same
|
|
2282
2361
|
* field of the vehicle's `costs` (or, when the vehicle does not set it,
|
|
2283
2362
|
* of `objective.costs`) for this shift; fields not set keep that value.
|
|
2363
|
+
* `per_used_vehicle` is not accepted here: it prices the vehicle, not a
|
|
2364
|
+
* shift.
|
|
2284
2365
|
*/
|
|
2285
|
-
costs?: null | components["schemas"]["
|
|
2366
|
+
costs?: null | components["schemas"]["ShiftCosts"];
|
|
2286
2367
|
/** @description Where the shift ends. Absent = open end. */
|
|
2287
2368
|
end?: null | components["schemas"]["ShiftPlace"];
|
|
2288
2369
|
/**
|
|
@@ -2405,6 +2486,51 @@ export interface components {
|
|
|
2405
2486
|
*/
|
|
2406
2487
|
to: string;
|
|
2407
2488
|
};
|
|
2489
|
+
/**
|
|
2490
|
+
* @description The `Costs` fields for one shift, minus `per_used_vehicle`. A shift is one
|
|
2491
|
+
* of a vehicle's days, so a charge for using the vehicle at all is set on the
|
|
2492
|
+
* vehicle (or the fleet), where it applies once across its shifts. A field
|
|
2493
|
+
* set here replaces the vehicle's value (else the fleet's) for this shift
|
|
2494
|
+
* only; the `Costs` schema says what each field prices.
|
|
2495
|
+
* @example {
|
|
2496
|
+
* "per_route": 50,
|
|
2497
|
+
* "per_travel_km": 0.3
|
|
2498
|
+
* }
|
|
2499
|
+
*/
|
|
2500
|
+
ShiftCosts: {
|
|
2501
|
+
/**
|
|
2502
|
+
* Format: double
|
|
2503
|
+
* @description Per hour this route finishes past the shift's `to`, as
|
|
2504
|
+
* `Costs.per_overtime_hour`.
|
|
2505
|
+
* @example 0
|
|
2506
|
+
*/
|
|
2507
|
+
per_overtime_hour?: number | null;
|
|
2508
|
+
/**
|
|
2509
|
+
* Format: double
|
|
2510
|
+
* @description Flat charge for this used shift, as `Costs.per_route`.
|
|
2511
|
+
* @example 50
|
|
2512
|
+
*/
|
|
2513
|
+
per_route?: number | null;
|
|
2514
|
+
/**
|
|
2515
|
+
* Format: double
|
|
2516
|
+
* @description Per hour of this route's wall-clock span, as `Costs.per_route_hour`.
|
|
2517
|
+
* @example 35
|
|
2518
|
+
*/
|
|
2519
|
+
per_route_hour?: number | null;
|
|
2520
|
+
/**
|
|
2521
|
+
* Format: double
|
|
2522
|
+
* @description Per kilometre driven on this shift, as `Costs.per_travel_km`.
|
|
2523
|
+
* @example 0.2
|
|
2524
|
+
*/
|
|
2525
|
+
per_travel_km?: number | null;
|
|
2526
|
+
/**
|
|
2527
|
+
* Format: double
|
|
2528
|
+
* @description Per hour spent waiting for a time window to open on this shift, as
|
|
2529
|
+
* `Costs.per_wait_hour`.
|
|
2530
|
+
* @example 0
|
|
2531
|
+
*/
|
|
2532
|
+
per_wait_hour?: number | null;
|
|
2533
|
+
};
|
|
2408
2534
|
/**
|
|
2409
2535
|
* @description Per-shift limits: the route-level `limits` fields a shift may override.
|
|
2410
2536
|
* Period limits apply across shifts, so they stay on the vehicle.
|
|
@@ -2537,7 +2663,9 @@ export interface components {
|
|
|
2537
2663
|
* On a shipment the drop cost applies to the pair, charged once.
|
|
2538
2664
|
*
|
|
2539
2665
|
* Must be finite, `>= 0` and at most `1e9`; combined with `priority` it
|
|
2540
|
-
* is rejected with HTTP 400 (`conflicting_fields`).
|
|
2666
|
+
* is rejected with HTTP 400 (`conflicting_fields`). Also rejected with
|
|
2667
|
+
* HTTP 400 (`not_supported`) while a positive `objective.per_delay_workday` is set,
|
|
2668
|
+
* since a droppable task could be dropped to avoid its delay charge.
|
|
2541
2669
|
* @example 25
|
|
2542
2670
|
*/
|
|
2543
2671
|
drop_cost?: number | null;
|
|
@@ -2723,10 +2851,10 @@ export interface components {
|
|
|
2723
2851
|
*/
|
|
2724
2852
|
time_limit_s?: number | null;
|
|
2725
2853
|
/**
|
|
2726
|
-
* @description What to do when
|
|
2727
|
-
*
|
|
2728
|
-
*
|
|
2729
|
-
*
|
|
2854
|
+
* @description What to do when travel times cannot be fetched from Solvice Maps:
|
|
2855
|
+
* `estimate` (the default) solves on estimated travel and sets
|
|
2856
|
+
* `summary.travel_estimated`; `fail` returns the 502/503 instead.
|
|
2857
|
+
* Locations that Maps rejects for spanning more than one region are a 400.
|
|
2730
2858
|
* @default estimate
|
|
2731
2859
|
*/
|
|
2732
2860
|
travel_fallback?: null | components["schemas"]["TravelFallback"];
|
|
@@ -2955,6 +3083,7 @@ export interface components {
|
|
|
2955
3083
|
* "score": {
|
|
2956
3084
|
* "components": {
|
|
2957
3085
|
* "assignment": 0,
|
|
3086
|
+
* "delay": 0,
|
|
2958
3087
|
* "distance": 1.69,
|
|
2959
3088
|
* "drop_costs": 0,
|
|
2960
3089
|
* "grouping": 0,
|
|
@@ -2966,6 +3095,7 @@ export interface components {
|
|
|
2966
3095
|
* "tag_preference": 0,
|
|
2967
3096
|
* "target": 0,
|
|
2968
3097
|
* "time": 57.1536,
|
|
3098
|
+
* "vehicles": 0,
|
|
2969
3099
|
* "waiting": 0,
|
|
2970
3100
|
* "window_choice": 0,
|
|
2971
3101
|
* "workload_share": 0
|
|
@@ -3288,6 +3418,7 @@ export interface components {
|
|
|
3288
3418
|
* "score": {
|
|
3289
3419
|
* "components": {
|
|
3290
3420
|
* "assignment": 0,
|
|
3421
|
+
* "delay": 0,
|
|
3291
3422
|
* "distance": 1.69,
|
|
3292
3423
|
* "drop_costs": 0,
|
|
3293
3424
|
* "grouping": 0,
|
|
@@ -3299,6 +3430,7 @@ export interface components {
|
|
|
3299
3430
|
* "tag_preference": 0,
|
|
3300
3431
|
* "target": 0,
|
|
3301
3432
|
* "time": 57.1536,
|
|
3433
|
+
* "vehicles": 0,
|
|
3302
3434
|
* "waiting": 0,
|
|
3303
3435
|
* "window_choice": 0,
|
|
3304
3436
|
* "workload_share": 0
|
|
@@ -3361,15 +3493,14 @@ export interface components {
|
|
|
3361
3493
|
/** @description Where the request's time went. */
|
|
3362
3494
|
timings: components["schemas"]["Timings"];
|
|
3363
3495
|
/**
|
|
3364
|
-
* @description `true` when
|
|
3496
|
+
* @description `true` when travel times could not be fetched and the plan was costed
|
|
3365
3497
|
* on estimated travel: straight-line distance × a detour factor, at a
|
|
3366
3498
|
* typical speed for the profile. No one-way streets or traffic, so it
|
|
3367
3499
|
* can be tens of percent off: the plan, `unassigned[].reasons` and
|
|
3368
|
-
* `score.violation_count` hold only against it, and no `routes[].polyline`
|
|
3369
|
-
* returned. Solve again once Maps is back if the plan must hold on the
|
|
3370
|
-
* road; `options.travel_fallback: "fail"` returns the error
|
|
3371
|
-
* Absent when travel is road-routed
|
|
3372
|
-
* which returns the error rather than estimate.
|
|
3500
|
+
* `score.violation_count` hold only against it, and no `routes[].polyline`
|
|
3501
|
+
* is returned. Solve again once Maps is back if the plan must hold on the
|
|
3502
|
+
* road; on a solve, `options.travel_fallback: "fail"` returns the error
|
|
3503
|
+
* instead. Absent when travel is road-routed.
|
|
3373
3504
|
*/
|
|
3374
3505
|
travel_estimated?: boolean;
|
|
3375
3506
|
/**
|
|
@@ -3571,7 +3702,8 @@ export interface components {
|
|
|
3571
3702
|
TimeTotals: {
|
|
3572
3703
|
/**
|
|
3573
3704
|
* Format: int64
|
|
3574
|
-
* @description Time on driver breaks
|
|
3705
|
+
* @description Time on driver breaks: the `break` stops plus the breaks that paused
|
|
3706
|
+
* a job's service (the job stops' `break_s`).
|
|
3575
3707
|
*/
|
|
3576
3708
|
break_s: number;
|
|
3577
3709
|
/**
|
|
@@ -3722,7 +3854,7 @@ export interface components {
|
|
|
3722
3854
|
};
|
|
3723
3855
|
/**
|
|
3724
3856
|
* @description `options.travel_fallback`: what a solve does when travel times cannot be
|
|
3725
|
-
* fetched. `/evaluate` and `/suggest`
|
|
3857
|
+
* fetched. `/evaluate` and `/suggest` always estimate.
|
|
3726
3858
|
* @example estimate
|
|
3727
3859
|
* @enum {string}
|
|
3728
3860
|
*/
|
|
@@ -3752,8 +3884,9 @@ export interface components {
|
|
|
3752
3884
|
*/
|
|
3753
3885
|
UnassignedReason: {
|
|
3754
3886
|
/**
|
|
3755
|
-
* @description The constraint that refused the task on at least one vehicle
|
|
3756
|
-
*
|
|
3887
|
+
* @description The constraint that refused the task on at least one vehicle (or
|
|
3888
|
+
* `all_or_none`, for a task its group holds back), in the vocabulary of
|
|
3889
|
+
* the evaluate violations' `code`. A task lists one reason
|
|
3757
3890
|
* per constraint, once each, in [`ConstraintCode`] order. Absent on the
|
|
3758
3891
|
* single reason of a `time_limit` or `priced_out` task, which names no
|
|
3759
3892
|
* constraint.
|
|
@@ -3794,8 +3927,9 @@ export interface components {
|
|
|
3794
3927
|
* @description Never empty. When `category` is `impossible` or `blocked` there is
|
|
3795
3928
|
* one reason per constraint that refused the task on at least one
|
|
3796
3929
|
* vehicle, named in `constraint`, once each, `unreachable` first
|
|
3797
|
-
* (`unknown` when no constraint was recorded)
|
|
3798
|
-
*
|
|
3930
|
+
* (`unknown` when no constraint was recorded); a task that fits but
|
|
3931
|
+
* whose `all_or_none` group holds it back has the one reason
|
|
3932
|
+
* `all_or_none`. Otherwise there is one reason with no `constraint`.
|
|
3799
3933
|
*/
|
|
3800
3934
|
reasons: components["schemas"]["UnassignedReason"][];
|
|
3801
3935
|
/**
|
|
@@ -4150,7 +4284,7 @@ export interface components {
|
|
|
4150
4284
|
* reach (the service time of the tasks whose windows overlap it), weighted
|
|
4151
4285
|
* by shift length, so a day with no tasks carries none of the share; each
|
|
4152
4286
|
* shift is charged on its own part. An empty, non-exempt shift pays for its whole share, so pair the
|
|
4153
|
-
* term with `costs.
|
|
4287
|
+
* term with `costs.per_route` or `per_used_vehicle` only when both are meant.
|
|
4154
4288
|
* See `vehicles[].workload_weight` to give a part-time vehicle a smaller
|
|
4155
4289
|
* share. A problem that sets the term solves without decomposition, like
|
|
4156
4290
|
* `assignment_costs`.
|
|
@@ -4299,38 +4433,6 @@ export interface operations {
|
|
|
4299
4433
|
"application/json": components["schemas"]["ErrorBody"];
|
|
4300
4434
|
};
|
|
4301
4435
|
};
|
|
4302
|
-
/** @description Travel times and distances could not be fetched (`code: travel_provider_error`). The request can be retried. This endpoint never falls back to estimated travel. */
|
|
4303
|
-
502: {
|
|
4304
|
-
headers: {
|
|
4305
|
-
/** @description The request's `X-Request-Id`, echoed, or a generated `req_…` id. */
|
|
4306
|
-
"x-request-id"?: string;
|
|
4307
|
-
[name: string]: unknown;
|
|
4308
|
-
};
|
|
4309
|
-
content: {
|
|
4310
|
-
"application/json": components["schemas"]["ErrorBody"];
|
|
4311
|
-
};
|
|
4312
|
-
};
|
|
4313
|
-
/** @description Solvice Maps is temporarily refused after repeated failures (`code: overloaded`), so travel times cannot be fetched. Evaluate takes no solver slot, so this is its only 503. Retry after the number of seconds in the `Retry-After` header. */
|
|
4314
|
-
503: {
|
|
4315
|
-
headers: {
|
|
4316
|
-
/** @description Seconds to wait before retrying. */
|
|
4317
|
-
"Retry-After"?: number;
|
|
4318
|
-
/** @description The request's `X-Request-Id`, echoed, or a generated `req_…` id. */
|
|
4319
|
-
"x-request-id"?: string;
|
|
4320
|
-
[name: string]: unknown;
|
|
4321
|
-
};
|
|
4322
|
-
content: {
|
|
4323
|
-
/**
|
|
4324
|
-
* @example {
|
|
4325
|
-
* "code": "overloaded",
|
|
4326
|
-
* "message": "Circuit breaker is open — Solvice Maps temporarily unavailable",
|
|
4327
|
-
* "request_id": "req_7f3a2c90d1e4b5a6",
|
|
4328
|
-
* "status": "SERVICE_UNAVAILABLE"
|
|
4329
|
-
* }
|
|
4330
|
-
*/
|
|
4331
|
-
"application/json": components["schemas"]["ErrorBody"];
|
|
4332
|
-
};
|
|
4333
|
-
};
|
|
4334
4436
|
};
|
|
4335
4437
|
};
|
|
4336
4438
|
solve: {
|
|
@@ -4450,7 +4552,7 @@ export interface operations {
|
|
|
4450
4552
|
"application/json": components["schemas"]["ErrorBody"];
|
|
4451
4553
|
};
|
|
4452
4554
|
};
|
|
4453
|
-
/** @description Travel times and distances could not be fetched (`code: travel_provider_error`). The request can be retried.
|
|
4555
|
+
/** @description Travel times and distances could not be fetched (`code: travel_provider_error`). The request can be retried. Only with `options.travel_fallback: "fail"`; by default the plan is solved on estimated travel and `summary.travel_estimated` is set. */
|
|
4454
4556
|
502: {
|
|
4455
4557
|
headers: {
|
|
4456
4558
|
/** @description The request's `X-Request-Id`, echoed, or a generated `req_…` id. */
|
|
@@ -4601,18 +4703,7 @@ export interface operations {
|
|
|
4601
4703
|
"application/json": components["schemas"]["ErrorBody"];
|
|
4602
4704
|
};
|
|
4603
4705
|
};
|
|
4604
|
-
/** @description
|
|
4605
|
-
502: {
|
|
4606
|
-
headers: {
|
|
4607
|
-
/** @description The request's `X-Request-Id`, echoed, or a generated `req_…` id. */
|
|
4608
|
-
"x-request-id"?: string;
|
|
4609
|
-
[name: string]: unknown;
|
|
4610
|
-
};
|
|
4611
|
-
content: {
|
|
4612
|
-
"application/json": components["schemas"]["ErrorBody"];
|
|
4613
|
-
};
|
|
4614
|
-
};
|
|
4615
|
-
/** @description No capacity right now (`code: overloaded`): every solver slot is busy, the wait for one timed out, or Solvice Maps is temporarily refused after repeated failures. Retry after the number of seconds in the `Retry-After` header. */
|
|
4706
|
+
/** @description No capacity right now (`code: overloaded`): every solver slot is busy, or the wait for one timed out. Retry after the number of seconds in the `Retry-After` header. */
|
|
4616
4707
|
503: {
|
|
4617
4708
|
headers: {
|
|
4618
4709
|
/** @description Seconds to wait before retrying. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvice/routing",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3-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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=20"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"generate": "openapi-typescript ../../mintlify/openapi.json -o src/v3.ts --default-non-nullable false",
|
|
31
|
+
"generate": "openapi-typescript ../../mintlify/openapi.json -o src/v3.ts --default-non-nullable false && openapi-typescript ../../mintlify/openapi-runs.json -o src/runs.ts --default-non-nullable false",
|
|
32
32
|
"build": "tsc",
|
|
33
33
|
"prepack": "npm run build",
|
|
34
34
|
"publish:beta": "npm test && npm publish --tag beta",
|