ZonoOpt v2.0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ZonoOpt::EmptySet Class Referencefinal

Empty Set class. More...

#include <EmptySet.hpp>

Inheritance diagram for ZonoOpt::EmptySet:
Inheritance graph
[legend]
Collaboration diagram for ZonoOpt::EmptySet:
Collaboration graph
[legend]

Public Member Functions

 EmptySet ()=default
 Default constructor for EmptySet class.
 
 EmptySet (int n)
 EmptySet constructor.
 
HybZonoclone () const override
 Clone method for polymorphic behavior.
 
std::string print () const override
 Returns set information as a string.
 
void constraint_reduction () override
 Execute constraint reduction algorithm from Scott et. al. 2016.
 
std::unique_ptr< Zonoto_zono_approx () const override
 Compute outer approximation of constrained zonotope as zonotope using SVD.
 
- Public Member Functions inherited from ZonoOpt::ConZono
 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
 
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.
 
void convert_form () override
 Converts the set representation between -1-1 and 0-1 forms.
 
- 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_floatget_Gc () const
 Returns continuous generator matrix.
 
virtual Eigen::SparseMatrix< zono_floatget_Gb () const
 Returns binary generator matrix.
 
virtual Eigen::SparseMatrix< zono_floatget_G () const
 Returns generator matrix.
 
virtual Eigen::SparseMatrix< zono_floatget_Ac () const
 Returns continuous constraint matrix.
 
virtual Eigen::SparseMatrix< zono_floatget_Ab () const
 Returns binary constraint matrix.
 
virtual Eigen::SparseMatrix< zono_floatget_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< ConZonoconvex_relaxation () const
 Returns convex relaxation of the hybrid zonotope.
 
virtual std::unique_ptr< HybZonocomplement (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< ConZonoget_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.
 

Protected Member Functions

Eigen::Vector< zono_float, -1 > do_optimize_over (const Eigen::SparseMatrix< zono_float > &, const Eigen::Vector< zono_float, -1 > &, zono_float, const OptSettings &, OptSolution *solution) const override
 
Eigen::Vector< zono_float, -1 > do_project_point (const Eigen::Vector< zono_float, -1 > &, const OptSettings &, OptSolution *solution) const override
 
zono_float do_support (const Eigen::Vector< zono_float, -1 > &, const OptSettings &, OptSolution *solution) override
 
bool do_contains_point (const Eigen::Vector< zono_float, -1 > &, const OptSettings &, OptSolution *) const override
 
Box do_bounding_box (const OptSettings &, OptSolution *) override
 
bool do_is_empty (const OptSettings &, OptSolution *) const override
 
std::unique_ptr< HybZonodo_complement (zono_float delta_m, bool, const OptSettings &, OptSolution *, int, int) override
 
- Protected Member Functions inherited from ZonoOpt::ConZono
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 OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const
 
- Protected Member Functions inherited from ZonoOpt::HybZono
OptSolution mi_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 OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const
 
std::vector< OptSolutionmi_opt_multisol (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, int n_sols, const OptSettings &settings=OptSettings(), OptSolution *solution=nullptr) const
 

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< intfind_unused_generators (const Eigen::SparseMatrix< zono_float > &G, const Eigen::SparseMatrix< zono_float > &A)
 
- Protected Attributes inherited from ZonoOpt::HybZono
Eigen::SparseMatrix< zono_floatG = Eigen::SparseMatrix<zono_float>(0, 0)
 generator matrix G = [Gc, Gb]
 
Eigen::SparseMatrix< zono_floatGc = Eigen::SparseMatrix<zono_float>(0, 0)
 continuous generator matrix
 
Eigen::SparseMatrix< zono_floatGb = Eigen::SparseMatrix<zono_float>(0, 0)
 binary generator matrix
 
Eigen::SparseMatrix< zono_floatA = Eigen::SparseMatrix<zono_float>(0, 0)
 constraint matrix A = [Ac, Ab]
 
Eigen::SparseMatrix< zono_floatAc = Eigen::SparseMatrix<zono_float>(0, 0)
 continuous constraint matrix
 
Eigen::SparseMatrix< zono_floatAb = 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)
 

Detailed Description

Empty Set class.

Used to facilitate set operations with trivial solutions when one of the sets is an empty set.

Constructor & Destructor Documentation

◆ EmptySet() [1/2]

ZonoOpt::EmptySet::EmptySet ( )
default

Default constructor for EmptySet class.

◆ EmptySet() [2/2]

ZonoOpt::EmptySet::EmptySet ( int  n)
explicit

EmptySet constructor.

Parameters
ndimension

Member Function Documentation

◆ clone()

HybZono * ZonoOpt::EmptySet::clone ( ) const
overridevirtual

Clone method for polymorphic behavior.

Reimplemented from ZonoOpt::ConZono.

◆ constraint_reduction()

void ZonoOpt::EmptySet::constraint_reduction ( )
inlineoverridevirtual

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 from ZonoOpt::ConZono.

◆ do_bounding_box()

Box ZonoOpt::EmptySet::do_bounding_box ( const OptSettings ,
OptSolution  
)
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_complement()

std::unique_ptr< HybZono > ZonoOpt::EmptySet::do_complement ( zono_float  delta_m,
bool  ,
const OptSettings ,
OptSolution ,
int  ,
int   
)
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_contains_point()

bool ZonoOpt::EmptySet::do_contains_point ( const Eigen::Vector< zono_float, -1 > &  ,
const OptSettings ,
OptSolution  
) const
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_is_empty()

bool ZonoOpt::EmptySet::do_is_empty ( const OptSettings ,
OptSolution  
) const
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_optimize_over()

Eigen::Vector< zono_float, -1 > ZonoOpt::EmptySet::do_optimize_over ( const Eigen::SparseMatrix< zono_float > &  ,
const Eigen::Vector< zono_float, -1 > &  ,
zono_float  ,
const OptSettings ,
OptSolution solution 
) const
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_project_point()

Eigen::Vector< zono_float, -1 > ZonoOpt::EmptySet::do_project_point ( const Eigen::Vector< zono_float, -1 > &  ,
const OptSettings ,
OptSolution solution 
) const
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ do_support()

zono_float ZonoOpt::EmptySet::do_support ( const Eigen::Vector< zono_float, -1 > &  ,
const OptSettings ,
OptSolution solution 
)
overrideprotectedvirtual

Reimplemented from ZonoOpt::ConZono.

◆ print()

std::string ZonoOpt::EmptySet::print ( ) const
overridevirtual

Returns set information as a string.

Reimplemented from ZonoOpt::ConZono.

◆ to_zono_approx()

std::unique_ptr< Zono > ZonoOpt::EmptySet::to_zono_approx ( ) const
inlineoverridevirtual

Compute outer approximation of constrained zonotope as zonotope using SVD.

Returns
Zonotope over-approximation

Reimplemented from ZonoOpt::ConZono.


The documentation for this class was generated from the following files: