Description: Creates a new optimization job which receives a set of tasks with corresponding locations and other some configurations and returns the corresponding job id. Since the optimization job takes more than 10s to run (api timeout), the optimization result must be obtained asynchronously through the Get Optimization Result endpoint.
Host: https://api.gowizi.com
Path: /optimization
POST
x-api-key=[string]
organizationId type: string. Mandatory. The identifier of the Organization submitting the optimization request.criteria type: string. Options: duration or distance. Default: duration. The optimization criteria, corresponding to the quantity that is minimized in the optimization.pickupFixedDuration type: integer. Unit: minutes. Default: 5. The duration each pickup will invariably take.pickupVariableDuration type: integer. Unit: minutes. Default: 1. The marginal duration that each delivery will add to the pickup duration. The total pickup duration for pickup i will be: pickupFixedDuration + (nr of deliveries served by pickup i) * pickupVariableDuration. This parameter can be set to 0 to make the pickup time independent of the number of deliveries per pickup.deliveryDuration type: integer. Unit: minutes. Default: 7. The time each delivery will take to be completed once the driver arrives to the delivery location.maxDurationPerRoute type: integer. Optional. Unit: minutes. Constraint on the maximum duration that a route can take. Route duration calculation already considers the delivery and pickup duration parameters. If no value is passed, the maximum duration constraint is not applied.maxDistancePerRoute type: integer. Optional. Unit: meters. Constraint on the maximum distance that a route can take. If no value is passed, the maximum distance constraint is not applied.maxCapacityPerVehicle type: integer. Optional. Unit: quantity, volume, weight, etc. Constraint on the maximum capacity that each vehicle can carry. The unit is not fixed, as it depends directly on the load parameters passed in the tasks. If this is not set, nor a fleet parameter with respective capacity's per vehicle, the capacity constraint will be ignored even if there are loads set on the tasks.fleet Optional. Defines a fleet of vehicles used to solve the problem. This parameter will be used to set a different capacity per vehicle. When a fleet is passed, the optimization result assigns the vehicle id’s to the respective routes. If this is passed, the maxCapacityPerVehicle parameter will be ignored. Even when setting a fleet, the algorithm can still use more vehicles than the ones in the fleet unless a fixNVehicles parameter is set. Check maxVehicles and fixNVehicles for more details.
vehicle]. Each vehicle object with the following attributes:
id type: string. The unique identifier of this vehicle.capacity type: integer. Unit: quantity, volume, weight, etc. Constraint on the maximum capacity that this vehicle can carry. The unit is not fixed, as it depends directly on the load parameters passed in the tasks.startTime type: float. Optional. Unit: minutes. Minutes from the start of the day. This defines when the vehicle can start operating. It can be used to set a different starting time for each vehicle.startLocation type: object. Optional. vehicle start location coordinates. It can be used to set a different starting location for each vehicle. **Attributes:
lat type: double. The latitude of the vehicle start location***.***lng type: double. The longitude of the vehicle start location.maxVehicles type: integer. Optional. Default: 100. Sets up to how many vehicles can be considered to solve the problem. The optimization algorithm always minimizes the number of vehicles used. The final number of vehicles used is not bounded by the number of vehicles in the fleet. In case more vehicles are needed, extra vehicles will be added assuming the capacity equal to the minimum capacity of the vehicles in the fleet. To really fix the number of vehicles, see fixNVehicles