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