15 #include "test/test_utils/sample_graph.hpp"
21 #include <boost/range/algorithm/copy.hpp>
31 typedef sample_graphs_metrics SGM;
32 auto gm = SGM::get_graph_metric_small();
33 std::vector<int> fcosts{ 7, 8 };
41 typedef VT::GeneratorsSet GSet;
42 typedef VT::VerticesSet VSet;
43 typedef Sol::UnchosenFacilitiesSet USet;
46 VorType voronoi(GSet{}, VSet{ SGM::A, SGM::B, SGM::C, SGM::D, SGM::E }, gm);
47 Sol sol(std::move(voronoi), USet{ SGM::A, SGM::B },
59 boost::copy(sol.get_chosen_facilities(), std::ostream_iterator<int>(std::cout,
","));
60 std::cout << std::endl;
Multisearch_components< facility_locationget_moves_add, facility_location_gain_add, facility_location_commit_add > default_add_fl_components
add components for facility location
default VertexType is int.
Adapts array as function, providing operator()().
describes solution to facility location The initial solution is passed as voronoi, which has to be the model of the Voronoi concept. The generators of the voronoi are the facilities and the vertices are the clients.
This file contains set of simple useful functors or functor adapters.
Model of Multisearch_components with default multi search components for facility location...
auto make_array_to_functor(const Array &a, int offset=0)
make function for array_to_functor
simple implementation of the Voronoi concept.
bool facility_location_first_improving(facility_location_solution &fls, components...comps)
simple version of local search for facility location
bool local_search(Solution &solution, SearchStrategy searchStrategy, ContinueOnSuccess succ, ContinueOnFail fail, components...comps)
detail
Multisearch_components< facility_locationget_moves_swap, facility_location_gain_swap, facility_location_commit_swap > default_swap_fl_components
Swap components for facility location.