diff --git a/wpimath/src/main/java/edu/wpi/first/math/optimization/SimulatedAnnealing.java b/wpimath/src/main/java/edu/wpi/first/math/optimization/SimulatedAnnealing.java index 820829e808..f0ead5b459 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/optimization/SimulatedAnnealing.java +++ b/wpimath/src/main/java/edu/wpi/first/math/optimization/SimulatedAnnealing.java @@ -10,6 +10,12 @@ import java.util.function.ToDoubleFunction; /** * An implementation of the Simulated Annealing stochastic nonlinear optimization method. * + *

Solving optimization problems involves tweaking decision variables to try to minimize some + * cost function. Simulated annealing is good for solving optimization problems with many local + * minima and a very large search space (it’s a heuristic solver rather than an exact solver like, + * say, SQP or interior-point method). Simulated annealing is a popular choice for solving the + * traveling salesman problem (see {@link edu.wpi.first.math.path.TravelingSalesman}). + * * @see https://en.wikipedia.org/wiki/Simulated_annealing * @param The type of the state to optimize. diff --git a/wpimath/src/main/native/include/frc/optimization/SimulatedAnnealing.h b/wpimath/src/main/native/include/frc/optimization/SimulatedAnnealing.h index 08ccf596e1..0a16dd963a 100644 --- a/wpimath/src/main/native/include/frc/optimization/SimulatedAnnealing.h +++ b/wpimath/src/main/native/include/frc/optimization/SimulatedAnnealing.h @@ -15,6 +15,13 @@ namespace frc { * An implementation of the Simulated Annealing stochastic nonlinear * optimization method. * + * Solving optimization problems involves tweaking decision variables to try to + * minimize some cost function. Simulated annealing is good for solving + * optimization problems with many local minima and a very large search space + * (it’s a heuristic solver rather than an exact solver like, say, SQP or + * interior-point method). Simulated annealing is a popular choice for solving + * the traveling salesman problem (see TravelingSalesman). + * * @see https://en.wikipedia.org/wiki/Simulated_annealing * @tparam State The type of the state to optimize.