Google OR-Tools: operations_research::TypeRegulationsChecker Class Reference

Definition at line 2876 of file routing.h.

#include <routing.h>

operations_research::TypeIncompatibilityChecker operations_research::TypeRequirementChecker

Public Member Functions

 TypeRegulationsChecker (const RoutingModel &model)
virtual ~TypeRegulationsChecker ()=default
bool CheckVehicle (int vehicle, const std::function< int64_t(int64_t)> &next_accessor)

Protected Member Functions

bool TypeOccursOnRoute (int type) const
bool TypeCurrentlyOnRoute (int type, int pos) const
void InitializeCheck (int vehicle, const std::function< int64_t(int64_t)> &next_accessor)
virtual void OnInitializeCheck ()
virtual bool HasRegulationsToCheck () const =0
virtual bool CheckTypeRegulations (int type, VisitTypePolicy policy, int pos)=0
virtual bool FinalizeCheck () const

◆ VisitTypePolicy

operations_research::TypeRegulationsChecker::TypeRegulationsChecker ( const RoutingModel & model)
explicit

◆ ~TypeRegulationsChecker()

virtual operations_research::TypeRegulationsChecker::~TypeRegulationsChecker ( )
virtualdefault

◆ CheckTypeRegulations()

virtual bool operations_research::TypeRegulationsChecker::CheckTypeRegulations ( int type,
VisitTypePolicy policy,
int pos )
protectedpure virtual

◆ CheckVehicle()

bool operations_research::TypeRegulationsChecker::CheckVehicle ( int vehicle,
const std::function< int64_t(int64_t)> & next_accessor )

◆ FinalizeCheck()

virtual bool operations_research::TypeRegulationsChecker::FinalizeCheck ( ) const
inlineprotectedvirtual

◆ HasRegulationsToCheck()

virtual bool operations_research::TypeRegulationsChecker::HasRegulationsToCheck ( ) const
protectedpure virtual

◆ InitializeCheck()

void operations_research::TypeRegulationsChecker::InitializeCheck ( int vehicle,
const std::function< int64_t(int64_t)> & next_accessor )
protected

◆ OnInitializeCheck()

virtual void operations_research::TypeRegulationsChecker::OnInitializeCheck ( )
inlineprotectedvirtual

◆ TypeCurrentlyOnRoute()

bool operations_research::TypeRegulationsChecker::TypeCurrentlyOnRoute ( int type,
int pos ) const
protected

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 6981 of file routing.cc.

◆ TypeOccursOnRoute()

bool operations_research::TypeRegulationsChecker::TypeOccursOnRoute ( int type) const
protected

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 6975 of file routing.cc.

◆ model_

const RoutingModel& operations_research::TypeRegulationsChecker::model_

protected

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