26 #ifndef CASADI_QRQP_HPP
27 #define CASADI_QRQP_HPP
29 #include "casadi/core/conic_impl.hpp"
30 #include <casadi/solvers/casadi_conic_qrqp_export.h>
44 struct QrqpMemory :
public ConicMemory {
47 const char* return_status;
58 class Qrqp :
public Conic {
61 explicit Qrqp(
const std::string& name,
62 const std::map<std::string, Sparsity> &st);
65 static Conic* creator(
const std::string& name,
66 const std::map<std::string, Sparsity>& st) {
67 return new Qrqp(name, st);
74 const char* plugin_name()
const override {
return "qrqp";}
77 std::string class_name()
const override {
return "Qrqp";}
80 void* alloc_mem()
const override {
return new QrqpMemory();}
83 int init_mem(
void* mem)
const override;
86 void free_mem(
void *mem)
const override {
delete static_cast<QrqpMemory*
>(mem);}
89 void set_work(
void* mem,
const double**& arg,
double**& res,
90 casadi_int*& iw,
double*& w)
const override;
94 static const Options options_;
95 const Options& get_options()
const override {
return options_;}
99 void init(
const Dict& opts)
override;
102 int solve(
const double** arg,
double** res,
103 casadi_int* iw,
double* w,
void* mem)
const override;
106 Dict get_stats(
void* mem)
const override;
109 void codegen_body(CodeGenerator& g)
const override;
112 static const std::string meta_doc;
116 Sparsity AT_, kkt_, sp_v_, sp_r_;
118 std::vector<casadi_int> prinv_, pc_;
121 bool print_iter_, print_header_, print_info_, print_lincomb_;
124 void serialize_body(SerializingStream &s)
const override;
127 static ProtoFunction* deserialize(DeserializingStream& s) {
return new Qrqp(s); }
131 explicit Qrqp(DeserializingStream& s);
134 void set_qrqp_prob();
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.