26 #ifndef CASADI_SNOPT_INTERFACE_HPP
27 #define CASADI_SNOPT_INTERFACE_HPP
29 #include "casadi/core/nlpsol_impl.hpp"
30 #include "casadi/core/im.hpp"
32 #include "casadi/interfaces/snopt/casadi_nlpsol_snopt_export.h"
34 #include "snopt_cwrap.h"
60 double *
gk, *jac_fk, *jac_gk;
62 std::vector<double>
bl, bu, xx;
64 std::vector<int>
hs, locJ, indJ;
103 std::string
class_name()
const override {
return "SnoptInterface";}
117 void init(
const Dict& opts)
override;
123 int init_mem(
void* mem)
const override;
129 void set_work(
void* mem,
const double**& arg,
double**& res,
130 casadi_int*& iw,
double*& w)
const override;
133 int solve(
void* mem)
const override;
136 Dict get_stats(
void* mem)
const override;
141 std::string formatStatus(
int status)
const;
142 std::string formatSecondaryStatus(
int status)
const;
144 void userfun(
SnoptMemory* m,
int* mode,
int nnObj,
int nnCon,
int nnJac,
int nnL,
int neJac,
145 const double* x,
double* fObj,
double*gObj,
double* fCon,
double* gCon,
146 int nState,
char* cu,
int lencu,
int* iu,
int leniu,
double* ru,
int lenru)
const;
157 static void userfunPtr(
int * mode,
int* nnObj,
int * nnCon,
int *nJac,
int *nnL,
int * neJac,
158 double *x,
double *fObj,
double *gObj,
double * fCon,
double* gCon,
159 int* nState,
char* cu,
int* lencu,
int* iu,
int* leniu,
160 double* ru,
int *lenru);
Helper class for Serialization.
NLP solver storage class.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
'snopt' plugin for Nlpsol
static const std::string meta_doc
A documentation string.
static const Options options_
Options.
void free_mem(void *mem) const override
Free memory block.
static std::map< int, std::string > secondary_status_
std::string class_name() const override
Get type name.
casadi_int Cold_
Warm-start settings.
static std::map< int, std::string > status_
static Nlpsol * creator(const std::string &name, const Function &nlp)
Create a new NLP Solver.
const char * plugin_name() const override
static ProtoFunction * deserialize(DeserializingStream &s)
Deserialize into MX.
const Options & get_options() const override
Options.
void * alloc_mem() const override
Create memory block.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
const double pi
Define pi.
Options metadata for a class.
std::vector< double > A_data
static std::vector< SnoptMemory * > mempool