MCPcopy Create free account

hub / github.com/LeonSering/rapid_solve / functions

Functions144 in github.com/LeonSering/rapid_solve

↓ 52 callersMethodobjective_value
Get a reference to the [`ObjectiveValue`].
src/objective/evaluated_solution.rs:32
↓ 34 callersMethodunwrap
Unwraps the [`TspTour`] from this [`TspTourWithInfo`].
src/examples/tsp/tsp_tour_with_info/mod.rs:35
↓ 22 callersMethoditer
Returns the entries of the objective vector.
src/objective/objective_value.rs:26
↓ 21 callersMethodsolve
(&self, initial_solution: S)
src/heuristics/tabu_search/mod.rs:143
↓ 16 callersMethodget_nodes
Returns the `nodes` of the tour.
src/examples/tsp/tsp_tour.rs:77
↓ 15 callersMethodevaluate
Consumes the solution, computes its [`ObjectiveValue`], and returns both as [`EvaluatedSolution`].
src/objective/mod.rs:43
↓ 11 callersMethodget_distance
Returns the distance between two nodes.
src/examples/tsp/tsp_instance.rs:23
↓ 10 callersMethodunwrap
Unwrap the solution.
src/objective/evaluated_solution.rs:37
↓ 9 callersFunctionbuild
Builds a [`TabuSearchSolver`] for the TSP. The neighborhood is the 3-opt neighborhood, i.e., the neighborhood that consists of all tours that can be o
src/examples/tsp/solvers/tabu_search.rs:103
↓ 9 callersMethodget_number_of_nodes
Returns the number of nodes in the instance.
src/examples/tsp/tsp_instance.rs:28
↓ 9 callersMethodneighbors_of
( &'a self, tour: &'a TspTour, )
src/examples/tsp/neighborhood.rs:26
↓ 9 callersMethodsolution
Get a reference to the solution.
src/objective/evaluated_solution.rs:27
↓ 7 callersMethodcmp
(&self, other: &Self)
src/objective/base_value.rs:132
↓ 6 callersFunctiondefault_function_between_steps
Default function between steps that prints the iteration number, the objective value of the current solution, the comparison of the objective value of
src/heuristics/common/function_between_steps.rs:34
↓ 6 callersMethodthree_opt_swap
Performs a single [3-opt swap](https://en.wikipedia.org/wiki/3-opt) on the tour. Assumes that 0 <= i < j < k < n. New [`TspTour`] consists of the node
src/examples/tsp/tsp_tour.rs:93
↓ 5 callersFunctionbuild_tsp_objective
Builds the [`Objective`] for the TSP, which consists of a single [`Indicator`] for the total distance of the tour.
src/examples/tsp/objective.rs:20
↓ 4 callersMethodpartial_cmp
(&self, other: &Self)
src/objective/base_value.rs:165
↓ 2 callersFunctionbuild
Builds a local search solver with the default [`LocalImprover`][`crate::heuristics::local_search::local_improver::LocalImprover`] [`Minimizer`][`crate
src/examples/tsp/solvers/basic_local_search.rs:24
↓ 2 callersFunctionbuild
Builds a [`ThresholdAcceptingSolver`] for the TSP. The neighborhood is the [3-opt neighborhood][RotatedThreeOptNeighborhood], i.e., the neighborhood t
src/examples/tsp/solvers/threshold_accepting.rs:39
↓ 2 callersFunctionbuild
Builds a [`LocalSearchSolver`] with [`TakeFirstRecursion`] as [`LocalImprover`][`crate::heuristics::local_search::local_improver::LocalImprover`]. The
src/examples/tsp/solvers/take_first_local_search.rs:42
↓ 2 callersFunctionbuild
Builds a [`SimulatedAnnealingSolver`] for the TSP. The neighborhood is the [3-opt neighborhood][RotatedThreeOptNeighborhood], i.e., the neighborhood t
src/examples/tsp/solvers/simulated_annealing.rs:70
↓ 2 callersFunctionbuild
Builds a parallel local search solver with the default [`ParallelLocalImprover`][`crate::heuristics::parallel_local_search::parallel_local_improver::P
src/examples/tsp/solvers/parallel_local_search.rs:25
↓ 2 callersFunctionbuild
Builds a [`ParallelTabuSearchSolver`] for the TSP. The neighborhood is the 3-opt neighborhood, i.e., the neighborhood that consists of all tours that
src/examples/tsp/solvers/parallel_tabu_search.rs:102
↓ 2 callersFunctionbuild_objective_for_tsp_tour_with_info
Builds the [`Objective`] for [`TspTourWithInfo`], which consists of a single [`Indicator`] for the total distance of the tour.
src/examples/tsp/tsp_tour_with_info/objective.rs:21
↓ 2 callersMethodcmp
(&self, other: &Self)
src/objective/objective_value.rs:37
↓ 2 callersMethodevaluate
(&self, solution: &TestSolution)
src/objective/tests.rs:18
↓ 2 callersMethodget_total_distance
Returns the `total_distance` of the tour.
src/examples/tsp/tsp_tour.rs:82
↓ 2 callersMethodprint_objective_value
Prints the [`ObjectiveValue`].
src/objective/mod.rs:64
↓ 2 callersFunctionprint_usage
(program_name: &str)
src/examples/tsp/main.rs:76
↓ 2 callersMethodsum
(iter: I)
src/objective/base_value.rs:179
↓ 2 callersMethodunwrap_float
Unwraps [`BaseValue::Float`]. Panics if other variant.
src/objective/base_value.rs:43
↓ 1 callersMethodexplore_neihborhood
( &self, current_solution: &EvaluatedSolution<S>, current_threshold: &ObjectiveValue,
src/heuristics/threshold_accepting/mod.rs:157
↓ 1 callersMethodexplore_neihborhood
( &self, current_solution: &EvaluatedSolution<S>, current_temperature: Temperature,
src/heuristics/simulated_annealing/mod.rs:203
↓ 1 callersMethodimprove
( &self, solution: &EvaluatedSolution<S>, tabu_list: &VecDeque<T>, )
src/heuristics/parallel_tabu_search/parallel_tabu_improver/parallel_tabu_minimizer.rs:37
↓ 1 callersMethodimprove
(&self, solution: &EvaluatedSolution<S>)
src/heuristics/local_search/local_improver/minimizer.rs:34
↓ 1 callersMethodimprove
( &self, solution: &EvaluatedSolution<S>, tabu_list: &VecDeque<T>, )
src/heuristics/tabu_search/tabu_improver/tabu_minimizer.rs:37
↓ 1 callersMethodimprove
(&self, solution: &EvaluatedSolution<S>)
src/heuristics/parallel_local_search/parallel_local_improver/parallel_minimizer.rs:34
↓ 1 callersMethodimprove_recursion
Returns the first improving solution in the neighborhood of the given solutions. If no improvement is found, None is returned.
src/heuristics/local_search/local_improver/take_first_recursion.rs:58
↓ 1 callersMethodimprove_recursion
( &self, solutions: Vec<EvaluatedSolution<S>>, objective_to_beat: &ObjectiveValue,
src/heuristics/parallel_local_search/parallel_local_improver/take_any_recursion.rs:65
↓ 1 callersMethodis_tabu
Checks if the given 3-opt move is tabu.
src/examples/tsp/solvers/tabu_search.rs:23
↓ 1 callersMethodis_tabu
Checks if the given 3-opt move is tabu.
src/examples/tsp/solvers/parallel_tabu_search.rs:25
↓ 1 callersMethodpartial_cmp
(&self, other: &Self)
src/objective/objective_value.rs:48
↓ 1 callersMethodprint_objective_value_with_comparison
Prints the [`ObjectiveValue`] with a comparison to another [`ObjectiveValue`].
src/objective/mod.rs:71
Methodadd
(self, rhs: Self)
src/objective/objective_value.rs:64
Methodadd
(self, other: Self)
src/objective/base_value.rs:100
Methodas_vec
Returns the entries of the objective vector as a vector.
src/objective/objective_value.rs:31
Methodcreate_tabus
Creates for a given 3-opt move the three tabus corresponding to the arcs that are removed by the move.
src/examples/tsp/solvers/tabu_search.rs:35
Methodcreate_tabus
Creates for a given 3-opt move the three tabus corresponding to the arcs that are removed by the move.
src/examples/tsp/solvers/parallel_tabu_search.rs:37
Methodeq
(&self, other: &Self)
src/objective/objective_value.rs:54
Methodeq
(&self, other: &Self)
src/objective/base_value.rs:171
Methodevaluate
Evaluate the linear combination for a given solution.
src/objective/linear_combination.rs:15
Methodevaluate
(&self, tsp_tour: &TspTour)
src/examples/tsp/objective.rs:9
Methodevaluate
(&self, tsp_tour: &TspTourWithInfo)
src/examples/tsp/tsp_tour_with_info/objective.rs:10
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/objective/coefficient.rs:80
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/objective/linear_combination.rs:29
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/objective/base_value.rs:185
Methodfrom
(i: i32)
src/objective/coefficient.rs:31
Methodfrom_instance_nearest_neighbor
Creates a new [`TspTour`] using the [nearest neighbor heuristic](https://en.wikipedia.org/wiki/Nearest_neighbour_algorithm).
src/examples/tsp/tsp_tour.rs:39
Methodfrom_tsplib_file
Loads a [`TspInstance`] from a [TSPLIB file](http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/). Support symmetric and asymmetric instances.
src/examples/tsp/tsp_instance.rs:50
Methodget_last_i
Returns the first index of the last 3-opt move.
src/examples/tsp/tsp_tour_with_info/mod.rs:30
Methodget_tour
Returns the [`TspTour`] of this [`TspTourWithInfo`].
src/examples/tsp/tsp_tour_with_info/mod.rs:25
Methodimprove
(&self, solution: &EvaluatedSolution<S>)
src/heuristics/local_search/local_improver/take_first.rs:36
Methodimprove
(&self, solution: &EvaluatedSolution<S>)
src/heuristics/local_search/local_improver/take_first_recursion.rs:45
Methodimprove
(&self, solution: &EvaluatedSolution<S>)
src/heuristics/parallel_local_search/parallel_local_improver/take_any_recursion.rs:58
Methodinitialize
Creates a new [`ParallelTabuSearchSolver`] with the given [`ParallelTabuNeighborhood`], [`Objective`], tabu list size, and as a termination criterion
src/heuristics/parallel_tabu_search/mod.rs:73
Methodinitialize
Creates a new [`LocalSearchSolver`] with the given [`Neighborhood`] and [`Objective`]. Uses the default [`LocalImprover`] ([`Minimizer`]) and the defa
src/heuristics/local_search/mod.rs:51
Methodinitialize
Creates a new [`TabuSearchSolver`] with the given [`TabuNeighborhood`], [`Objective`], tabu list size, and as a termination criterion the maximal numb
src/heuristics/tabu_search/mod.rs:72
Methodinitialize
Creates a new [`ThresholdAcceptingSolver`] with the given [`Neighborhood`], [`Objective`], `initial_threshold` and `threshold_factor` (value between 0
src/heuristics/threshold_accepting/mod.rs:53
Methodinitialize
Creates a new [`SimulatedAnnealingSolver`] with the given [`Neighborhood`], [`Objective`], `initial_temperature`, `cooling_factor`, and [`AcceptancePr
src/heuristics/simulated_annealing/mod.rs:83
Methodinitialize
Creates a new [`ParallelLocalSearchSolver`] with the given [`ParallelNeighborhood`] and [`Objective`]. Uses the default [`ParallelLocalImprover`] ([`P
src/heuristics/parallel_local_search/mod.rs:46
Methodis_one
Returns `True` if the coefficient is one.
src/objective/coefficient.rs:22
Functionmain
With this main function, you can run a TSP solver with a provided TSPLIB file.
src/examples/tsp/main.rs:10
Methodmaximum
Returns the maximum [`ObjectiveValue`] ([`BaseValue::Maximum`] on each level).
src/objective/mod.rs:59
Methodmul
(self, other: BaseValue)
src/objective/coefficient.rs:45
Methodmul
(self, rhs: f32)
src/objective/objective_value.rs:92
Methodname
(&self)
src/objective/tests.rs:22
Methodname
(&self)
src/examples/tsp/objective.rs:13
Methodname
(&self)
src/examples/tsp/tsp_tour_with_info/objective.rs:14
Methodneighbors_of
( &'a self, tour: &'a TspTour, tabu_list: &'a VecDeque<Tabu>, )
src/examples/tsp/solvers/tabu_search.rs:70
Methodneighbors_of
( &'a self, tour: &'a TspTour, tabu_list: &'a VecDeque<Tabu>, )
src/examples/tsp/solvers/parallel_tabu_search.rs:72
Methodneighbors_of
( &'a self, tour_with_info: &'a TspTourWithInfo, )
src/examples/tsp/tsp_tour_with_info/neighborhood.rs:24
Methodnew
Creates a new [`Objective`] with the given [`LinearCombinations`][`LinearCombination`] as hierarchy levels. The most important level is the first entr
src/objective/mod.rs:121
Methodnew
Creates a new objective value. This is usally done by the [evaluate][super::Objective::evaluate] method of an Objective.
src/objective/objective_value.rs:21
Methodnew
Create a [`EvaluatedSolution`]. Usually done by the [`evaluate`][`super::Objective::evaluate`] method of an [`Objective`][`super::Objective`] instance
src/objective/evaluated_solution.rs:19
Methodnew
Creates a new linear combination from a list of summands.
src/objective/linear_combination.rs:23
Methodnew
Creates a new [`ParallelTabuMinimizer`] with the given [`ParallelTabuNeighborhood`] and [`Objective`].
src/heuristics/parallel_tabu_search/parallel_tabu_improver/parallel_tabu_minimizer.rs:26
Methodnew
Creates a new [`Minimizer`] with the given [`Neighborhood`] and [`Objective`].
src/heuristics/local_search/local_improver/minimizer.rs:22
Methodnew
Creates a new [`TakeFirst`] with the given [`Neighborhood`] and [`Objective`].
src/heuristics/local_search/local_improver/take_first.rs:24
Methodnew
Creates a new instance of [`TakeFirstRecursion`]. In addition to the [`Neighborhood`] and the [`Objective`] the following parameters are needed: `recu
src/heuristics/local_search/local_improver/take_first_recursion.rs:29
Methodnew
Creates a new [`TabuMinimizer`] with the given [`TabuNeighborhood`] and [`Objective`].
src/heuristics/tabu_search/tabu_improver/tabu_minimizer.rs:25
Methodnew
Creates a new [`ParallelMinimizer`] with the given [`ParallelNeighborhood`] and [`Objective`].
src/heuristics/parallel_local_search/parallel_local_improver/parallel_minimizer.rs:23
Methodnew
Creates a new instance of [`TakeAnyRecursion`]. In addition to the [`ParallelNeighborhood`] and the [`Objective`] the following parameters are needed:
src/heuristics/parallel_local_search/parallel_local_improver/take_any_recursion.rs:40
Methodnew
Creates a new [`TspTour`] with the given nodes and computes the total distance.
src/examples/tsp/tsp_tour.rs:16
Methodnew
Creates a new [`ThreeOptNeighborhood`] for the given [`TspInstance`].
src/examples/tsp/neighborhood.rs:20
Methodnew
Creates a new [`TspInstance`] with the given `distance_matrix`.
src/examples/tsp/tsp_instance.rs:36
Methodnew
Creates a new [`ThreeOptTabuNeighborhood`] for the given [`TspInstance`].
src/examples/tsp/solvers/tabu_search.rs:64
Methodnew
Creates a new [`ParallelThreeOptTabuNeighborhood`] for the given [`TspInstance`].
src/examples/tsp/solvers/parallel_tabu_search.rs:66
Methodnew
Creates a new [`RotatedThreeOptNeighborhood`] for the given [`TspInstance`].
src/examples/tsp/tsp_tour_with_info/neighborhood.rs:18
Methodnew
Creates a new [`TspTourWithInfo`] from a [`TspTour`] and the first index of the last 3-opt move.
src/examples/tsp/tsp_tour_with_info/mod.rs:20
Methodnew_pre_computed
( nodes: Vec<NodeIdx>, total_distance: Distance, tsp_instance: Arc<TspInstance>, )
src/examples/tsp/tsp_tour.rs:26
next →1–100 of 144, ranked by callers