139 const auto &kkterr = results.
error;
140 auto time_s = std::chrono::duration<double>(solstats.duration);
142 << solstats.evals <<
'\n'
143 <<
"solver: " << solstats.solver <<
'\n'
144 <<
"problem: " << results.
problem.
name <<
" (from "
146 <<
"status: " << (solstats.success ?
"\033[0;32m" :
"\033[0;31m")
147 << solstats.status <<
"\033[0m" <<
'\n'
150 <<
"ε = " << float_to_str(solstats.ε) <<
'\n'
151 <<
"δ = " << float_to_str(solstats.δ) <<
'\n'
152 <<
"final step size = " << float_to_str(solstats.γ) <<
'\n'
153 <<
"penalty norm = " << float_to_str(solstats.Σ) <<
'\n'
154 <<
"nonsmooth objective = " << float_to_str(solstats.h) <<
'\n'
155 <<
"smooth objective = " << float_to_str(results.
objective) <<
'\n'
156 <<
"objective = " << float_to_str(results.
objective) <<
'\n'
157 <<
"stationarity = " << float_to_str(kkterr.stationarity) <<
'\n'
158 <<
"violation = " << float_to_str(kkterr.constr_violation) <<
'\n'
159 <<
"complementarity = " << float_to_str(kkterr.complementarity) <<
'\n'
160 <<
"bounds violation = " << float_to_str(kkterr.bounds_violation) <<
'\n'
161 <<
"time: " << float_to_str(time_s.count(), 3) <<
" s\n"
162 <<
"outer iter: " << std::setw(6) << solstats.outer_iter <<
'\n'
163 <<
"iter: " << std::setw(6) << solstats.inner_iter <<
'\n'
165 for (
const auto &[key, value] : solstats.extra) {
166 auto print_key = [&os, k{key}](
const auto &v) {
167 os << k <<
": " << v <<
'\n';
170 [&print_key](
const auto &v) { print_key(v); },
171 [&print_key](real_t v) { print_key(float_to_str(v)); },
172 [&print_key](
bool v) { print_key(v ?
"yes" :
"no"); },
173 [](
const std::vector<real_t> &) {},
176 std::visit(print, value);