conic.hpp
1 /*
2  * This file is part of CasADi.
3  *
4  * CasADi -- A symbolic framework for dynamic optimization.
5  * Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl,
6  * KU Leuven. All rights reserved.
7  * Copyright (C) 2011-2014 Greg Horn
8  *
9  * CasADi is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * CasADi is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with CasADi; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 
26 #ifndef CASADI_CONIC_HPP
27 #define CASADI_CONIC_HPP
28 
29 #include "function.hpp"
30 
31 namespace casadi {
32 
98  CASADI_EXPORT Function conic(const std::string& name, const std::string& solver,
99  const SpDict& qp, const Dict& opts=Dict());
100  CASADI_EXPORT Function qpsol(const std::string& name, const std::string& solver,
101  const SXDict& qp, const Dict& opts=Dict());
102  CASADI_EXPORT Function qpsol(const std::string& name, const std::string& solver,
103  const MXDict& qp, const Dict& opts=Dict());
105 
109  CASADI_EXPORT std::vector<std::string> conic_in();
110 
114  CASADI_EXPORT std::vector<std::string> conic_out();
115 
119  CASADI_EXPORT std::string conic_in(casadi_int ind);
120 
124  CASADI_EXPORT std::string conic_out(casadi_int ind);
125 
129  CASADI_EXPORT casadi_int conic_n_in();
130 
134  CASADI_EXPORT casadi_int conic_n_out();
135 
139  CASADI_EXPORT std::vector<std::string> conic_options(const std::string& name);
140 
144  CASADI_EXPORT std::string conic_option_type(const std::string& name, const std::string& op);
145 
149  CASADI_EXPORT std::string conic_option_info(const std::string& name, const std::string& op);
150 
152  CASADI_EXPORT bool has_conic(const std::string& name);
153 
155  CASADI_EXPORT void load_conic(const std::string& name);
156 
158  CASADI_EXPORT std::string doc_conic(const std::string& name);
159 
161  CASADI_EXPORT void conic_debug(const Function& f, const std::string &filename);
162 
164  CASADI_EXPORT void conic_debug(const Function& f, std::ostream &file);
165 
168 #ifndef SWIG
197 
209 #endif // SWIG
210 
211 } // namespace casadi
212 
213 #endif // CASADI_CONIC_HPP
Function qpsol(const std::string &name, const std::string &solver, const SXDict &qp, const Dict &opts)
Definition: conic.cpp:262
std::string conic_option_info(const std::string &name, const std::string &op)
Get documentation for a particular option.
Definition: conic.cpp:572
Function conic(const std::string &name, const std::string &solver, const SpDict &qp, const Dict &opts)
Definition: conic.cpp:44
std::string conic_option_type(const std::string &name, const std::string &op)
Get type info for a particular option.
Definition: conic.cpp:568
bool has_conic(const std::string &name)
Check if a particular plugin is available.
Definition: conic.cpp:32
std::string doc_conic(const std::string &name)
Get the documentation string for a plugin.
Definition: conic.cpp:40
std::vector< std::string > conic_options(const std::string &name)
Get all options for a plugin.
Definition: conic.cpp:564
std::vector< std::string > conic_out()
Get QP solver output scheme of QP solvers.
Definition: conic.cpp:67
casadi_int conic_n_in()
Get the number of QP solver inputs.
Definition: conic.cpp:103
casadi_int conic_n_out()
Get the number of QP solver outputs.
Definition: conic.cpp:107
void load_conic(const std::string &name)
Explicitly load a plugin dynamically.
Definition: conic.cpp:36
std::vector< std::string > conic_in()
Get input scheme of QP solvers.
Definition: conic.cpp:61
void conic_debug(const Function &f, const std::string &filename)
Definition: conic.cpp:49
The casadi namespace.
Definition: archiver.cpp:28
std::map< std::string, MX > MXDict
Definition: mx.hpp:1009
ConicInput
Input arguments of a QP problem.
Definition: conic.hpp:170
@ CONIC_UBA
dense, (nc x 1)
Definition: conic.hpp:181
@ CONIC_X0
dense, (n x 1)
Definition: conic.hpp:187
@ CONIC_A
The matrix A: sparse, (nc x n) - product with x must be dense.
Definition: conic.hpp:177
@ CONIC_G
The vector g: dense, (n x 1)
Definition: conic.hpp:175
@ CONIC_Q
The matrix Q: sparse symmetric, (np^2 x n)
Definition: conic.hpp:193
@ CONIC_LBA
dense, (nc x 1)
Definition: conic.hpp:179
@ CONIC_UBX
dense, (n x 1)
Definition: conic.hpp:185
@ CONIC_H
Definition: conic.hpp:173
@ CONIC_LAM_A0
dense
Definition: conic.hpp:191
@ CONIC_LBX
dense, (n x 1)
Definition: conic.hpp:183
@ CONIC_NUM_IN
Definition: conic.hpp:196
@ CONIC_LAM_X0
dense
Definition: conic.hpp:189
@ CONIC_P
The matrix P: sparse symmetric, (np x np)
Definition: conic.hpp:195
std::map< std::string, SX > SXDict
Definition: sx_fwd.hpp:40
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
std::map< std::string, Sparsity > SpDict
Definition: sparsity.hpp:1502
std::string filename(const std::string &path)
Definition: ghc.cpp:55
ConicOutput
Output arguments of an QP Solver.
Definition: conic.hpp:199
@ CONIC_X
The primal solution.
Definition: conic.hpp:201
@ CONIC_LAM_A
The dual solution corresponding to linear bounds.
Definition: conic.hpp:205
@ CONIC_COST
The optimal cost.
Definition: conic.hpp:203
@ CONIC_LAM_X
The dual solution corresponding to simple bounds.
Definition: conic.hpp:207
@ CONIC_NUM_OUT
Definition: conic.hpp:208