11 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
13 : initializedIntermediate_(false), initializedTerminal_(false)
17 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
26 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
31 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
38 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
45 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
51 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR>
54 Eigen::VectorXi iRows, jCols;
56 std::cout << std::endl;
58 std::cout <<
"LinearConstraintContainer - Printout INTERMEDIATE STAGE" << std::endl;
60 std::cout <<
"getLowerBoundsIntermediate().transpose() :" << std::endl;
63 std::cout <<
"getUpperBoundsIntermediate().transpose() :" << std::endl;
66 std::cout <<
"getJacobianStateNonZeroCountIntermediate() :" << std::endl;
69 std::cout <<
"getJacobianInputNonZeroCountIntermediate() :" << std::endl;
72 std::cout <<
"jacobianStateIntermediate() :" << std::endl;
75 std::cout <<
"jacobianStateSparseIntermediate() :" << std::endl;
78 std::cout <<
"jacobianInputIntermediate() :" << std::endl;
81 std::cout <<
"jacobianInputSparseIntermediate() :" << std::endl;
84 std::cout <<
"sparsityPatternStateIntermediate(iRows, jCols) :" << std::endl;
86 std::cout <<
"iRows: " << iRows.transpose() << std::endl;
87 std::cout <<
"jCols: " << jCols.transpose() << std::endl;
89 std::cout <<
"sparsityPatternInputIntermediate(iRows, jCols) :" << std::endl;
91 std::cout <<
"iRows: " << iRows.transpose() << std::endl;
92 std::cout <<
"jCols: " << jCols.transpose() << std::endl;
95 std::cout <<
"LinearConstraintContainer - Printout TERMINAL STAGE" << std::endl;
97 std::cout <<
"getLowerBoundsTerminal().transpose() :" << std::endl;
100 std::cout <<
"getUpperBoundsTerminal().transpose() :" << std::endl;
103 std::cout <<
"getJacobianStateNonZeroCountTerminal() :" << std::endl;
106 std::cout <<
"getJacobianInputNonZeroCountTerminal() :" << std::endl;
109 std::cout <<
"jacobianStateTerminal() :" << std::endl;
112 std::cout <<
"jacobianStateSparseTerminal() :" << std::endl;
115 std::cout <<
"jacobianInputTerminal() :" << std::endl;
118 std::cout <<
"jacobianInputSparseTerminal() :" << std::endl;
121 std::cout <<
"sparsityPatternStateTerminal(iRows, jCols) :" << std::endl;
123 std::cout <<
"iRows: " << iRows.transpose() << std::endl;
124 std::cout <<
"jCols: " << jCols.transpose() << std::endl;
126 std::cout <<
"sparsityPatternInputTerminal(iRows, jCols) :" << std::endl;
128 std::cout <<
"iRows: " << iRows.transpose() << std::endl;
129 std::cout <<
"jCols: " << jCols.transpose() << std::endl;
131 std::cout << std::endl;
132 std::cout << std::endl;
VectorXs getLowerBoundsIntermediate() const
Retrieves the lower constraint bound on the intermediate constraints.
Definition: ConstraintContainerBase-impl.h:53
VectorXs getLowerBoundsTerminal() const
Retrieves the lower constraint bound on the terminal constraints.
Definition: ConstraintContainerBase-impl.h:60
void initialize()
Initializes the constraint container.
Definition: LinearConstraintContainer-impl.h:39
virtual size_t getJacobianStateNonZeroCountTerminal()=0
Returns the number of non zero elements in the constraint jacobian wrt state.
A base function for linear constraint functions which have a first derivative.
Definition: LinearConstraintContainer.h:27
virtual ~LinearConstraintContainer()
Destructor.
Definition: LinearConstraintContainer-impl.h:27
VectorXs getUpperBoundsTerminal() const
Retrieves the upper constraint bound on the terminal constraints.
Definition: ConstraintContainerBase-impl.h:74
virtual VectorXs jacobianStateSparseTerminal()=0
Evaluates the constraint jacobian wrt the state using sparse representation.
virtual VectorXs jacobianStateSparseIntermediate()=0
Evaluates the constraint jacobian wrt the state using sparse representation.
bool initializedIntermediate_
Definition: LinearConstraintContainer.h:238
virtual VectorXs jacobianInputSparseTerminal()=0
Evaluates the constraint jacobian wrt the control input using sparse representation.
virtual size_t getJacobianInputNonZeroCountTerminal()=0
Returns the number of non zero elements in the constraint jacobian wrt input.
virtual MatrixXs jacobianStateTerminal()=0
Evaluates the constraint jacobian wrt the state.
virtual VectorXs jacobianInputSparseIntermediate()=0
Evaluates the constraint jacobian wrt the control input using sparse representation.
bool isInitialized()
Checks if the constraint container is initialized.
Definition: LinearConstraintContainer-impl.h:46
virtual bool initializeTerminal()=0
Initializes the terminal constraints.
virtual MatrixXs jacobianInputIntermediate()=0
Evaluates the constraint jacobian wrt the control input.
VectorXs getUpperBoundsIntermediate() const
Retrieves the upper constraint bound on the intermediate constraints.
Definition: ConstraintContainerBase-impl.h:67
CppAD::AD< CppAD::cg::CG< double > > SCALAR
bool initializedTerminal_
Definition: LinearConstraintContainer.h:239
virtual size_t getJacobianStateNonZeroCountIntermediate()=0
Returns the number of non zero elements in the constraint jacobian wrt state.
LinearConstraintContainer()
Default constructor.
Definition: LinearConstraintContainer-impl.h:12
virtual void sparsityPatternInputIntermediate(Eigen::VectorXi &iRows, Eigen::VectorXi &jCols)=0
Returns the sparsity pattern for the jacobian wrt control.
The ConstraintBase Class is the base class for defining the non-linear optimization constraints...
Definition: ConstraintContainerBase.h:31
virtual void sparsityPatternStateTerminal(Eigen::VectorXi &iRows, Eigen::VectorXi &jCols)=0
Returns the sparsity pattern for the jacobian wrt state.
virtual void sparsityPatternStateIntermediate(Eigen::VectorXi &iRows, Eigen::VectorXi &jCols)=0
Returns the sparsity pattern for the jacobian wrt state.
virtual MatrixXs jacobianInputTerminal()=0
Evaluates the constraint jacobian wrt the control input.
virtual size_t getJacobianInputNonZeroCountIntermediate()=0
Returns the number of non zero elements in the constraint jacobian wrt input.
size_t getJacNonZeroCount()
Returns the number of non zeros in the constraint jacobian wrt to state and input.
Definition: LinearConstraintContainer-impl.h:32
void printout()
Print out sparsity patterns, jacobians, etc. Serves for quick visual inspection.
Definition: LinearConstraintContainer-impl.h:52
virtual bool initializeIntermediate()=0
Initializes the intermediate constraints.
virtual MatrixXs jacobianStateIntermediate()=0
Evaluates the constraint jacobian wrt the state.
virtual void sparsityPatternInputTerminal(Eigen::VectorXi &iRows, Eigen::VectorXi &jCols)=0
Returns the sparsity pattern for the jacobian wrt control.