26 #ifndef CASADI_OOQP_INTERFACE_HPP
27 #define CASADI_OOQP_INTERFACE_HPP
29 #include "casadi/core/conic_impl.hpp"
30 #include <casadi/interfaces/ooqp/casadi_conic_ooqp_export.h>
47 struct OoqpMemory :
public ConicMemory {
57 class OoqpInterface :
public Conic {
60 explicit OoqpInterface(
const std::string& name,
61 const std::map<std::string, Sparsity>& st);
64 static Conic* creator(
const std::string& name,
65 const std::map<std::string, Sparsity>& st) {
66 return new OoqpInterface(name, st);
70 ~OoqpInterface()
override;
73 const char* plugin_name()
const override {
return "ooqp";}
76 std::string class_name()
const override {
return "OoqpInterface";}
80 static const Options options_;
81 const Options& get_options()
const override {
return options_;}
85 void init(
const Dict& opts)
override;
88 int solve(
const double** arg,
double** res,
89 casadi_int* iw,
double* w,
void* mem)
const override;
92 void* alloc_mem()
const override {
return new OoqpMemory();}
95 void free_mem(
void *mem)
const override {
delete static_cast<OoqpMemory*
>(mem);}
98 static const char* errFlag(
int flag);
101 static std::string printBounds(
const std::vector<double>& b,
102 const std::vector<char>& ib, casadi_int n,
const char *sign);
105 Dict get_stats(
void* mem)
const override;
120 casadi_int print_level_;
123 double mutol_, artol_;
126 static const std::string meta_doc;
129 void serialize_body(SerializingStream &s)
const override;
132 static ProtoFunction* deserialize(DeserializingStream& s) {
return new OoqpInterface(s); }
136 explicit OoqpInterface(DeserializingStream& s);
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.