1#ifndef ZONOOPT_CONZONO_HPP_
2#define ZONOOPT_CONZONO_HPP_
19 using namespace detail;
52 ConZono(
const Eigen::SparseMatrix<zono_float>&
G,
const Eigen::Vector<zono_float, -1>&
c,
53 const Eigen::SparseMatrix<zono_float>&
A,
const Eigen::Vector<zono_float, -1>&
b,
75 void set(
const Eigen::SparseMatrix<zono_float>&
G,
const Eigen::Vector<zono_float, -1>&
c,
76 const Eigen::SparseMatrix<zono_float>&
A,
const Eigen::Vector<zono_float, -1>&
b,
103 std::string
print()
const override;
128 OptSolution qp_opt(
const Eigen::SparseMatrix<zono_float>& P,
const Eigen::Vector<zono_float, -1>& q,
130 const Eigen::Vector<zono_float, -1>&
b,
132 std::shared_ptr<OptSolution>* solution =
nullptr,
136 const Eigen::SparseMatrix<zono_float>& P,
const Eigen::Vector<zono_float, -1>& q,
const zono_float c,
137 const SolverSettings& settings, std::shared_ptr<OptSolution>* solution,
142 std::shared_ptr<OptSolution>* solution,
149 std::shared_ptr<OptSolution>* solution,
153 std::shared_ptr<OptSolution>* solution,
160 std::shared_ptr<OptSolution>*,
int,
int)
override;
174 std::unique_ptr<ConZono>
vrep_2_conzono(
const Eigen::Matrix<zono_float, -1, -1>& Vpoly);
Hybrid zonotope class for ZonoOpt library.
Box (i.e., interval vector) class.
Definition Box.hpp:25
Constrained zonotope class.
Definition ConZono.hpp:32
void operator+=(HybZono &other)=delete
Deleted: use operator+ instead — result type would be HybZono.
void set(const Eigen::SparseMatrix< zono_float > &G, const Eigen::Vector< zono_float, -1 > &c, const Eigen::SparseMatrix< zono_float > &A, const Eigen::Vector< zono_float, -1 > &b, bool zero_one_form=false)
Reset constrained zonotope object with the given parameters.
Definition ConZono.cpp:22
std::unique_ptr< HybZono > do_complement(zono_float delta_m, bool, const SolverSettings &, std::shared_ptr< OptSolution > *, int, int) override
Definition ConZono.cpp:702
void operator+=(ConZono &other)
In-place Minkowski sum (type-preserving: ConZono, Zono, or Point argument). Use operator+ for operati...
Definition ConZono.cpp:930
Box do_bounding_box(const SolverSettings &settings, std::shared_ptr< OptSolution > *, const WarmStartParams &warm_start_params) override
Definition ConZono.cpp:269
HybZono * clone() const override
Clone method for polymorphic behavior.
Definition ConZono.cpp:17
ConZono()
Default constructor for ConZono class.
Definition ConZono.hpp:40
void convert_form() override
Converts the set representation between -1-1 and 0-1 forms.
Definition ConZono.cpp:52
bool do_contains_point(const Eigen::Vector< zono_float, -1 > &x, const SolverSettings &settings, std::shared_ptr< OptSolution > *solution, const WarmStartParams &warm_start_params) const override
Definition ConZono.cpp:187
bool do_is_empty(const SolverSettings &settings, std::shared_ptr< OptSolution > *solution, const WarmStartParams &warm_start_params) const override
Definition ConZono.cpp:144
OptSolution qp_opt(const Eigen::SparseMatrix< zono_float > &P, const Eigen::Vector< zono_float, -1 > &q, zono_float c, const Eigen::SparseMatrix< zono_float > &A, const Eigen::Vector< zono_float, -1 > &b, const SolverSettings &settings=get_default_solver_settings(), std::shared_ptr< OptSolution > *solution=nullptr, const WarmStartParams &warm_start_params=WarmStartParams()) const
Definition ConZono.cpp:213
void operator*=(ConZono &other)
In-place Cartesian product (type-preserving: ConZono, Zono, or Point argument). Use operator* for ope...
Definition ConZono.cpp:935
zono_float do_support(const Eigen::Vector< zono_float, -1 > &d, const SolverSettings &settings, std::shared_ptr< OptSolution > *solution, const WarmStartParams &warm_start_params) override
Definition ConZono.cpp:163
void operator*=(HybZono &other)=delete
Deleted: use operator* instead — result type would be HybZono.
Eigen::Vector< zono_float, -1 > do_optimize_over(const Eigen::SparseMatrix< zono_float > &P, const Eigen::Vector< zono_float, -1 > &q, const zono_float c, const SolverSettings &settings, std::shared_ptr< OptSolution > *solution, const WarmStartParams &) const override
Definition ConZono.cpp:92
~ConZono() override=default
virtual std::unique_ptr< ConZono > constraint_reduction() const
Execute constraint reduction algorithm from Scott et. al. 2016.
Definition ConZono.cpp:449
std::string print() const override
Returns set information as a string.
Definition ConZono.cpp:77
virtual std::unique_ptr< Zono > to_zono_approx() const
Compute outer approximation of constrained zonotope as zonotope using SVD.
Definition ConZono.cpp:410
Eigen::Vector< zono_float, -1 > do_project_point(const Eigen::Vector< zono_float, -1 > &x, const SolverSettings &settings, std::shared_ptr< OptSolution > *solution, const WarmStartParams &warm_start_params) const override
Definition ConZono.cpp:119
Hybrid zonotope class.
Definition HybZono.hpp:43
bool zero_one_form
flag to indicate whether the set is in 0-1 or -1-1 form
Definition HybZono.hpp:746
void set(const Eigen::SparseMatrix< zono_float > &Gc, const Eigen::SparseMatrix< zono_float > &Gb, const Eigen::Vector< zono_float, -1 > &c, const Eigen::SparseMatrix< zono_float > &Ac, const Eigen::SparseMatrix< zono_float > &Ab, const Eigen::Vector< zono_float, -1 > &b, bool zero_one_form=false, bool sharp=false)
Reset hybrid zonotope object with the given parameters.
Definition HybZono.cpp:23
bool sharp
flag to indicate whether the set is known to be sharp (i.e., convex relaxation = convex hull)
Definition HybZono.hpp:749
Eigen::Vector< zono_float, -1 > c
center vector
Definition HybZono.hpp:725
Eigen::SparseMatrix< zono_float > A
constraint matrix A = [Ac, Ab]
Definition HybZono.hpp:716
Eigen::Vector< zono_float, -1 > b
constraint vector
Definition HybZono.hpp:728
Eigen::SparseMatrix< zono_float > G
generator matrix G = [Gc, Gb]
Definition HybZono.hpp:707
#define zono_float
Defines the floating-point type used in ZonoOpt.
Definition ZonoOpt.hpp:45
std::unique_ptr< ConZono > vrep_2_conzono(const Eigen::Matrix< zono_float, -1, -1 > &Vpoly)
Builds a constrained zonotope from a vertex representation polytope.
Definition ConZono.cpp:675
Definition ZonoOpt.hpp:58
const SolverSettings & get_default_solver_settings()
Returns a reference to the current program-wide default solver settings.
Definition SolverDataStructures.hpp:388
Solution data structure for optimization routines in ZonoOpt library.
Definition SolverDataStructures.hpp:288
Abstract base for all solver settings.
Definition SolverDataStructures.hpp:35
Warm start parameters for optimization routines in ZonoOpt library.
Definition ADMM.hpp:49