Go to the documentation of this file.
34 xy0.
insert(yKey, Vector::Constant(1,
y0));
42 double yOpt = xyInit.
at(yKey)[0];
55 initLP->inequalities =
77 double y0 = -std::numeric_limits<double>::infinity();
79 double error = factor->error(
x0);
88 std::vector<std::pair<Key, Matrix> > terms;
90 terms.push_back(make_pair(*it, factor.
getA(it)));
100 std::vector<std::pair<Key, Matrix> > terms =
collectTerms(*factor);
101 terms.push_back(make_pair(yKey, Matrix::Constant(1, 1, -1.0)));
102 double d = factor->getb()[0];
105 return slackInequalities;
std::shared_ptr< This > shared_ptr
shared_ptr to this class
static const double d[K][N]
iterator insert(const std::pair< Key, Vector > &key_value)
Key maxKey(const PROBLEM &problem)
const KeyDimMap & constrainedKeyDimMap() const
EqualityFactorGraph equalities
Linear equality constraints: cE(x) = 0.
const_iterator begin() const
Throw when the problem is either infeasible or unbounded.
std::vector< std::pair< Key, Matrix > > collectTerms(const LinearInequality &factor) const
Collect all terms of a factor into a container.
double compute_y0(const VectorValues &x0) const
y = max_j ( Cj*x0 - dj ) – due to the inequality constraints y >= Cx - d
InequalityFactorGraph inequalities
Linear inequality constraints: cI(x) <= 0.
std::pair< VectorValues, VectorValues > optimize(const VectorValues &initialValues, const VectorValues &duals=VectorValues(), bool useWarmStart=false) const
const_iterator end() const
GaussianFactorGraph::shared_ptr buildInitOfInitGraph() const
const gtsam::Symbol key('X', 0)
KeyVector::const_iterator const_iterator
Const iterator over keys.
constABlock getA(const_iterator variable) const
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
This finds a feasible solution for an LP problem.
Policy of ActiveSetSolver to solve Linear Programming Problems.
InequalityFactorGraph addSlackVariableToInequalities(Key yKey, const InequalityFactorGraph &inequalities) const
Turn Cx <= d into Cx - y <= d factors.
VectorValues solve() const
std::uint64_t Key
Integer nonlinear key type.
LP::shared_ptr buildInitialLP(Key yKey) const
build initial LP
std::shared_ptr< LP > shared_ptr
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:44