11 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
15 : ub_(ub), lb_(lb), alpha_(alpha)
19 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
25 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
32 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
37 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
44 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
48 for (
size_t i = 0;
i < STATE_DIM;
i++)
54 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
56 const Eigen::Matrix<SCALAR, STATE_DIM, 1>&
x,
57 const Eigen::Matrix<SCALAR, CONTROL_DIM, 1>&
u,
61 for (
size_t i = 0;
i < STATE_DIM;
i++)
67 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
71 ct::core::ADCGScalar
t)
73 ct::core::ADCGScalar c = ct::core::ADCGScalar(0.0);
74 for (
size_t i = 0;
i < STATE_DIM;
i++)
80 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR_EVAL,
typename SCALAR>
82 const std::string& termName,
99 std::cout <<
"Read alpha as = \n" <<
alpha_.transpose() << std::endl;
100 std::cout <<
"Read upper_bound as = \n" <<
ub_.transpose() << std::endl;
101 std::cout <<
"Read lower_bound as = \n" <<
lb_.transpose() << std::endl;
void initialize()
Definition: TermStateBarrier-impl.hpp:45
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
virtual ~TermStateBarrier()
Definition: TermStateBarrier-impl.hpp:33
state_vector_t ub_
Definition: TermStateBarrier.hpp:68
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
CppAD::AD< CppAD::cg::CG< double > > SCALAR
for i
Definition: mpc_unittest_plotting.m:14
A state barrier term (could also be considered a soft constraint) Note that this term explicitly excl...
Definition: TermStateBarrier.hpp:26
ct::core::StateVector< state_dim > x
Definition: LoadFromFileTest.cpp:20
std::vector< ct::core::tpl::BarrierActivation< SCALAR, ct::core::tpl::TraitSelector< SCALAR > > > barriers_
Definition: TermStateBarrier.hpp:71
state_vector_t alpha_
Definition: TermStateBarrier.hpp:67
TermStateBarrier< STATE_DIM, CONTROL_DIM, SCALAR_EVAL, SCALAR > * clone() const override
Deep-copy term.
Definition: TermStateBarrier-impl.hpp:39
SCALAR_EVAL computeActivation(SCALAR_EVAL t)
compute time activation
Definition: TermBase-impl.hpp:58
virtual SCALAR evaluate(const Eigen::Matrix< SCALAR, STATE_DIM, 1 > &x, const Eigen::Matrix< SCALAR, CONTROL_DIM, 1 > &u, const SCALAR &t) override
Evaluates the term at x, u, t.
Definition: TermStateBarrier-impl.hpp:55
TermStateBarrier()
Definition: TermStateBarrier-impl.hpp:20
state_vector_t lb_
Definition: TermStateBarrier.hpp:69
Eigen::Matrix< SCALAR_EVAL, STATE_DIM, STATE_DIM > state_matrix_t
Definition: TermBase.hpp:39
Eigen::Matrix< double, nStates, 1 > state_vector_t
const bool verbose
Definition: ConstraintComparison.h:18
void loadMatrixCF(const std::string &filename, const std::string &matrixName, Eigen::Matrix< SCALAR, ROW, COL > &matrix, const std::string &termName="")
Definition: utilities.hpp:46
virtual void loadConfigFile(const std::string &filename, const std::string &termName, bool verbose=false) override
load the term from config file, where the bounds are stored as matrices
Definition: TermStateBarrier-impl.hpp:81