Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::vrp::ConfigurationParameters Class Reference

Defines the configuration of the optimization and the route. More...

Inheritance diagram for gem::vrp::ConfigurationParameters:
Collaboration diagram for gem::vrp::ConfigurationParameters:

Public Member Functions

 ConfigurationParameters ()=default
 Default constructor.
 ConfigurationParameters (const ConfigurationParameters &)=default
 Default copy constructor.
 ConfigurationParameters (ConfigurationParameters &&) noexcept=default
 Default move constructor. noexcept is deduced.
ConfigurationParametersoperator= (const ConfigurationParameters &)=default
 Default copy assignment operator.
ConfigurationParametersoperator= (ConfigurationParameters &&) noexcept=default
 Default move assignment operator.
bool operator== (ConfigurationParameters const &params) const
 Compares two ConfigurationParameters objects for equality.
bool operator!= (ConfigurationParameters const &params) const
 Compares two ConfigurationParameters objects for inequality.
const StringRef getName () const noexcept
 Retrieves the name of the optimization/route configuration.
ConfigurationParameterssetName (const String &name) noexcept
 Sets the name of the optimization/route configuration.
bool getIgnoreTimeWindow () const noexcept
 Checks if time-windows are considered during optimization.
ConfigurationParameterssetIgnoreTimeWindow (bool ignoreTimeWindow) noexcept
 Sets whether to ignore time-windows during optimization.
bool getAllowDroppingOrders () const noexcept
 Specify if the algorithm is allowed to drop orders in case no solution is found by visiting all of them By default it is false.
ConfigurationParameterssetAllowDroppingOrders (bool allowDroppingOrders) noexcept
 Sets whether to allow the algorithm to drop orders, if no solution is found by visiting all of them.
bool getGroupingOrders () const noexcept
 Specify if the orders will be grouped.
ConfigurationParameterssetGroupingOrders (bool groupingOrders) noexcept
 Sets whether to group orders during optimization.
vrp::EBalanceRoutesOption getBalancedRoutes () const noexcept
 Option to balance the routes of an optimization.
ConfigurationParameterssetBalancedRoutes (vrp::EBalanceRoutesOption balancedRoutes) noexcept
 Sets the option to balance routes of an optimization .
EOptimizationCriterion getOptimizationCriterion () const noexcept
 Retrieves the optimization criterion.
ConfigurationParameterssetOptimizationCriterion (EOptimizationCriterion criterion) noexcept
 Sets the optimization criterion.
EArrangeCriterion getArrangeCriterion () const noexcept
 Retrieves the arrangement criterion for optimizing time.
ConfigurationParameterssetArrangeCriterion (EArrangeCriterion criterion) noexcept
 Sets the arrangement criterion for optimizing time.
EOptimizationQuality getOptimizationQuality () const noexcept
 Retrieves the optimization quality setting.
ConfigurationParameterssetOptimizationQuality (EOptimizationQuality quality) noexcept
 Sets the optimization quality (solution accuracy).
unsigned int getMaxSearchTime () const noexcept
 Retrieves the maximum search time for the optimization algorithm.
ConfigurationParameterssetMaxSearchTime (unsigned int seconds) noexcept
 Sets the maximum amount of time the optimization algorithm can search for a solution.
unsigned int getMaxWaitTime () const noexcept
 Retrieves the maximum waiting time at an order.
ConfigurationParameterssetMaxWaitTime (unsigned int seconds) noexcept
 Sets the maximum waiting time at an order.
ERouteType getRouteType () const noexcept
 Retrieves the route type.
ConfigurationParameterssetRouteType (ERouteType routeType) noexcept
 Sets the route type.
ERoadRestrictions getRestrictions () const noexcept
 Retrieves the road restrictions for distance and time matrix calculations.
ConfigurationParameterssetRestrictions (ERoadRestrictions restrictions) noexcept
 Sets the road restrictions for distance and time matrix calculations.
EDistanceUnit getDistanceUnit () const noexcept
 Retrieves the unit of distance used in the optimization and routing calculations.
ConfigurationParameterssetDistanceUnit (EDistanceUnit distanceUnit) noexcept
 Sets the unit of distance to be used throughout the optimization and routing calculations.
OrdersSequenceMap getOrderSequenceOptions () const noexcept
 Gets the OrdersSequenceOptions.These options are used to specify the association between different orders that should be visited in a certain order.
ConfigurationParameterssetOrderSequenceOptions (const OrdersSequenceMap &ordersSequences) noexcept
 Sets the OrdersSequenceOptions.These options are used to specify the association between different orders that should be visited in a certain order.

Detailed Description

Defines the configuration of the optimization and the route.

Implements share-read / copy-on-write Api object over IConfigurationParameters.

Member Function Documentation

◆ getAllowDroppingOrders()

bool gem::vrp::ConfigurationParameters::getAllowDroppingOrders ( ) const
inlinenoexcept

