PUZZLE KPI interface (4.0.0)

Download OpenAPI specification:Download

Changelog

Component Category Description Date
KPI Plugin 4.0.0 Changed PUZZLE core version ${puzzle-core.version}.
Change Removed episode KPIs from documentation as these are no longer unsupported 2022-08-04
Added Provided documentation for KPIs Layer.Height and EuroNormPallet.Equivalent. 2022-08-03
KPI Plugin 3.0.0 Fixed Client can now request all documented kpi fields, without getting a Jackson parsing error
Changed Updated list of supported kpi fields. Some fields are not available and some are renamed, please consult the table below for available fields. [Breaking Change]
Changed PUZZLE core version 47.0.0.

Description

Plugin for PUZZLE, which allows a client to retrieve key performances indices (KPIs) for solutions of a job.

A client specifies the jobId and which KPIs PUZZLE should compute. PUZZLE computes the specified KPI for each solution of the job and provide the value for the specified KPI a string.

You can request PUZZLE to compute the following key performance indices:

Field Description Value Range
ordername Name of the order of the job.
state count Quantity of positions of the solution. Non-negative integer
timestamp Timestamp of the current time
group count Quantity of distinct groups in the job Non-negative integer
groups List of all distinct groups in the job Non-negative integer
orderlines Quantity of order lines in the job Non-negative integer
placements The quantity of positions in the solution Non-negative integer
remaining The sum of all quantity attribute values of all entries in the remainder array of the solution. Non-negative integer
local search time The time PUZZLE spent calculating the solution, given in seconds.
Load.Stability Load.Stability measure the average stability of all order items in the Solution. Integer from [0;100]
Load.Weight Total weight of all order items in the load of the solution. Non-negative integer
Load.PackDensity The ratio of Load.NetVolume and the volume of the bounding box of all items in percent Integer from [0;100]
Load.Height Total load height (height of the bounding box of all placements in the solution) Non-negative integer
Load.NetVolume Total volume of all order items in the load of the solution Non-negative integer
Load.VolumeUtilization The ratio of Load.NetVolume and the maximum possible volume in percent Integer from [0;100]
Load.WeightUtilization The ratio of Load.Weight and the attribute maxLoadWeight of the loading device of the solution in percent Integer from [0;100]
Article.Coherence Article coherence measures how far apart order items of the same order line are placed. The closer the value is to 100, the closer the order items of the same order line are to each other. Integer from [0;100]
Group.Coherence Group.Coherence measures how faw apart items of the same group are placed. The closer the value is to 10000, the closer the order items of the same group are to each other. Integer from [0;10000]
Pattern.Count Only use for DEBUG purpose.
Layer.Height Height of the base layer of the load. Will return -1 if the base of the load includes packages with different top height values Positive integer or -1
EuroNormPallet.Equivalent

/kpis/{jobId}

Precondition: the state of the job is DONE.

Retrieve the key performances indices for the job specified by the jobId.

Returns the key performances indices specified in the request attribute fields. The response consists of an array with one object per solution containing the solutionId and each specified key performances index (KPI) as attribute. If PUZZLE can compute a KPI, the value of attribute corresponding to a KPI contains the computed KPI value given as string, or the empty string if PUZZLE cannot compute a value for a KPI. PUZZLE returns with HTTP status code 200.

If PUZZLE cannot parse the JSON in the request body, it returns with HTTP status code 400 and a JSON object. The JSON object encodes a parsing error (see section error and response samples with HTTP status code 400).

If you specify an unknown jobId, PUZZLE returns HTTP status code 404 (see 404 response samples).

If the job does not have the states expected in the precondition, PUZZLE returns an error and HTTP status code 500 (see response samples for 500).

path Parameters
jobId
required
integer <int64> >= 1

The Id of the job.

Request Body schema: application/json
fields
required
Array of strings (KPIFields)

Array of KPIs that PUZZLE shall compute and return for each solution of the job.

Responses

Request samples

Content type
application/json
{
  • "fields": [
    ]
}

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    }
]