alpaqa dll
Nonconvex constrained optimization
Loading...
Searching...
No Matches
problem.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include "options.hpp"
8
9#include <filesystem>
10#include <memory>
11#include <optional>
12namespace fs = std::filesystem;
13
16 ConstrCount() = default;
17 length_t lb = 0; ///< Number of variables with only lower bound
18 length_t ub = 0; ///< Number of variables with only upper bound
19 length_t lbub = 0; ///< Number of variables with both bounds
20 length_t eq = 0; ///< Number of variables with equal bounds
21};
22
26 fs::path abs_path;
27 fs::path path;
28 std::string name = path.filename().string();
29 std::shared_ptr<alpaqa::EvalCounter> evaluations = nullptr;
30 vec initial_guess_x = vec::Zero(problem.get_num_variables()); ///< Unknowns
32 vec::Zero(problem.get_num_constraints()); ///< Multipliers g
33 vec initial_guess_w = alpaqa::null_vec<config_t>; ///< Multipliers bounds
34 std::optional<ConstrCount> box_constr_count = std::nullopt,
35 general_constr_count = std::nullopt;
36 std::optional<length_t> nnz_jac_g = std::nullopt, nnz_hess_L = std::nullopt,
37 nnz_hess_ψ = std::nullopt;
38};
39
40LoadedProblem load_problem(std::string_view type, const fs::path &dir,
41 const fs::path &file, Options &opts);
The main polymorphic minimization problem interface.
#define USING_ALPAQA_CONFIG(Conf)
Definition config.hpp:77
EigenConfigd DefaultConfig
Definition config.hpp:31
const rvec< Conf > null_vec
Global empty vector for convenience.
Definition config.hpp:193
fs::path abs_path
Definition problem.hpp:26
vec initial_guess_y
Multipliers g.
Definition problem.hpp:31
vec initial_guess_x
Unknowns.
Definition problem.hpp:30
vec initial_guess_w
Multipliers bounds.
Definition problem.hpp:33
std::optional< length_t > nnz_hess_L
Definition problem.hpp:36
std::optional< ConstrCount > general_constr_count
Definition problem.hpp:35
std::optional< length_t > nnz_hess_ψ
Definition problem.hpp:37
alpaqa::TypeErasedProblem< config_t > problem
Definition problem.hpp:25
std::string name
Definition problem.hpp:28
fs::path path
Definition problem.hpp:27
std::optional< ConstrCount > box_constr_count
Definition problem.hpp:34
std::optional< length_t > nnz_jac_g
Definition problem.hpp:36
LoadedProblem load_problem(std::string_view type, const fs::path &dir, const fs::path &file, Options &opts)
Definition problem.cpp:197
std::shared_ptr< alpaqa::EvalCounter > evaluations
Definition problem.hpp:29
ConstrCount()=default
length_t ub
Number of variables with only upper bound.
Definition problem.hpp:18
length_t eq
Number of variables with equal bounds.
Definition problem.hpp:20
length_t lb
Number of variables with only lower bound.
Definition problem.hpp:17
length_t lbub
Number of variables with both bounds.
Definition problem.hpp:19