File nlp_hpolyoracles.hpp

Defines

MAX_NR_TRIES
POLYTOL
template<typename VT, typename NT>
class HPolyOracleVariables : public VariableSet
#include <nlp_hpolyoracles.hpp>

Define the variable t we use in the optimization

Template Parameters:
  • VT – Vector Type

  • NT – Numeric Type

Public Functions

inline HPolyOracleVariables(NT t_prev, NT tb_, NT eta_ = -1)
inline void SetVariables(const VT &T) override
inline VectorXd GetValues() const override
inline VecBound GetBounds() const override

Public Members

NT t
NT tb
NT eta
template<typename VT, typename NT>
class HPolyOracleCost : public CostTerm
#include <nlp_hpolyoracles.hpp>

Define the cost function f(t) = t (ipopt takes minimization so it is -t)

Template Parameters:
  • VT – Vector Type

  • NT – Numeric Type

Public Functions

inline HPolyOracleCost(std::string method_)
inline NT GetCost() const override
inline void FillJacobianBlock(std::string var_set, Jacobian &jac) const override

Public Members

std::string method
template<typename MT, typename VT, typename NT, class bfunc>
class HPolyOracleFeasibility : public ConstraintSet
#include <nlp_hpolyoracles.hpp>

Define the feasibility constraint A p(t) <= b which we translate to (A * C) * Phi <= b

Template Parameters:
  • MT – Matrix Type

  • VT – Vector Type

  • NT – Numeric Type

  • bfunc – feasibility constraint type

Public Functions

inline HPolyOracleFeasibility(MT &C_, VT &b_, NT t0_, bfunc basis, bfunc basis_grad, std::string method_, int i, int ignore_facet_ = -1)
inline VecBound GetBounds() const override
inline VectorXd GetValues() const override
inline void FillJacobianBlock(std::string var_set, Jacobian &jac_block) const override

Public Members

MT &C
VT &b
bfunc phi
bfunc grad_phi
NT t0
int m
int M
std::string method
int index
int ignore_facet
template<typename Polytope, class bfunc>
struct IpoptHPolyoracle
#include <nlp_hpolyoracles.hpp>

Oracle that uses the COIN-OR ipopt solver

Template Parameters:
  • Polytope – Polytope Type

  • bfunc – feasibility constraint type

Public Types

typedef Polytope::MT MT
typedef Polytope::VT VT
typedef Polytope::NT NT
typedef Polytope::PointType Point

Public Functions

inline std::tuple<NT, Point, int> apply(NT t_prev, NT t0, NT eta, MT &A, VT &b, Polytope &P, std::vector<Point> &coeffs, bfunc phi, bfunc grad_phi, int ignore_facet = -1, std::string solution = "max_pos")
template<typename Polytope, class bfunc>
struct MPSolveHPolyoracle
#include <nlp_hpolyoracles.hpp>

Compute intersection of H-polytope P := Ax <= b with polynomial curve p(t) = sum a_j (t - t0)^j Uses the MPsolve library

Template Parameters:
  • Polytope – Polytope Type

  • bfunc – feasibility constraint type

Public Types

typedef Polytope::MT MT
typedef Polytope::VT VT
typedef Polytope::NT NT
typedef Polytope::PointType Point

Public Functions

inline std::tuple<NT, Point, int> apply(NT t_prev, NT t0, NT eta, MT &A, VT &b, Polytope &P, std::vector<Point> &coeffs, bfunc phi, bfunc grad_phi, int ignore_facet = -1, bool positive_real = true)
template<typename Polytope, class bfunc>
struct NewtonRaphsonHPolyoracle
#include <nlp_hpolyoracles.hpp>

Compute intersection of H-polytope P := Ax <= b with curve p(t) = sum a_j phi_j(t) where phi_j are basis functions (e.g. polynomials) Uses Newton-Raphson to solve the transcendental equation

Template Parameters:
  • Polytope – Polytope Type

  • bfunc – feasibility constraint type

Public Types

typedef Polytope::MT MT
typedef Polytope::VT VT
typedef Polytope::NT NT
typedef Polytope::PointType Point

Public Functions

inline std::tuple<NT, Point, int> apply(NT t_prev, NT t0, NT eta, MT &A, VT &b, Polytope &P, std::vector<Point> &coeffs, bfunc phi, bfunc grad_phi, int ignore_facet = -1)
namespace ifopt