Currently, PUZZLE adds the parameter "Order.Processor" after the computation has been finished.
You should not expect that this parameters to remain. This parameter will be removed in a later release without further notification.
Component | Category | Description |
---|---|---|
Best-Fit Plugin 2.3.1 | Dependency | PUZZLE core version 49.1.0. |
Bug | PUZZLE does not add undocumented parameters to a job, with the exception of the parameter "Order.Processor". | |
Best-Fit Plugin 2.1.0 | Bug | PUZZLE adds undocumented parameters to the attribute parameters of the JSON representation of a job, after PUZZLE has computed solutions for this job. Resolved: PUZZLE now omit most of them. |
Dependency | PUZZLE core version 48.0.0. | |
Best-Fit Plugin 2.0.1 | Improvement | The Best-Fit Plugin offers its own REST API for clients. The Best-Fit REST API is largely identical to the PUZZLE REST API. |
Dependency | PUZZLE core version 47.0.0. |
This PUZZLE Plugin provides the Best-Fit optimization and a REST-API for the Best-Fit optimization. The Best-Fit REST API is largely identical to the PUZZLE REST API. Therefore, this document describes the differences to the PUZZLE REST API.
The introduction section describes the core idea of the PUZZLE REST API.
A PUZZLE Best-Fit optimization distributes all order items of a job to the required number of loading devices and finds the appropriate loading devices for the order by means of a Branch and Bound algorithm. PUZZLE can select the appropriate loading devices from the collection of loading devices specified in the loadingDevices
attribute of the job.
For a job, PUZZLE creates a collection of solutions, which contains a solution for each required loading device. Those solutions consists of the required loading device together with the positions of the order items packed onto the required loading device. For each order item that fits into at least one loading device, the collection of solutions of a job contains the order item in the quantity specified in the order of the job.
For a Best-Fit optimization, PUZZLE minimizes the number of loading devices required as the main criterion and maximizes the volume utilization of the loads onto the loading devices as the secondary criterion, which is far less important. Currently, a client cannot customize these criteria.
The Best-Fit REST API uses the same data objects as the PUZZLE REST API.
PUZZLE ignores the parameter Search.SolutionCount
for a Best-Fit optimization and always returns exactly one collection of loads for a job.
The Best-Fit REST API uses the same state machine as the PUZZLE REST API, only with a Best-Fit specific prefix to the urls.
The Best-Fit REST API supports the same plugins as the PUZZLE REST API.
The Best-Fit REST API has the same errors and error handling as the PUZZLE REST API
This section describes all available HTTP endpoints of the Best-Fit REST API. For each endpoint, this documentation contains an interactive representation of the structure of the request body schema and the response schema below the endpoint description. In addition, the right column contains request and response samples for these structures.
In order to facilitate understanding, the following scenario is included as example.
For a Best-Fit optimization, PUZZLE will compute a collection of loads required to distribute an order consisting of 5 tablets and 5 usb power supplies. For each load, PUZZLE can select between an off-the-shelf FEFCO 0201 carton and a customized carton in which exactly one tablet fits.
The same behavior as for POST /jobs.
PUZZLE considers considers all loading devices in a job for a Best-Fit optimization.
job required | object |
Job is successful created.
Location | string <uri> The uri of the newly created job. |
jobId required | integer <int64> >= 1 Identifier created by PUZZLE for a created a job. PUZZLE creates always returns a positive integer. |
PUZZLE cannot parse the JSON in the request body.
An unexpected error (an unhandled exception) occurred in PUZZLE.
The same behavior as for POST /jobs/{jobId}/metadata.
jobId required | integer <int64> >= 1 The Id of the job. |
PUZZLE returns the metadata
jobId required | integer <int64> >= 1 Identifier created by PUZZLE for a created a job. PUZZLE creates always returns a positive integer. |
state required | string Enum:"CREATED" "VALID" "SUBMITTED" "DONE" "DELETED" |
lastUseTimestamp required | string Timestamp of the last access to the job. Format is YYYY-MM-DDTHH:MM:SSZ (according to RFC 3339) |
expirationTimestamp required | string String containing the time at which PUZZLE automatically deletes this job if the job is not used before the expirationTimestamp. Format is YYYY-MM-DDTHH:MM:SSZ (according to RFC 3339). PUZZLE does not automatically delete a job in state SUBMITTED. If a job has state SUBMITTED, its expirationTimestamp is set to the empty string (""). |
timeIntervalUntilExpiration | integer <int64> Time interval between the current time and the expiration timestamp time in seconds. |
orderNumber required | string Order number of the job as specified by the client. |
errorOccurred | boolean Flag indicating whether an error occurred during the computation of solutions by PUZZLE (during the transition from state SUBMITTED to DONE). PUZZLE sets the flag to false if no error occurred, otherwise to false. |
errorMessage | string The message of the error occurred during the computation of solutions by PUZZLE If no error occurred, this attribute is set to the empty string. |
There does not exist a job with the given jobId
.
An unexpected error (an unhandled exception) occurred in PUZZLE.
The same behavior as for POST /jobs/{jobId}/validation.
jobId required | integer <int64> >= 1 The Id of the job. |
language | string Example: "en" The language of the validation messages. A client can specify the language with IETF language tags. If not specified, the system setting language is used. Currently supported languages are German (de) and English (en). |
no error.
isValid required | boolean Flag that indicates if the job is valid. PUZZLE sets the flag to true if a job is valid, otherwise to false. |
validationMessages | Array of string Array of constraints violation messages. If a job is valid, this array is empty. |
There does not exist a job with the given jobId
.
An error occurred.
The same behavior as for POST /jobs/{jobId}/computation.
jobId required | integer <int64> >= 1 The Id of the job. |
PUZZLE has successfully accepted the request for Best-Fit computation.
There does not exist a job with the given jobId
.
An error occurred.
The same behavior as for DEL /jobs/{jobId}/computation.
jobId required | integer <int64> >= 1 The Id of the job. |
Successfully aborted computation.
There does not exist a job with the given jobId
.
An error occurred.
The same behavior as for GET /jobs/{jobId}/summaries.
jobId required | integer <int64> >= 1 The Id of the job. |
Successfully created summaries for all solutions of the job.
solutionId | integer Unique identifier of the Solution. Generated by PUZZLE. A positive integer. |
length | integer >= 0 Length of the bounding box that encloses all positioned order items in millimeters. |
width | integer >= 0 Width of the bounding box that encloses all positioned order items in millimeters. |
height | integer >= 0 Height of the bounding box that encloses all positioned order items in millimeters. |
weight | integer >= 0 Sum of the weight of all positioned order items in grams. |
volume | integer <int64> >= 0 Sum of the volume of all positioned order items in cubic millimeters (mm^3). |
numberOfPositionedItems | integer >= 0 Number of order items that are placed on the loading device. Not number of distinct order items in the solution. |
weightUtilization | integer [ 0 .. 100 ] The ratio of the sum of weights of positioned order items (equal to the weight field) to the maximum possible weight of the loading device, in percent (integer in range [0,100]). |
volumeUtilization | integer [ 0 .. 100 ] The ratio of the sum of volumes of positioned order items (equal to the volume field) to the maximum possible volume of the loading device, in percent (integer in range [0,100]). |
packDensity | integer [ 0 .. 100 ] The ratio of the sum of volumes of positioned order items (equal to the volume field) to the volume of the bounding box that encloses all positioned order items, in percent (integer in the range [0,100]). |
loadingDeviceNumber | string The number of the loading device used in this solution. If PUZZLE has not assigned a |
There does not exist a job with the given jobId
.
An error occurred.
The same behavior as for GET /jobs/{jobId}/picklists.
jobId required | integer <int64> >= 1 The Id of the job. |
Successfully created picklists for all solutions of the job.
solutionId | integer Unique identifier of the Solution. Generated by PUZZLE. A positive integer. |
loadingDeviceNumber | string The number of the loading device used in this solution. If PUZZLE has not assigned a |
picklist | Array of object |
There does not exist a job with the given jobId
.
An error in PUZZLE occurred. This includes error messages containing the wrong state of the job.
The same behavior as for GET /jobs/{jobId}.
jobId required | integer <int64> >= 1 The Id of the job. |
Successful creation of the JSON representation of the job
parameters required | object Hash map of the parameters used by PUZZLE. PUZZLE uses default values for each parameter. A client can override any default value by explicitly setting a parameter value. Setting undocumented parameters may result in undefined behavior. |
order required | object Order that is to be palletized on a pallet or packed in a box. |
loadingDevices required | Array of object The loading devices on which PUZZLE is to palletize or pack the order. |
extension | object Extension provides a hash map for additional data for the client and PUZZLE. Keys and values must be strings. PUZZLE uses extension itself, so it is highly recommended to use a client specific prefix for extension keys. |
solutions | Array of object |
There does not exist a job with the given jobId
.
An error in PUZZLE occurred. This includes error messages containing the wrong state of the job.
The same behavior as for PUT /jobs/{jobId}.
jobId required | integer <int64> >= 1 The Id of the job. |
job required | object |
Update was successful
PUZZLE cannot parse the JSON in the request body.
There does not exist a job with the given jobId
.
An error in PUZZLE occurred. This includes error messages containing the wrong state of the job.
The same behavior as for DEL /jobs/{jobId}.
jobId required | integer <int64> >= 1 The Id of the job. |
PUZZLE has successfully deleted the job.
There does not exist a job with the given jobId
.
An error in PUZZLE occurred. This includes error messages containing the wrong state of the job.
The same behavior as for GET /jobs/{jobId}/prolong.
jobId required | integer <int64> >= 1 The Id of the job. |
Prolongation was successful
There does not exist a job with the given jobId
.
An error in PUZZLE occurred. This includes error messages containing the wrong state of the job.