ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#include <Constraint.h>
Public Member Functions | |
bool | isRespected (int index=-1) const |
Constraint (Function *function, bool equality, const VectorXd &v=VectorXd()) | |
Constraint (Function *function, const VectorXd &l=VectorXd(), const VectorXd &u=VectorXd()) | |
virtual Function & | getFunction () |
virtual const Function & | getFunction () const |
bool | isEquality () const |
bool | isInequality () const |
void | setB (const VectorXd &b) |
void | setL (const VectorXd &l) |
void | setU (const VectorXd &u) |
void | setLandU (const VectorXd &l, const VectorXd &u) |
eConstraintType | getType () const |
const VectorXd & | getB () const |
const VectorXd & | getL () const |
const VectorXd & | getU () const |
void | setViolationTolerance (double tol) |
double | getViolationTolerance () const |
Public Member Functions inherited from ocra::SubjectBase< EVT_CSTR_CHANGE_BOUNDS_NUMBER > | |
void | connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const |
Call this method to register a non-static method as a callback. More... | |
void | connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const |
Call this method to register a free function as a callback. More... | |
void | disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const |
Disconnect non-static method. More... | |
void | disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const |
Disconnect free function. More... | |
void | propagate (int timestamp) const |
void | propagate () const |
Protected Attributes | |
Function & | _function |
Additional Inherited Members | |
Protected Member Functions inherited from ocra::SubjectBase< EVT_CSTR_CHANGE_BOUNDS_NUMBER > | |
SubjectBase () | |
~SubjectBase () | |
Definition at line 174 of file Constraint.h.
|
inline |
Specializations of the generic Constraint<T> constructors
Definition at line 593 of file Constraint.h.
|
inline |
Definition at line 618 of file Constraint.h.
|
inline |
Get the right member of an equality constraint.
Definition at line 543 of file Constraint.h.
|
inlinevirtual |
Returns the function associated with the constraint
Definition at line 231 of file Constraint.h.
|
inlinevirtual |
Definition at line 232 of file Constraint.h.
|
inline |
Get the lower bound of an inequality constraint.
Definition at line 549 of file Constraint.h.
|
inline |
getters on the datas of Constraint
Definition at line 538 of file Constraint.h.
|
inline |
Get the upper bound of an inequality constraint.
Definition at line 555 of file Constraint.h.
|
inline |
Definition at line 567 of file Constraint.h.
|
inline |
Equality/Inequality property accessor
Definition at line 396 of file Constraint.h.
|
inline |
Definition at line 401 of file Constraint.h.
|
inline |
Return true if the ith component of the constraint is valid for the actual value of its function, false otherwise. If the parameter is non-positive, it will check for the validity of all the components. Validity of a component is check with respect to the violation tolerance. This tolerance is 1.e-7 by default and can be changed with setViolationTolerance()
[in] | index. | Index of the constraint component. If non-positive (as with the default value), all components will be considered |
Definition at line 360 of file Constraint.h.
|
inline |
All of the following methods do not change the equality/inequality property of the constraint. In particular, changing l and or u for an inequality constraint so as to have l = u will not make it become an equality constraint.Set the right member of an equality constraint. If b is null the constraint is considered as an equality to zero (type CSTR_EQUAL_ZERO). If not, it stays or becomes an equality to b (type CSTR_EQUAL_B).
Definition at line 406 of file Constraint.h.
|
inline |
Set the lower bound of an inequality constraint. If l is null, the lower bound of the contraint is removed (if applicable). In case the constraint only had a lower bound, this bound is set to zero. If l is not null, the lower bound is changed to the value of l. If the constraint had no lower bound it is created and set to l.
Definition at line 419 of file Constraint.h.
|
inline |
This method combines setL() and setU(). It is provided to avoid breaking the precondition l<u of setL() or setU(), which could happen by calling sequentially both methods while the new l and u are perfectly valid. In case l or u is null (including the case when both are null), the method calls setL() and setU() in the proper order.
Definition at line 497 of file Constraint.h.
|
inline |
Set the upper bound of an inequality constraint. If u is null, the upper bound of the contraint is removed (if applicable). In case the constraint only had an upper bound, this bound is set to zero. If u is not null, the upper bound is changed to the value of u. If the constraint had no upper bound it is created and set to u.
Definition at line 458 of file Constraint.h.
|
inline |
getter and setter for the constraint violation tolerance
Definition at line 561 of file Constraint.h.
|
protected |
Definition at line 342 of file Constraint.h.