The order fulfillment app is available in one modeling language as a Mixed Integer Problem (MIP). You can also choose to make customizations to the model by instantiating the app first.
- Nextmv SDK
- Default solver:
HiGHS - Marketplace subscription app IDs
- Go:
nextmv-order.fulfill.gosdk
- Go:
- Default solver:
Once you have the code locally, you can customize the model, run it locally and deploy it to Nextmv Platform.
Input
The input schema is a JSON payload defining the items, distribution centers, carrier capacities, and carrier delivery costs . Nextmv's tools are designed to operate directly on business data (in JSON) to produce decisions that are actionable by software systems. This makes decisions more interpretable and easier to test. It also makes integration with data warehouses and business intelligence platforms significantly easier. An input contains the following components:
| Field name | Required | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
carton_volume | Yes | float | NA | The volume of a carton. | {"carton_volume": 2.0} |
items | Yes | array of item | NA | The items which need to be fulfilled. | See item |
distribution_centers | Yes | array of distribution_center | NA | The distribution centers available. | {"depot": 0} |
carrier_capacities | Yes | map of string to map of string to float | NA | The capacities of each distribution center and carrier combination. | {"carrier_capacites": {"distribution_center_1": "carrier1": 10.0, "carrier2": 25.0}} |
carrier_delivery_costs | Yes | map of string to map of string to map of string to array of float | NA | The cost of each carrier and distribution center combination by weight tier. | {"carrier_delivery_costs": "distribution_center_1": {"carrier1": {"weight_tiers": [2,3], "weight_rate": [1.2, 3.4]}}} |
Item
| Field name | Required | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
item_id | Yes | string | NA | The ID of the item. | {"item_id": "book"} |
quantity | Yes | float | NA | The quantity needed of the item. | {"quantity": 5} |
unit_volume | Yes | float | NA | The volume per unit of item. | {"unit_volume": 0.1} |
unit_weight | Yes | float | NA | The quantity needed of the item. | {"unit_weight": 0.6} |
Distribution center
| Field name | Required | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
distribution_center_id | Yes | string | NA | The ID of the distribution center. | {"distribution_center_id": "distribution_center_1"} |
handling_cost | Yes | float | NA | The handling cost at the distribution center. | {"handling_cost": 1} |
inventory | Yes | map | NA | The inventory of each item available at the distribution center. | {"inventory": {"book": 8, "sneaker": 5}} |
Here you can find a sample .json with the input schema:
Output
The output schema defines the solution to the order fulfillment problem in JSON format. The output schema contains the following components.
| Field name | Always present | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
solutions | Yes | array of solution | NA | Solutions to the order fulfillment problem. | {"solutions": []} |
statistics | Yes | statistics | NA | Summary statistics of the solution. | {"statistics": {"total_cost": 123}} |
Solution
| Field name | Always present | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
assignments | Yes | array of assignment | NA | Solution to the order fulfillment problem | See assignment |
Assignment
| Field name | Always present | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
item_id | Yes | string | NA | ID of the item. | {"item_id": "book"} |
quantity | Yes | int | NA | Quantity of the items in the assignment. | {"quantity": 1} |
distribution_center_id | Yes | string | NA | ID of the distribution center. | {"distribution_center_id": "distribution_center_2"} |
carrier_id | Yes | string | NA | ID of the carrier. | {"carrier_id": "carrier1"} |
Statistics
| Field name | Always present | Data type | SI Unit | Description | Example |
|---|---|---|---|---|---|
result | No | result | NA | Final result of the solutions. | See result |
run | Yes | run | NA | Information about the run. | See run |
schema | Yes | string | NA | Schema of the statistics. | {"schema": "v1"} |
Here you can find additional definitions used in the statistics schema:
resultField name Always present Data type SI Unit Description Example durationYes floatsecondsTime duration to get to the final result. {"duration": 0.123}valueYes floatNA Value of the final result. {"value": 0.123}customYes anyNA Custom solver metrics. See customrunField name Always present Data type SI Unit Description Example durationYes floatsecondsTime duration of the run. {"duration": 0.123}customField name Always present Data type SI Unit Description Example constraintsYes intNA Number of constraints. {"constraints": 123}providerYes stringNA Solver provider. {"provider": "highs"}statusYes stringNA Solver status. {"status": "optimal"}variablesYes intNA Number of variables. {"variables": 123}
Run options
These are the default options that are available with routing without constraints.