Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::RoutingSolution::Event Struct Reference

#include <solution_serializer.h>

Public Types

enum class  Type {
  kStart , kEnd , kServeArc , kServeEdge ,
  kServeNode , kTransit
}
 Describes the type of events that occur along a route. More...
 

Public Member Functions

 Event (Type type, int64_t demand_id, Arc arc)
 
 Event (Type type, int64_t demand_id, Arc arc, std::string_view arc_name)
 
bool operator== (const Event &other) const
 
bool operator!= (const Event &other) const
 

Public Attributes

Type type
 
int64_t demand_id
 
Arc arc
 
std::string arc_name
 

Detailed Description

Describes a state transition performed by a vehicle: starting from/ending at a given depot, serving a given customer, etc. When need be, each event can have a specific demand ID (this is mostly useful when servicing arcs and edges). An event always stores an arc: this is simply the edge when servicing the edge (it should correspond to the direction in which the edge is traversed); when the event is about a node (either a depot or a demand), both ends of the arc should be the node the event is about.

Definition at line 64 of file solution_serializer.h.

Member Enumeration Documentation

◆ Type

Describes the type of events that occur along a route.

Enumerator
kStart 

The vehicle starts its route at a depot.

kEnd 

The vehicle ends its route at a depot (not necessarily the same as the starting one).

kServeArc 

The vehicle traverses the arc while servicing it.

kServeEdge 

The vehicle traverses the edge while servicing it.

kServeNode 

The vehicle serves the demand of the node.

kTransit 

The vehicle simply goes through an edge or an arc without servicing.

Definition at line 66 of file solution_serializer.h.

Constructor & Destructor Documentation

◆ Event() [1/2]

operations_research::RoutingSolution::Event::Event ( Type type,
int64_t demand_id,
Arc arc )
inline

Definition at line 87 of file solution_serializer.h.

◆ Event() [2/2]

operations_research::RoutingSolution::Event::Event ( Type type,
int64_t demand_id,
Arc arc,
std::string_view arc_name )
inline

Definition at line 89 of file solution_serializer.h.

Member Function Documentation

◆ operator!=()

bool operations_research::RoutingSolution::Event::operator!= ( const Event & other) const
inline

Definition at line 96 of file solution_serializer.h.

◆ operator==()

bool operations_research::RoutingSolution::Event::operator== ( const Event & other) const
inline

Definition at line 92 of file solution_serializer.h.

Member Data Documentation

◆ arc

Arc operations_research::RoutingSolution::Event::arc

Definition at line 84 of file solution_serializer.h.

◆ arc_name

std::string operations_research::RoutingSolution::Event::arc_name

Definition at line 85 of file solution_serializer.h.

◆ demand_id

int64_t operations_research::RoutingSolution::Event::demand_id

Definition at line 83 of file solution_serializer.h.

◆ type

Type operations_research::RoutingSolution::Event::type

Definition at line 82 of file solution_serializer.h.


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