Scheduling Input JSON with Work Order Dependency Handling
This API sends all the input required for optimization in an environment where the work order dependency feature is enabled.
For information about the Dependency Scheduling feature, see Working with Dependency Scheduling.
* 
Information about dependencies is passed within the WorkOrders wrapper of the input JSON, in the relations segment. This is because the dependencies are primarily driven in terms of work orders. The dependency is always between two or more work orders.
Endpoint
https://<hostname>:<port>/optimax/scheduling/v1/batch/optimize
Sample Input Data
{
"workOrders": [
{
"workOrderId": "WO-00305986",
"geoLocation": {
"latitude": "39.24876022338867",
"longitude": "-94.90394592285156"

},
"accessHours": [
{
"begin": "2020-03-19T09:00:00Z",
"end": "2020-03-19T18:00:00Z"

},
{
"begin": "2020-03-20T09:00:00Z",
"end": "2020-03-20T18:00:00Z"

},
{
"begin": "2020-03-21T09:00:00Z",
"end": "2020-03-21T18:00:00Z"

},
{
"begin": "2020-03-23T09:00:00Z",
"end": "2020-03-23T18:00:00Z"

}

],
"address": "Kansas, 66043, United States",
"importance": "5",
"serviceDuration": "PT1H",
"relations": [
{
"relatedNodeId": "WO-00305987",
"resourceDependencyType": "SAMERESOURCE",
"relationshipType": "FINISHSTART"

}

]

},
{
"workOrderId": "WO-00305987",
"geoLocation": {
"latitude": "39.24876022338867",
"longitude": "-94.90394592285156"

},
"accessHours": [
{
"begin": "2020-03-19T09:00:00Z",
"end": "2020-03-19T18:00:00Z"

},
{
"begin": "2020-03-20T09:00:00Z",
"end": "2020-03-20T18:00:00Z"

},
{
"begin": "2020-03-21T09:00:00Z",
"end": "2020-03-21T18:00:00Z"

},
{
"begin": "2020-03-23T09:00:00Z",
"end": "2020-03-23T18:00:00Z"

}

],
"address": "Kansas, 66043, United States",
"importance": "5",
"serviceDuration": "PT1H"

}

],
"resources": [
{
"resourceId": "Tech1",
"fixedCost": "0.0",
"hourlyCost": "60.0",
"travelUnitCost": "0.621371192",
"workingHours": [
{
"begin": "2020-03-19T09:00:00Z",
"end": "2020-03-19T18:00:00Z"

},
{
"begin": "2020-03-20T09:00:00Z",
"end": "2020-03-20T18:00:00Z"

},
{
"begin": "2020-03-21T09:00:00Z",
"end": "2020-03-21T18:00:00Z"

},
{
"begin": "2020-03-23T09:00:00Z",
"end": "2020-03-23T18:00:00Z"

}

],
"geoLocation": {
"latitude": "39.2905387878418",
"longitude": "-94.83391571044922"

},
"address": "Kansas, 64028, United States",
"maxDistance": "1609.344 km",
"avgTravelSpeed": "22 m/s"

},
{
"resourceId": "Tech2",
"fixedCost": "0.0",
"hourlyCost": "60.0",
"travelUnitCost": "0.621371192",
"workingHours": [
{
"begin": "2020-03-19T09:00:00Z",
"end": "2020-03-19T18:00:00Z"

},
{
"begin": "2020-03-20T09:00:00Z",
"end": "2020-03-20T18:00:00Z"

},
{
"begin": "2020-03-21T09:00:00Z",
"end": "2020-03-21T18:00:00Z"

},
{
"begin": "2020-03-23T09:00:00Z",
"end": "2020-03-23T18:00:00Z"

}

],
"geoLocation": {
"latitude": "39.2905387878418",
"longitude": "-94.83391571044922"

},
"address": "Kansas, 64028, United States",
"maxDistance": "1609.344 km",
"avgTravelSpeed": "22 m/s"

}

]
}
Input Description
See the Sample Input Data for examples.
Input Type
Field
Mandatory / Optional?
Description
Default Value / Example
relations (in the workOrders wrapper of the input JSON)
* 
This input should be in pairs of these fields.
relationshipType
Mandatory if resourceDependencyType has not been provided.
Type of time dependency you want to enforce between two or more work orders.
Possible values are: FINISHSTART, STARTSTART, FINISHFINISH, STARTFINISH, FINISHUNISON, STARTUNISON, NONE
Note: The value cannot be NONE if the value in the resourceDependencyType field is NONE.
relatedNodeId
Mandatory
Work order number of the work order with which dependency is being set.
resourceDependencyType
Mandatory if relationshipType is not provided.
Type of resource dependency you want to enforce between two or more work orders.
Possible values are: SAMERESOURCE, DIFFERENTRESOURCE, NONE
Note:
1. The value cannot be NONE if the value in the relationshipType field is NONE.
2. SAMERESOURCE is not allowed in case relationshipType is STARTFINISH, FINISHUNISON, or STARTUNISON.
minBuffer
Optional
The minimum time buffer from which the time dependency needs to be met.
Format: PT<h>H<m>M<s>S
Note: Applicable only for the time dependency group. The default value is 0 seconds.
Example: “PT5M”
Note: If the relationshipType value is FINISHUNISON or STARTUNISON, minBuffer value will not be considered even if provided.
maxBuffer
Optional
The maximum time buffer up to which the time dependency needs to be met.
Format: PT<h>H<m>M<s>S
Note: Applicable only for the time dependency group. The default value is 365 days.
Example: “PT1H”
Scheduling Response JSON
The response to the scheduling input JSON with work order dependency is the same as the Scheduling Response JSON for the batch optimization request JSON, but with dependencies specified in scheduling input JSON honored.
Error Codes and Messages
For the list of error codes and messages, see Error Codes and Messages.
Was this helpful?