29 auto port = std::make_unique<VectorOutputPort3<T>>(std::move(value));
42 const T& scalar_value)
46 static std::unique_ptr<BasicVector<T>> MakeBasicVector(
48 auto basic_vector = std::make_unique<BasicVector<T>>((int)vector.rows());
49 basic_vector->get_mutable_value() = vector;
55 std::unique_ptr<AbstractContext3> DoCreateEmptyContext()
const override {
56 return std::make_unique<Context3<T>>();
VectorInterface is a pure abstract interface that real-valued signals between Systems must satisfy...
Definition: vector_interface.h:25
An abstract superclass for the Context3 objects for dynamical systems, encapsulating functionality th...
Definition: context3.h:87
A superclass template for systems that use a specified scalar type T for numerical values...
Definition: system3.h:481
Definition: constants.h:3
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorX
A column vector of any size, templated on scalar type.
Definition: eigen_types.h:36
Eigen::Matrix< Scalar, 1, 1 > Vector1
A column vector of size 1 (a scalar), templated on scalar type.
Definition: eigen_types.h:16
VectorConstant3(const std::string &name, const Eigen::Ref< const VectorX< T >> &vector)
Given an Eigen vector value, create a BasicVector containing that value as the output of this system...
Definition: vector_constant3.h:35
VectorConstant3(const std::string &name, std::unique_ptr< VectorInterface< T >> value)
Takes over ownership of the given VectorInterface, which will be regurgitated as the value of the Out...
Definition: vector_constant3.h:25
int AddOutputPort(std::unique_ptr< OutputPort3 > port)
Add an output port that is to be owned by this System.
Definition: system3.h:99
const AbstractValue & get_model_value() const
Returns a const reference to a value of the type that this OutputPort3 will present at run time...
Definition: system3_output.h:57
std::vector< Number > result
Definition: IpoptSolver.cpp:170
const OutputPort3 & get_output_port(int port_num) const
Returns a const reference to the OutputPort3 with the given port number.
Definition: system3.h:130
A fully type-erased container class.
Definition: value.h:22
VectorConstant3(const std::string &name, const T &scalar_value)
Given a scalar, create a one-element BasicVector containing that value as the output of this system...
Definition: vector_constant3.h:41
This System produces a constant VectorInterface value on its single OutputPort.
Definition: vector_constant3.h:21