Optimization - v1

Description

This service is to run computation for optimization by specifying optimization parameters and the algorithm to be used.

Input

  1. apiKey: In order to obtain your API KEY, first log into logvrp web application and click "Manage API Key" button.
  2. computationTicketID: You will get this using Ticket service.
  3. computationParameters: This parameters are used in optimization. If set to null, then the parameters that are saved in your account will be used.
    1. userID: User ID
    2. avoidRegions: Not used for now. In the following releases...
    3. currencyID: Currency Unit ID. Known values: 1-USD, 2-EUR, 3-GBP, 4-CAD, 5-AUD, 6-JPY, 7-INR, 8-TRY, 0-OTHER
    4. distanceUnitID: Distance Unit ID. Known values: 1-Km, 2-Mile
    5. optimizationGoal: Optimization Goal. Available values: 0-Balance, 1-Cost, 2-Distance, 3-TotalTime, 4-RouteCount 5-VehicleDecision
    6. useCFDinAlg: Whether to use crow fly distance in computation. true or false.
    7. splitDeliveryPickupVehicles: Split delivery pickup vehicles. true or false.
    8. avoidHighways: Avoid Highways. true or false.
    9. avoidTolls: Avoid Tolls. true or false.
    10. vehicleEndOfDayLocation: Vehicle end of day location. Known values: 1-None, 2-StartingStation, 3-StoppingStation
    11. visitStationsOnce: Visit station once. true or false
    12. partitionByLocations: If set true, the stops are clustered by smaller groups based on their locations.
    13. allowDepotRevisitBySameVehicle: If set true, then the vehicle can return to depot and process other routes. Like round-trip.
    14. maxDistancePerROute: Maximum distance per route. A non-negative number. If set to 0, it will not be considered.
    15. maxContinuousRideTime: Max continuous ride time. A non-negative value. If set to 0, it will not be considered.
      1. hour
      2. minute
    16. maxWorkTimeInDay: Max work time in a day. A non-negative value. If set to 0, it will not be considered.
      1. hour
      2. minute
    17. minPauseTime: Minimum pause time. A non-negative value. If set to 0, it will not be considered.
      1. hour
      2. minute
    18. maxNumberOfRoutes: Maximum number of routes. A non-negative value. If set to 0, it will not be considered.
    19. maxRouteDuration: Maximum route duration. A non-negative value. If set to 0, it will not be considered.
      1. day
      2. hour
      3. minute
    20. maxStopsPerRoute: Maximum stops per route. A non-negative value. If set to 0, it will not be considered.
    21. availableHoursList: Available hours list
      1. weeklyWorkingTime: Weekly working time. This parameter is an array of 7 daily working hours from Monday to Sunday. A daily working hour consists of:
        1. P1: Period 1 of day. Non-negative values. If set to 0, it will not be considered.
          1. start
            1. hour
            2. minute
          2. end
            1. hour
            2. minute
        2. P2: Period 2 of day. Non-negative values. If set to 0, it will not be considered.
          1. start
            1. hour
            2. minute
          2. end
            1. hour
            2. minute
      2. holidays: The days of holidays. This parameter is an array of holiday objects. A holiday object contains the following:
        1. SD: Start Date. A string in the format, "\/Date( t ) \/", where t is the Unix epoch.
        2. ED: End Data. A string in the format, "\/Date( t ) \/", where t is the Unix epoch.
  4. algorithmID: Algorithm ID that will be used for the optimization. Available values: 1-Modified Jan Dethloff's Alg., 2-Modified Adaptive Largescale Neighbourhood Search

Output

Data: An integer that specifies how much time approximately the optimization will work as seconds. You need to wait until that much time seconds elapses, before getting the result via "Result" service.
Message: Output message
ReturnCode: Return code of the output. If "Success" is true, then check this value.
Success: If unpected errors, or exceptions occur, this will be false.
success: Same as Success

REST - JSON

URL
Input
Body
{
"apiKey": "your API key here",
"computationTicketID": "your computation ticket ID here",
"computationParameters": {
"userID": 0,
"avoidRegions": null,
"currencyID": 1,
"distanceUnitID": 1,
"optimizationGoal": 1,
"useCFDinAlg": false,
"splitDeliveryPickupVehicles": false,
"avoidHighways": false,
"avoidTolls": false,
"vehicleEndOfDayLocation": 1,
"visitStationsOnce": true,
"partitionByLocations": true,
"allowDepotRevisitBySameVehicle": false,
"maxDistancePerRoute": "0",
"maxContinuousRideTime": {
"hour": "0",
"minute": "0"
},
"maxWorkTimeInDay": {
"hour": "0",
"minute": "0"
},
"minPauseTime": {
"hour": "0",
"minute": "0"
},
"maxNumberOfRoutes": "0",
"maxRouteDuration": {
"day": "0",
"hour": "0",
"minute": "0"
},
"maxStopsPerRoute": "0",
"availableHoursList": {
"weeklyWorkingTime": [
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
},
{
"P1": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
},
"P2": {
"start": {
"hour": "00",
"minute": "00"
},
"end": {
"hour": "00",
"minute": "00"
}
}
}
],
"holidays": [
]
}
},
"algorithmID": 1
}
Headers
Content-Type: application/json

Method:

POST
Output
Response
{
"Data": 261,
"Message": null,
"ReturnCode": 0,
"Success": true,
"success": true
}