API Reference
Technical reference for every public class and function in grid. For a guided introduction to the modelling style, see the Quickstart and the User Guide.
Modelling Elements
The four core entities used to describe a problem instance on the routing graph. Native features are configured via their constructor parameters and attributes (e.g. node demands, vehicle capacities, time windows); see each class for the full list, and Native Features for a guided overview.
|
High-level model of a Vehicle Routing Problem. |
|
Vertex of the routing graph, representing a customer, depot, or stop. |
|
Directed arc of the routing graph between two |
|
Definition of a homogeneous group of vehicles sharing the same parameters. |
Variables
User-defined variables declared on a VehicleType (via
VehicleType.add_integer_var(), VehicleType.add_float_var(),
VehicleType.add_nodes_set_var()) or globally on a
RoutingModel. Combined with Python operators and the functions
below, they enable the custom features described in
Custom Features.
|
Decision variable of the model. |
|
Set-valued decision variable, with elements from the node-id universe. |
Functions
Free functions used to build expressions in cases where Python operators do not suffice: element-wise maximum and minimum over a list, square root, logarithm, and indexing into an array constant.
|
Return an expression evaluating to the element-wise maximum of inputs. |
|
Return an expression evaluating to the element-wise minimum of inputs. |
|
Return an expression evaluating to the square root of |
|
Return an expression evaluating to a logarithm. |
|
Return an expression indexing an array expression at a key. |