Specify if the algorithm is allowed to drop orders in case no solution is found by visiting all of them By default it is false.

Returns
True if the algorithm is allowed to drop orders when no complete solution is found, false otherwise.

◆ getArrangeCriterion()

EArrangeCriterion gem::vrp::ConfigurationParameters::getArrangeCriterion ( ) const
inlinenoexcept

Retrieves the arrangement criterion for optimizing time.

Returns
The arrange criterion as an EArrangeCriterion enum value.

◆ getBalancedRoutes()

vrp::EBalanceRoutesOption gem::vrp::ConfigurationParameters::getBalancedRoutes ( ) const
inlinenoexcept

Option to balance the routes of an optimization.

Returns
The balance routes option as an EBalanceRoutesOption enum value. (none, by time, by number of orders).

◆ getDistanceUnit()

EDistanceUnit gem::vrp::ConfigurationParameters::getDistanceUnit ( ) const
inlinenoexcept

Retrieves the unit of distance used in the optimization and routing calculations.

Returns
The distance unit as an EDistanceUnit enumeration value.

◆ getGroupingOrders()

bool gem::vrp::ConfigurationParameters::getGroupingOrders ( ) const
inlinenoexcept

Specify if the orders will be grouped.

If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group.

Returns
True if orders will be grouped, false otherwise.

◆ getIgnoreTimeWindow()

bool gem::vrp::ConfigurationParameters::getIgnoreTimeWindow ( ) const
inlinenoexcept

Checks if time-windows are considered during optimization.

Returns
True if time-windows are ignored, false otherwise.

◆ getMaxSearchTime()

unsigned int gem::vrp::ConfigurationParameters::getMaxSearchTime ( ) const
inlinenoexcept

Retrieves the maximum search time for the optimization algorithm.

Returns
The maximum search time in seconds.

◆ getMaxWaitTime()

unsigned int gem::vrp::ConfigurationParameters::getMaxWaitTime ( ) const
inlinenoexcept

Retrieves the maximum waiting time at an order.

This is used to determine how long a vehicle can wait at an order to align with the time window for the next order.

Returns
The maximum wait time in seconds.

◆ getName()

const StringRef gem::vrp::ConfigurationParameters::getName ( ) const
inlinenoexcept

Retrieves the name of the optimization/route configuration.

Returns
The name as a StringRef.

◆ getOptimizationCriterion()

EOptimizationCriterion gem::vrp::ConfigurationParameters::getOptimizationCriterion ( ) const
inlinenoexcept

Retrieves the optimization criterion.

Returns
The optimization criterion as an EOptimizationCriterion enum value.

◆ getOptimizationQuality()

EOptimizationQuality gem::vrp::ConfigurationParameters::getOptimizationQuality ( ) const
inlinenoexcept

Retrieves the optimization quality setting.

Returns
The optimization quality as an EOptimizationQuality enum value.

◆ getOrderSequenceOptions()

OrdersSequenceMap gem::vrp::ConfigurationParameters::getOrderSequenceOptions ( ) const
inlinenoexcept

Gets the OrdersSequenceOptions.These options are used to specify the association between different orders that should be visited in a certain order.

Returns
A map where each pair contains an enum and a list of lists, where each inner list is a sequence of order ids that is defined by the value of the enum.

◆ getRestrictions()

ERoadRestrictions gem::vrp::ConfigurationParameters::getRestrictions ( ) const
inlinenoexcept

Retrieves the road restrictions for distance and time matrix calculations.

This is particularly important when real-world conditions such as road types and vehicle capabilities must be considered.

Returns
The road restrictions as an ERoadRestrictions enumeration value.

◆ getRouteType()

ERouteType gem::vrp::ConfigurationParameters::getRouteType ( ) const
inlinenoexcept

Retrieves the route type.

The route type can influence how routes are generated, whether as round routes, open routes, etc.

Returns
The route type as an ERouteType enumeration value.

◆ operator!=()

bool gem::vrp::ConfigurationParameters::operator!= ( ConfigurationParameters const & params) const
inline

Compares two ConfigurationParameters objects for inequality.

Parameters
paramsThe other ConfigurationParameters object to compare with.
Returns
True if the objects are not equal, false otherwise.

◆ operator=() [1/2]

ConfigurationParameters & gem::vrp::ConfigurationParameters::operator= ( ConfigurationParameters && )
defaultnoexcept

Default move assignment operator.

noexcept is deduced.

Returns
A reference to the current object.

◆ operator=() [2/2]

ConfigurationParameters & gem::vrp::ConfigurationParameters::operator= ( const ConfigurationParameters & )
default

Default copy assignment operator.

Returns
A reference to the current object.

◆ operator==()

bool gem::vrp::ConfigurationParameters::operator== ( ConfigurationParameters const & params) const
inline

