PANOC-ALM main
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;
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>";
88
89 private:
90 std::unique_ptr<class CUTEstLoader> implementation;
91};
92
94std::ostream &operator<<(std::ostream &, const CUTEstProblem::Report &);
98std::ostream &operator<<(std::ostream &, CUTEstProblem::Report::Status);
const char * enum_name(CUTEstProblem::Report::Status s)
Wrapper for CUTEst problems loaded from an external shared library.
pa::vec x0
Initial value of decision variables.
pa::Problem problem
Problem statement (bounds, objective, constraints)
unsigned number_box_constraints
The number of box constraints on x.
std::string name
Problem name.
CUTEstProblem(const char *so_fname, const char *outsdif_fname)
Load a CUTEst problem from the given shared library and OUTSDIF.d file.
Report get_report() const
pa::vec y0
Initial value of Lagrange multipliers.
std::unique_ptr< class CUTEstLoader > implementation
CUTEstProblem & operator=(CUTEstProblem &&)
CUTEstProblem(CUTEstProblem &&)
realvec vec
Default type for vectors.
Definition: vec.hpp:14
The report generated by CUTEst.
double time_setup
CPU time (in seconds) for CUTEST_csetup.
std::ostream & operator<<(std::ostream &, const CUTEstProblem::Report &)
struct CUTEstProblem::Report::@1 calls
Function call counters.
Status
Status returned by CUTEst.
@ EvaluationError
Evaluation error.
@ ArrayBoundError
Array bound error.
@ AllocationError
Array allocation/deallocation error.
@ Success
Successful call.
std::string name
Name of the problem.
unsigned ncon
Number of constraints.
double time
CPU time (in seconds) since the end of CUTEST_csetup.
unsigned nvar
Number of independent variables.
enum CUTEstProblem::Report::Status status
Exit status.
Problem description for minimization problems.