1#ifndef ZONOOPT_EMPTYSET_HPP_
2#define ZONOOPT_EMPTYSET_HPP_
44 this->
c.resize(this->n);
45 this->
c.setConstant(std::numeric_limits<zono_float>::quiet_NaN());
46 this->
G.resize(this->n,0);
52 this->
Gb.resize(this->n, 0);
53 this->
A.resize(0, this->
nG);
55 this->
Ab.resize(0, 0);
65 std::string
print()
const override
68 ss <<
"EmptySet: " << std::endl;
69 ss <<
" n: " << this->
n;
75 std::unique_ptr<Zono>
to_zono_approx()
const override {
throw std::runtime_error(
"to_zono_approx: EmptySet"); }
79 const Eigen::SparseMatrix<zono_float> &P,
const Eigen::Vector<zono_float, -1> &q,
zono_float c,
86 return Eigen::Vector<zono_float, -1>::Constant(this->
n, std::numeric_limits<zono_float>::quiet_NaN());
96 return Eigen::Vector<zono_float, -1>::Constant(this->
n, std::numeric_limits<zono_float>::quiet_NaN());
106 return std::numeric_limits<zono_float>::quiet_NaN();
117 const Eigen::Vector<
zono_float, -1>
x_l = Eigen::Vector<zono_float, -1>::Constant(this->
n, std::numeric_limits<zono_float>::infinity());
118 const Eigen::Vector<
zono_float, -1>
x_u = -Eigen::Vector<zono_float, -1>::Constant(this->
n, std::numeric_limits<zono_float>::infinity());
131 const Eigen::Vector<
zono_float, -1>
x_l = -Eigen::Vector<zono_float, -1>::Constant(this->
n, m);
132 const Eigen::Vector<
zono_float, -1>
x_u = Eigen::Vector<zono_float, -1>::Constant(this->
n, m);
Constrained zonotope class for ZonoOpt library.
Box (i.e., interval vector) class.
Definition Intervals.hpp:720
Constrained zonotope class.
Definition ConZono.hpp:33
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.hpp:150
Empty Set class.
Definition EmptySet.hpp:25
Eigen::Vector< zono_float, -1 > do_optimize_over(const Eigen::SparseMatrix< zono_float > &P, const Eigen::Vector< zono_float, -1 > &q, zono_float c, const OptSettings &settings, OptSolution *solution) const override
Definition EmptySet.hpp:78
zono_float do_support(const Eigen::Vector< zono_float, -1 > &d, const OptSettings &settings, OptSolution *solution) override
Definition EmptySet.hpp:99
void constraint_reduction() override
Execute constraint reduction algorithm from Scott et. al. 2016.
Definition EmptySet.hpp:73
HybZono * clone() const override
Clone method for polymorphic behavior.
Definition EmptySet.hpp:60
Box do_bounding_box(const OptSettings &settings, OptSolution *solution) override
Definition EmptySet.hpp:115
std::unique_ptr< Zono > to_zono_approx() const override
Compute outer approximation of constrained zonotope as zonotope using SVD.
Definition EmptySet.hpp:75
bool do_contains_point(const Eigen::Vector< zono_float, -1 > &x, const OptSettings &settings, OptSolution *solution) const override
Definition EmptySet.hpp:109
EmptySet(const int n)
EmptySet constructor.
Definition EmptySet.hpp:39
std::unique_ptr< HybZono > do_complement(zono_float delta_m, bool remove_redundancy, const OptSettings &settings, OptSolution *solution, int n_leaves, int contractor_iter) override
Definition EmptySet.hpp:127
Eigen::Vector< zono_float, -1 > do_project_point(const Eigen::Vector< zono_float, -1 > &x, const OptSettings &settings, OptSolution *solution) const override
Definition EmptySet.hpp:89
bool do_is_empty(const OptSettings &settings, OptSolution *solution) const override
Definition EmptySet.hpp:122
std::string print() const override
Returns set information as a string.
Definition EmptySet.hpp:65
EmptySet()=default
Default constructor for EmptySet class.
Hybrid zonotope class.
Definition HybZono.hpp:44
int nC
number of constraints
Definition HybZono.hpp:482
int n
set dimension
Definition HybZono.hpp:470
bool zero_one_form
flag to indicate whether the set is in 0-1 or -1-1 form
Definition HybZono.hpp:485
Eigen::SparseMatrix< zono_float > Gc
continuous generator matrix
Definition HybZono.hpp:449
Eigen::SparseMatrix< zono_float > Gb
binary generator matrix
Definition HybZono.hpp:452
int nG
total number of factors. nG = nGc + nGb
Definition HybZono.hpp:473
virtual void remove_redundancy(int contractor_iter=100)
Removes redundant constraints and any unused generators.
Definition HybZono.hpp:771
Eigen::Vector< zono_float, -1 > c
center vector
Definition HybZono.hpp:464
int nGb
number of binary factors
Definition HybZono.hpp:479
Eigen::SparseMatrix< zono_float > A
constraint matrix A = [Ac, Ab]
Definition HybZono.hpp:455
Eigen::Vector< zono_float, -1 > b
constraint vector
Definition HybZono.hpp:467
Eigen::SparseMatrix< zono_float > Ab
binary constraint matrix
Definition HybZono.hpp:461
Eigen::SparseMatrix< zono_float > Ac
continuous constraint matrix
Definition HybZono.hpp:458
Eigen::SparseMatrix< zono_float > G
generator matrix G = [Gc, Gb]
Definition HybZono.hpp:446
int nGc
number of continuous factors
Definition HybZono.hpp:476
#define zono_float
Defines the floating-point type used in ZonoOpt.
Definition ZonoOpt.hpp:43
std::unique_ptr< Zono > interval_2_zono(const Box &box)
Builds a zonotope from a Box object.
Definition PolymorphicFunctions.hpp:1566
Settings for optimization routines in ZonoOpt library.
Definition SolverDataStructures.hpp:26
Solution data structure for optimization routines in ZonoOpt library.
Definition SolverDataStructures.hpp:153
bool infeasible
true if optimization problem is provably infeasible
Definition SolverDataStructures.hpp:175