PANOC-ALM  quadratic-penalty
Nonconvex constrained optimization
CUTEstLoader.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <iosfwd>
6 #include <memory>
7 #include <string>
8 
17 
18  public:
20  CUTEstProblem(const char *so_fname, const char *outsdif_fname);
22  CUTEstProblem(const std::string &so_fname,
23  const std::string &outsdif_fname);
27 
28  public:
32  struct Report {
34  std::string name;
35 
37  unsigned nvar = 0;
39  unsigned ncon = 0;
40 
43  enum Status {
44  Success = 0,
48  } status = Status::Success;
49 
57  struct {
59  unsigned objective = 0;
61  unsigned objective_grad = 0;
63  unsigned objective_hess = 0;
65  unsigned hessian_times_vector = 0;
67  unsigned constraints = 0;
69  unsigned constraints_grad = 0;
71  unsigned constraints_hess = 0;
72  } calls;
73 
75  double time_setup = 0;
77  double time = 0;
78  };
79 
80  Report get_report() const;
81 
82  public:
84  std::string name = "<UNKNOWN>";
85  unsigned number_box_constraints = 0;
88 
89  private:
90  std::unique_ptr<class CUTEstLoader> implementation;
91 };
92 
94 std::ostream &operator<<(std::ostream &, const CUTEstProblem::Report &);
98 std::ostream &operator<<(std::ostream &, CUTEstProblem::Report::Status);
CUTEstProblem::Report::ncon
unsigned ncon
Number of constraints.
Definition: CUTEstLoader.hpp:39
CUTEstProblem::Report::time_setup
double time_setup
CPU time (in seconds) for CUTEST_csetup.
Definition: CUTEstLoader.hpp:75
enum_name
const char * enum_name(CUTEstProblem::Report::Status s)
Definition: CUTEstLoader.cpp:391
CUTEstProblem::y0
pa::vec y0
Initial value of Lagrange multipliers.
Definition: CUTEstLoader.hpp:87
CUTEstProblem::Report::operator<<
std::ostream & operator<<(std::ostream &, const CUTEstProblem::Report &)
Definition: CUTEstLoader.cpp:407
CUTEstProblem::Report::Success
@ Success
Successful call.
Definition: CUTEstLoader.hpp:44
CUTEstProblem::CUTEstProblem
CUTEstProblem(CUTEstProblem &&)
pa::vec
realvec vec
Default type for vectors.
Definition: vec.hpp:14
CUTEstProblem::Report::AllocationError
@ AllocationError
Array allocation/deallocation error.
Definition: CUTEstLoader.hpp:45
CUTEstProblem::problem
pa::Problem problem
Problem statement (bounds, objective, constraints)
Definition: CUTEstLoader.hpp:83
CUTEstProblem::operator=
CUTEstProblem & operator=(CUTEstProblem &&)
CUTEstProblem::Report::time
double time
CPU time (in seconds) since the end of CUTEST_csetup.
Definition: CUTEstLoader.hpp:77
CUTEstProblem::~CUTEstProblem
~CUTEstProblem()
CUTEstProblem::Report::ArrayBoundError
@ ArrayBoundError
Array bound error.
Definition: CUTEstLoader.hpp:46
CUTEstProblem::Report::status
enum CUTEstProblem::Report::Status status
Exit status.
CUTEstProblem::CUTEstProblem
CUTEstProblem(const char *so_fname, const char *outsdif_fname)
Load a CUTEst problem from the given shared library and OUTSDIF.d file.
Definition: CUTEstLoader.cpp:328
CUTEstProblem
Wrapper for CUTEst problems loaded from an external shared library.
Definition: CUTEstLoader.hpp:16
CUTEstProblem::x0
pa::vec x0
Initial value of decision variables.
Definition: CUTEstLoader.hpp:86
CUTEstProblem::get_report
Report get_report() const
Definition: CUTEstLoader.cpp:370
CUTEstProblem::Report::name
std::string name
Name of the problem.
Definition: CUTEstLoader.hpp:34
CUTEstProblem::number_box_constraints
unsigned number_box_constraints
The number of box constraints on x.
Definition: CUTEstLoader.hpp:85
CUTEstProblem::Report
The report generated by CUTEst.
Definition: CUTEstLoader.hpp:32
problem.hpp
CUTEstProblem::Report::EvaluationError
@ EvaluationError
Evaluation error.
Definition: CUTEstLoader.hpp:47
CUTEstProblem::Report::calls
struct CUTEstProblem::Report::@0 calls
Function call counters.
CUTEstProblem::Report::Status
Status
Status returned by CUTEst.
Definition: CUTEstLoader.hpp:43
CUTEstProblem::Report::nvar
unsigned nvar
Number of independent variables.
Definition: CUTEstLoader.hpp:37
CUTEstProblem::name
std::string name
Problem name.
Definition: CUTEstLoader.hpp:84
pa::Problem
Problem description for minimization problems.
Definition: include/panoc-alm/util/problem.hpp:24
CUTEstProblem::implementation
std::unique_ptr< class CUTEstLoader > implementation
Definition: CUTEstLoader.hpp:90