You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
optional(:preprocessing,type: Hash,desc: 'Parameters independent from the search')do
130
132
use:vrp_request_preprocessing
@@ -208,7 +210,7 @@ module VrpConfiguration
208
210
'Specifies the geometry structures to be returned. Can be a subset of `[polylines encoded_polylines partitions]` or a boolean value to output all or no geometry. Polylines and encoded_polylines are not compatible together.' :
209
211
'Specifies the geometry structures to be returned. Can be `partitions` to generate geometry structure for each partition or `true` for generating the geometry structure under each route.')
210
212
optional(:geometry_polyline,type: Boolean,documentation: {hidden: true},desc: '[DEPRECATED] Use geometry instead, with :polylines or :encoded_polylines')
211
-
optional(:intermediate_solutions,type: Boolean,desc: 'Return intermediate solutions if available')
213
+
optional(:intermediate_solutions,types: [String,Boolean],desc: 'Return intermediate solutions if available',coerce_with: ->(i){INTERMEDIATE_SOLUTION_VALUES.include?(i)})
212
214
optional(:csv,type: Boolean,desc: 'The output is a CSV file if you do not specify api format')
213
215
optional(:use_deprecated_csv_headers,type: Boolean,desc: 'Forces API to ignore provided language to return old CSV headers')
214
216
optional(:allow_empty_result,type: Boolean,desc: 'Allow no solution from the solver used')
expose:travel_distance,documentation: {type: Integer,desc: 'Travel distance from previous point (in m)'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
62
+
expose:travel_time,documentation: {type: Integer,desc: 'Travel time from previous point (in s)'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
63
+
expose:travel_value,documentation: {type: Integer,desc: 'Travel value from previous point'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
64
+
expose:waiting_time,documentation: {type: Integer,desc: 'Idle time (in s)'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
expose:type,documentation: {type: String,desc: 'depot, rest, service, pickup or delivery'}
75
-
expose:current_distance,documentation: {type: Integer,desc: 'Travel distance from route start to current point (in m)'}
75
+
expose:current_distance,documentation: {type: Integer,desc: 'Travel distance from route start to current point (in m)'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
76
76
expose:alternative,documentation: {type: Integer,desc: 'When one service has alternative activities, index of the chosen one'}
77
77
expose:visit_index,documentation: {type: Integer,desc: 'Index of the visit'}
78
78
end
@@ -89,8 +89,8 @@ class VrpResultSolutionRoute < Grape::Entity
89
89
expose:total_waiting_time,documentation: {type: Integer,desc: 'Sum of every idle time within the route (in s)'}
90
90
expose:start_time,documentation: {type: Integer,desc: 'Give the actual start time of the current route if provided by the solve'}
91
91
expose:end_time,documentation: {type: Integer,desc: 'Give the actual end time of the current route if provided by the solver'}
92
-
expose:geometry,documentation: {type: String,desc: 'Contains the geometry of the route, if asked in first place'}
93
-
expose:initial_loads,using: VrpResultDetailQuantities,documentation: {is_array: true,desc: 'Give the actual initial loads of the route'}
92
+
expose:geometry,documentation: {type: String,desc: 'Contains the geometry of the route, if asked in first place'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
93
+
expose:initial_loads,using: VrpResultDetailQuantities,documentation: {is_array: true,desc: 'Give the actual initial loads of the route'},if: lambda{ |instance,options| options[:detailed_solutions] == true}
94
94
expose:cost_details,using: VRPResultDetailedCosts,documentation: {desc: 'The impact of the current route within the solution cost'}
95
95
end
96
96
@@ -100,7 +100,7 @@ class VrpResultSolutionUnassigned < Grape::Entity
100
100
expose:pickup_shipment_id,expose_nil: false,documentation: {type: String,desc: 'Internal reference of the shipment'}
101
101
expose:delivery_shipment_id,expose_nil: false,documentation: {type: String,desc: 'Internal reference of the shipment'}
102
102
expose:rest_id,expose_nil: false,documentation: {type: String,desc: 'Internal reference of the rest'}
expose:type,documentation: {type: String,desc: 'depot, rest, service, pickup or delivery'}
105
105
expose:reason,documentation: {type: String,desc: 'Unassigned reason. Only available when activity was rejected within preprocessing fase or periodic first_solution_strategy.'}
0 commit comments