Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SavingsFilteredHeuristic
Note: This documentation is automatically generated.
Filter-based decision builder which builds a solution by using
Clarke & Wright's Savings heuristic. For each pair of nodes, the savings
value is the difference between the cost of two routes visiting one node
each and one route visiting both nodes. Routes are built sequentially, each
route being initialized from the pair with the best available savings value
then extended by selecting the nodes with best savings on both ends of the
partial route. Cost is based on the arc cost function of the routing model
and cost classes are taken into account.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["This C++ class, `SavingsFilteredHeuristic`, builds solutions using Clarke & Wright's Savings heuristic. It calculates savings by comparing the cost of separate routes to a combined route for node pairs. Routes are built sequentially, initialized with the best savings pair, and extended by selecting nodes with the best savings on each end. The cost is derived from the routing model's arc cost function and considers cost classes. The class provides methods for constructing the solution, initialization, and deallocation.\n"]]