Compares two ConfigurationParameters objects for equality.

Parameters
paramsThe other ConfigurationParameters object to compare with.
Returns
True if both objects are equal, false otherwise.

◆ setAllowDroppingOrders()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setAllowDroppingOrders ( bool allowDroppingOrders)
inlinenoexcept

Sets whether to allow the algorithm to drop orders, if no solution is found by visiting all of them.

Parameters
allowDroppingOrdersTrue to allow, false otherwise.
Returns
A reference to this ConfigurationParameters object.

◆ setArrangeCriterion()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setArrangeCriterion ( EArrangeCriterion criterion)
inlinenoexcept

Sets the arrangement criterion for optimizing time.

Parameters
criterionThe arrange criterion as an EArrangeCriterion enum value.
Returns
A reference to this ConfigurationParameters object.

◆ setBalancedRoutes()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setBalancedRoutes ( vrp::EBalanceRoutesOption balancedRoutes)
inlinenoexcept

Sets the option to balance routes of an optimization .

Parameters
balancedRoutesThe balance routes option as an EBalanceRoutesOption enum value. (none, by time, by number of orders).
Returns
A reference to this ConfigurationParameters object.

◆ setDistanceUnit()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setDistanceUnit ( EDistanceUnit distanceUnit)
inlinenoexcept

Sets the unit of distance to be used throughout the optimization and routing calculations.

This affects how distances are reported and calculated.

Parameters
distanceUnitThe distance unit as an EDistanceUnit enumeration value.
Returns
A reference to this ConfigurationParameters object.

◆ setGroupingOrders()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setGroupingOrders ( bool groupingOrders)
inlinenoexcept

Sets whether to group orders during optimization.

Parameters
groupingOrdersTrue, if the distance between any two orders is less than 10 meters, those orders will be considered part of the same group, false to consider them.
Returns
A reference to this ConfigurationParameters object.

◆ setIgnoreTimeWindow()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setIgnoreTimeWindow ( bool ignoreTimeWindow)
inlinenoexcept

Sets whether to ignore time-windows during optimization.

Parameters
ignoreTimeWindowTrue to ignore time-windows, false to consider them.
Returns
A reference to this ConfigurationParameters object.

◆ setMaxSearchTime()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setMaxSearchTime ( unsigned int seconds)
inlinenoexcept

Sets the maximum amount of time the optimization algorithm can search for a solution.

Parameters
secondsThe maximum search time in seconds.
Returns
A reference to this ConfigurationParameters object.

◆ setMaxWaitTime()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setMaxWaitTime ( unsigned int seconds)
inlinenoexcept

Sets the maximum waiting time at an order.

This influences the optimization to ensure that waiting at an order does not exceed this time, allowing for better alignment with subsequent order time windows.

Parameters
secondsThe maximum wait time in seconds.
Returns
A reference to this ConfigurationParameters object.

◆ setName()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setName ( const String & name)
inlinenoexcept

Sets the name of the optimization/route configuration.

Parameters
nameThe new name for the configuration.
Returns
A reference to this ConfigurationParameters object.

◆ setOptimizationCriterion()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setOptimizationCriterion ( EOptimizationCriterion criterion)
inlinenoexcept

Sets the optimization criterion.

Parameters
criterionThe optimization criterion as an EOptimizationCriterion enum value.
Returns
A reference to this ConfigurationParameters object.

◆ setOptimizationQuality()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setOptimizationQuality ( EOptimizationQuality quality)
inlinenoexcept

Sets the optimization quality (solution accuracy).

Parameters
qualityThe optimization quality as an EOptimizationQuality enum value.
Returns
A reference to this ConfigurationParameters object.

◆ setOrderSequenceOptions()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setOrderSequenceOptions ( const OrdersSequenceMap & ordersSequences)
inlinenoexcept

Sets the OrdersSequenceOptions.These options are used to specify the association between different orders that should be visited in a certain order.

Parameters
ordersSequencesA map where each pair contains an enum and a list of lists, where each inner list is a sequence of order ids that is defined by the value of the enum.
Returns
A reference to this ConfigurationParameters object.

◆ setRestrictions()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setRestrictions ( ERoadRestrictions restrictions)
inlinenoexcept

Sets the road restrictions for distance and time matrix calculations.

Allows tailoring the optimization to consider specific road types or restrictions based on vehicle capabilities.

Parameters
restrictionsThe road restrictions as an ERoadRestrictions enumeration value.
Returns
A reference to this ConfigurationParameters object.

◆ setRouteType()

ConfigurationParameters & gem::vrp::ConfigurationParameters::setRouteType ( ERouteType routeType)
inlinenoexcept

Sets the route type.

This determines the structure of the routes generated by the optimization process.

Parameters
routeTypeThe route type as an ERouteType enumeration value.
Returns
A reference to this ConfigurationParameters object.