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
170 enum ConicInput {
173  CONIC_H,
175  CONIC_G,
177  CONIC_A,
179  CONIC_LBA,
181  CONIC_UBA,
183  CONIC_LBX,
185  CONIC_UBX,
187  CONIC_X0,
189  CONIC_LAM_X0,
191  CONIC_LAM_A0,
193  CONIC_Q,
195  CONIC_P,
196  CONIC_NUM_IN};
197 
199 enum ConicOutput {
201  CONIC_X,
203  CONIC_COST,
205  CONIC_LAM_A,
207  CONIC_LAM_X,
208  CONIC_NUM_OUT};
209 #endif // SWIG
210 
211 } // namespace casadi
212 
213 #endif // CASADI_CONIC_HPP
Function object.
Definition: function.hpp:60
CASADI_EXPORT std::string conic_option_info(const std::string &name, const std::string &op)
Get documentation for a particular option.
CASADI_EXPORT Function conic(const std::string &name, const std::string &solver, const SpDict &qp, const Dict &opts=Dict())
CASADI_EXPORT Function qpsol(const std::string &name, const std::string &solver, const SXDict &qp, const Dict &opts=Dict())
CASADI_EXPORT std::vector< std::string > conic_out()
Get QP solver output scheme of QP solvers.
CASADI_EXPORT std::string conic_option_type(const std::string &name, const std::string &op)
Get type info for a particular option.
CASADI_EXPORT std::vector< std::string > conic_in()
Get input scheme of QP solvers.
CASADI_EXPORT bool has_conic(const std::string &name)
Check if a particular plugin is available.
CASADI_EXPORT std::string doc_conic(const std::string &name)
Get the documentation string for a plugin.
CASADI_EXPORT casadi_int conic_n_in()
Get the number of QP solver inputs.
CASADI_EXPORT casadi_int conic_n_out()
Get the number of QP solver outputs.
CASADI_EXPORT std::vector< std::string > conic_options(const std::string &name)
Get all options for a plugin.
CASADI_EXPORT void load_conic(const std::string &name)
Explicitly load a plugin dynamically.
CASADI_EXPORT void conic_debug(const Function &f, const std::string &filename)
The casadi namespace.
std::map< std::string, MX > MXDict
Definition: mx.hpp:943
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:1490