Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | Attributes |
class | Resource |
Public Member Functions | |
ResourceGroup (long cPtr, boolean cMemoryOwn) | |
synchronized void | delete () |
int | AddResource (RoutingModel.ResourceGroup.Attributes attributes, RoutingDimension dimension) |
void | NotifyVehicleRequiresAResource (int vehicle) |
int[] | GetVehiclesRequiringAResource () |
boolean | VehicleRequiresAResource (int vehicle) |
void | SetAllowedResourcesForVehicle (int vehicle, int[] allowed_resource_indices) |
void | ClearAllowedResourcesForVehicle (int vehicle) |
SWIGTYPE_p_absl__flat_hash_setT_int_t | GetResourcesMarkedAllowedForVehicle (int vehicle) |
boolean | IsResourceAllowedForVehicle (int resource, int vehicle) |
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t | GetResources () |
RoutingModel.ResourceGroup.Resource | GetResource (int resource_index) |
SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t | GetAffectedDimensionIndices () |
int | GetResourceClassesCount () |
int[] | GetResourceIndicesInClass (int resource_class) |
SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t | GetResourceIndicesPerClass () |
int | GetResourceClassIndex (int resource_index) |
int | Size () |
int | Index () |
Static Public Member Functions | |
static long | getCPtr (ResourceGroup obj) |
static long | swigRelease (ResourceGroup obj) |
Protected Member Functions | |
void | finalize () |
Protected Attributes | |
transient boolean | swigCMemOwn |
A ResourceGroup defines a set of available Resources with attributes on
one or multiple dimensions.
For every ResourceGroup in the model, each (used) vehicle in the solution
which requires a resource (see NotifyVehicleRequiresResource()) from this
group must be assigned to exactly 1 resource, and each resource can in
turn be assigned to at most 1 vehicle requiring it. This
vehicle-to-resource assignment will apply the corresponding Attributes to
the dimensions affected by the resource group. NOTE: As of 2021/07, each
ResourceGroup can only affect a single RoutingDimension at a time, i.e.
all Resources in a group must apply attributes to the same single
dimension.
Definition at line 219 of file RoutingModel.java.
com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.ResourceGroup | ( | long | cPtr, |
boolean | cMemoryOwn ) |
Definition at line 223 of file RoutingModel.java.
int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.AddResource | ( | RoutingModel.ResourceGroup.Attributes | attributes, |
RoutingDimension | dimension ) |
Adds a Resource with the given attributes for the corresponding
dimension. Returns the index of the added resource in resources_.
Definition at line 373 of file RoutingModel.java.
void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.ClearAllowedResourcesForVehicle | ( | int | vehicle | ) |
Definition at line 398 of file RoutingModel.java.
synchronized void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.delete | ( | ) |
Definition at line 249 of file RoutingModel.java.
|
protected |
Definition at line 245 of file RoutingModel.java.
SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetAffectedDimensionIndices | ( | ) |
Definition at line 418 of file RoutingModel.java.
|
static |
Definition at line 228 of file RoutingModel.java.
RoutingModel.ResourceGroup.Resource com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResource | ( | int | resource_index | ) |
Definition at line 414 of file RoutingModel.java.
int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceClassesCount | ( | ) |
Definition at line 422 of file RoutingModel.java.
int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceClassIndex | ( | int | resource_index | ) |
Definition at line 434 of file RoutingModel.java.
int[] com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceIndicesInClass | ( | int | resource_class | ) |
Definition at line 426 of file RoutingModel.java.
SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceIndicesPerClass | ( | ) |
Definition at line 430 of file RoutingModel.java.
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResources | ( | ) |
Definition at line 410 of file RoutingModel.java.
SWIGTYPE_p_absl__flat_hash_setT_int_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourcesMarkedAllowedForVehicle | ( | int | vehicle | ) |
Definition at line 402 of file RoutingModel.java.
int[] com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetVehiclesRequiringAResource | ( | ) |
Definition at line 386 of file RoutingModel.java.
int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.Index | ( | ) |
Definition at line 442 of file RoutingModel.java.
boolean com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.IsResourceAllowedForVehicle | ( | int | resource, |
int | vehicle ) |
Definition at line 406 of file RoutingModel.java.
void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.NotifyVehicleRequiresAResource | ( | int | vehicle | ) |
Notifies that the given vehicle index requires a resource from this
group if the vehicle is used (i.e. if its route is non-empty or
vehicle_used_when_empty_[vehicle] is true).
Definition at line 382 of file RoutingModel.java.
void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.SetAllowedResourcesForVehicle | ( | int | vehicle, |
int[] | allowed_resource_indices ) |
Definition at line 394 of file RoutingModel.java.
int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.Size | ( | ) |
Definition at line 438 of file RoutingModel.java.
|
static |
Definition at line 232 of file RoutingModel.java.
boolean com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.VehicleRequiresAResource | ( | int | vehicle | ) |
Definition at line 390 of file RoutingModel.java.
|
protected |
Definition at line 221 of file RoutingModel.java.