30 #ifndef TOWR_COSTS_SOFT_CONSTRAINT_H_ 31 #define TOWR_COSTS_SOFT_CONSTRAINT_H_ 33 #include <ifopt/cost_term.h> 81 virtual VecBound
GetBounds() const override final {
return VecBound(GetRows(), ifopt::NoBound); };
virtual Jacobian GetJacobian() const override
The row-vector of derivatives of the cost term.
virtual ~SoftConstraint()=default
ConstraintPtr constraint_
Component::Ptr ConstraintPtr
virtual VecBound GetBounds() const overridefinal
SoftConstraint(const ConstraintPtr &constraint)
Creates a soft constraint (=cost) from a hard constraint.
virtual void SetVariables(const VectorXd &x) overridefinal
virtual VectorXd GetValues() const override
average value of each upper and lower bound.
Converts a constraint to a cost by weighing the quadratic violations.
VectorXd W_
weights how each constraint violation contributes to the cost.