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 
348  CASADI_EXPORT Function conic(const std::string& name, const std::string& solver,
349  const SpDict& qp, const Dict& opts=Dict());
350  CASADI_EXPORT Function qpsol(const std::string& name, const std::string& solver,
351  const SXDict& qp, const Dict& opts=Dict());
352  CASADI_EXPORT Function qpsol(const std::string& name, const std::string& solver,
353  const MXDict& qp, const Dict& opts=Dict());
355 
409  CASADI_EXPORT std::vector<std::string> conic_in();
410 
447  CASADI_EXPORT std::vector<std::string> conic_out();
448 
477  CASADI_EXPORT std::string conic_in(casadi_int ind);
478 
506  CASADI_EXPORT std::string conic_out(casadi_int ind);
507 
532  CASADI_EXPORT casadi_int conic_n_in();
533 
558  CASADI_EXPORT casadi_int conic_n_out();
559 
590  CASADI_EXPORT std::vector<std::string> conic_options(const std::string& name);
591 
621  CASADI_EXPORT std::string conic_option_type(const std::string& name, const std::string& op);
622 
650  CASADI_EXPORT std::string conic_option_info(const std::string& name, const std::string& op);
651 
679  CASADI_EXPORT bool has_conic(const std::string& name);
680 
716  CASADI_EXPORT void load_conic(const std::string& name);
717 
744  CASADI_EXPORT std::string doc_conic(const std::string& name);
745 
796  CASADI_EXPORT void conic_debug(const Function& f, const std::string &filename);
797 
801  CASADI_EXPORT void conic_debug(const Function& f, std::ostream &file);
802 
805 #ifndef SWIG
807 enum ConicInput {
810  CONIC_H,
812  CONIC_G,
814  CONIC_A,
816  CONIC_LBA,
818  CONIC_UBA,
820  CONIC_LBX,
822  CONIC_UBX,
824  CONIC_X0,
826  CONIC_LAM_X0,
828  CONIC_LAM_A0,
830  CONIC_Q,
832  CONIC_P,
833  CONIC_NUM_IN};
834 
836 enum ConicOutput {
838  CONIC_X,
840  CONIC_COST,
843  CONIC_LAM_A,
845  CONIC_LAM_X,
846  CONIC_NUM_OUT};
847 #endif // SWIG
848 
849 } // namespace casadi
850 
851 #endif // CASADI_CONIC_HPP
Function object.
Definition: function.hpp:126
CASADI_EXPORT std::string conic_option_info(const std::string &name, const std::string &op)
Get the documentation string of an option of a QP solver plugin.
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 the output scheme of QP solvers.
CASADI_EXPORT std::string conic_option_type(const std::string &name, const std::string &op)
Get the type of an option of a QP solver plugin.
CASADI_EXPORT std::vector< std::string > conic_in()
Get the input scheme of QP solvers.
CASADI_EXPORT bool has_conic(const std::string &name)
Check if a QP solver plugin is available.
CASADI_EXPORT std::string doc_conic(const std::string &name)
Get the documentation string of a QP solver 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 of a QP solver plugin.
CASADI_EXPORT void load_conic(const std::string &name)
Explicitly load a QP solver plugin.
CASADI_EXPORT void conic_debug(const Function &f, const std::string &filename)
Generate native code in the interfaced language for debugging.
The casadi namespace.
Definition: archiver.hpp:32
std::map< std::string, MX > MXDict
Definition: mx.hpp:5151
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:6350