Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.RoutingModel.ResourceGroup Class Reference

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)
 
RoutingModel.ResourceGroup.Attributes GetDimensionAttributesForClass (RoutingDimension dimension, int rc_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
 

Detailed Description

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 228 of file RoutingModel.java.

Constructor & Destructor Documentation

◆ ResourceGroup()

com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.ResourceGroup ( long cPtr,
boolean cMemoryOwn )

Definition at line 232 of file RoutingModel.java.

Member Function Documentation

◆ AddResource()

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 382 of file RoutingModel.java.

◆ ClearAllowedResourcesForVehicle()

void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.ClearAllowedResourcesForVehicle ( int vehicle)

Definition at line 407 of file RoutingModel.java.

◆ delete()

synchronized void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.delete ( )

Definition at line 258 of file RoutingModel.java.

◆ finalize()

void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.finalize ( )
protected

Definition at line 254 of file RoutingModel.java.

◆ GetAffectedDimensionIndices()

SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetAffectedDimensionIndices ( )

Definition at line 427 of file RoutingModel.java.

◆ getCPtr()

static long com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.getCPtr ( ResourceGroup obj)
static

Definition at line 237 of file RoutingModel.java.

◆ GetDimensionAttributesForClass()

RoutingModel.ResourceGroup.Attributes com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetDimensionAttributesForClass ( RoutingDimension dimension,
int rc_index )

Definition at line 447 of file RoutingModel.java.

◆ GetResource()

RoutingModel.ResourceGroup.Resource com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResource ( int resource_index)

Definition at line 423 of file RoutingModel.java.

◆ GetResourceClassesCount()

int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceClassesCount ( )

Definition at line 431 of file RoutingModel.java.

◆ GetResourceClassIndex()

int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceClassIndex ( int resource_index)

Definition at line 443 of file RoutingModel.java.

◆ GetResourceIndicesInClass()

int[] com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceIndicesInClass ( int resource_class)

Definition at line 435 of file RoutingModel.java.

◆ GetResourceIndicesPerClass()

SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourceIndicesPerClass ( )

Definition at line 439 of file RoutingModel.java.

◆ GetResources()

SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResources ( )

Definition at line 419 of file RoutingModel.java.

◆ GetResourcesMarkedAllowedForVehicle()

SWIGTYPE_p_absl__flat_hash_setT_int_t com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetResourcesMarkedAllowedForVehicle ( int vehicle)

Definition at line 411 of file RoutingModel.java.

◆ GetVehiclesRequiringAResource()

int[] com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.GetVehiclesRequiringAResource ( )

Definition at line 395 of file RoutingModel.java.

◆ Index()

int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.Index ( )

Definition at line 455 of file RoutingModel.java.

◆ IsResourceAllowedForVehicle()

boolean com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.IsResourceAllowedForVehicle ( int resource,
int vehicle )

Definition at line 415 of file RoutingModel.java.

◆ NotifyVehicleRequiresAResource()

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 391 of file RoutingModel.java.

◆ SetAllowedResourcesForVehicle()

void com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.SetAllowedResourcesForVehicle ( int vehicle,
int[] allowed_resource_indices )

Definition at line 403 of file RoutingModel.java.

◆ Size()

int com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.Size ( )

Definition at line 451 of file RoutingModel.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.swigRelease ( ResourceGroup obj)
static

Definition at line 241 of file RoutingModel.java.

◆ VehicleRequiresAResource()

boolean com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.VehicleRequiresAResource ( int vehicle)

Definition at line 399 of file RoutingModel.java.

Member Data Documentation

◆ swigCMemOwn

transient boolean com.google.ortools.constraintsolver.RoutingModel.ResourceGroup.swigCMemOwn
protected

Definition at line 230 of file RoutingModel.java.


The documentation for this class was generated from the following file: