2#include <alpaqa/ipopt-adapter-export.h>
4#include <IpIpoptApplication.hpp>
14 return a +
"'" + b.first +
"', ";
17 "'" + std::string(
penult->first) +
"'";
33 const auto &
ipopt_opts =
app.RegOptions()->RegisteredOptionsList();
37 "Invalid key '" + std::string(
opt_name) +
"' for type '" +
38 "IpoptApplication" +
"' in '" + std::string(s.
full_key) +
43 const auto type =
regops_it->second->Type();
45 case Ipopt::OT_Number: {
48 success =
app.Options()->SetNumericValue(std::string(
opt_name),
51 case Ipopt::OT_Integer: {
54 success =
app.Options()->SetIntegerValue(std::string(
opt_name),
57 case Ipopt::OT_String: {
58 success =
app.Options()->SetStringValue(
61 case Ipopt::OT_Unknown:
std::string_view key
The subkey to resolve next.
static auto possible_keys(const T &tbl)
std::string_view full_key
Full key string, used for diagnostics.
auto split_key(std::string_view full, char tok='.')
Split the string full on the first occurrence of tok.
std::string_view value
The value of the parameter to store.
void set_param(T &t, const json &j)
Update/overwrite the first argument based on the JSON object j.
Represents a parameter value encoded as a string in the format abc.def.key=value.
Custom parameter parsing exception.