OR-Tools  8.2
TypeIncompatibilityChecker

Detailed Description

Checker for type incompatibilities.

Definition at line 2220 of file routing.h.

Public Member Functions

 TypeIncompatibilityChecker (const RoutingModel &model, bool check_hard_incompatibilities)
 
 ~TypeIncompatibilityChecker () override
 
bool CheckVehicle (int vehicle, const std::function< int64(int64)> &next_accessor)
 

Protected Types

using VisitTypePolicy = RoutingModel::VisitTypePolicy
 

Protected Member Functions

bool TypeOccursOnRoute (int type) const
 Returns true iff any occurrence of the given type was seen on the route, i.e. More...
 
bool TypeCurrentlyOnRoute (int type, int pos) const
 Returns true iff there's at least one instance of the given type on the route when scanning the route at the given position 'pos'. More...
 
void InitializeCheck (int vehicle, const std::function< int64(int64)> &next_accessor)
 
virtual void OnInitializeCheck ()
 
virtual bool FinalizeCheck () const
 

Protected Attributes

const RoutingModelmodel_
 

Member Typedef Documentation

◆ VisitTypePolicy

using VisitTypePolicy = RoutingModel::VisitTypePolicy
protectedinherited

Definition at line 2170 of file routing.h.

Constructor & Destructor Documentation

◆ TypeIncompatibilityChecker()

TypeIncompatibilityChecker ( const RoutingModel model,
bool  check_hard_incompatibilities 
)

Definition at line 6310 of file routing.cc.

◆ ~TypeIncompatibilityChecker()

~TypeIncompatibilityChecker ( )
inlineoverride

Definition at line 2224 of file routing.h.

Member Function Documentation

◆ CheckVehicle()

bool CheckVehicle ( int  vehicle,
const std::function< int64(int64)> &  next_accessor 
)
inherited

Definition at line 6228 of file routing.cc.

◆ FinalizeCheck()

virtual bool FinalizeCheck ( ) const
inlineprotectedvirtualinherited

Definition at line 2210 of file routing.h.

◆ InitializeCheck()

void InitializeCheck ( int  vehicle,
const std::function< int64(int64)> &  next_accessor 
)
protectedinherited

Definition at line 6272 of file routing.cc.

◆ OnInitializeCheck()

virtual void OnInitializeCheck ( )
inlineprotectedvirtualinherited

Definition at line 2206 of file routing.h.

◆ TypeCurrentlyOnRoute()

bool TypeCurrentlyOnRoute ( int  type,
int  pos 
) const
protectedinherited

Returns true iff there's at least one instance of the given type on the route when scanning the route at the given position 'pos'.

This is the case iff we have at least one added but non-removed instance of the type, or if occurrences_of_type_[type].last_type_on_vehicle_up_to_visit is greater than 'pos'.

Definition at line 6303 of file routing.cc.

◆ TypeOccursOnRoute()

bool TypeOccursOnRoute ( int  type) const
protectedinherited

Returns true iff any occurrence of the given type was seen on the route, i.e.

iff the added count for this type is positive, or if a node of this type and policy TYPE_ON_VEHICLE_UP_TO_VISIT is visited on the route (see TypePolicyOccurrence.last_type_on_vehicle_up_to_visit).

Definition at line 6297 of file routing.cc.

Member Data Documentation

◆ model_

const RoutingModel& model_
protectedinherited

Definition at line 2212 of file routing.h.


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