C++ Reference: class ResourceAssignmentOptimizer
Note: This documentation is automatically generated.
Method | |
---|---|
ComputeAssignmentCostsForVehicle | Return type: Arguments: Computes the vehicle-to-resource assignment costs for the given vehicle to all resources in the group, and sets these costs in assignment_costs (if non-null). optimize_vehicle_costs indicates if the costs should be optimized or if we merely care about feasibility (cost of 0) and infeasibility (cost of -1) of the assignments. The cumul and break values corresponding to the assignment of each resource are also set in cumul_values and break_values, if non-null. |
ComputeBestAssignmentCost | Return type: Arguments: Returns the cost resulting from the min-cost assignment of resources to
(used) vehicles, or -1 if the assignment is impossible.
For each vehicle v and resource r, the cost of assigning r to v is equal to
- primary_vehicle_to_resource_assignment_costs[v][r] if
primary_vehicle_to_resource_assignment_costs[v] is not empty,
- secondary_vehicle_to_resource_assignment_costs[v][r] otherwise
(secondary_vehicle_to_resource_assignment_costs[v] can never be empty).
If non-null, 'resource_indices' contains the index of the resource assigned
to each vehicle.
TODO(user): Return std::optional |
dimension | Return type: |
ResourceAssignmentOptimizer | Arguments: |