An "external" constraint on a System.
This class is intended for use by applications that are examining a System by adding additional constraints based on their particular situation (e.g., that a velocity state element has an upper bound); it is not intended for declaring intrinsic constraints that some particular System subclass might always impose on itself (e.g., that a mass parameter is non-negative).
#include <drake/systems/framework/system_constraint.h>
Public Member Functions | |
| ExternalSystemConstraint () | |
| Creates an empty constraint. More... | |
| ExternalSystemConstraint (std::string description, SystemConstraintBounds bounds, SystemConstraintCalc< double > calc_double, SystemConstraintCalc< AutoDiffXd > calc_autodiffxd={}, SystemConstraintCalc< symbolic::Expression > calc_expression={}) | |
| Creates a constraint with the given arguments. More... | |
| const std::string & | description () const |
| Returns a human-readable description of this constraint. More... | |
| const SystemConstraintBounds & | bounds () const |
| Returns the bounds of this constraint (and whether it is an equality or inequality constraint.) More... | |
| template<typename T > | |
| const SystemConstraintCalc< T > & | get_calc () const |
Retrieves the evaluation function value = f(system, context) for this constraint. More... | |
| template<> | |
| const SystemConstraintCalc< double > & | do_get_calc () const |
| template<> | |
| const SystemConstraintCalc< AutoDiffXd > & | do_get_calc () const |
| template<> | |
| const SystemConstraintCalc< symbolic::Expression > & | do_get_calc () const |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| ExternalSystemConstraint (const ExternalSystemConstraint &)=default | |
| ExternalSystemConstraint & | operator= (const ExternalSystemConstraint &)=default |
| ExternalSystemConstraint (ExternalSystemConstraint &&)=default | |
| ExternalSystemConstraint & | operator= (ExternalSystemConstraint &&)=default |
Static Public Member Functions | |
| template<typename GenericSystemConstraintCalc > | |
| static ExternalSystemConstraint | MakeForAllScalars (std::string description, SystemConstraintBounds bounds, GenericSystemConstraintCalc calc) |
| Creates a constraint based on generic lambda. More... | |
| template<typename GenericSystemConstraintCalc > | |
| static ExternalSystemConstraint | MakeForNonsymbolicScalars (std::string description, SystemConstraintBounds bounds, GenericSystemConstraintCalc calc) |
| Creates a constraint based on generic lambda. More... | |
|
default |
|
default |
Creates an empty constraint.
| ExternalSystemConstraint | ( | std::string | description, |
| SystemConstraintBounds | bounds, | ||
| SystemConstraintCalc< double > | calc_double, | ||
| SystemConstraintCalc< AutoDiffXd > | calc_autodiffxd = {}, |
||
| SystemConstraintCalc< symbolic::Expression > | calc_expression = {} |
||
| ) |
Creates a constraint with the given arguments.
The calc functions (other than calc_double) may be omitted.
| const SystemConstraintBounds& bounds | ( | ) | const |
Returns the bounds of this constraint (and whether it is an equality or inequality constraint.)
| const std::string& description | ( | ) | const |
Returns a human-readable description of this constraint.
| const SystemConstraintCalc<double>& do_get_calc | ( | ) | const |
| const SystemConstraintCalc<AutoDiffXd>& do_get_calc | ( | ) | const |
| const SystemConstraintCalc<symbolic::Expression>& do_get_calc | ( | ) | const |
| const SystemConstraintCalc<T>& get_calc | ( | ) | const |
Retrieves the evaluation function value = f(system, context) for this constraint.
The result may be a default-constructed (missing) function, if the scalar type T is not supported by this constraint instance.
| T | denotes the scalar type of the System<T>. |
|
static |
Creates a constraint based on generic lambda.
This constraint will supply Calc functions for Drake's default scalar types.
|
static |
Creates a constraint based on generic lambda.
This constraint will supply Calc functions for Drake's non-symbolic default scalar types.
|
default |
|
default |