|
using | Scalar = double |
| The scalar type with which this System was instantiated. More...
|
|
static DependencyTicket | nothing_ticket () |
| Returns a ticket indicating that a computation does not depend on any source value; that is, it is a constant. More...
|
|
static DependencyTicket | time_ticket () |
| Returns a ticket indicating dependence on time. More...
|
|
static DependencyTicket | accuracy_ticket () |
| Returns a ticket indicating dependence on the accuracy setting in the Context. More...
|
|
static DependencyTicket | q_ticket () |
| Returns a ticket indicating that a computation depends on configuration state variables q. More...
|
|
static DependencyTicket | v_ticket () |
| Returns a ticket indicating dependence on velocity state variables v. More...
|
|
static DependencyTicket | z_ticket () |
| Returns a ticket indicating dependence on any or all of the miscellaneous continuous state variables z. More...
|
|
static DependencyTicket | xc_ticket () |
| Returns a ticket indicating dependence on all of the continuous state variables q, v, or z. More...
|
|
static DependencyTicket | xd_ticket () |
| Returns a ticket indicating dependence on all of the numerical discrete state variables, in any discrete variable group. More...
|
|
static DependencyTicket | xa_ticket () |
| Returns a ticket indicating dependence on all of the abstract state variables in the current Context. More...
|
|
static DependencyTicket | all_state_ticket () |
| Returns a ticket indicating dependence on all state variables x in this system, including continuous variables xc, discrete (numeric) variables xd, and abstract state variables xa. More...
|
|
static DependencyTicket | pn_ticket () |
| Returns a ticket indicating dependence on all of the numerical parameters in the current Context. More...
|
|
static DependencyTicket | pa_ticket () |
| Returns a ticket indicating dependence on all of the abstract parameters pa in the current Context. More...
|
|
static DependencyTicket | all_parameters_ticket () |
| Returns a ticket indicating dependence on all parameters p in this system, including numeric parameters pn, and abstract parameters pa. More...
|
|
static DependencyTicket | all_input_ports_ticket () |
| Returns a ticket indicating dependence on all input ports u of this system. More...
|
|
static DependencyTicket | all_sources_ticket () |
| Returns a ticket indicating dependence on every possible independent source value, including time, accuracy, state, input ports, and parameters (but not cache entries). More...
|
|
static DependencyTicket | configuration_ticket () |
| Returns a ticket indicating dependence on all source values that may affect configuration-dependent computations. More...
|
|
static DependencyTicket | kinematics_ticket () |
| Returns a ticket indicating dependence on all source values that may affect configuration- or velocity-dependent computations. More...
|
|
static DependencyTicket | xcdot_ticket () |
| Returns a ticket for the cache entry that holds time derivatives of the continuous variables. More...
|
|
static DependencyTicket | pe_ticket () |
| Returns a ticket for the cache entry that holds the potential energy calculation. More...
|
|
static DependencyTicket | ke_ticket () |
| Returns a ticket for the cache entry that holds the kinetic energy calculation. More...
|
|
static DependencyTicket | pc_ticket () |
| Returns a ticket for the cache entry that holds the conservative power calculation. More...
|
|
static DependencyTicket | pnc_ticket () |
| Returns a ticket for the cache entry that holds the non-conservative power calculation. More...
|
|
static std::unique_ptr< S< double > > | Clone (const S< double > &from) |
| Creates a deep copy of this system. More...
|
|
static std::unique_ptr< S< AutoDiffXd > > | ToAutoDiffXd (const S< double > &from) |
| Creates a deep copy of from , transmogrified to use the autodiff scalar type, with a dynamic-sized vector of partial derivatives. More...
|
|
static std::unique_ptr< S< symbolic::Expression > > | ToSymbolic (const S< double > &from) |
| Creates a deep copy of from , transmogrified to use the symbolic scalar type. More...
|
|
static std::unique_ptr< S< U > > | ToScalarType (const S< double > &from) |
| Creates a deep copy of from , transmogrified to use the scalar type selected by a template parameter. More...
|
|
static DependencyTicket | nothing_ticket () |
| Returns a ticket indicating that a computation does not depend on any source value; that is, it is a constant. More...
|
|
static DependencyTicket | time_ticket () |
| Returns a ticket indicating dependence on time. More...
|
|
static DependencyTicket | accuracy_ticket () |
| Returns a ticket indicating dependence on the accuracy setting in the Context. More...
|
|
static DependencyTicket | q_ticket () |
| Returns a ticket indicating that a computation depends on configuration state variables q. More...
|
|
static DependencyTicket | v_ticket () |
| Returns a ticket indicating dependence on velocity state variables v. More...
|
|
static DependencyTicket | z_ticket () |
| Returns a ticket indicating dependence on any or all of the miscellaneous continuous state variables z. More...
|
|
static DependencyTicket | xc_ticket () |
| Returns a ticket indicating dependence on all of the continuous state variables q, v, or z. More...
|
|
static DependencyTicket | xd_ticket () |
| Returns a ticket indicating dependence on all of the numerical discrete state variables, in any discrete variable group. More...
|
|
static DependencyTicket | xa_ticket () |
| Returns a ticket indicating dependence on all of the abstract state variables in the current Context. More...
|
|
static DependencyTicket | all_state_ticket () |
| Returns a ticket indicating dependence on all state variables x in this system, including continuous variables xc, discrete (numeric) variables xd, and abstract state variables xa. More...
|
|
static DependencyTicket | pn_ticket () |
| Returns a ticket indicating dependence on all of the numerical parameters in the current Context. More...
|
|
static DependencyTicket | pa_ticket () |
| Returns a ticket indicating dependence on all of the abstract parameters pa in the current Context. More...
|
|
static DependencyTicket | all_parameters_ticket () |
| Returns a ticket indicating dependence on all parameters p in this system, including numeric parameters pn, and abstract parameters pa. More...
|
|
static DependencyTicket | all_input_ports_ticket () |
| Returns a ticket indicating dependence on all input ports u of this system. More...
|
|
static DependencyTicket | all_sources_except_input_ports_ticket () |
| Returns a ticket indicating dependence on every possible independent source value except input ports. More...
|
|
static DependencyTicket | all_sources_ticket () |
| Returns a ticket indicating dependence on every possible independent source value, including time, accuracy, state, input ports, and parameters (but not cache entries). More...
|
|
static DependencyTicket | configuration_ticket () |
| Returns a ticket indicating dependence on all source values that may affect configuration-dependent computations. More...
|
|
static DependencyTicket | kinematics_ticket () |
| Returns a ticket indicating dependence on all source values that may affect configuration- or velocity-dependent computations. More...
|
|
static DependencyTicket | xcdot_ticket () |
| Returns a ticket for the cache entry that holds time derivatives of the continuous variables. More...
|
|
static DependencyTicket | pe_ticket () |
| Returns a ticket for the cache entry that holds the potential energy calculation. More...
|
|
static DependencyTicket | ke_ticket () |
| Returns a ticket for the cache entry that holds the kinetic energy calculation. More...
|
|
static DependencyTicket | pc_ticket () |
| Returns a ticket for the cache entry that holds the conservative power calculation. More...
|
|
static DependencyTicket | pnc_ticket () |
| Returns a ticket for the cache entry that holds the non-conservative power calculation. More...
|
|
static DependencyTicket | xd_unique_periodic_update_ticket () |
| (Internal use only) Returns a ticket for the cache entry that holds the unique periodic discrete update computation. More...
|
|
| LeafSystem () |
| Default constructor that declares no inputs, outputs, state, parameters, events, nor scalar-type conversion support (AutoDiff, etc.). More...
|
|
| LeafSystem (SystemScalarConverter converter) |
| Constructor that declares no inputs, outputs, state, parameters, or events, but allows subclasses to declare scalar-type conversion support (AutoDiff, etc.). More...
|
|
virtual std::unique_ptr< LeafContext< double > > | DoMakeLeafContext () const |
| Provides a new instance of the leaf context for this system. More...
|
|
virtual void | DoValidateAllocatedLeafContext (const LeafContext< double > &context) const |
| Derived classes that impose restrictions on what resources are permitted should check those restrictions by implementing this. More...
|
|
double | DoCalcWitnessValue (const Context< double > &context, const WitnessFunction< double > &witness_func) const final |
| Derived classes will implement this method to evaluate a witness function at the given context. More...
|
|
void | AddTriggeredWitnessFunctionToCompositeEventCollection (Event< double > *event, CompositeEventCollection< double > *events) const final |
| Add event to events due to a witness function triggering. More...
|
|
void | DoCalcNextUpdateTime (const Context< double > &context, CompositeEventCollection< double > *events, double *time) const override |
| Computes the next update time based on the configured periodic events, for scalar types that are arithmetic, or aborts for scalar types that are not arithmetic. More...
|
|
std::unique_ptr< ContinuousState< double > > | AllocateContinuousState () const |
| Returns a copy of the state declared in the most recent DeclareContinuousState() call, or else a zero-sized state if that method has never been called. More...
|
|
std::unique_ptr< DiscreteValues< double > > | AllocateDiscreteState () const |
| Returns a copy of the states declared in DeclareDiscreteState() calls. More...
|
|
std::unique_ptr< AbstractValues > | AllocateAbstractState () const |
| Returns a copy of the states declared in DeclareAbstractState() calls. More...
|
|
std::unique_ptr< Parameters< double > > | AllocateParameters () const |
| Returns a copy of the parameters declared in DeclareNumericParameter() and DeclareAbstractParameter() calls. More...
|
|
int | DeclareNumericParameter (const BasicVector< double > &model_vector) |
| Declares a numeric parameter using the given model_vector . More...
|
|
const U< double > & | GetNumericParameter (const Context< double > &context, int index) const |
| Extracts the numeric parameters of type U from the context at index . More...
|
|
U< double > & | GetMutableNumericParameter (Context< double > *context, int index) const |
| Extracts the numeric parameters of type U from the context at index . More...
|
|
int | DeclareAbstractParameter (const AbstractValue &model_value) |
| Declares an abstract parameter using the given model_value . More...
|
|
SystemConstraintIndex | DeclareEqualityConstraint (void(MySystem::*calc)(const Context< double > &, VectorX< double > *) const, int count, std::string description) |
| Declares a system constraint of the form f(context) = 0 by specifying a member function to use to calculate the (VectorX) constraint value with a signature: More...
|
|
SystemConstraintIndex | DeclareEqualityConstraint (ContextConstraintCalc< double > calc, int count, std::string description) |
| Declares a system constraint of the form f(context) = 0 by specifying a std::function to use to calculate the (Vector) constraint value with a signature: More...
|
|
SystemConstraintIndex | DeclareInequalityConstraint (void(MySystem::*calc)(const Context< double > &, VectorX< double > *) const, SystemConstraintBounds bounds, std::string description) |
| Declares a system constraint of the form bounds.lower() <= calc(context) <= bounds.upper() by specifying a member function to use to calculate the (VectorX) constraint value with a signature: More...
|
|
SystemConstraintIndex | DeclareInequalityConstraint (ContextConstraintCalc< double > calc, SystemConstraintBounds bounds, std::string description) |
| Declares a system constraint of the form bounds.lower() <= calc(context) <= bounds.upper() by specifying a std::function to use to calculate the (Vector) constraint value with a signature: More...
|
|
void | DeclarePeriodicPublishEvent (double period_sec, double offset_sec, EventStatus(MySystem::*publish)(const Context< double > &) const) |
| Declares that a Publish event should occur periodically and that it should invoke the given event handler method. More...
|
|
void | DeclarePeriodicPublishEvent (double period_sec, double offset_sec, void(MySystem::*publish)(const Context< double > &) const) |
| This variant accepts a handler that is assumed to succeed rather than one that returns an EventStatus result. More...
|
|
void | DeclarePeriodicDiscreteUpdateEvent (double period_sec, double offset_sec, EventStatus(MySystem::*update)(const Context< double > &, DiscreteValues< double > *) const) |
| Declares that a DiscreteUpdate event should occur periodically and that it should invoke the given event handler method. More...
|
|
void | DeclarePeriodicDiscreteUpdateEvent (double period_sec, double offset_sec, void(MySystem::*update)(const Context< double > &, DiscreteValues< double > *) const) |
| This variant accepts a handler that is assumed to succeed rather than one that returns an EventStatus result. More...
|
|
void | DeclarePeriodicUnrestrictedUpdateEvent (double period_sec, double offset_sec, EventStatus(MySystem::*update)(const Context< double > &, State< double > *) const) |
| Declares that an UnrestrictedUpdate event should occur periodically and that it should invoke the given event handler method. More...
|
|
void | DeclarePeriodicUnrestrictedUpdateEvent (double period_sec, double offset_sec, void(MySystem::*update)(const Context< double > &, State< double > *) const) |
| This variant accepts a handler that is assumed to succeed rather than one that returns an EventStatus result. More...
|
|
void | DeclarePeriodicEvent (double period_sec, double offset_sec, const EventType &event) |
| (Advanced) Declares that a particular Event object should be dispatched periodically. More...
|
|
void | DeclarePerStepPublishEvent (EventStatus(MySystem::*publish)(const Context< double > &) const) |
| Declares that a Publish event should occur at initialization and at the end of every trajectory-advancing step and that it should invoke the given event handler method. More...
|
|
void | DeclarePerStepDiscreteUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, DiscreteValues< double > *) const) |
| Declares that a DiscreteUpdate event should occur at the start of every trajectory-advancing step and that it should invoke the given event handler method. More...
|
|
void | DeclarePerStepUnrestrictedUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, State< double > *) const) |
| Declares that an UnrestrictedUpdate event should occur at the start of every trajectory-advancing step and that it should invoke the given event handler method. More...
|
|
void | DeclarePerStepEvent (const EventType &event) |
| (Advanced) Declares that a particular Event object should be dispatched at every trajectory-advancing step. More...
|
|
void | DeclareInitializationPublishEvent (EventStatus(MySystem::*publish)(const Context< double > &) const) |
| Declares that a Publish event should occur at initialization and that it should invoke the given event handler method. More...
|
|
void | DeclareInitializationDiscreteUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, DiscreteValues< double > *) const) |
| Declares that a DiscreteUpdate event should occur at initialization and that it should invoke the given event handler method. More...
|
|
void | DeclareInitializationUnrestrictedUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, State< double > *) const) |
| Declares that an UnrestrictedUpdate event should occur at initialization and that it should invoke the given event handler method. More...
|
|
void | DeclareInitializationEvent (const EventType &event) |
| (Advanced) Declares that a particular Event object should be dispatched at initialization. More...
|
|
void | DeclareForcedPublishEvent (EventStatus(MySystem::*publish)(const Context< double > &) const) |
| Declares a function that is called whenever a user directly calls ForcedPublish(const Context&). More...
|
|
void | DeclareForcedDiscreteUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, DiscreteValues< double > *) const) |
| Declares a function that is called whenever a user directly calls CalcForcedDiscreteVariableUpdate(const Context&, DiscreteValues<T>*). More...
|
|
void | DeclareForcedUnrestrictedUpdateEvent (EventStatus(MySystem::*update)(const Context< double > &, State< double > *) const) |
| Declares a function that is called whenever a user directly calls CalcForcedUnrestrictedUpdate(const Context&, State<T>*). More...
|
|
ContinuousStateIndex | DeclareContinuousState (int num_state_variables) |
| Declares that this System should reserve continuous state with num_state_variables state variables, which have no second-order structure. More...
|
|
ContinuousStateIndex | DeclareContinuousState (int num_q, int num_v, int num_z) |
| Declares that this System should reserve continuous state with num_q generalized positions, num_v generalized velocities, and num_z miscellaneous state variables. More...
|
|
ContinuousStateIndex | DeclareContinuousState (const BasicVector< double > &model_vector) |
| Declares that this System should reserve continuous state with model_vector.size() miscellaneous state variables, stored in a vector cloned from model_vector . More...
|
|
ContinuousStateIndex | DeclareContinuousState (const BasicVector< double > &model_vector, int num_q, int num_v, int num_z) |
| Declares that this System should reserve continuous state with num_q generalized positions, num_v generalized velocities, and num_z miscellaneous state variables, stored in a vector cloned from model_vector . More...
|
|
DiscreteStateIndex | DeclareDiscreteState (const BasicVector< double > &model_vector) |
| Declares a discrete state group with model_vector.size() state variables, stored in a vector cloned from model_vector (preserving the concrete type and value). More...
|
|
DiscreteStateIndex | DeclareDiscreteState (const Eigen::Ref< const VectorX< double >> &vector) |
| Declares a discrete state group with vector.size() state variables, stored in a BasicVector initialized with the contents of vector . More...
|
|
DiscreteStateIndex | DeclareDiscreteState (int num_state_variables) |
| Declares a discrete state group with num_state_variables state variables, stored in a BasicVector initialized to be all-zero. More...
|
|
AbstractStateIndex | DeclareAbstractState (const AbstractValue &model_value) |
| Declares an abstract state variable and provides a model value for it. More...
|
|
void | DeclareImplicitTimeDerivativesResidualSize (int n) |
| (Advanced) Overrides the default size for the implicit time derivatives residual. More...
|
|
InputPort< double > & | DeclareVectorInputPort (std::variant< std::string, UseDefaultName > name, const BasicVector< double > &model_vector, std::optional< RandomDistribution > random_type=std::nullopt) |
| Declares a vector-valued input port using the given model_vector . More...
|
|
InputPort< double > & | DeclareVectorInputPort (std::variant< std::string, UseDefaultName > name, int size, std::optional< RandomDistribution > random_type=std::nullopt) |
| Declares a vector-valued input port with type BasicVector and size size . More...
|
|
InputPort< double > & | DeclareAbstractInputPort (std::variant< std::string, UseDefaultName > name, const AbstractValue &model_value) |
| Declares an abstract-valued input port using the given model_value . More...
|
|
void | DeprecateInputPort (const InputPort< double > &port, std::string message) |
| Flags an already-declared input port as deprecated. More...
|
|
LeafOutputPort< double > & | DeclareVectorOutputPort (std::variant< std::string, UseDefaultName > name, const BasicVectorSubtype &model_vector, void(MySystem::*calc)(const Context< double > &, BasicVectorSubtype *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a vector-valued output port by specifying (1) a model vector of type BasicVectorSubtype derived from BasicVector and initialized to the correct size and desired initial value, and (2) a calculator function that is a class member function (method) with signature: More...
|
|
LeafOutputPort< double > & | DeclareVectorOutputPort (std::variant< std::string, UseDefaultName > name, int size, void(MySystem::*calc)(const Context< double > &, BasicVector< double > *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a vector-valued output port with type BasicVector and size size , using the drake::dummy_value<T>, which is NaN when T = double. More...
|
|
LeafOutputPort< double > & | DeclareVectorOutputPort (std::variant< std::string, UseDefaultName > name, void(MySystem::*calc)(const Context< double > &, BasicVectorSubtype *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a vector-valued output port by specifying only a calculator function that is a class member function (method) with signature: More...
|
|
LeafOutputPort< double > & | DeclareVectorOutputPort (std::variant< std::string, UseDefaultName > name, const BasicVector< double > &model_vector, typename LeafOutputPort< double >::CalcVectorCallback vector_calc_function, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| (Advanced) Declares a vector-valued output port using the given model_vector and a function for calculating the port's value at runtime. More...
|
|
LeafOutputPort< double > & | DeclareVectorOutputPort (std::variant< std::string, UseDefaultName > name, int size, typename LeafOutputPort< double >::CalcVectorCallback vector_calc_function, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| (Advanced) Declares a vector-valued output port with type BasicVector<T> and size size , using the drake::dummy_value<T>, which is NaN when T = double. More...
|
|
LeafOutputPort< double > & | DeclareAbstractOutputPort (std::variant< std::string, UseDefaultName > name, const OutputType &model_value, void(MySystem::*calc)(const Context< double > &, OutputType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares an abstract-valued output port by specifying a model value of concrete type OutputType and a calculator function that is a class member function (method) with signature: More...
|
|
LeafOutputPort< double > & | DeclareAbstractOutputPort (std::variant< std::string, UseDefaultName > name, void(MySystem::*calc)(const Context< double > &, OutputType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares an abstract-valued output port by specifying only a calculator function that is a class member function (method) with signature: More...
|
|
LeafOutputPort< double > & | DeclareAbstractOutputPort (std::variant< std::string, UseDefaultName > name, typename LeafOutputPort< double >::AllocCallback alloc, typename LeafOutputPort< double >::CalcCallback calc, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| (Advanced) Declares an abstract-valued output port using the given allocator and calculator functions provided in their most generic forms. More...
|
|
LeafOutputPort< double > & | DeclareStateOutputPort (std::variant< std::string, UseDefaultName > name, ContinuousStateIndex state_index) |
| Declares a vector-valued output port whose value is the continuous state of this system. More...
|
|
LeafOutputPort< double > & | DeclareStateOutputPort (std::variant< std::string, UseDefaultName > name, DiscreteStateIndex state_index) |
| Declares a vector-valued output port whose value is the given discrete state group of this system. More...
|
|
LeafOutputPort< double > & | DeclareStateOutputPort (std::variant< std::string, UseDefaultName > name, AbstractStateIndex state_index) |
| Declares an abstract-valued output port whose value is the given abstract state of this system. More...
|
|
void | DeprecateOutputPort (const OutputPort< double > &port, std::string message) |
| Flags an already-declared output port as deprecated. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, double(MySystem::*calc)(const Context< double > &) const) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, and calculator function; and with no event object. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, std::function< double(const Context< double > &)> calc) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, and calculator function; and with no event object. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, double(MySystem::*calc)(const Context< double > &) const, void(MySystem::*publish_callback)(const Context< double > &, const PublishEvent< double > &) const) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, calculator function, and publish event callback function for when this triggers. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, double(MySystem::*calc)(const Context< double > &) const, void(MySystem::*du_callback)(const Context< double > &, const DiscreteUpdateEvent< double > &, DiscreteValues< double > *) const) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, calculator function, and discrete update event callback function for when this triggers. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, double(MySystem::*calc)(const Context< double > &) const, void(MySystem::*uu_callback)(const Context< double > &, const UnrestrictedUpdateEvent< double > &, State< double > *) const) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, calculator function, and unrestricted update event callback function for when this triggers. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, double(MySystem::*calc)(const Context< double > &) const, const Event< double > &e) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, and calculator function, and with an object corresponding to the event that is to be dispatched when this witness function triggers. More...
|
|
std::unique_ptr< WitnessFunction< double > > | MakeWitnessFunction (const std::string &description, const WitnessFunctionDirection &direction_type, std::function< double(const Context< double > &)> calc, const Event< double > &e) const |
| Constructs the witness function with the given description (used primarily for debugging and logging), direction type, and calculator function, and with an object corresponding to the event that is to be dispatched when this witness function triggers. More...
|
|
virtual void | DoGetWitnessFunctions (const Context< double > &, std::vector< const WitnessFunction< double > * > *) const |
| Derived classes can override this method to provide witness functions active for the given state. More...
|
|
SystemConstraintIndex | AddConstraint (std::unique_ptr< SystemConstraint< double >> constraint) |
| Adds an already-created constraint to the list of constraints for this System. More...
|
|
bool | forced_publish_events_exist () const |
|
bool | forced_discrete_update_events_exist () const |
|
bool | forced_unrestricted_update_events_exist () const |
|
EventCollection< PublishEvent< double > > & | get_mutable_forced_publish_events () |
|
EventCollection< DiscreteUpdateEvent< double > > & | get_mutable_forced_discrete_update_events () |
|
EventCollection< UnrestrictedUpdateEvent< double > > & | get_mutable_forced_unrestricted_update_events () |
|
const EventCollection< DiscreteUpdateEvent< double > > & | get_forced_discrete_update_events () const |
|
const EventCollection< UnrestrictedUpdateEvent< double > > & | get_forced_unrestricted_update_events () const |
|
void | set_forced_publish_events (std::unique_ptr< EventCollection< PublishEvent< double >>> forced) |
|
void | set_forced_discrete_update_events (std::unique_ptr< EventCollection< DiscreteUpdateEvent< double >>> forced) |
|
void | set_forced_unrestricted_update_events (std::unique_ptr< EventCollection< UnrestrictedUpdateEvent< double >>> forced) |
|
SystemScalarConverter & | get_mutable_system_scalar_converter () |
| Returns the SystemScalarConverter for this system. More...
|
|
CacheEntry & | DeclareCacheEntry (std::string description, ValueProducer value_producer, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a new CacheEntry in this System using the most generic form of the calculation function. More...
|
|
CacheEntry & | DeclareCacheEntry (std::string description, const ValueType &model_value, void(MySystem::*calc)(const MyContext &, ValueType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a cache entry by specifying a model value of concrete type ValueType and a calculator function that is a class member function (method) with signature: More...
|
|
CacheEntry & | DeclareCacheEntry (std::string description, void(MySystem::*calc)(const MyContext &, ValueType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a cache entry by specifying only a calculator function that is a class member function (method) with signature: More...
|
|
| System (SystemScalarConverter converter) |
| Constructs an empty System base class object and allocates base class resources, possibly supporting scalar-type conversion support (AutoDiff, etc.) using converter . More...
|
|
InputPort< double > & | DeclareInputPort (std::variant< std::string, UseDefaultName > name, PortDataType type, int size, std::optional< RandomDistribution > random_type=std::nullopt) |
| Adds a port with the specified type and size to the input topology. More...
|
|
virtual void | DoCalcTimeDerivatives (const Context< double > &context, ContinuousState< double > *derivatives) const |
| Override this if you have any continuous state variables x꜀ in your concrete System to calculate their time derivatives. More...
|
|
virtual void | DoCalcImplicitTimeDerivativesResidual (const Context< double > &context, const ContinuousState< double > &proposed_derivatives, EigenPtr< VectorX< double >> residual) const |
| Override this if you have an efficient way to evaluate the implicit time derivatives residual for this System. More...
|
|
virtual double | DoCalcPotentialEnergy (const Context< double > &context) const |
| Override this method for physical systems to calculate the potential energy PE currently stored in the configuration provided in the given Context. More...
|
|
virtual double | DoCalcKineticEnergy (const Context< double > &context) const |
| Override this method for physical systems to calculate the kinetic energy KE currently present in the motion provided in the given Context. More...
|
|
virtual double | DoCalcConservativePower (const Context< double > &context) const |
| Override this method to return the rate Pc at which mechanical energy is being converted from potential energy to kinetic energy by this system in the given Context. More...
|
|
virtual double | DoCalcNonConservativePower (const Context< double > &context) const |
| Override this method to return the rate Pnc at which work W is done on the system by non-conservative forces. More...
|
|
virtual void | DoMapQDotToVelocity (const Context< double > &context, const Eigen::Ref< const VectorX< double >> &qdot, VectorBase< double > *generalized_velocity) const |
| Provides the substantive implementation of MapQDotToVelocity(). More...
|
|
virtual void | DoMapVelocityToQDot (const Context< double > &context, const Eigen::Ref< const VectorX< double >> &generalized_velocity, VectorBase< double > *qdot) const |
| Provides the substantive implementation of MapVelocityToQDot(). More...
|
|
Eigen::VectorBlock< VectorX< double > > | GetMutableOutputVector (SystemOutput< double > *output, int port_index) const |
| Returns a mutable Eigen expression for a vector valued output port with index port_index in this system. More...
|
|
| SystemBase ()=default |
| (Internal use only). More...
|
|
void | AddInputPort (std::unique_ptr< InputPortBase > port) |
| (Internal use only) Adds an already-constructed input port to this System. More...
|
|
void | AddOutputPort (std::unique_ptr< OutputPortBase > port) |
| (Internal use only) Adds an already-constructed output port to this System. More...
|
|
std::string | NextInputPortName (std::variant< std::string, UseDefaultName > given_name) const |
| (Internal use only) Returns a name for the next input port, using the given name if it isn't kUseDefaultName, otherwise making up a name like "u3" from the next available input port index. More...
|
|
std::string | NextOutputPortName (std::variant< std::string, UseDefaultName > given_name) const |
| (Internal use only) Returns a name for the next output port, using the given name if it isn't kUseDefaultName, otherwise making up a name like "y3" from the next available output port index. More...
|
|
void | AddDiscreteStateGroup (DiscreteStateIndex index) |
| (Internal use only) Assigns a ticket to a new discrete variable group with the given index . More...
|
|
void | AddAbstractState (AbstractStateIndex index) |
| (Internal use only) Assigns a ticket to a new abstract state variable with the given index . More...
|
|
void | AddNumericParameter (NumericParameterIndex index) |
| (Internal use only) Assigns a ticket to a new numeric parameter with the given index . More...
|
|
void | AddAbstractParameter (AbstractParameterIndex index) |
| (Internal use only) Assigns a ticket to a new abstract parameter with the given index . More...
|
|
CacheEntry & | DeclareCacheEntryWithKnownTicket (DependencyTicket known_ticket, std::string description, ValueProducer value_producer, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| (Internal use only) This is for cache entries associated with pre-defined tickets, for example the cache entry for time derivatives. More...
|
|
const internal::SystemParentServiceInterface * | get_parent_service () const |
| Returns a pointer to the service interface of the immediately enclosing Diagram if one has been set, otherwise nullptr. More...
|
|
DependencyTicket | assign_next_dependency_ticket () |
| (Internal use only) Assigns the next unused dependency ticket number, unique only within a particular system. More...
|
|
bool | IsObviouslyNotInputDependent (DependencyTicket dependency_ticket) const |
| (Internal use only) Checks if a ticket depends on (any) input port. More...
|
|
const AbstractValue * | EvalAbstractInputImpl (const char *func, const ContextBase &context, InputPortIndex port_index) const |
| (Internal use only) Shared code for updating an input port and returning a pointer to its abstract value, or nullptr if the port is not connected. More...
|
|
void | ThrowNegativePortIndex (const char *func, int port_index) const |
| Throws std::exception to report a negative port_index that was passed to API method func . More...
|
|
void | ThrowInputPortIndexOutOfRange (const char *func, InputPortIndex port_index) const |
| Throws std::exception to report bad input port_index that was passed to API method func . More...
|
|
void | ThrowOutputPortIndexOutOfRange (const char *func, OutputPortIndex port_index) const |
| Throws std::exception to report bad output port_index that was passed to API method func . More...
|
|
void | ThrowNotAVectorInputPort (const char *func, InputPortIndex port_index) const |
| Throws std::exception because someone misused API method func , that is only allowed for declared-vector input ports, on an abstract port whose index is given here. More...
|
|
void | ThrowInputPortHasWrongType (const char *func, InputPortIndex port_index, const std::string &expected_type, const std::string &actual_type) const |
| Throws std::exception because someone called API method func claiming the input port had some value type that was wrong. More...
|
|
void | ThrowCantEvaluateInputPort (const char *func, InputPortIndex port_index) const |
| Throws std::exception because someone called API method func , that requires this input port to be evaluatable, but the port was neither fixed nor connected. More...
|
|
const InputPortBase & | GetInputPortBaseOrThrow (const char *func, int port_index, bool warn_deprecated) const |
| (Internal use only) Returns the InputPortBase at index port_index , throwing std::exception we don't like the port index. More...
|
|
const OutputPortBase & | GetOutputPortBaseOrThrow (const char *func, int port_index, bool warn_deprecated) const |
| (Internal use only) Returns the OutputPortBase at index port_index , throwing std::exception if we don't like the port index. More...
|
|
void | ThrowValidateContextMismatch (const ContextBase &) const |
| (Internal use only) Throws std::exception with a message that the sanity check(s) given by ValidateContext have failed. More...
|
|
virtual std::string | GetUnsupportedScalarConversionMessage (const std::type_info &source_type, const std::type_info &destination_type) const |
| (Internal use only) Returns the message to use for a std::exception in the case of unsupported scalar type conversions. More...
|
|
void | InitializeContextBase (ContextBase *context) const |
| This method must be invoked from within derived class DoAllocateContext() implementations right after the concrete Context object has been allocated. More...
|
|
const ContextSizes & | get_context_sizes () const |
| Obtains access to the declared Context partition sizes as accumulated during LeafSystem or Diagram construction . More...
|
|
ContextSizes & | get_mutable_context_sizes () |
| Obtains mutable access to the Context sizes struct. More...
|
|
void | set_implicit_time_derivatives_residual_size (int n) |
| Allows a LeafSystem to override the default size for the implicit time derivatives residual and a Diagram to sum up the total size. More...
|
|
internal::SystemId | get_system_id () const |
| (Internal) Gets the id used to tag context data as being created by this system. More...
|
|
virtual GraphvizFragment | DoGetGraphvizFragment (const GraphvizFragmentParams ¶ms) const |
| The NVI implementation of GetGraphvizFragment() for subclasses to override if desired. More...
|
|
CacheEntry & | DeclareCacheEntry (std::string description, ValueProducer value_producer, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a new CacheEntry in this System using the most generic form of the calculation function. More...
|
|
template<class MySystem , class MyContext , typename ValueType > |
CacheEntry & | DeclareCacheEntry (std::string description, const ValueType &model_value, void(MySystem::*calc)(const MyContext &, ValueType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a cache entry by specifying a model value of concrete type ValueType and a calculator function that is a class member function (method) with signature: More...
|
|
template<class MySystem , class MyContext , typename ValueType > |
CacheEntry & | DeclareCacheEntry (std::string description, void(MySystem::*calc)(const MyContext &, ValueType *) const, std::set< DependencyTicket > prerequisites_of_calc={ all_sources_ticket()}) |
| Declares a cache entry by specifying only a calculator function that is a class member function (method) with signature: More...
|
|
static DependencyTicket | all_sources_ticket () |
| Returns a ticket indicating dependence on every possible independent source value, including time, accuracy, state, input ports, and parameters (but not cache entries). More...
|
|
static void | FindUniquePeriodicDiscreteUpdatesOrThrow (const char *api_name, const System< double > &system, const Context< double > &context, std::optional< PeriodicEventData > *timing, EventCollection< DiscreteUpdateEvent< double >> *events) |
| (Internal use only) Static interface to DoFindUniquePeriodicDiscreteUpdatesOrThrow() to allow a Diagram to invoke that private method on its subsystems. More...
|
|
static void | set_parent_service (SystemBase *child, const internal::SystemParentServiceInterface *parent_service) |
| (Internal use only) Declares that parent_service is the service interface of the Diagram that owns this subsystem. More...
|
|
static void | ThrowInputPortHasWrongType (const char *func, const std::string &system_pathname, InputPortIndex, const std::string &port_name, const std::string &expected_type, const std::string &actual_type) |
| Throws std::exception because someone called API method func claiming the input port had some value type that was wrong. More...
|
|
static const ContextSizes & | get_context_sizes (const SystemBase &system) |
| Allows Diagram to access protected get_context_sizes() recursively on its subsystems. More...
|
|