3 #include <casadi/interfaces/sleqp/casadi_nlpsol_sleqp_export.h>
4 #include "casadi/core/nlpsol_impl.hpp"
5 #include "casadi/core/timing.hpp"
10 #define SLEQP_CALL_EXC(x) \
12 const SLEQP_RETCODE _status = (x); \
13 if(_status != SLEQP_OKAY) { \
14 throw std::runtime_error("SLEQP error"); \
33 double *
gk, *grad_fk, *jac_gk;
39 double *
h_dk, *h_pk, *h_mk;
54 double max_wall_time_;
57 SleqpSettings* settings_;
61 bool exact_hess()
const;
63 void update_settings(
const Dict& opts);
78 std::string
class_name()
const override {
return "SLEQPInterface";}
83 const Options&
get_options()
const override {
return options_;}
102 void set_work(
void* mem,
const double**& arg,
double**& res,
103 casadi_int*& iw,
double*& w)
const override;
106 int solve(
void* mem)
const override;
Helper class for Serialization.
static const Options options_
int init_mem(void *mem) const override
Initalize memory block.
const Options & get_options() const override
void serialize_body(SerializingStream &s) const override
Serialize an object without type information.
static ProtoFunction * deserialize(DeserializingStream &s)
Deserialize into MX.
void * alloc_mem() const override
Create memory block.
const Sparsity & jac_sparsity() const
int solve(void *mem) const override
std::string class_name() const override
SLEQPInterface(const std::string &name, const Function &nlp)
static const std::string meta_doc
const char * plugin_name() const override
~SLEQPInterface() override
void init(const Dict &opts) override
SLEQPInterface(DeserializingStream &s)
Deserializing constructor.
static Nlpsol * creator(const std::string &name, const Function &nlp)
Dict get_stats(void *mem) const override
Get all statistics.
void set_work(void *mem, const double **&arg, double **&res, casadi_int *&iw, double *&w) const override
Set the (persistent) work vectors.
void free_mem(void *mem) const override
Free memory block.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
bool iteration_callback_ignore_errors
const SLEQPInterface * interface