26 #ifndef CASADI_CONIC_IMPL_HPP
27 #define CASADI_CONIC_IMPL_HPP
30 #include "function_internal.hpp"
31 #include "plugin_interface.hpp"
50 Conic(
const std::string& name,
const std::map<std::string, Sparsity> &st);
53 ~
Conic()
override = 0;
67 Sparsity get_sparsity_in(casadi_int i)
override;
68 Sparsity get_sparsity_out(casadi_int i)
override;
88 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w,
void* mem)
const final;
91 virtual int solve(
const double** arg,
double** res,
92 casadi_int* iw,
double* w,
void* mem)
const = 0;
95 void init(
const Dict& opts)
override;
100 int init_mem(
void* mem)
const override;
105 void set_work(
void* mem,
const double**& arg,
double**& res,
106 casadi_int*& iw,
double*& w)
const override;
109 virtual void check_inputs(
const double* lbx,
const double* ubx,
110 const double* lba,
const double* uba)
const;
113 virtual void generateNativeCode(std::ostream& file)
const;
116 typedef Conic* (*Creator)(
const std::string& name,
117 const std::map<std::string, Sparsity>& st);
125 #ifdef CASADI_WITH_THREADSAFE_SYMBOLICS
126 static std::mutex mutex_solvers_;
138 bool is_a(
const std::string& type,
bool recursive)
const override;
143 double get_default_in(casadi_int ind)
const override;
152 Dict get_stats(
void* mem)
const override;
180 std::vector<casadi_int>
r;
Helper class for C code generation.
static const Options options_
Options.
casadi_int nx_
Number of decision variables.
virtual int solve(const double **arg, double **res, casadi_int *iw, double *w, void *mem) const =0
Solve the QP.
casadi_int np_
The shape of psd constraint matrix.
size_t get_n_in() override
Number of function inputs and outputs.
casadi_int na_
The number of constraints (counting both equality and inequality) == A.size1()
static std::map< std::string, Plugin > solvers_
Collection of solvers.
size_t get_n_out() override
Number of function inputs and outputs.
std::string serialize_base_function() const override
String used to identify the immediate FunctionInternal subclass.
std::vector< bool > discrete_
Options.
const Options & get_options() const override
Options.
std::vector< bool > equality_
virtual bool psd_support() const
Can psd constraints be treated.
static std::string shortname()
Short name.
static const std::string infix_
Infix.
casadi_qp_prob< double > p_qp_
std::string get_name_out(casadi_int i) override
Names of function input and outputs.
std::string get_name_in(casadi_int i) override
Names of function input and outputs.
virtual bool integer_support() const
Can discrete variables be treated.
Helper class for Serialization.
Internal class for Function.
Interface for accessing input and output data structures.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
std::vector< std::string > conic_out()
Get QP solver output scheme of QP solvers.
std::vector< std::string > conic_in()
Get input scheme of QP solvers.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
casadi_qp_data< double > d_qp
SDP to SOCP conversion memory.
std::vector< casadi_int > r
std::vector< casadi_int > A_mapping
std::vector< casadi_int > map_P
Function memory with temporary work vectors.
Options metadata for a class.