3#include <initializer_list>
61 std::initializer_list<double>
alpha,
62 std::initializer_list<double>
beta)
111 double weight() const noexcept {
return weight_; }
132 std::vector<double>
alpha,
133 std::vector<double>
beta,
137 alpha_(std::move(
alpha)),
138 beta_(std::move(
beta)),
141 static std::vector<double> copy_span(Span<const double> values)
147 return std::vector<double>(values.data(), values.data() + values.size());
151 double weight_ = 1.0;
152 std::vector<double> alpha_;
153 std::vector<double> beta_;
154 std::vector<double> normalize_;
183 std::initializer_list<double> alpha,
184 std::initializer_list<double> beta)
206 std::initializer_list<double> normalize)
Owning objective descriptor used by C++ COPP solver problem objects.
ObjectiveKind kind() const noexcept
Span< const double > beta() const noexcept
Span< const double > alpha() const noexcept
static Objective Linear(double weight, Span< const double > alpha, Span< const double > beta)
Add a linear torque objective.
static Objective ThermalEnergy(double weight, std::initializer_list< double > normalize)
Span< const double > normalize() const noexcept
static Objective TotalVariationTorque(double weight, std::initializer_list< double > normalize)
static Objective Time(double weight=1.0)
Minimize traversal time.
static Objective TotalVariationTorque(double weight, Span< const double > normalize)
Penalize total variation of torque along the path.
static Objective Linear(double weight, std::initializer_list< double > alpha, std::initializer_list< double > beta)
static Objective ThermalEnergy(double weight, Span< const double > normalize)
Penalize normalized squared torque / thermal energy.
double weight() const noexcept
Non-owning view of a contiguous one-dimensional array.
Python-like factory namespace for constructing COPP objective descriptors such as time,...
Objective Linear(double weight, Span< const double > alpha, Span< const double > beta)
Objective ThermalEnergy(double weight, Span< const double > normalize)
Objective TotalVariationTorque(double weight, Span< const double > normalize)
Objective Time(double weight=1.0)
Root namespace for the C++ facade: paths, robots, constraints, matrices, profiles,...
ObjectiveKind
Objective kinds accepted by COPP optimization solvers.