C++ Reference

C++ Reference: Routing

TypeRegulationsCheckerabstract

Detailed Description

Definition at line 1952 of file routing.h.

Classes

struct  TypePolicyOccurrence
 

Public Member Functions

 TypeRegulationsChecker (const RoutingModel &model)
 
virtual ~TypeRegulationsChecker ()
 
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 HasRegulationsToCheck () const =0
 
virtual bool CheckTypeRegulations (int type, VisitTypePolicy policy, int pos)=0
 
virtual bool FinalizeCheck () const
 

Protected Attributes

const RoutingModelmodel_
 

Member Typedef Documentation

◆ VisitTypePolicy

Definition at line 1962 of file routing.h.

Constructor & Destructor Documentation

◆ TypeRegulationsChecker()

TypeRegulationsChecker ( const RoutingModel model)
explicit

◆ ~TypeRegulationsChecker()

virtual ~TypeRegulationsChecker ( )
inlinevirtual

Definition at line 1955 of file routing.h.

Member Function Documentation

◆ CheckTypeRegulations()

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

◆ CheckVehicle()

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

◆ FinalizeCheck()

virtual bool FinalizeCheck ( ) const
inlineprotectedvirtual

Definition at line 2002 of file routing.h.

◆ HasRegulationsToCheck()

virtual bool HasRegulationsToCheck ( ) const
protectedpure virtual

◆ InitializeCheck()

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

◆ OnInitializeCheck()

virtual void OnInitializeCheck ( )
inlineprotectedvirtual

Definition at line 1998 of file routing.h.

◆ TypeCurrentlyOnRoute()

bool 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'.

◆ TypeOccursOnRoute()

bool 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).

Member Data Documentation

◆ model_

const RoutingModel& model_
protected

Definition at line 2004 of file routing.h.


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