Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::vrp::VRPAvailableBreak Struct Reference

Defines an available break window for a vehicle during a route. More...

Collaboration diagram for gem::vrp::VRPAvailableBreak:

Public Member Functions

bool operator== (const VRPAvailableBreak &other) const
 Equality comparison operator.

Public Attributes

std::vector< std::pair< int, int > > timeWindows
 Time windows during which the break can occur (in minutes from midnight).
int duration
 Duration of the break in seconds.

Detailed Description

Defines an available break window for a vehicle during a route.

Specifies one or more time windows during which a break may be scheduled, along with the required break duration. The optimizer will select the most suitable time window based on the route constraints.

Example usage:

lunchBreak.duration = 1800; // 30 minutes in seconds
lunchBreak.timeWindows = { { 720, 840 } }; // between 12:00 PM and 2:00 PM (minutes from midnight)
vrp::Vehicle vehicle;
vehicle.setBreaks({ lunchBreak });
Defines a vehicle.
Definition GEM_VRP.h:2978
Vehicle & setBreaks(const std::vector< VRPAvailableBreak > &breaks) noexcept
Sets the breaks of the vehicle.
Definition GEM_VRP.h:3394
Defines an available break window for a vehicle during a route.
Definition GEM_VRP.h:440
std::vector< std::pair< int, int > > timeWindows
Time windows during which the break can occur (in minutes from midnight).
Definition GEM_VRP.h:444
int duration
Duration of the break in seconds.
Definition GEM_VRP.h:448
See also
Vehicle::setBreaks(), Vehicle::getBreaks(), VRPActualBreak

Member Function Documentation

◆ operator==()

bool gem::vrp::VRPAvailableBreak::operator== ( const VRPAvailableBreak & other) const
inline

Equality comparison operator.

Checks if two VRPAvailableBreak objects are equal.

Parameters
otherThe VRPAvailableBreak to compare against.
Returns
True if both timeWindows and duration are equal, false otherwise.

Member Data Documentation

◆ duration

int gem::vrp::VRPAvailableBreak::duration

Duration of the break in seconds.

For example, a value of 1800 represents a 30-minute break.

◆ timeWindows

std::vector<std::pair<int, int> > gem::vrp::VRPAvailableBreak::timeWindows

Time windows during which the break can occur (in minutes from midnight).

Each pair represents a [start, end] interval. The optimizer will pick the most feasible window from this list.