|
ZonoOpt v2.0.1
|
Constrained zonotope class. More...
#include <ConZono.hpp>


Public Member Functions | |
| ConZono () | |
| Default constructor for ConZono class. | |
| ConZono (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) | |
| ConZono constructor. | |
| ~ConZono () override=default | |
| HybZono * | clone () const override |
| Clone method for polymorphic behavior. | |
| 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. | |
| virtual void | constraint_reduction () |
| Execute constraint reduction algorithm from Scott et. al. 2016. | |
| void | convert_form () override |
| Converts the set representation between -1-1 and 0-1 forms. | |
| virtual std::unique_ptr< Zono > | to_zono_approx () const |
| Compute outer approximation of constrained zonotope as zonotope using SVD. | |
| std::string | print () const override |
| Returns set information as a string. | |
Public Member Functions inherited from ZonoOpt::HybZono | |
| HybZono ()=default | |
| Default constructor for HybZono class. | |
| HybZono (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) | |
| HybZono constructor. | |
| virtual | ~HybZono ()=default |
| 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. | |
| virtual int | get_n () const |
| Returns dimension of set. | |
| virtual int | get_nC () const |
| Returns number of constraints in set definition. | |
| virtual int | get_nG () const |
| Returns number of generators in set definition. | |
| virtual int | get_nGc () const |
| Returns number of continuous generators in set definition. | |
| virtual int | get_nGb () const |
| Returns number of binary generators in set definition. | |
| virtual Eigen::SparseMatrix< zono_float > | get_Gc () const |
| Returns continuous generator matrix. | |
| virtual Eigen::SparseMatrix< zono_float > | get_Gb () const |
| Returns binary generator matrix. | |
| virtual Eigen::SparseMatrix< zono_float > | get_G () const |
| Returns generator matrix. | |
| virtual Eigen::SparseMatrix< zono_float > | get_Ac () const |
| Returns continuous constraint matrix. | |
| virtual Eigen::SparseMatrix< zono_float > | get_Ab () const |
| Returns binary constraint matrix. | |
| virtual Eigen::SparseMatrix< zono_float > | get_A () const |
| Returns constraint matrix. | |
| virtual Eigen::Vector< zono_float, -1 > | get_c () const |
| Returns center vector. | |
| virtual Eigen::Vector< zono_float, -1 > | get_b () const |
| Returns constraint vector. | |
| virtual bool | is_0_1_form () const |
| Returns true if factors are in range [0,1], false if they are in range [-1,1]. | |
| bool | is_sharp () const |
| Returns true if set is known to be sharp. | |
| virtual void | remove_redundancy (int contractor_iter=100) |
| Removes redundant constraints and any unused generators. | |
| virtual std::unique_ptr< ConZono > | convex_relaxation () const |
| Returns convex relaxation of the hybrid zonotope. | |
| virtual std::unique_ptr< HybZono > | complement (const zono_float delta_m=100, const bool remove_redundancy=true, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr, const int n_leaves=std::numeric_limits< int >::max(), const int contractor_iter=100) |
| Computes the complement of the set Z. | |
| bool | is_point () const |
| Polymorphic type checking: true if set is a point. | |
| bool | is_zono () const |
| Polymorphic type checking: true if set is a zonotope. | |
| bool | is_conzono () const |
| Polymorphic type checking: true if set is a constrained zonotope. | |
| bool | is_hybzono () const |
| Polymorphic type checking: true if set is a hybrid zonotope. | |
| bool | is_empty_set () const |
| Polymorphic type checking: true if set is empty set object. | |
| Eigen::Vector< zono_float, -1 > | optimize_over (const Eigen::SparseMatrix< zono_float > &P, const Eigen::Vector< zono_float, -1 > &q, zono_float c=0, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const |
| Solves optimization problem with quadratic objective over the current set. | |
| Eigen::Vector< zono_float, -1 > | project_point (const Eigen::Vector< zono_float, -1 > &x, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const |
| Returns the projection of the point x onto the set object. | |
| bool | is_empty (const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const |
| Returns true if the set is provably empty, false otherwise. | |
| zono_float | support (const Eigen::Vector< zono_float, -1 > &d, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) |
| Computes support function of the set in the direction d. | |
| bool | contains_point (const Eigen::Vector< zono_float, -1 > &x, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const |
| Checks whether the point x is contained in the set object. | |
| Box | bounding_box (const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) |
| Computes a bounding box of the set object as a Box object. | |
| std::vector< ConZono > | get_leaves (bool remove_redundancy=true, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr, int n_leaves=std::numeric_limits< int >::max(), int contractor_iter=10) const |
| Computes individual constrained zonotopes whose union is the hybrid zonotope object. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from ZonoOpt::HybZono | |
| static void | remove_generators (Eigen::SparseMatrix< zono_float > &G, Eigen::SparseMatrix< zono_float > &A, const std::set< int > &idx_to_remove) |
| static std::set< int > | find_unused_generators (const Eigen::SparseMatrix< zono_float > &G, const Eigen::SparseMatrix< zono_float > &A) |
Protected Attributes inherited from ZonoOpt::HybZono | |
| Eigen::SparseMatrix< zono_float > | G = Eigen::SparseMatrix<zono_float>(0, 0) |
| generator matrix G = [Gc, Gb] | |
| Eigen::SparseMatrix< zono_float > | Gc = Eigen::SparseMatrix<zono_float>(0, 0) |
| continuous generator matrix | |
| Eigen::SparseMatrix< zono_float > | Gb = Eigen::SparseMatrix<zono_float>(0, 0) |
| binary generator matrix | |
| Eigen::SparseMatrix< zono_float > | A = Eigen::SparseMatrix<zono_float>(0, 0) |
| constraint matrix A = [Ac, Ab] | |
| Eigen::SparseMatrix< zono_float > | Ac = Eigen::SparseMatrix<zono_float>(0, 0) |
| continuous constraint matrix | |
| Eigen::SparseMatrix< zono_float > | Ab = Eigen::SparseMatrix<zono_float>(0, 0) |
| binary constraint matrix | |
| Eigen::Vector< zono_float, -1 > | c = Eigen::Vector<zono_float, -1>(0) |
| center vector | |
| Eigen::Vector< zono_float, -1 > | b = Eigen::Vector<zono_float, -1>(0) |
| constraint vector | |
| int | n = 0 |
| set dimension | |
| int | nG = 0 |
| total number of factors. nG = nGc + nGb | |
| int | nGc = 0 |
| number of continuous factors | |
| int | nGb = 0 |
| number of binary factors | |
| int | nC = 0 |
| number of constraints | |
| bool | zero_one_form = false |
| flag to indicate whether the set is in 0-1 or -1-1 form | |
| bool | sharp = false |
| flag to indicate whether the set is known to be sharp (i.e., convex relaxation = convex hull) | |
Constrained zonotope class.
A constrained zonotope is defined as: Z = {G * xi + c | A * xi = b, xi in [-1, 1]^nG}. Equivalently, the following shorthand can be used: Z = <G, c, A, b>. Optionally, in 0-1 form, the factors are xi in [0, 1]^nG. The set dimension is n, and the number of equality constraints is nC.
|
inline |
Default constructor for ConZono class.
| ZonoOpt::ConZono::ConZono | ( | 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 |
||
| ) |
ConZono constructor.
| G | generator matrix |
| c | center |
| A | constraint matrix |
| b | constraint vector |
| zero_one_form | true if set is in 0-1 form |
|
overridedefault |
|
overridevirtual |
Clone method for polymorphic behavior.
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, ZonoOpt::Point, and ZonoOpt::Zono.
|
virtual |
Execute constraint reduction algorithm from Scott et. al. 2016.
Removes one constraint and one generator from the constrained zonotope. The resulting set is an over-approximation of the original set.
Reimplemented in ZonoOpt::EmptySet.
|
overridevirtual |
Converts the set representation between -1-1 and 0-1 forms.
This method converts the set representation between -1-1 and 0-1 forms. If the set is in -1-1 form, then xi_c in [-1,1] and xi_b in {-1,1}. If the set is in 0-1 form, then xi_c in [0,1] and xi_b in {0,1}.
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::Point, and ZonoOpt::Zono.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, ZonoOpt::Point, and ZonoOpt::Zono.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, and ZonoOpt::Point.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, and ZonoOpt::Zono.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::Point, and ZonoOpt::EmptySet.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, and ZonoOpt::Point.
|
overrideprotectedvirtual |
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, ZonoOpt::Point, and ZonoOpt::Zono.
|
overridevirtual |
Returns set information as a string.
Reimplemented from ZonoOpt::HybZono.
Reimplemented in ZonoOpt::EmptySet, ZonoOpt::Point, and ZonoOpt::Zono.
|
protected |
| void ZonoOpt::ConZono::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.
| G | generator matrix |
| c | center |
| A | constraint matrix |
| b | constraint vector |
| zero_one_form | true if set is in 0-1 form |
|
virtual |
Compute outer approximation of constrained zonotope as zonotope using SVD.
Reimplemented in ZonoOpt::EmptySet.