Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
routing_filters.cc File Reference
#include "ortools/constraint_solver/routing_filters.h"
#include <stddef.h>
#include <algorithm>
#include <cstdint>
#include <deque>
#include <functional>
#include <limits>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/container/btree_set.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "ortools/base/map_util.h"
#include "ortools/base/small_map.h"
#include "ortools/base/strong_vector.h"
#include "ortools/base/types.h"
#include "ortools/constraint_solver/constraint_solver.h"
#include "ortools/constraint_solver/constraint_solveri.h"
#include "ortools/constraint_solver/routing.h"
#include "ortools/constraint_solver/routing_lp_scheduling.h"
#include "ortools/constraint_solver/routing_parameters.pb.h"
#include "ortools/constraint_solver/routing_types.h"
#include "ortools/util/bitset.h"
#include "ortools/util/piecewise_linear_function.h"
#include "ortools/util/saturated_arithmetic.h"

Go to the source code of this file.

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 

Functions

 ABSL_FLAG (bool, routing_strong_debug_checks, false, "Run stronger checks in debug; these stronger tests might change " "the complexity of the code in particular.")
 Implementation of local search filters for routing models.
 
IntVarLocalSearchFilteroperations_research::MakeMaxActiveVehiclesFilter (const RoutingModel &routing_model)
 Returns a filter ensuring that max active vehicles constraints are enforced.
 
IntVarLocalSearchFilteroperations_research::MakeNodeDisjunctionFilter (const RoutingModel &routing_model, bool filter_cost)
 Returns a filter ensuring that node disjunction constraints are enforced.
 
IntVarLocalSearchFilteroperations_research::MakeVehicleAmortizedCostFilter (const RoutingModel &routing_model)
 Returns a filter computing vehicle amortized costs.
 
IntVarLocalSearchFilteroperations_research::MakeTypeRegulationsFilter (const RoutingModel &routing_model)
 Returns a filter ensuring type regulation constraints are enforced.
 
IntVarLocalSearchFilteroperations_research::MakePathCumulFilter (const RoutingDimension &dimension, bool propagate_own_objective_value, bool filter_objective_cost, bool can_use_lp)
 Returns a filter handling dimension costs and constraints.
 
void operations_research::AppendLightWeightDimensionFilters (const PathState *path_state, const std::vector< RoutingDimension * > &dimensions, std::vector< LocalSearchFilterManager::FilterEvent > *filters)
 
void operations_research::AppendDimensionCumulFilters (const std::vector< RoutingDimension * > &dimensions, const RoutingSearchParameters &parameters, bool filter_objective_cost, bool use_chain_cumul_filter, std::vector< LocalSearchFilterManager::FilterEvent > *filters)
 
IntVarLocalSearchFilteroperations_research::MakePickupDeliveryFilter (const RoutingModel &routing_model, const std::vector< PickupDeliveryPair > &pairs, const std::vector< RoutingModel::PickupAndDeliveryPolicy > &vehicle_policies)
 
IntVarLocalSearchFilteroperations_research::MakeVehicleVarFilter (const RoutingModel &routing_model)
 Returns a filter checking that vehicle variable domains are respected.
 
IntVarLocalSearchFilteroperations_research::MakeCumulBoundsPropagatorFilter (const RoutingDimension &dimension)
 Returns a filter handling dimension cumul bounds.
 
IntVarLocalSearchFilteroperations_research::MakeGlobalLPCumulFilter (GlobalDimensionCumulOptimizer *optimizer, GlobalDimensionCumulOptimizer *mp_optimizer, bool filter_objective_cost)
 Returns a filter checking global linear constraints and costs.
 
LocalSearchFilteroperations_research::MakeResourceAssignmentFilter (LocalDimensionCumulOptimizer *optimizer, LocalDimensionCumulOptimizer *mp_optimizer, bool propagate_own_objective_value, bool filter_objective_cost)
 
IntVarLocalSearchFilteroperations_research::MakeCPFeasibilityFilter (RoutingModel *routing_model)
 Returns a filter checking the current solution using CP propagation.
 
LocalSearchFilteroperations_research::MakePathEnergyCostFilter (Solver *solver, std::unique_ptr< PathEnergyCostChecker > checker, absl::string_view dimension_name)
 

Function Documentation

◆ ABSL_FLAG()

ABSL_FLAG ( bool ,
routing_strong_debug_checks ,
false ,
"Run stronger checks in debug; these stronger tests might change " "the complexity of the code in particular."  )

Implementation of local search filters for routing models.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Variable Documentation

◆ bound

int64_t bound

Definition at line 968 of file routing_filters.cc.

◆ coefficient

int64_t coefficient

Definition at line 969 of file routing_filters.cc.

◆ cumul_value

int64_t cumul_value

Definition at line 961 of file routing_filters.cc.

◆ cumul_value_support

int cumul_value_support

Definition at line 962 of file routing_filters.cc.

◆ path_values

std::vector<int64_t> path_values

Definition at line 963 of file routing_filters.cc.