Closed
Description
Description
Google OR-Tools is an open-source software suite that can solve optimization problems such as:
- Vehicle Routing
- Flows
- Integer and Linear Programming
- Constraint Programming
- Bin Packing
OR-Tools Bin Packing Category Functions:
vrp_knapsack
vrp_knapsack(
Weights_Costs SQL, capacity ANY-INTEGER, [, max_rows])
RETURNS SET OF
(item_id)
vrp_multiple_knapsack
vrp_multiple_knapsack(
Weights_Costs SQL, capacities ARRAY[ANY-INTEGER], [, max_rows])
RETURNS SET OF
(knapsack_number, item_id)
vrp_bin_packing
vrp_bin_packing(
Weights SQL, bin_capacity ANY-INTEGER, [, max_rows])
RETURNS SET OF
(bin_number, item_id)
Parameters:
vrp_knapsack
Parameter | Type | Description |
---|---|---|
Weights_Cost SQL | TEXT |
Weights_Cost SQL query describing the weight and cost of each item |
Capacity | ANY-INTEGER |
Maximum Capacity of the knapsack |
max_rows | ANY-INTEGER |
Maximum items(rows) to fetch from bin_packing_data table. Default = 100000 |
vrp_multiple_knapsack
Parameter | Type | Description |
---|---|---|
Weights_Cost SQL | TEXT |
Weights_Cost SQL query describing the weight and cost of each item |
Capacities | ARRAY[ANY-INTEGER] |
An Array describing maximum capacity of each knapsack |
max_rows | ANY-INTEGER |
Maximum items(rows) to fetch from bin_packing_data table. Default = 100000 |
vrp_bin_packing
Parameter | Type | Description |
---|---|---|
Weights SQL | TEXT |
Weights_Cost SQL query describing the weight of each item |
Bin_Capacity | ANY-INTEGER |
Maximum Capacity of Bin. |
max_rows | ANY-INTEGER |
Maximum items(rows) to fetch from bin_packing_data table. Default = 100000 |
Inner Query:
Weights_Cost SQL
Column | Type | Default | Description |
---|---|---|---|
id | ANY-INTEGER |
unique Identifier of the edge | |
weight | ANY-INTEGER |
weight of the item | |
cost | ANY-INTEGER |
cost of the item |
Weights SQL
Column | Type | Default | Description |
---|---|---|---|
id | ANY-INTEGER |
unique Identifier of the edge | |
weight | ANY-INTEGER |
weight of the item |
Where:
ANY-INTEGER
= SMALLINT, INTEGER, BIGINT
ANY-NUMERICAL
= SMALLINT, INTEGER, BIGINT, REAL, FLOAT
Result Columns:
vrp_knapsack
Column | Type | Description |
---|---|---|
item_id | ANY-INTEGER |
Integer to identify an item. |
vrp_multiple_knapsack
Column | Type | Description |
---|---|---|
item_id | ANY-INTEGER |
Integer to identify an item. |
knapsack_number | ANY-INTEGER |
Integer to identify knapsack. |
vrp_bin_packing
Column | Type | Description |
---|---|---|
item_id | ANY-INTEGER |
Integer to identify an item. |
bin_number | ANY-INTEGER |
Integer to identify bin. |