1#ifndef ZONOOPT_SOLVER_DATA_STRUCUTURES_HPP_
2#define ZONOOPT_SOLVER_DATA_STRUCUTURES_HPP_
36 double t_max = std::numeric_limits<double>::max();
111 return (general_valid && admm_valid && mi_valid);
121 std::stringstream ss;
122 ss <<
"OptSettings structure: " << std::endl;
123 ss <<
" verbose: " << (
verbose ?
"true" :
"false") << std::endl;
125 ss <<
" t_max: " <<
t_max << std::endl;
126 ss <<
" k_max_admm: " <<
k_max_admm << std::endl;
127 ss <<
" rho: " <<
rho << std::endl;
128 ss <<
" eps_dual: " <<
eps_dual << std::endl;
129 ss <<
" eps_prim: " <<
eps_prim << std::endl;
130 ss <<
" k_inf_check: " <<
k_inf_check << std::endl;
131 ss <<
" inf_norm_conv: " << (
inf_norm_conv ?
"true" :
"false") << std::endl;
134 ss <<
" search_mode: " <<
search_mode << std::endl;
135 ss <<
" polish: " <<
polish << std::endl;
138 ss <<
" eps_r: " <<
eps_r << std::endl;
139 ss <<
" eps_a: " <<
eps_a << std::endl;
140 ss <<
" k_max_bnb: " <<
k_max_bnb << std::endl;
142 ss <<
" max_nodes: " <<
max_nodes << std::endl;
198 std::stringstream ss;
199 ss <<
"OptSolution structure:" << std::endl;
200 ss <<
" z: vector of length " <<
z.size() << std::endl;
201 ss <<
" J: " <<
J << std::endl;
202 ss <<
" run_time: " <<
run_time << std::endl;
204 ss <<
" iter: " <<
iter << std::endl;
205 ss <<
" converged: " << (
converged ?
"true" :
"false") << std::endl;
206 ss <<
" infeasible: " << (
infeasible ?
"true" :
"false") << std::endl;
207 ss <<
" x: vector of length " <<
x.size() << std::endl;
208 ss <<
" u: vector of length " <<
u.size() << std::endl;
#define zono_float
Defines the floating-point type used in ZonoOpt.
Definition ZonoOpt.hpp:43
Settings for optimization routines in ZonoOpt library.
Definition SolverDataStructures.hpp:26
bool polish
flag to perform solution polishing
Definition SolverDataStructures.hpp:70
int k_inf_check
check infeasibility every k_inf_check iterations
Definition SolverDataStructures.hpp:53
bool use_interval_contractor
flag to use interval contractor for constraint tightening / implication
Definition SolverDataStructures.hpp:59
double t_max
max time for optimization
Definition SolverDataStructures.hpp:36
int k_max_bnb
max number of branch-and-bound iterations
Definition SolverDataStructures.hpp:85
zono_float eps_r
relative convergence tolerance
Definition SolverDataStructures.hpp:79
zono_float eps_a
absolute convergence tolerance
Definition SolverDataStructures.hpp:82
bool verbose
display optimization progress
Definition SolverDataStructures.hpp:30
std::string print() const
displays settings as string
Definition SolverDataStructures.hpp:119
int n_threads_bnb
max threads for branch and bound
Definition SolverDataStructures.hpp:88
zono_float eps_prim_search
primal residual convergence tolerance during branch and bound and search
Definition SolverDataStructures.hpp:76
int contractor_tree_search_depth
when applying interval contractor in branch and bound, this is how deep to search the constraint tree...
Definition SolverDataStructures.hpp:94
zono_float eps_prim
primal convergence tolerance
Definition SolverDataStructures.hpp:50
bool inf_norm_conv
use infinity norm for convergence check (if false, scaled 2-norm is used)
Definition SolverDataStructures.hpp:56
int verbosity_interval
print every verbose_interval iterations
Definition SolverDataStructures.hpp:33
zono_float rho
admm penalty parameter, higher prioritizes feasibility during iterations, lower prioritizes optimalit...
Definition SolverDataStructures.hpp:44
int k_max_admm
max admm iterations
Definition SolverDataStructures.hpp:41
zono_float eps_dual
dual convergence tolerance
Definition SolverDataStructures.hpp:47
int max_nodes
terminate if more than this many nodes are in branch and bound queue
Definition SolverDataStructures.hpp:91
int search_mode
0: best first, 1: best dive
Definition SolverDataStructures.hpp:67
zono_float eps_dual_search
dual residual convergence tolerance during branch and bound and search
Definition SolverDataStructures.hpp:73
bool settings_valid() const
Checks whether settings struct is valid.
Definition SolverDataStructures.hpp:102
int contractor_iter
number of interval contractor iterations
Definition SolverDataStructures.hpp:62
Solution data structure for optimization routines in ZonoOpt library.
Definition SolverDataStructures.hpp:153
zono_float dual_residual
dual residual, corresponds to optimality
Definition SolverDataStructures.hpp:189
bool infeasible
true if optimization problem is provably infeasible
Definition SolverDataStructures.hpp:175
Eigen::Vector< zono_float, -1 > x
ADMM primal variable, approximately equal to z when converged.
Definition SolverDataStructures.hpp:180
Eigen::Vector< zono_float, -1 > z
solution vector
Definition SolverDataStructures.hpp:157
double run_time
time to compute solution
Definition SolverDataStructures.hpp:163
std::string print() const
displays solution as string
Definition SolverDataStructures.hpp:196
zono_float J
objective
Definition SolverDataStructures.hpp:160
zono_float primal_residual
primal residual, corresponds to feasibility
Definition SolverDataStructures.hpp:186
int iter
number of iterations
Definition SolverDataStructures.hpp:169
double startup_time
time to factorize matrices and run interval contractors
Definition SolverDataStructures.hpp:166
bool converged
true if optimization has converged
Definition SolverDataStructures.hpp:172
Eigen::Vector< zono_float, -1 > u
ADMM dual variable.
Definition SolverDataStructures.hpp:183