25 #ifndef CASADI_CLARABEL_INTERFACE_HPP
26 #define CASADI_CLARABEL_INTERFACE_HPP
28 #include "casadi/core/conic_impl.hpp"
29 #include <casadi/interfaces/clarabel/casadi_conic_clarabel_export.h>
34 #include "clarabel_runtime.hpp"
66 const std::map<std::string, Sparsity>& st) {
72 const std::map<std::string, Sparsity>& st);
78 const char*
plugin_name()
const override {
return "clarabel"; }
81 std::string
class_name()
const override {
return "ClarabelInterface"; }
87 void set_clarabel_prob();
103 void init(
const Dict& opts)
override;
106 void init_dependent();
112 int init_mem(
void* mem)
const override;
115 void free_mem(
void* mem)
const override;
118 void set_work(
void* mem,
const double**& arg,
double**& res,
119 casadi_int*& iw,
double*& w)
const override;
122 Dict get_stats(
void* mem)
const override;
125 int solve(
const double** arg,
double** res,
126 casadi_int* iw,
double* w,
void* mem)
const override;
151 std::vector<int> colindp_, rowp_;
152 std::vector<int> colinda_, rowa_;
'clarabel' plugin for Conic
void * alloc_mem() const override
Create memory block.
std::string class_name() const override
Get the class name.
static ProtoFunction * deserialize(DeserializingStream &s)
Deserialize with type disambiguation.
Dict opts_
Options passed to Clarabel (distinct from options in the solver)
static Conic * creator(const std::string &name, const std::map< std::string, Sparsity > &st)
Creator function for the plugin.
const char * plugin_name() const override
Get the name of the plugin.
bool integer_support() const override
Clarabel does not (in this example) support discrete variables.
static const Options options_
Options for Clarabel.
std::string codegen_mem_type() const override
Thread-local memory object type.
static const std::string meta_doc
A documentation string.
const Options & get_options() const override
Options.
Helper class for C code generation.
Helper class for Serialization.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
casadi_clarabel_data< double > d
Options metadata for a class.