sgerp-frontend-lib 0.1.0 → 0.1.2
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 +1 -1
- package/dist/connection-manager.d.ts +48 -0
- package/dist/connection-manager.d.ts.map +1 -0
- package/dist/connection-manager.js +156 -0
- package/dist/index.js +20 -2
- package/dist/locales/locale-server.d.ts +10 -0
- package/dist/locales/locale-server.d.ts.map +1 -0
- package/dist/locales/locale-server.js +49 -0
- package/dist/locales/locale.d.ts +23 -0
- package/dist/locales/locale.d.ts.map +1 -0
- package/dist/locales/locale.js +145 -0
- package/dist/locales/locale_en.d.ts.map +1 -1
- package/dist/locales/locale_en.js +93 -9
- package/dist/locales/locale_ja.d.ts.map +1 -1
- package/dist/locales/locale_ja.js +93 -9
- package/dist/locales/locale_ms.d.ts.map +1 -1
- package/dist/locales/locale_ms.js +84 -9
- package/dist/locales/useLocalization.d.ts +11 -0
- package/dist/locales/useLocalization.d.ts.map +1 -0
- package/dist/locales/useLocalization.js +64 -0
- package/dist/locales.d.ts +228 -0
- package/dist/locales.d.ts.map +1 -0
- package/dist/locales.js +229 -0
- package/dist/sgerp/api/client.d.ts +45 -0
- package/dist/sgerp/api/client.d.ts.map +1 -0
- package/dist/sgerp/api/client.js +141 -0
- package/dist/sgerp/client.js +341 -0
- package/dist/sgerp/collection.d.ts +391 -0
- package/dist/sgerp/collection.d.ts.map +1 -0
- package/dist/sgerp/collection.js +756 -0
- package/dist/sgerp/collections/account/user.d.ts +8 -0
- package/dist/sgerp/collections/account/user.d.ts.map +1 -0
- package/dist/sgerp/collections/account/user.js +10 -0
- package/dist/sgerp/collections/masstransit/building.d.ts +26 -0
- package/dist/sgerp/collections/masstransit/building.d.ts.map +1 -0
- package/dist/sgerp/collections/masstransit/building.js +53 -0
- package/dist/sgerp/collections/masstransit/transitstop.d.ts +15 -0
- package/dist/sgerp/collections/masstransit/transitstop.d.ts.map +1 -0
- package/dist/sgerp/collections/masstransit/transitstop.js +54 -0
- package/dist/sgerp/collections/masstransit/transitstopset.d.ts +10 -0
- package/dist/sgerp/collections/masstransit/transitstopset.d.ts.map +1 -0
- package/dist/sgerp/collections/masstransit/transitstopset.js +10 -0
- package/dist/sgerp/collections/sharing/organization-project.d.ts +11 -0
- package/dist/sgerp/collections/sharing/organization-project.d.ts.map +1 -0
- package/dist/sgerp/collections/sharing/organization-project.js +13 -0
- package/dist/sgerp/collections/sharing/organization.d.ts +11 -0
- package/dist/sgerp/collections/sharing/organization.d.ts.map +1 -0
- package/dist/sgerp/collections/sharing/organization.js +13 -0
- package/dist/sgerp/collections/sharing/pricing.d.ts +18 -0
- package/dist/sgerp/collections/sharing/pricing.d.ts.map +1 -0
- package/dist/sgerp/collections/sharing/pricing.js +23 -0
- package/dist/sgerp/collections/sharing/project-member.d.ts +8 -0
- package/dist/sgerp/collections/sharing/project-member.d.ts.map +1 -0
- package/dist/sgerp/collections/sharing/project-member.js +10 -0
- package/dist/sgerp/collections/sharing/project.d.ts +8 -0
- package/dist/sgerp/collections/sharing/project.d.ts.map +1 -0
- package/dist/sgerp/collections/sharing/project.js +10 -0
- package/dist/sgerp/collections/simulation/booking.d.ts +11 -0
- package/dist/sgerp/collections/simulation/booking.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/booking.js +13 -0
- package/dist/sgerp/collections/simulation/dataset.d.ts +14 -0
- package/dist/sgerp/collections/simulation/dataset.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/dataset.js +17 -0
- package/dist/sgerp/collections/simulation/driver.d.ts +12 -0
- package/dist/sgerp/collections/simulation/driver.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/driver.js +40 -0
- package/dist/sgerp/collections/simulation/geofence.d.ts +24 -0
- package/dist/sgerp/collections/simulation/geofence.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/geofence.js +66 -0
- package/dist/sgerp/collections/simulation/mapboxtoken.d.ts +18 -0
- package/dist/sgerp/collections/simulation/mapboxtoken.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/mapboxtoken.js +24 -0
- package/dist/sgerp/collections/simulation/node.js +13 -0
- package/dist/sgerp/collections/simulation/operationslocation.d.ts +28 -0
- package/dist/sgerp/collections/simulation/operationslocation.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/operationslocation.js +64 -0
- package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts +12 -0
- package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/operationslocationgroup.js +24 -0
- package/dist/sgerp/collections/simulation/routingprofile.d.ts +10 -0
- package/dist/sgerp/collections/simulation/routingprofile.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/routingprofile.js +10 -0
- package/dist/sgerp/collections/simulation/simulation.d.ts +12 -0
- package/dist/sgerp/collections/simulation/simulation.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/simulation.js +35 -0
- package/dist/sgerp/collections/simulation/simulationprocessor.d.ts +19 -0
- package/dist/sgerp/collections/simulation/simulationprocessor.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/simulationprocessor.js +27 -0
- package/dist/sgerp/collections/simulation/vehicle.js +13 -0
- package/dist/sgerp/collections/simulation/vehicletype.d.ts +11 -0
- package/dist/sgerp/collections/simulation/vehicletype.d.ts.map +1 -0
- package/dist/sgerp/collections/simulation/vehicletype.js +13 -0
- package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts +11 -0
- package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts.map +1 -0
- package/dist/sgerp/collections/sms_notify/smsscheduled.js +13 -0
- package/dist/sgerp/collections/transportation/passenger.d.ts +8 -0
- package/dist/sgerp/collections/transportation/passenger.d.ts.map +1 -0
- package/dist/sgerp/collections/transportation/passenger.js +10 -0
- package/dist/sgerp/collections/transportation/ticket.d.ts +11 -0
- package/dist/sgerp/collections/transportation/ticket.d.ts.map +1 -0
- package/dist/sgerp/collections/transportation/ticket.js +13 -0
- package/dist/sgerp/collections/transportation/transaction.d.ts +11 -0
- package/dist/sgerp/collections/transportation/transaction.d.ts.map +1 -0
- package/dist/sgerp/collections/transportation/transaction.js +13 -0
- package/dist/sgerp/constants/bulkoperations-enums.d.ts +71 -0
- package/dist/sgerp/constants/bulkoperations-enums.d.ts.map +1 -0
- package/dist/sgerp/constants/bulkoperations-enums.js +99 -0
- package/dist/sgerp/constants/messages-enums.d.ts +47 -0
- package/dist/sgerp/constants/messages-enums.d.ts.map +1 -0
- package/dist/sgerp/constants/messages-enums.js +67 -0
- package/dist/sgerp/constants/scheduling-enums.d.ts +42 -0
- package/dist/sgerp/constants/scheduling-enums.d.ts.map +1 -0
- package/dist/sgerp/constants/scheduling-enums.js +61 -0
- package/dist/sgerp/constants/simulation-enums.d.ts +93 -0
- package/dist/sgerp/constants/simulation-enums.d.ts.map +1 -0
- package/dist/sgerp/constants/simulation-enums.js +147 -0
- package/dist/sgerp/constants/solver-strategies.d.ts +75 -0
- package/dist/sgerp/constants/solver-strategies.d.ts.map +1 -0
- package/dist/sgerp/constants/solver-strategies.js +26 -0
- package/dist/sgerp/context/sgerp-context.js +134 -0
- package/dist/sgerp/domains.d.ts +47 -0
- package/dist/sgerp/domains.d.ts.map +1 -0
- package/dist/sgerp/domains.js +45 -0
- package/dist/sgerp/hooks/use-collection.js +122 -0
- package/dist/sgerp/hooks/use-live-updates.js +16 -13
- package/dist/sgerp/index.js +153 -0
- package/dist/sgerp/map-states/operations-location-state.d.ts +12 -0
- package/dist/sgerp/map-states/operations-location-state.d.ts.map +1 -0
- package/dist/sgerp/map-states/operations-location-state.js +86 -0
- package/dist/sgerp/routing/index.d.ts +51 -0
- package/dist/sgerp/routing/index.d.ts.map +1 -0
- package/dist/sgerp/routing/index.js +373 -0
- package/dist/sgerp/simulation-logic/fetchUtils.js +226 -0
- package/dist/sgerp/simulation-logic/index.js +27 -7
- package/dist/sgerp/simulation-logic/manualEditUtils.js +69 -0
- package/dist/sgerp/simulation-logic/mapUtils.js +58 -0
- package/dist/sgerp/simulation-logic/optimisticUpdateUtils.js +8 -5
- package/dist/sgerp/simulation-logic/referenceUtils.js +110 -0
- package/dist/sgerp/simulation-logic/routeCalculationUtils.js +43 -0
- package/dist/sgerp/simulation-logic/timeShiftUtils.js +63 -0
- package/dist/sgerp/types/account/user.d.ts +38 -0
- package/dist/sgerp/types/account/user.d.ts.map +1 -0
- package/dist/sgerp/types/account/user.js +2 -0
- package/dist/sgerp/types/bulkoperations/index.d.ts +37 -0
- package/dist/sgerp/types/bulkoperations/index.d.ts.map +1 -0
- package/dist/sgerp/types/bulkoperations/index.js +35 -0
- package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts +335 -0
- package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts.map +1 -0
- package/dist/sgerp/types/bulkoperations/vehicle-upload.js +49 -0
- package/dist/sgerp/types/config.d.ts +25 -0
- package/dist/sgerp/types/config.d.ts.map +1 -0
- package/dist/sgerp/types/config.js +2 -0
- package/dist/sgerp/types/geojson.d.ts +45 -0
- package/dist/sgerp/types/geojson.d.ts.map +1 -0
- package/dist/sgerp/types/geojson.js +6 -0
- package/dist/sgerp/types/map.d.ts +24 -0
- package/dist/sgerp/types/map.d.ts.map +1 -0
- package/dist/sgerp/types/map.js +2 -0
- package/dist/sgerp/types/masstransit/building.d.ts +24 -0
- package/dist/sgerp/types/masstransit/building.d.ts.map +1 -0
- package/dist/sgerp/types/masstransit/building.js +2 -0
- package/dist/sgerp/types/masstransit/transitstop.d.ts +35 -0
- package/dist/sgerp/types/masstransit/transitstop.d.ts.map +1 -0
- package/dist/sgerp/types/masstransit/transitstop.js +2 -0
- package/dist/sgerp/types/masstransit/transitstopset.d.ts +14 -0
- package/dist/sgerp/types/masstransit/transitstopset.d.ts.map +1 -0
- package/dist/sgerp/types/masstransit/transitstopset.js +2 -0
- package/dist/sgerp/types/sharing/organization-project.d.ts +14 -0
- package/dist/sgerp/types/sharing/organization-project.d.ts.map +1 -0
- package/dist/sgerp/types/sharing/organization-project.js +2 -0
- package/dist/sgerp/types/sharing/organization.d.ts +14 -0
- package/dist/sgerp/types/sharing/organization.d.ts.map +1 -0
- package/dist/sgerp/types/sharing/organization.js +2 -0
- package/dist/sgerp/types/sharing/pricing.d.ts +98 -0
- package/dist/sgerp/types/sharing/pricing.d.ts.map +1 -0
- package/dist/sgerp/types/sharing/pricing.js +2 -0
- package/dist/sgerp/types/sharing/project-member.d.ts +15 -0
- package/dist/sgerp/types/sharing/project-member.d.ts.map +1 -0
- package/dist/sgerp/types/sharing/project-member.js +2 -0
- package/dist/sgerp/types/sharing/project.d.ts +16 -0
- package/dist/sgerp/types/sharing/project.d.ts.map +1 -0
- package/dist/sgerp/types/sharing/project.js +2 -0
- package/dist/sgerp/types/simulation/booking.d.ts +128 -0
- package/dist/sgerp/types/simulation/booking.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/booking.js +24 -0
- package/dist/sgerp/types/simulation/calculation-params.d.ts +20 -0
- package/dist/sgerp/types/simulation/calculation-params.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/calculation-params.js +2 -0
- package/dist/sgerp/types/simulation/dataset.d.ts +16 -0
- package/dist/sgerp/types/simulation/dataset.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/dataset.js +2 -0
- package/dist/sgerp/types/simulation/driver.d.ts +19 -0
- package/dist/sgerp/types/simulation/driver.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/driver.js +2 -0
- package/dist/sgerp/types/simulation/geofence.d.ts +19 -0
- package/dist/sgerp/types/simulation/geofence.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/geofence.js +2 -0
- package/dist/sgerp/types/simulation/logistics-api-settings.d.ts +98 -0
- package/dist/sgerp/types/simulation/logistics-api-settings.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/logistics-api-settings.js +104 -0
- package/dist/sgerp/types/simulation/mapboxtoken.d.ts +13 -0
- package/dist/sgerp/types/simulation/mapboxtoken.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/mapboxtoken.js +2 -0
- package/dist/sgerp/types/simulation/node.js +5 -2
- package/dist/sgerp/types/simulation/operationslocation.d.ts +40 -0
- package/dist/sgerp/types/simulation/operationslocation.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/operationslocation.js +2 -0
- package/dist/sgerp/types/simulation/operationslocationgroup.d.ts +11 -0
- package/dist/sgerp/types/simulation/operationslocationgroup.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/operationslocationgroup.js +2 -0
- package/dist/sgerp/types/simulation/pricing.d.ts +171 -0
- package/dist/sgerp/types/simulation/pricing.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/pricing.js +2 -0
- package/dist/sgerp/types/simulation/route-cost-modification.d.ts +35 -0
- package/dist/sgerp/types/simulation/route-cost-modification.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/route-cost-modification.js +5 -0
- package/dist/sgerp/types/simulation/routing-engine-settings.d.ts +42 -0
- package/dist/sgerp/types/simulation/routing-engine-settings.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/routing-engine-settings.js +35 -0
- package/dist/sgerp/types/simulation/routingprofile.d.ts +32 -0
- package/dist/sgerp/types/simulation/routingprofile.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/routingprofile.js +37 -0
- package/dist/sgerp/types/simulation/simulation.d.ts +120 -0
- package/dist/sgerp/types/simulation/simulation.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/simulation.js +2 -0
- package/dist/sgerp/types/simulation/simulationprocessor.d.ts +31 -0
- package/dist/sgerp/types/simulation/simulationprocessor.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/simulationprocessor.js +2 -0
- package/dist/sgerp/types/simulation/vehicle.js +2 -1
- package/dist/sgerp/types/simulation/vehicletype.d.ts +33 -0
- package/dist/sgerp/types/simulation/vehicletype.d.ts.map +1 -0
- package/dist/sgerp/types/simulation/vehicletype.js +2 -0
- package/dist/sgerp/types/sms_notify/smsscheduled.d.ts +36 -0
- package/dist/sgerp/types/sms_notify/smsscheduled.d.ts.map +1 -0
- package/dist/sgerp/types/sms_notify/smsscheduled.js +6 -0
- package/dist/sgerp/types/transportation/passenger.d.ts +49 -0
- package/dist/sgerp/types/transportation/passenger.d.ts.map +1 -0
- package/dist/sgerp/types/transportation/passenger.js +13 -0
- package/dist/sgerp/types/transportation/ticket.d.ts +31 -0
- package/dist/sgerp/types/transportation/ticket.d.ts.map +1 -0
- package/dist/sgerp/types/transportation/ticket.js +2 -0
- package/dist/sgerp/types/transportation/transaction.d.ts +71 -0
- package/dist/sgerp/types/transportation/transaction.d.ts.map +1 -0
- package/dist/sgerp/types/transportation/transaction.js +54 -0
- package/dist/sgerp/utils/bookingPayload.d.ts +80 -0
- package/dist/sgerp/utils/bookingPayload.d.ts.map +1 -0
- package/dist/sgerp/utils/bookingPayload.js +44 -0
- package/dist/sgerp/utils/color.d.ts +30 -0
- package/dist/sgerp/utils/color.d.ts.map +1 -0
- package/dist/sgerp/utils/color.js +117 -0
- package/dist/sgerp/utils/enum-helpers.d.ts +41 -0
- package/dist/sgerp/utils/enum-helpers.d.ts.map +1 -0
- package/dist/sgerp/utils/enum-helpers.js +54 -0
- package/dist/sgerp/utils/routeUtils.js +171 -0
- package/package.json +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logistics API Settings
|
|
3
|
+
* Based on LogisticsOptimizationSettings from ~/dev/sgerp/messages/messages.py
|
|
4
|
+
*/
|
|
5
|
+
import type { RouteCostModification } from './route-cost-modification';
|
|
6
|
+
export interface LogisticsApiSettings {
|
|
7
|
+
vehicle_cost?: number | null;
|
|
8
|
+
vehicle_amortized_linear_cost_factor?: number | null;
|
|
9
|
+
vehicle_amortized_quadratic_cost_factor?: number | null;
|
|
10
|
+
booking_penalty?: number | null;
|
|
11
|
+
use_walking_time_to_reduce_time_windows?: boolean | null;
|
|
12
|
+
mutually_exclusive_groups?: unknown[] | null;
|
|
13
|
+
strictly_exclusive_groups?: unknown[] | null;
|
|
14
|
+
group_crossing_penalty?: number | null;
|
|
15
|
+
algo_optimize_quantity?: string | null;
|
|
16
|
+
use_lifo_order_check?: boolean | null;
|
|
17
|
+
lifo_order_check_on_all_vehicles?: boolean | null;
|
|
18
|
+
compound_zones?: unknown[] | null;
|
|
19
|
+
cumulative_limitations?: unknown | null;
|
|
20
|
+
slack_cost_factor?: number | null;
|
|
21
|
+
algorithm?: string | null;
|
|
22
|
+
first_solution_strategies?: number[] | null;
|
|
23
|
+
solution_limit?: number | null;
|
|
24
|
+
use_local_search_metaheuristic?: boolean | null;
|
|
25
|
+
guided_local_search_lambda_coefficient?: number | null;
|
|
26
|
+
use_tsp_opt?: boolean | null;
|
|
27
|
+
time_limit_ms?: number | null;
|
|
28
|
+
log_search?: boolean | null;
|
|
29
|
+
lns_time_limit_ms?: number | null;
|
|
30
|
+
savings_neighbors_ratio?: number | null;
|
|
31
|
+
waypoints_solution_limit?: number | null;
|
|
32
|
+
waypoints_optimization_second_phase?: boolean | null;
|
|
33
|
+
use_depth_first_search?: boolean | null;
|
|
34
|
+
optimization_step?: number | null;
|
|
35
|
+
use_all_local_search_operators?: boolean | null;
|
|
36
|
+
use_local_search_operators?: string[] | null;
|
|
37
|
+
use_cvb_local_search_operator?: boolean | null;
|
|
38
|
+
cvb_local_search_iterations_limit?: number | null;
|
|
39
|
+
cvb_fleetmin_iterations_limit?: number | null;
|
|
40
|
+
cvb_fleetmin_solutions_limit?: number | null;
|
|
41
|
+
cvb_fleetmin_time_limit?: number | null;
|
|
42
|
+
first_solution_strategies_second_stage?: number[] | null;
|
|
43
|
+
time_limit_ms_second_stage?: number | null;
|
|
44
|
+
total_to_furthest_distance_ratio?: number | null;
|
|
45
|
+
allow_vehicle_late?: boolean | null;
|
|
46
|
+
vehicle_late_penalty_coefficient?: number | null;
|
|
47
|
+
max_possible_lateness?: number | null;
|
|
48
|
+
use_node_weights_cost?: boolean | null;
|
|
49
|
+
use_path_equalizer?: boolean | null;
|
|
50
|
+
path_equalizer_weight?: number | null;
|
|
51
|
+
use_mixed_time_matrix?: boolean | null;
|
|
52
|
+
exclude_unroutable_bookings?: boolean | null;
|
|
53
|
+
use_selective_path_equalizer?: boolean | null;
|
|
54
|
+
trip_cost?: number | null;
|
|
55
|
+
pipeline_type?: string | null;
|
|
56
|
+
geofence_vehicle_allocation_strategy?: string | null;
|
|
57
|
+
only_pdp?: boolean | null;
|
|
58
|
+
max_pickup_slack?: number | null;
|
|
59
|
+
max_dropoff_slack?: number | null;
|
|
60
|
+
allow_upload_after_simulation_start_time?: boolean | null;
|
|
61
|
+
geofence_definition_strategy?: string | null;
|
|
62
|
+
stateless_api_server?: string | null;
|
|
63
|
+
stateless_api_login?: string | null;
|
|
64
|
+
stateless_api_password?: string | null;
|
|
65
|
+
average_travel_duration_to_node?: number | null;
|
|
66
|
+
should_set_max_slack_start_location_zero?: boolean | null;
|
|
67
|
+
should_lock_next_stop_if_vehicle_live?: boolean | null;
|
|
68
|
+
should_optimize_fail_to_board_bookings?: boolean | null;
|
|
69
|
+
truckban_enabled?: boolean | null;
|
|
70
|
+
truckban_strategy?: string | null;
|
|
71
|
+
truckban_buffer_time_windows?: number | null;
|
|
72
|
+
booking_order_prioritization?: string | null;
|
|
73
|
+
slack_cost?: number | null;
|
|
74
|
+
logistics_optimize_slack?: boolean | null;
|
|
75
|
+
path_constraints_mode?: string | null;
|
|
76
|
+
node_grouping_enabled?: boolean | null;
|
|
77
|
+
node_grouping_capacity_strategy?: string | null;
|
|
78
|
+
clear_cumulative_limitations?: boolean | null;
|
|
79
|
+
manual_edit_api_minimize_slack?: boolean | null;
|
|
80
|
+
manual_edit_api_vehicle_logistics_optimize_slack?: boolean | null;
|
|
81
|
+
manual_edit_api_use_vehicle_start_time?: boolean | null;
|
|
82
|
+
manual_edit_api_solver_kind?: string | null;
|
|
83
|
+
manual_edit_finalization_type_pickups?: string | null;
|
|
84
|
+
manual_edit_finalization_type_dropoffs?: string | null;
|
|
85
|
+
manual_edit_allow_vehicle_late?: boolean | null;
|
|
86
|
+
manual_edit_max_possible_lateness?: number | null;
|
|
87
|
+
manual_edit_lateness_penalty_coefficient?: number | null;
|
|
88
|
+
manual_edit_optimize_quantity?: string | null;
|
|
89
|
+
manual_edit_slack_cost_factor?: number | null;
|
|
90
|
+
route_cost_modification_primary?: RouteCostModification | null;
|
|
91
|
+
route_cost_modification_secondary?: RouteCostModification | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Returns default values for Logistics API Settings
|
|
95
|
+
* Based on LogisticsOptimizationSettings.default() in Python backend
|
|
96
|
+
*/
|
|
97
|
+
export declare function getDefaultLogisticsApiSettings(): LogisticsApiSettings;
|
|
98
|
+
//# sourceMappingURL=logistics-api-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logistics-api-settings.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/logistics-api-settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IAEnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,oCAAoC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrD,uCAAuC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,uCAAuC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzD,yBAAyB,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC7C,yBAAyB,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC7C,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,gCAAgC,CAAC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I,CAAC;IAC9C,+BAA+B,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC/D,iCAAiC,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAClE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,oBAAoB,CA+FrE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Logistics API Settings
|
|
4
|
+
* Based on LogisticsOptimizationSettings from ~/dev/sgerp/messages/messages.py
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getDefaultLogisticsApiSettings = getDefaultLogisticsApiSettings;
|
|
8
|
+
/**
|
|
9
|
+
* Returns default values for Logistics API Settings
|
|
10
|
+
* Based on LogisticsOptimizationSettings.default() in Python backend
|
|
11
|
+
*/
|
|
12
|
+
function getDefaultLogisticsApiSettings() {
|
|
13
|
+
return {
|
|
14
|
+
// LogisticsModelParametersMessage defaults
|
|
15
|
+
vehicle_cost: 1000.0,
|
|
16
|
+
vehicle_amortized_linear_cost_factor: null,
|
|
17
|
+
vehicle_amortized_quadratic_cost_factor: null,
|
|
18
|
+
booking_penalty: 1000,
|
|
19
|
+
use_walking_time_to_reduce_time_windows: false,
|
|
20
|
+
mutually_exclusive_groups: [],
|
|
21
|
+
strictly_exclusive_groups: [],
|
|
22
|
+
group_crossing_penalty: 10000.0,
|
|
23
|
+
algo_optimize_quantity: 'total_time',
|
|
24
|
+
use_lifo_order_check: false,
|
|
25
|
+
lifo_order_check_on_all_vehicles: true,
|
|
26
|
+
compound_zones: [],
|
|
27
|
+
cumulative_limitations: null,
|
|
28
|
+
slack_cost_factor: null,
|
|
29
|
+
// LogisticsSolverParametersMessage defaults
|
|
30
|
+
algorithm: 'static',
|
|
31
|
+
first_solution_strategies: [0],
|
|
32
|
+
solution_limit: 100000000,
|
|
33
|
+
use_local_search_metaheuristic: false,
|
|
34
|
+
guided_local_search_lambda_coefficient: 0.1,
|
|
35
|
+
use_tsp_opt: false,
|
|
36
|
+
time_limit_ms: 30000,
|
|
37
|
+
log_search: false,
|
|
38
|
+
lns_time_limit_ms: 1000,
|
|
39
|
+
savings_neighbors_ratio: 1.0,
|
|
40
|
+
waypoints_solution_limit: 1000,
|
|
41
|
+
waypoints_optimization_second_phase: false,
|
|
42
|
+
use_depth_first_search: false,
|
|
43
|
+
optimization_step: 1,
|
|
44
|
+
use_all_local_search_operators: false,
|
|
45
|
+
use_local_search_operators: [],
|
|
46
|
+
use_cvb_local_search_operator: false,
|
|
47
|
+
cvb_local_search_iterations_limit: 100000,
|
|
48
|
+
cvb_fleetmin_iterations_limit: 3000000,
|
|
49
|
+
cvb_fleetmin_solutions_limit: 30000,
|
|
50
|
+
cvb_fleetmin_time_limit: 600,
|
|
51
|
+
first_solution_strategies_second_stage: null,
|
|
52
|
+
time_limit_ms_second_stage: 30000,
|
|
53
|
+
total_to_furthest_distance_ratio: null,
|
|
54
|
+
// LogisticsCalculationParametersMessage defaults
|
|
55
|
+
allow_vehicle_late: false,
|
|
56
|
+
vehicle_late_penalty_coefficient: 10,
|
|
57
|
+
max_possible_lateness: null,
|
|
58
|
+
use_node_weights_cost: true,
|
|
59
|
+
use_path_equalizer: false,
|
|
60
|
+
path_equalizer_weight: 100,
|
|
61
|
+
use_mixed_time_matrix: false,
|
|
62
|
+
exclude_unroutable_bookings: false,
|
|
63
|
+
use_selective_path_equalizer: false,
|
|
64
|
+
// LogisticsOptimizationSettings specific defaults
|
|
65
|
+
trip_cost: 0.0,
|
|
66
|
+
pipeline_type: 'simple_one_stage',
|
|
67
|
+
geofence_vehicle_allocation_strategy: 'strict',
|
|
68
|
+
only_pdp: false,
|
|
69
|
+
max_pickup_slack: null,
|
|
70
|
+
max_dropoff_slack: null,
|
|
71
|
+
allow_upload_after_simulation_start_time: false,
|
|
72
|
+
geofence_definition_strategy: 'by_dropoff',
|
|
73
|
+
stateless_api_server: null,
|
|
74
|
+
stateless_api_login: '',
|
|
75
|
+
stateless_api_password: '',
|
|
76
|
+
average_travel_duration_to_node: 1200,
|
|
77
|
+
should_set_max_slack_start_location_zero: true,
|
|
78
|
+
should_lock_next_stop_if_vehicle_live: true,
|
|
79
|
+
should_optimize_fail_to_board_bookings: false,
|
|
80
|
+
truckban_enabled: false,
|
|
81
|
+
truckban_strategy: 'default',
|
|
82
|
+
truckban_buffer_time_windows: 1800,
|
|
83
|
+
booking_order_prioritization: 'disabled',
|
|
84
|
+
slack_cost: null,
|
|
85
|
+
logistics_optimize_slack: null,
|
|
86
|
+
path_constraints_mode: null,
|
|
87
|
+
node_grouping_enabled: false,
|
|
88
|
+
node_grouping_capacity_strategy: 'min',
|
|
89
|
+
clear_cumulative_limitations: false,
|
|
90
|
+
manual_edit_api_minimize_slack: true,
|
|
91
|
+
manual_edit_api_vehicle_logistics_optimize_slack: null,
|
|
92
|
+
manual_edit_api_use_vehicle_start_time: true,
|
|
93
|
+
manual_edit_api_solver_kind: 'local',
|
|
94
|
+
manual_edit_finalization_type_pickups: null,
|
|
95
|
+
manual_edit_finalization_type_dropoffs: null,
|
|
96
|
+
manual_edit_allow_vehicle_late: true,
|
|
97
|
+
manual_edit_max_possible_lateness: null,
|
|
98
|
+
manual_edit_lateness_penalty_coefficient: 10,
|
|
99
|
+
manual_edit_optimize_quantity: null,
|
|
100
|
+
manual_edit_slack_cost_factor: null,
|
|
101
|
+
route_cost_modification_primary: null,
|
|
102
|
+
route_cost_modification_secondary: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MapboxToken model from simulation app
|
|
3
|
+
*/
|
|
4
|
+
export interface MapboxToken {
|
|
5
|
+
id: number;
|
|
6
|
+
description: string;
|
|
7
|
+
token: string;
|
|
8
|
+
project_id: number;
|
|
9
|
+
is_active: boolean;
|
|
10
|
+
created_at: string;
|
|
11
|
+
modified_at: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=mapboxtoken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapboxtoken.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/mapboxtoken.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeType = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* Node type enum
|
|
3
6
|
*/
|
|
4
|
-
|
|
7
|
+
var NodeType;
|
|
5
8
|
(function (NodeType) {
|
|
6
9
|
NodeType["PICKUP"] = "pickup";
|
|
7
10
|
NodeType["DROPOFF"] = "dropoff";
|
|
8
11
|
NodeType["POINT"] = "point";
|
|
9
12
|
NodeType["VEHICLE_POSITION"] = "vehicle_position";
|
|
10
13
|
NodeType["DEPOT"] = "depot";
|
|
11
|
-
})(NodeType || (NodeType = {}));
|
|
14
|
+
})(NodeType || (exports.NodeType = NodeType = {}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CalculationParams } from './calculation-params';
|
|
2
|
+
import type { GeoJSONPoint } from '../geojson';
|
|
3
|
+
export interface OperationsLocation {
|
|
4
|
+
id: number;
|
|
5
|
+
h3: string;
|
|
6
|
+
created_at: string;
|
|
7
|
+
modified_at: string;
|
|
8
|
+
point: GeoJSONPoint;
|
|
9
|
+
external_id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
group_id: number;
|
|
12
|
+
code: string;
|
|
13
|
+
address: string;
|
|
14
|
+
postal_code: string | null;
|
|
15
|
+
calculation_params: CalculationParams;
|
|
16
|
+
project_id: number;
|
|
17
|
+
data: Record<string, unknown>;
|
|
18
|
+
time_windows: Array<{
|
|
19
|
+
id: number;
|
|
20
|
+
created_at: string;
|
|
21
|
+
modified_at: string;
|
|
22
|
+
time_windows: {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
open_time_ts: string;
|
|
26
|
+
close_time_ts: string;
|
|
27
|
+
recurrences: string;
|
|
28
|
+
public_holiday: boolean;
|
|
29
|
+
strict: boolean;
|
|
30
|
+
created_at: string;
|
|
31
|
+
modified_at: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
project: {
|
|
35
|
+
id: number;
|
|
36
|
+
name: string;
|
|
37
|
+
timezone: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=operationslocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationslocation.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/operationslocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,YAAY,EAAE,KAAK,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE;YACZ,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;YACb,YAAY,EAAE,MAAM,CAAC;YACrB,aAAa,EAAE,MAAM,CAAC;YACtB,WAAW,EAAE,MAAM,CAAC;YACpB,cAAc,EAAE,OAAO,CAAC;YACxB,MAAM,EAAE,OAAO,CAAC;YAChB,UAAU,EAAE,MAAM,CAAC;YACnB,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC,CAAC;IACH,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CalculationParams } from './calculation-params';
|
|
2
|
+
export interface OperationsLocationGroup {
|
|
3
|
+
id: number;
|
|
4
|
+
created_at: string;
|
|
5
|
+
modified_at: string;
|
|
6
|
+
project_id: number;
|
|
7
|
+
code: string;
|
|
8
|
+
geofence_id: number | null;
|
|
9
|
+
calculation_params: CalculationParams;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=operationslocationgroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationslocationgroup.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/operationslocationgroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,EAAE,iBAAiB,CAAC;CACvC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export interface PricingExtension {
|
|
2
|
+
type: string;
|
|
3
|
+
surcharge: number;
|
|
4
|
+
exact_price: number;
|
|
5
|
+
pickup_stop_ids: number[];
|
|
6
|
+
discount_percent?: number;
|
|
7
|
+
dropoff_stop_ids: number[];
|
|
8
|
+
}
|
|
9
|
+
export interface DemandAdditionalPrice {
|
|
10
|
+
coefficient: number;
|
|
11
|
+
fixed_amount: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PricingRule {
|
|
14
|
+
extensions: PricingExtension[];
|
|
15
|
+
demand_limit: number;
|
|
16
|
+
initial_price: number;
|
|
17
|
+
demand_limit_help: string;
|
|
18
|
+
initial_price_help: string;
|
|
19
|
+
distance_coefficient: number;
|
|
20
|
+
demand_additional_price: DemandAdditionalPrice;
|
|
21
|
+
distance_coefficient_help: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RoundingStrategy {
|
|
24
|
+
round_to: string;
|
|
25
|
+
minimal_unit: string;
|
|
26
|
+
round_function: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CancellationTerms {
|
|
29
|
+
penalty: number;
|
|
30
|
+
grace_period: number;
|
|
31
|
+
}
|
|
32
|
+
export interface TicketItem {
|
|
33
|
+
max: number;
|
|
34
|
+
title: {
|
|
35
|
+
[locale: string]: string;
|
|
36
|
+
};
|
|
37
|
+
subtitle: {
|
|
38
|
+
[locale: string]: string;
|
|
39
|
+
};
|
|
40
|
+
description: {
|
|
41
|
+
[locale: string]: string;
|
|
42
|
+
};
|
|
43
|
+
ticket_type: string;
|
|
44
|
+
require_driver_verification: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface TicketSection {
|
|
47
|
+
items: TicketItem[];
|
|
48
|
+
title: {
|
|
49
|
+
[locale: string]: string;
|
|
50
|
+
};
|
|
51
|
+
section_constraints: {
|
|
52
|
+
total_minimum_demand: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface Discount {
|
|
56
|
+
kind: string;
|
|
57
|
+
constant: number;
|
|
58
|
+
percentage: number;
|
|
59
|
+
description: {
|
|
60
|
+
[locale: string]: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface PaymentMethodConfig {
|
|
64
|
+
payment_provider: string;
|
|
65
|
+
payment_method_type: string;
|
|
66
|
+
}
|
|
67
|
+
export interface PricingOptions {
|
|
68
|
+
rules: {
|
|
69
|
+
[ticketType: string]: PricingRule;
|
|
70
|
+
};
|
|
71
|
+
format: string;
|
|
72
|
+
currency: string;
|
|
73
|
+
format_help: string;
|
|
74
|
+
variability: string;
|
|
75
|
+
format_localized: {
|
|
76
|
+
[locale: string]: string;
|
|
77
|
+
};
|
|
78
|
+
rounding_strategy: RoundingStrategy;
|
|
79
|
+
cancellation_terms: CancellationTerms;
|
|
80
|
+
fail_to_board_terms: CancellationTerms;
|
|
81
|
+
tickets_configuration: TicketSection[];
|
|
82
|
+
organization_discounts?: {
|
|
83
|
+
[orgCode: string]: Discount;
|
|
84
|
+
};
|
|
85
|
+
rounding_strategy_help?: unknown;
|
|
86
|
+
payment_method_discounts?: {
|
|
87
|
+
[method: string]: Discount;
|
|
88
|
+
};
|
|
89
|
+
payment_method_configuration?: PaymentMethodConfig[];
|
|
90
|
+
payment_method_configuration_operator?: PaymentMethodConfig[];
|
|
91
|
+
}
|
|
92
|
+
export interface Pricing {
|
|
93
|
+
id: number;
|
|
94
|
+
created_at: string;
|
|
95
|
+
modified_at: string;
|
|
96
|
+
name: string;
|
|
97
|
+
project_id: number;
|
|
98
|
+
strategy: string;
|
|
99
|
+
options: PricingOptions;
|
|
100
|
+
}
|
|
101
|
+
export interface PricingCostTicket {
|
|
102
|
+
demand: number;
|
|
103
|
+
ticket_type: string;
|
|
104
|
+
pass_id?: number;
|
|
105
|
+
}
|
|
106
|
+
export interface PricingCostRequest {
|
|
107
|
+
pickup_location_lat: number;
|
|
108
|
+
pickup_location_lon: number;
|
|
109
|
+
preferred_pickup_stop_id: number;
|
|
110
|
+
dropoff_location_lat: number;
|
|
111
|
+
dropoff_location_lon: number;
|
|
112
|
+
preferred_dropoff_stop_id: number;
|
|
113
|
+
tickets: PricingCostTicket[];
|
|
114
|
+
}
|
|
115
|
+
export interface PricingDetail {
|
|
116
|
+
ticket_type: string;
|
|
117
|
+
pass_id: number | null;
|
|
118
|
+
stop_ids: number[];
|
|
119
|
+
price: number;
|
|
120
|
+
discount: number;
|
|
121
|
+
surge: number;
|
|
122
|
+
additional_demand_price: number;
|
|
123
|
+
demand: number;
|
|
124
|
+
payable: number;
|
|
125
|
+
payable_formatted: string;
|
|
126
|
+
payable_formatted_localized: {
|
|
127
|
+
[locale: string]: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface PaymentMethodDiscount {
|
|
131
|
+
formatted: string;
|
|
132
|
+
formatted_localized: {
|
|
133
|
+
[locale: string]: string;
|
|
134
|
+
};
|
|
135
|
+
amount: number;
|
|
136
|
+
payment_method_type: string;
|
|
137
|
+
}
|
|
138
|
+
export interface PenaltyTerms {
|
|
139
|
+
formatted: string;
|
|
140
|
+
formatted_localized: {
|
|
141
|
+
[locale: string]: string;
|
|
142
|
+
};
|
|
143
|
+
penalty: number;
|
|
144
|
+
currency: string;
|
|
145
|
+
grace_period: number;
|
|
146
|
+
}
|
|
147
|
+
export interface PricingCostResponse {
|
|
148
|
+
pricing_details: PricingDetail[];
|
|
149
|
+
currency: string;
|
|
150
|
+
variability: string;
|
|
151
|
+
total_price: number;
|
|
152
|
+
total_price_formatted: string;
|
|
153
|
+
total_price_formatted_localized: {
|
|
154
|
+
[locale: string]: string;
|
|
155
|
+
};
|
|
156
|
+
organization_discount: PaymentMethodDiscount | null;
|
|
157
|
+
payment_method_discount: PaymentMethodDiscount | null;
|
|
158
|
+
total_discount: number;
|
|
159
|
+
total_discount_formatted: string;
|
|
160
|
+
total_discount_formatted_localized: {
|
|
161
|
+
[locale: string]: string;
|
|
162
|
+
};
|
|
163
|
+
total_payable: number;
|
|
164
|
+
total_payable_formatted: string;
|
|
165
|
+
total_payable_formatted_localized: {
|
|
166
|
+
[locale: string]: string;
|
|
167
|
+
};
|
|
168
|
+
cancellation_terms: PenaltyTerms;
|
|
169
|
+
fail_to_board_terms: PenaltyTerms;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=pricing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/pricing.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,C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MAAM,GAAG,MAAM,CAAC;KAC1B,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;IAChC,iCAAiC,EAAE;QACjC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B,CAAC;IACF,kBAAkB,EAAE,YAAY,CAAC;IACjC,mBAAmB,EAAE,YAAY,CAAC;CACnC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route Cost Modification Types
|
|
3
|
+
*/
|
|
4
|
+
export type RouteCostModificationRelation = 'greater' | 'less';
|
|
5
|
+
export interface RouteCostModificationPenalty {
|
|
6
|
+
/** Base penalty value */
|
|
7
|
+
base: number;
|
|
8
|
+
/** Penalty rate per unit */
|
|
9
|
+
rate: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RouteCostModificationPolylinearSetting {
|
|
12
|
+
/** 'greater' or 'less', penalty will be applied to either above or below threshold */
|
|
13
|
+
relation: RouteCostModificationRelation;
|
|
14
|
+
/** If true, no penalty applied to trip from partial_route to next node */
|
|
15
|
+
ignore_first: boolean;
|
|
16
|
+
/** If true, no penalty applied to trip from last node to partial_route_end */
|
|
17
|
+
ignore_last: boolean;
|
|
18
|
+
/** The threshold value to apply the penalty */
|
|
19
|
+
threshold: number;
|
|
20
|
+
/** Specify the base and rate value of the penalty */
|
|
21
|
+
penalty: RouteCostModificationPenalty;
|
|
22
|
+
}
|
|
23
|
+
export interface RouteCostModificationSetting {
|
|
24
|
+
/** The linear coefficient of the route cost function */
|
|
25
|
+
linear: number;
|
|
26
|
+
/** The parameters for the polylinear segment of the route cost function */
|
|
27
|
+
polylinear?: RouteCostModificationPolylinearSetting[] | null;
|
|
28
|
+
}
|
|
29
|
+
export interface RouteCostModification {
|
|
30
|
+
/** The route cost function setting for time matrix */
|
|
31
|
+
time?: RouteCostModificationSetting | null;
|
|
32
|
+
/** The route cost function setting for distance matrix */
|
|
33
|
+
distance?: RouteCostModificationSetting | null;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=route-cost-modification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-cost-modification.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/route-cost-modification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sCAAsC;IACrD,sFAAsF;IACtF,QAAQ,EAAE,6BAA6B,CAAC;IACxC,0EAA0E;IAC1E,YAAY,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,4BAA4B,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IAC3C,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,UAAU,CAAC,EAAE,sCAAsC,EAAE,GAAG,IAAI,CAAC;CAC9D;AAED,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,IAAI,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC3C,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;CAChD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing engine settings for vehicles
|
|
3
|
+
* This is the format expected by the Vehicle API
|
|
4
|
+
*/
|
|
5
|
+
export interface RoutingEngineSettings {
|
|
6
|
+
key?: string;
|
|
7
|
+
url: string | null;
|
|
8
|
+
speed?: number;
|
|
9
|
+
time_factor?: number | null;
|
|
10
|
+
road_network: string;
|
|
11
|
+
make_depot_zero?: boolean;
|
|
12
|
+
routing_engine_name: string;
|
|
13
|
+
use_speed_in_routing?: boolean;
|
|
14
|
+
profile?: string;
|
|
15
|
+
disable_curb_for_destination_navigation?: boolean;
|
|
16
|
+
intermediate_curb?: boolean;
|
|
17
|
+
mapmatcher_radius?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Convert a RoutingProfile to RoutingEngineSettings for a vehicle
|
|
21
|
+
* @param profile - The routing profile from the API
|
|
22
|
+
* @param mapToken - Optional map token to use for the key field
|
|
23
|
+
* @param speed - Vehicle speed (defaults to 40)
|
|
24
|
+
* @returns RoutingEngineSettings object
|
|
25
|
+
*/
|
|
26
|
+
export declare function routingProfileToEngineSettings(profile: {
|
|
27
|
+
routing_engine_name: string;
|
|
28
|
+
road_network: string;
|
|
29
|
+
settings: {
|
|
30
|
+
key?: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
profile?: string;
|
|
33
|
+
road_network?: string;
|
|
34
|
+
asteria_map?: string;
|
|
35
|
+
speed_factor?: number;
|
|
36
|
+
disable_curb_for_destination_navigation?: boolean;
|
|
37
|
+
intermediate_curb?: boolean;
|
|
38
|
+
mapmatcher_radius?: number;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
}, mapToken?: string | null, speed?: number): RoutingEngineSettings;
|
|
42
|
+
//# sourceMappingURL=routing-engine-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing-engine-settings.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/types/simulation/routing-engine-settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC,CAAC,EAAE,OAAO,CAAC;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE;IACP,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE;QACR,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,uCAAuC,CAAC,EAAE,OAAO,CAAC;QAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH,EACD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,GAAE,MAAW,GACjB,qBAAqB,CAyBvB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.routingProfileToEngineSettings = routingProfileToEngineSettings;
|
|
4
|
+
/**
|
|
5
|
+
* Convert a RoutingProfile to RoutingEngineSettings for a vehicle
|
|
6
|
+
* @param profile - The routing profile from the API
|
|
7
|
+
* @param mapToken - Optional map token to use for the key field
|
|
8
|
+
* @param speed - Vehicle speed (defaults to 40)
|
|
9
|
+
* @returns RoutingEngineSettings object
|
|
10
|
+
*/
|
|
11
|
+
function routingProfileToEngineSettings(profile, mapToken, speed = 40) {
|
|
12
|
+
var _a;
|
|
13
|
+
const settings = {
|
|
14
|
+
key: mapToken || profile.settings.key,
|
|
15
|
+
url: profile.settings.url || profile.settings.asteria_map || null,
|
|
16
|
+
speed: speed,
|
|
17
|
+
time_factor: (_a = profile.settings.speed_factor) !== null && _a !== void 0 ? _a : 1,
|
|
18
|
+
road_network: profile.settings.road_network || profile.road_network,
|
|
19
|
+
make_depot_zero: false,
|
|
20
|
+
routing_engine_name: profile.routing_engine_name,
|
|
21
|
+
use_speed_in_routing: false,
|
|
22
|
+
profile: profile.settings.profile,
|
|
23
|
+
};
|
|
24
|
+
// Only add optional fields if they're defined
|
|
25
|
+
if (profile.settings.disable_curb_for_destination_navigation !== undefined) {
|
|
26
|
+
settings.disable_curb_for_destination_navigation = profile.settings.disable_curb_for_destination_navigation;
|
|
27
|
+
}
|
|
28
|
+
if (profile.settings.intermediate_curb !== undefined) {
|
|
29
|
+
settings.intermediate_curb = profile.settings.intermediate_curb;
|
|
30
|
+
}
|
|
31
|
+
if (profile.settings.mapmatcher_radius !== undefined) {
|
|
32
|
+
settings.mapmatcher_radius = profile.settings.mapmatcher_radius;
|
|
33
|
+
}
|
|
34
|
+
return settings;
|
|
35
|
+
}
|