31 HESSIAN_UNDEFINED = 0,
34 HESSIAN_LOWER_TRIANGULAR = 3
57 const bool initialize_upper_triangular_part =
true)
69 if (initialize_upper_triangular_part)
74 hessian_type_ = HESSIAN_DIAGONAL;
78 if (initialize_upper_triangular_part)
81 hessian_type_ = HESSIAN_GENERIC;
85 hessian_type_ = HESSIAN_LOWER_TRIANGULAR;
89 status_ = INITIALIZED;
122 hessian_type_ = HESSIAN_GENERIC;
159 return (hessian_type_);
174 H_(i,i) += regularization_factor;
188 const std::string &name =
"objective")
const 195 logger.log(
LogEntryName(subname).add(
"hessian_type"), hessian_type_);
196 logger.log(
LogEntryName(subname).add(
"status"), status_);
252 return(general_constraints_);
285 const std::string &name =
"constraints")
const 289 bounds_.
log(logger, subname,
"bounds");
290 general_constraints_.
log(logger, subname,
"general_constraints");
331 return(inequality_constraints_);
341 return(equality_constraints_);
354 const std::string &name =
"constraints")
const 358 equality_constraints_.
log(logger, subname,
"equality_constraints");
359 inequality_constraints_.
log(logger, subname,
"inequality_constraints");
396 return(equality_constraints_);
409 const std::string &name =
"constraints")
const 413 equality_constraints_.
log(logger, subname,
"equality_constraints");
423 template<
class t_Constra
ints>
436 const std::string &name =
"qp_problem")
const 441 t_Constraints::log(logger, subname);
Container for simple inequality constraints.
humoto::constraints::ContainerILU bounds_
const humoto::constraints::ContainerAL & getInequalities() const
get container with inequalities
const humoto::constraints::ContainerALU & getGeneralConstraints() const
get container with general constraints
A container for a QP Objective.
humoto::constraints::ContainerAL inequality_constraints_
HessianType hessian_type_
humoto::constraints::ContainerAB equality_constraints_
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
#define HUMOTO_ASSERT(condition, message)
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
Log a QP problem.
void initializeConstraints(const HierarchyLevel &hlevel, const humoto::SolutionStructure &sol_structure)
Generates (general) objective containing all constraints on this level.
void getGeneralConstraints(constraints::ContainerALU &constraints, const humoto::SolutionStructure &sol_structure) const
Generates objective containing all general constraints on this level.
Analog of 'sol_structure' struct in Octave code. [determine_solution_structure.m].
void getObjective(Eigen::MatrixXd &H, Eigen::VectorXd &g) const
Form objective of a QP.
This class represents one level of a hierarchy.
A QP problem with constraints of a specific type.
const humoto::constraints::ContainerILU & getSimpleBounds() const
get container with simple bounds
Eigen::VectorXd g_
Gradient vector.
Represents log entry name.
EIGEN_DEFAULT_DENSE_INDEX_TYPE EigenIndex
const Eigen::VectorXd & getSolutionLowerBounds() const
Get LB vector: 'LB <= X'.
QP constraints container.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
Log a QP problem.
const Eigen::VectorXd & getGradient() const
Const accessor.
Status getStatus() const
Status of the objective.
const humoto::constraints::ContainerAB & getEqualities() const
get container with equalities
bool isEquality() const
True if all constraints on this level are equalitites.
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
void initializeSolutionBounds(Eigen::VectorXd &lb, Eigen::VectorXd &ub) const
Generates LB and UB, such that 'LB <= X <= UB'.
void initializeConstraints(const HierarchyLevel &hlevel, const humoto::SolutionStructure &sol_structure)
Generates (general) objective containing all constraints on this level.
const Eigen::VectorXd & getSolutionUpperBounds() const
Get UB vector: 'X <= UB'.
Eigen::MatrixXd H_
Hessian.
const humoto::constraints::ContainerAB & getEqualities() const
get container with equalities
HessianType getHessianType() const
Hessian type.
void initializeObjective(const humoto::HierarchyLevel &hlevel, const bool initialize_upper_triangular_part=true)
Generates (general) objective containing all constraints on this level.
A QP problem with constraints of a specific type.
void getEqualityConstraints(constraints::ContainerAB &eq_constraints, const humoto::SolutionStructure &sol_structure) const
Generates (general) objective containing all equality constraints on this level.
void getSimpleConstraints(constraints::ContainerILU &constraints, const humoto::SolutionStructure &sol_structure) const
Generates objective containing all simple constraints on this level.
Container for general onesided inequality constraints.
The root namespace of HuMoTo.
std::size_t getNumberOfConstraints() const
Get total number of constraints.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
Log a QP problem.
QP constraints container.
Eigen::VectorXd & getGradient()
Non-const accessor.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
Log data.
void regularize(const double regularization_factor)
Adds regularization to the Hessian.
A QP problem with constraints of a specific type.
QP constraints container.
Container for general equality constraints.
void initializeConstraints(const HierarchyLevel &hlevel, const humoto::SolutionStructure &sol_structure)
Generates (general) objective containing all constraints on this level.
bool isSimple() const
True if all constraints on this level are simple.
LogEntryName & add(const char *name)
extends entry name with a subname
Eigen::MatrixXd & getHessian()
Non-const accessor.
Eigen::VectorXd lb_
Simple bounds on variables.
void getInequalityConstraints(constraints::ContainerAL &ineq_constraints, const humoto::SolutionStructure &sol_structure) const
Generates (general) objective containing all equality constraints on this level.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="qp_problem") const
Log a QP problem.
humoto::constraints::ContainerAB equality_constraints_
humoto::constraints::ContainerALU general_constraints_
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="objective") const
Log objective.
const Eigen::MatrixXd & getHessian() const
Const accessor.
Container for general inequality constraints.