""" @generated by mypy-protobuf. Do not edit manually! isort:skip_file Protocol buffer used to parametrize the local cheapest insertion heuristics.""" import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import sys import typing if sys.version_info >= (3, 10): import typing as typing_extensions else: import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor @typing.final class LocalCheapestInsertionParameters(google.protobuf.message.Message): """Parameters used to configure local cheapest insertion heuristics.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor class _PairInsertionStrategy: ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType class _PairInsertionStrategyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[LocalCheapestInsertionParameters._PairInsertionStrategy.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor AUTOMATIC: LocalCheapestInsertionParameters._PairInsertionStrategy.ValueType # 0 """Let the solver decide the set of positions and its ordering.""" BEST_PICKUP_THEN_BEST_DELIVERY: LocalCheapestInsertionParameters._PairInsertionStrategy.ValueType # 1 """Consider all positions, by increasing (cost(pickup), cost(delivery)).""" BEST_PICKUP_DELIVERY_PAIR: LocalCheapestInsertionParameters._PairInsertionStrategy.ValueType # 2 """Consider all positions, by increasing by cost(pickup) + cost(delivery).""" BEST_PICKUP_DELIVERY_PAIR_MULTITOUR: LocalCheapestInsertionParameters._PairInsertionStrategy.ValueType # 3 """Only consider insertion positions that are compatible with the multitour property, meaning a series of pickups may only start when the vehicle is not carrying any delivery. This setting is designed to explore much less possibilities than the full BEST_PICKUP_DELIVERY_PAIR. Order by increasing by cost(pickup) + cost(delivery). """ class PairInsertionStrategy(_PairInsertionStrategy, metaclass=_PairInsertionStrategyEnumTypeWrapper): """In insertion-based heuristics, describes what positions must be considered when inserting a pickup/delivery pair, and in what order they are considered. """ AUTOMATIC: LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType # 0 """Let the solver decide the set of positions and its ordering.""" BEST_PICKUP_THEN_BEST_DELIVERY: LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType # 1 """Consider all positions, by increasing (cost(pickup), cost(delivery)).""" BEST_PICKUP_DELIVERY_PAIR: LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType # 2 """Consider all positions, by increasing by cost(pickup) + cost(delivery).""" BEST_PICKUP_DELIVERY_PAIR_MULTITOUR: LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType # 3 """Only consider insertion positions that are compatible with the multitour property, meaning a series of pickups may only start when the vehicle is not carrying any delivery. This setting is designed to explore much less possibilities than the full BEST_PICKUP_DELIVERY_PAIR. Order by increasing by cost(pickup) + cost(delivery). """ class _InsertionSortingProperty: ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType class _InsertionSortingPropertyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor SORTING_PROPERTY_UNSPECIFIED: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 0 """Invalid property.""" SORTING_PROPERTY_ALLOWED_VEHICLES: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 1 """Selects nodes with the least number of allowed vehicles.""" SORTING_PROPERTY_PENALTY: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 2 """Selects nodes with the highest penalty.""" SORTING_PROPERTY_PENALTY_OVER_ALLOWED_VEHICLES_RATIO: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 3 """Selects nodes with the highest penalty / number of allowed vehicles ratio. """ SORTING_PROPERTY_HIGHEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 4 """Selects nodes that are on average the farthest from vehicles.""" SORTING_PROPERTY_LOWEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 5 """Selects nodes that are on average the closest to vehicles.""" SORTING_PROPERTY_LOWEST_MIN_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 6 """Select nodes with the smallest distance to the closest vehicle.""" SORTING_PROPERTY_HIGHEST_DIMENSION_USAGE: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 7 """Selects nodes that have a higher dimension usage on average, where the usage is determined as the ratio of node demand over vehicle capacity. Currently, this property only supports unary dimensions. """ SORTING_PROPERTY_RANDOM: LocalCheapestInsertionParameters._InsertionSortingProperty.ValueType # 8 """Selects nodes in random order. This property cannot be used in conjunction with other properties. """ class InsertionSortingProperty(_InsertionSortingProperty, metaclass=_InsertionSortingPropertyEnumTypeWrapper): """Properties used to select in which order nodes or node pairs are considered in insertion heuristics. """ SORTING_PROPERTY_UNSPECIFIED: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 0 """Invalid property.""" SORTING_PROPERTY_ALLOWED_VEHICLES: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 1 """Selects nodes with the least number of allowed vehicles.""" SORTING_PROPERTY_PENALTY: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 2 """Selects nodes with the highest penalty.""" SORTING_PROPERTY_PENALTY_OVER_ALLOWED_VEHICLES_RATIO: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 3 """Selects nodes with the highest penalty / number of allowed vehicles ratio. """ SORTING_PROPERTY_HIGHEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 4 """Selects nodes that are on average the farthest from vehicles.""" SORTING_PROPERTY_LOWEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 5 """Selects nodes that are on average the closest to vehicles.""" SORTING_PROPERTY_LOWEST_MIN_ARC_COST_TO_VEHICLE_START_ENDS: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 6 """Select nodes with the smallest distance to the closest vehicle.""" SORTING_PROPERTY_HIGHEST_DIMENSION_USAGE: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 7 """Selects nodes that have a higher dimension usage on average, where the usage is determined as the ratio of node demand over vehicle capacity. Currently, this property only supports unary dimensions. """ SORTING_PROPERTY_RANDOM: LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType # 8 """Selects nodes in random order. This property cannot be used in conjunction with other properties. """ PICKUP_DELIVERY_STRATEGY_FIELD_NUMBER: builtins.int INSERTION_SORTING_PROPERTIES_FIELD_NUMBER: builtins.int pickup_delivery_strategy: Global___LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType """Choice of insertion strategy for pickup/delivery pairs, used in local cheapest insertion, both first solution heuristic and LNS. """ @property def insertion_sorting_properties(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[Global___LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType]: """The properties used to sort insertion entries in the local cheapest insertion heuristic, in *decreasing* order of priority. The properties listed here are applied hierarchically, from highest to lowest priority. When no properties are provided (SORTING_PROPERTY_ALLOWED_VEHICLES, SORTING_PROPERTY_PENALTY) is used by default. """ def __init__( self, *, pickup_delivery_strategy: Global___LocalCheapestInsertionParameters.PairInsertionStrategy.ValueType = ..., insertion_sorting_properties: collections.abc.Iterable[Global___LocalCheapestInsertionParameters.InsertionSortingProperty.ValueType] | None = ..., ) -> None: ... _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["insertion_sorting_properties", b"insertion_sorting_properties", "pickup_delivery_strategy", b"pickup_delivery_strategy"] def ClearField(self, field_name: _ClearFieldArgType) -> None: ... Global___LocalCheapestInsertionParameters: typing_extensions.TypeAlias = LocalCheapestInsertionParameters @typing.final class SavingsParameters(google.protobuf.message.Message): """Parameters used to configure savings heuristics.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor NEIGHBORS_RATIO_FIELD_NUMBER: builtins.int MAX_MEMORY_USAGE_BYTES_FIELD_NUMBER: builtins.int ADD_REVERSE_ARCS_FIELD_NUMBER: builtins.int ARC_COEFFICIENT_FIELD_NUMBER: builtins.int neighbors_ratio: builtins.float """Ratio (in ]0, 1]) of neighbors to consider for each node when constructing the savings. If unspecified, its value is considered to be 1.0. """ max_memory_usage_bytes: builtins.float """The number of neighbors considered for each node in the Savings heuristic is chosen so that the space used to store the savings doesn't exceed max_memory_usage_bytes, which must be in ]0, 1e10]. NOTE: If both neighbors_ratio and max_memory_usage_bytes are specified, the number of neighbors considered for each node will be the minimum of the two numbers determined by these parameters. """ add_reverse_arcs: builtins.bool """Add savings related to reverse arcs when finding the nearest neighbors of the nodes. """ arc_coefficient: builtins.float """Coefficient of the cost of the arc for which the saving value is being computed: Saving(a-->b) = Cost(a-->end) + Cost(start-->b) - arc_coefficient * Cost(a-->b) This parameter must be greater than 0, and its default value is 1. """ def __init__( self, *, neighbors_ratio: builtins.float = ..., max_memory_usage_bytes: builtins.float = ..., add_reverse_arcs: builtins.bool = ..., arc_coefficient: builtins.float = ..., ) -> None: ... _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["add_reverse_arcs", b"add_reverse_arcs", "arc_coefficient", b"arc_coefficient", "max_memory_usage_bytes", b"max_memory_usage_bytes", "neighbors_ratio", b"neighbors_ratio"] def ClearField(self, field_name: _ClearFieldArgType) -> None: ... Global___SavingsParameters: typing_extensions.TypeAlias = SavingsParameters @typing.final class GlobalCheapestInsertionParameters(google.protobuf.message.Message): """Parameters used to configure global cheapest insertion heuristics.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor FARTHEST_SEEDS_RATIO_FIELD_NUMBER: builtins.int NEIGHBORS_RATIO_FIELD_NUMBER: builtins.int MIN_NEIGHBORS_FIELD_NUMBER: builtins.int USE_NEIGHBORS_RATIO_FOR_INITIALIZATION_FIELD_NUMBER: builtins.int ADD_UNPERFORMED_ENTRIES_FIELD_NUMBER: builtins.int farthest_seeds_ratio: builtins.float """Ratio (between 0 and 1) of available vehicles in the model on which farthest nodes of the model are inserted as seeds. """ neighbors_ratio: builtins.float """Ratio (in ]0, 1]) of closest non start/end nodes to consider as neighbors for each node when creating new insertions in the parallel/sequential cheapest insertion heuristic. If not overridden, its default value is 1, meaning all neighbors will be considered. The neighborhood ratio is coupled with the corresponding min_neighbors integer, indicating the minimum number of neighbors to consider for each node: num_closest_neighbors = max(min_neighbors, neighbors_ratio * NUM_NON_START_END_NODES) This minimum number of neighbors must be greater or equal to 1, its default value. """ min_neighbors: builtins.int use_neighbors_ratio_for_initialization: builtins.bool """Whether or not to only consider closest neighbors when initializing the assignment. More precisely, if true, only closest neighbors (see neighbors_ratio and min_neighbors) are considered as insertion positions during initialization. Otherwise, all possible insertion positions are considered. """ add_unperformed_entries: builtins.bool """Whether or not to consider entries making the nodes/pairs unperformed. More precisely, if true, entries are created for making the nodes/pairs unperformed, and when the cost of making a node unperformed is lower than all insertions, the node/pair will be made unperformed. If false, only entries making a node/pair performed are considered. """ def __init__( self, *, farthest_seeds_ratio: builtins.float = ..., neighbors_ratio: builtins.float = ..., min_neighbors: builtins.int = ..., use_neighbors_ratio_for_initialization: builtins.bool = ..., add_unperformed_entries: builtins.bool = ..., ) -> None: ... _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["add_unperformed_entries", b"add_unperformed_entries", "farthest_seeds_ratio", b"farthest_seeds_ratio", "min_neighbors", b"min_neighbors", "neighbors_ratio", b"neighbors_ratio", "use_neighbors_ratio_for_initialization", b"use_neighbors_ratio_for_initialization"] def ClearField(self, field_name: _ClearFieldArgType) -> None: ... Global___GlobalCheapestInsertionParameters: typing_extensions.TypeAlias = GlobalCheapestInsertionParameters