Drake
Drake C++ Documentation
aggregate_costs_constraints.h File Reference
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "drake/solvers/binding.h"
#include "drake/solvers/constraint.h"
#include "drake/solvers/cost.h"
#include "drake/solvers/mathematical_program.h"
Include dependency graph for aggregate_costs_constraints.h:

Classes

struct  Bound
 Stores the lower and upper bound of a variable. More...
 

Namespaces

 drake
 
 drake::solvers
 

Functions

void AggregateLinearCosts (const std::vector< Binding< LinearCost >> &linear_costs, Eigen::SparseVector< double > *linear_coeff, VectorX< symbolic::Variable > *vars, double *constant_cost)
 Given many linear costs, aggregate them into. More...
 
void AggregateQuadraticAndLinearCosts (const std::vector< Binding< QuadraticCost >> &quadratic_costs, const std::vector< Binding< LinearCost >> &linear_costs, Eigen::SparseMatrix< double > *Q_lower, VectorX< symbolic::Variable > *quadratic_vars, Eigen::SparseVector< double > *linear_coeff, VectorX< symbolic::Variable > *linear_vars, double *constant_cost)
 Given many linear and quadratic costs, aggregate them into. More...
 
std::unordered_map< symbolic::Variable, Bound > AggregateBoundingBoxConstraints (const std::vector< Binding< BoundingBoxConstraint >> &bounding_box_constraints)
 Aggregates many bounding box constraints, returns the intersection (the tightest bounds) of these constraints. More...
 
void AggregateBoundingBoxConstraints (const MathematicalProgram &prog, Eigen::VectorXd *lower, Eigen::VectorXd *upper)
 Aggregates all the BoundingBoxConstraints inside prog, returns the intersection of the bounding box constraints as the lower and upper bound for each variable in prog. More...
 
void AggregateBoundingBoxConstraints (const MathematicalProgram &prog, std::vector< double > *lower, std::vector< double > *upper)
 Overloads AggregateBoundingBoxConstraints, but the type of lower and upper are std::vector<double>. More...
 
void AggregateDuplicateVariables (const Eigen::SparseMatrix< double > &A, const VectorX< symbolic::Variable > &vars, Eigen::SparseMatrix< double > *A_new, VectorX< symbolic::Variable > *vars_new)
 For linear expression A * vars where vars might contain duplicated entries, rewrite this linear expression as A_new * vars_new where vars_new doesn't contain duplicated entries. More...