All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
facility_location.hpp
Go to the documentation of this file.
1 //=======================================================================
2 // Copyright (c) 2013 Piotr Wygocki
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //=======================================================================
16 #ifndef PAAL_FACILITY_LOCATION_HPP
17 #define PAAL_FACILITY_LOCATION_HPP
18 
23 
26 
27 namespace paal {
28 namespace local_search {
29 
36  Multisearch_components<facility_locationget_moves_remove,
37  facility_location_gain_remove,
38  facility_location_commit_remove>;
39 
44  Multisearch_components<facility_locationget_moves_add,
45  facility_location_gain_add,
47 
56 
82 template <typename SearchStrategy, typename ContinueOnSuccess,
83  typename ContinueOnFail, typename facility_location_solution,
84  typename... components>
85 bool facility_location_local_search(facility_location_solution &fls,
86  SearchStrategy searchStrategy,
87  ContinueOnSuccess on_success,
88  ContinueOnFail on_fail,
89  components... comps) {
91  FLSA flsa(fls);
92  return local_search(flsa, std::move(searchStrategy), std::move(on_success),
93  std::move(on_fail), std::move(comps)...);
94 }
95 
106 template <typename facility_location_solution, typename... components>
107 bool facility_location_first_improving(facility_location_solution &fls,
108  components... comps) {
111  utils::always_false{}, std::move(comps)...);
112 }
113 }
114 }
115 
116 #endif // PAAL_FACILITY_LOCATION_HPP
gain functor for swap in facility location problem.
Multisearch_components< facility_locationget_moves_add, facility_location_gain_add, facility_location_commit_add > default_add_fl_components
add components for facility location
functor return false
Definition: functors.hpp:222
data_structures::components< GetMoves, Gain, Commit > components
Definition for the components class for local search usually this class is not directly used...
bool facility_location_local_search(facility_location_solution &fls, SearchStrategy searchStrategy, ContinueOnSuccess on_success, ContinueOnFail on_fail, components...comps)
this is model of LocalSearchStepMultiSolution concept. See Local Search. The Move is facility_locati...
commit functor for facility location problem
commit functor for add moves in facility location problem
Model of Multisearch_components with default multi search components for facility location...
search_components< Args...> Multisearch_components
Multisearch_components template alias.
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
get moves functor for facility location problem
This strategy uses find_positive_predicate as stop condition.
Multisearch_components< facility_locationget_moves_swap, facility_location_gain_swap, facility_location_commit_swap > default_swap_fl_components
Swap components for facility location.
facility_location_solution adapter chosen range and unchosen range must be joined into one homogenus ...
functor return true
Definition: functors.hpp:227