casadi 3.6.5__cp27-none-manylinux1_i686.whl → 3.6.7__cp27-none-manylinux1_i686.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi.py +737 -306
  3. casadi/cbc +0 -0
  4. casadi/clp +0 -0
  5. casadi/cmake/casadi-config-version.cmake +1 -1
  6. casadi/include/casadi/casadi.i +3 -0
  7. casadi/include/casadi/casadi_c.h +2 -0
  8. casadi/include/casadi/config.h +8 -8
  9. casadi/include/casadi/core/casadi_common.hpp +1 -0
  10. casadi/include/casadi/core/casadi_misc.hpp +52 -0
  11. casadi/include/casadi/core/casadi_types.hpp +3 -2
  12. casadi/include/casadi/core/code_generator.hpp +30 -1
  13. casadi/include/casadi/core/global_options.hpp +2 -0
  14. casadi/include/casadi/core/mx.hpp +18 -3
  15. casadi/include/casadi/core/optistack.hpp +23 -0
  16. casadi/include/casadi/core/runtime/casadi_nlp.hpp +19 -4
  17. casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
  18. casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
  19. casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
  20. casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
  21. casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
  22. casadi/include/casadi/core/serializing_stream.hpp +2 -2
  23. casadi/include/casadi/core/sparsity.hpp +7 -0
  24. casadi/include/casadi/doc.i +1513 -1016
  25. casadi/include/casadi/doc_merged.i +965 -719
  26. casadi/include/casadi/mem.h +1 -0
  27. casadi/include/daqp/api.h +46 -0
  28. casadi/include/daqp/auxiliary.h +29 -0
  29. casadi/include/daqp/bnb.h +32 -0
  30. casadi/include/daqp/codegen.h +18 -0
  31. casadi/include/daqp/constants.h +92 -0
  32. casadi/include/daqp/daqp.h +22 -0
  33. casadi/include/daqp/daqp_prox.h +18 -0
  34. casadi/include/daqp/factorization.h +18 -0
  35. casadi/include/daqp/types.h +161 -0
  36. casadi/include/daqp/utils.h +44 -0
  37. casadi/include/licenses/daqp-external/LICENSE +21 -0
  38. casadi/include/osqp/constants.h +2 -3
  39. casadi/include/osqp/version.h +9 -0
  40. casadi/lib/libtinyxml2.a +0 -0
  41. casadi/libCbcSolver.so +0 -0
  42. casadi/libCbcSolver.so.3 +0 -0
  43. casadi/libCbcSolver.so.3.10.11 +0 -0
  44. casadi/libClpSolver.so +0 -0
  45. casadi/libClpSolver.so.1 +0 -0
  46. casadi/libClpSolver.so.1.14.9 +0 -0
  47. casadi/libbonmin.so +0 -0
  48. casadi/libbonmin.so.4 +0 -0
  49. casadi/libbonmin.so.4.8.9 +0 -0
  50. casadi/libcasadi.so +0 -0
  51. casadi/libcasadi.so.3.7 +0 -0
  52. casadi/libcasadi_conic_cbc.so +0 -0
  53. casadi/libcasadi_conic_cbc.so.3.7 +0 -0
  54. casadi/libcasadi_conic_clp.so +0 -0
  55. casadi/libcasadi_conic_clp.so.3.7 +0 -0
  56. casadi/libcasadi_conic_daqp.so +0 -0
  57. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  58. casadi/libcasadi_conic_gurobi.so +0 -0
  59. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  60. casadi/libcasadi_conic_ipqp.so +0 -0
  61. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  62. casadi/libcasadi_conic_nlpsol.so +0 -0
  63. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  64. casadi/libcasadi_conic_osqp.so +0 -0
  65. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  66. casadi/libcasadi_conic_qpoases.so +0 -0
  67. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  68. casadi/libcasadi_conic_qrqp.so +0 -0
  69. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  70. casadi/libcasadi_conic_superscs.so +0 -0
  71. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  72. casadi/libcasadi_integrator_collocation.so +0 -0
  73. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  74. casadi/libcasadi_integrator_cvodes.so +0 -0
  75. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  76. casadi/libcasadi_integrator_idas.so +0 -0
  77. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  78. casadi/libcasadi_integrator_rk.so +0 -0
  79. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  80. casadi/libcasadi_nlpsol_ampl.so +0 -0
  81. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  82. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  83. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  84. casadi/libcasadi_nlpsol_bonmin.so +0 -0
  85. casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
  86. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  87. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  88. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  89. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  90. casadi/libcasadi_nlpsol_knitro.so +0 -0
  91. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  92. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  93. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  94. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  95. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  96. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  97. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  98. casadi/libcasadi_nlpsol_snopt.so +0 -0
  99. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  100. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  101. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  102. casadi/libcasadi_nlpsol_worhp.so +0 -0
  103. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  104. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  105. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  106. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  107. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  108. casadi/libcasadi_rootfinder_newton.so +0 -0
  109. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  110. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  111. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  112. casadi/libcasadi_sundials_common.so +0 -0
  113. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  114. casadi/libcoinmetis.la +1 -1
  115. casadi/libcoinmetis.so +0 -0
  116. casadi/libcoinmetis.so.2 +0 -0
  117. casadi/libcoinmetis.so.2.0.0 +0 -0
  118. casadi/libdaqp.so +0 -0
  119. casadi/libdaqpstat.a +0 -0
  120. casadi/libindirect.a +0 -0
  121. casadi/liblinsys.a +0 -0
  122. casadi/libmatlab_ipc.so +0 -0
  123. casadi/libosqp.a +0 -0
  124. casadi/libosqp.so +0 -0
  125. casadi/libqdldl.a +0 -0
  126. casadi/libsuperscs.a +0 -0
  127. casadi/pkgconfig/casadi.pc +1 -1
  128. casadi/tools/__init__.py +4 -0
  129. casadi/tools/bounds.py +3 -3
  130. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/METADATA +2 -2
  131. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/RECORD +132 -109
  132. {casadi-3.6.5.dist-info → casadi-3.6.7.dist-info}/WHEEL +0 -0
@@ -46,6 +46,7 @@ extern "C" {
46
46
  #endif
47
47
 
48
48
  /* Function types corresponding to entry points in CasADi's C API */
49
+ typedef int (*casadi_config_t)(int, const char**);
49
50
  typedef void (*casadi_signal_t)(void);
50
51
  typedef casadi_int (*casadi_getint_t)(void);
51
52
  typedef int (*casadi_checkout_t)(void);
@@ -0,0 +1,46 @@
1
+ #ifndef DAQP_API_H
2
+ # define DAQP_API_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "daqp.h"
9
+ #include "daqp_prox.h"
10
+ #include "bnb.h"
11
+
12
+ typedef struct{
13
+ c_float *x;
14
+ c_float *lam;
15
+ c_float fval;
16
+ c_float soft_slack;
17
+
18
+ int exitflag;
19
+ int iter;
20
+ int nodes;
21
+ c_float solve_time;
22
+ c_float setup_time;
23
+
24
+ }DAQPResult;
25
+
26
+ void daqp_solve(DAQPResult* res, DAQPWorkspace *work);
27
+ void daqp_quadprog(DAQPResult* res, DAQPProblem* qp,DAQPSettings* settings);
28
+
29
+ int setup_daqp(DAQPProblem *qp, DAQPWorkspace* work, c_float* setup_time);
30
+ int setup_daqp_ldp(DAQPWorkspace *work, DAQPProblem* qp);
31
+ int setup_daqp_bnb(DAQPWorkspace* work, int nb, int ns);
32
+ void allocate_daqp_settings(DAQPWorkspace *work);
33
+ void allocate_daqp_workspace(DAQPWorkspace *work, int n, int ns);
34
+
35
+ void free_daqp_ldp(DAQPWorkspace *work);
36
+ void free_daqp_workspace(DAQPWorkspace *work);
37
+ void free_daqp_bnb(DAQPWorkspace* work);
38
+
39
+ void daqp_extract_result(DAQPResult* res, DAQPWorkspace* work);
40
+ void daqp_default_settings(DAQPSettings *settings);
41
+
42
+ # ifdef __cplusplus
43
+ }
44
+ # endif // ifdef __cplusplus
45
+
46
+ #endif //ifndef DAQP_API_H
@@ -0,0 +1,29 @@
1
+ #ifndef DAQP_AUX_H
2
+ # define DAQP_AUX_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "types.h"
9
+ #include "constants.h"
10
+
11
+ void remove_constraint(DAQPWorkspace* work, const int rm_ind);
12
+ void add_constraint(DAQPWorkspace *work, const int add_ind, c_float lam);
13
+ void compute_primal_and_fval(DAQPWorkspace *work);
14
+ int add_infeasible(DAQPWorkspace *work);
15
+ int remove_blocking(DAQPWorkspace *work);
16
+ void compute_CSP(DAQPWorkspace *work);
17
+ void compute_singular_direction(DAQPWorkspace *work);
18
+
19
+ void reorder_LDL(DAQPWorkspace *work);
20
+ void pivot_last(DAQPWorkspace *work);
21
+
22
+ int activate_constraints(DAQPWorkspace *work);
23
+ void deactivate_constraints(DAQPWorkspace *work);
24
+
25
+ # ifdef __cplusplus
26
+ }
27
+ # endif // ifdef __cplusplus
28
+
29
+ #endif //ifndef DAQP_AUX_H
@@ -0,0 +1,32 @@
1
+ #ifndef DAQP_BNB_H
2
+ # define DAQP_BNB_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "types.h"
9
+ #include "constants.h"
10
+ #include "daqp.h"
11
+
12
+ int daqp_bnb(DAQPWorkspace* work);
13
+ int process_node(DAQPNode* node, DAQPWorkspace* work);
14
+ int get_branch_id(DAQPWorkspace* work);
15
+ void spawn_children(DAQPNode* node, const int branch_id, DAQPWorkspace* work);
16
+
17
+ void node_cleanup_workspace(int n_clean, DAQPWorkspace* work);
18
+ void warmstart_node(DAQPNode* node, DAQPWorkspace* work);
19
+ void save_warmstart(DAQPNode* node, DAQPWorkspace* work);
20
+ int add_upper_lower(const int add_id, DAQPWorkspace* work);
21
+
22
+ #define LOWER_BIT 16
23
+ #define EXTRACT_LOWER_FLAG(x) (x>>(LOWER_BIT-1))
24
+ #define REMOVE_LOWER_FLAG(x) (x&~(1<<LOWER_BIT))
25
+ #define ADD_LOWER_FLAG(x) (x|(1<<LOWER_BIT))
26
+ #define TOGGLE_LOWER_FLAG(x) (x^(1<<LOWER_BIT))
27
+
28
+ # ifdef __cplusplus
29
+ }
30
+ # endif // ifdef __cplusplus
31
+
32
+ #endif //ifndef DAQP_BNB_H
@@ -0,0 +1,18 @@
1
+ #ifndef DAQP_CODEGEN_H
2
+ #define DAQP_CODEGEN_H
3
+
4
+ #include <stdio.h>
5
+ #include "types.h"
6
+
7
+ void render_daqp_workspace(DAQPWorkspace* work, const char *fname, const char* dir);
8
+
9
+ void write_daqp_workspace_h(FILE *f, DAQPWorkspace *work);
10
+ void write_daqp_workspace_src(FILE *f, DAQPWorkspace *work);
11
+ void write_daqp_settings_src(FILE* f, DAQPSettings* settings);
12
+ void write_daqp_bnb_h(FILE* f, DAQPBnB* bnb, const int n);
13
+ void write_daqp_bnb_src(FILE* f, DAQPBnB* bnb, const int n);
14
+
15
+ void write_float_array(FILE *f, c_float* a, const int N, const char *name);
16
+ void write_int_array(FILE *f, int* a, const int N, const char *name);
17
+
18
+ #endif //ifndef DAQP_CODEGEN_H
@@ -0,0 +1,92 @@
1
+ #ifndef DAQP_CONSTANTS_H
2
+ #define DAQP_CONSTANTS_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include <stddef.h>
9
+
10
+ #define EMPTY_IND -1
11
+ #define NX work->n
12
+ #define N_CONSTR work->m
13
+ #define N_SIMPLE work->ms
14
+ #define DAQP_INF ((c_float)1e30)
15
+
16
+ // DEFAULT SETTINGS
17
+ #define DEFAULT_PRIM_TOL 1e-6
18
+ #define DEFAULT_DUAL_TOL 1e-12
19
+ #define DEFAULT_ZERO_TOL 1e-11
20
+ #define DEFAULT_PROG_TOL 1e-14
21
+ #define DEFAULT_PIVOT_TOL 1e-6
22
+ #define DEFAULT_CYCLE_TOL 10
23
+ #define DEFAULT_ETA 1e-6
24
+ #define DEFAULT_ITER_LIMIT 1000
25
+ #define DEFAULT_RHO_SOFT 1e-3
26
+ #define DEFAULT_REL_SUBOPT 0
27
+ #define DEFAULT_ABS_SUBOPT 0
28
+
29
+ // MACROS
30
+ #define SQUARE(x) ((x)*(x))
31
+ #define ARSUM(x) ((x)*(x+1)/2)
32
+ #define R_OFFSET(X,Y) (((2*Y-X-1)*X)/2)
33
+
34
+ // EXIT FLAGS
35
+ #define EXIT_SOFT_OPTIMAL 2
36
+ #define EXIT_OPTIMAL 1
37
+ #define EXIT_INFEASIBLE -1
38
+ #define EXIT_CYCLE -2
39
+ #define EXIT_UNBOUNDED -3
40
+ #define EXIT_ITERLIMIT -4
41
+ #define EXIT_NONCONVEX -5
42
+ #define EXIT_OVERDETERMINED_INITIAL -6
43
+
44
+ // UPDATE LDP MASKS
45
+ #define UPDATE_Rinv 1
46
+ #define UPDATE_M 2
47
+ #define UPDATE_v 4
48
+ #define UPDATE_d 8
49
+ #define UPDATE_sense 16
50
+
51
+ // CONSTRAINT MASKS
52
+ #define ACTIVE 1
53
+ #define IS_ACTIVE(x) (work->sense[x]&1)
54
+ #define SET_ACTIVE(x) (work->sense[x]|=1)
55
+ #define SET_INACTIVE(x) (work->sense[x]&=~1)
56
+
57
+ // marks if a constraints is active at its lower bound
58
+ #define LOWER 2
59
+ #define IS_LOWER(x) (work->sense[x]&2)
60
+ #define SET_LOWER(x) (work->sense[x]|=2)
61
+ #define SET_UPPER(x) (work->sense[x]&=~2)
62
+
63
+ // marks if a constraint cannot be activated/deactivated
64
+ #define IMMUTABLE 4
65
+ #define IS_IMMUTABLE(x) (work->sense[x]&4)
66
+ #define SET_IMMUTABLE(x) (work->sense[x]|=4)
67
+ #define SET_MUTABLE(x) (work->sense[x]&=~4)
68
+
69
+ // marks that a constraint might be violated (but the slack is penalized)
70
+ #define SOFT 8
71
+ #define IS_SOFT(x) (work->sense[x]&8)
72
+ #define SET_SOFT(x) (work->sense[x]|=8)
73
+ #define SET_HARD(x) (work->sense[x]&=~8)
74
+
75
+ // marks that a constraint has to be active at either its upper or lower bound
76
+ #define BINARY 16
77
+ #define IS_BINARY(x) (work->sense[x]&16)
78
+
79
+ // marks that the soft slack is at its lower bound (d_ls or d_us)
80
+ #define SLACK_FIXED 32
81
+ #define IS_SLACK_FIXED(x) (work->sense[x]&32)
82
+ #define IS_SLACK_FREE(x) ((work->sense[x]&32)==0)
83
+ #define SET_SLACK_FIXED(x) (work->sense[x]|=32)
84
+ #define SET_SLACK_FREE(x) (work->sense[x]&=~32)
85
+
86
+ #define IS_SIMPLE(x) (x < work->ms)
87
+
88
+ # ifdef __cplusplus
89
+ }
90
+ # endif // ifdef __cplusplus
91
+
92
+ #endif //ifndef DAQP_CONSTANTS_H
@@ -0,0 +1,22 @@
1
+ #ifndef DAQP_H
2
+ # define DAQP_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "factorization.h"
9
+ #include "constants.h"
10
+ #include "auxiliary.h"
11
+
12
+ int daqp_ldp(DAQPWorkspace *work);
13
+ void ldp2qp_solution(DAQPWorkspace *work);
14
+
15
+ void warmstart_workspace(DAQPWorkspace* work, int* WS, const int n_active);
16
+ void reset_daqp_workspace(DAQPWorkspace *work);
17
+
18
+ # ifdef __cplusplus
19
+ }
20
+ # endif // ifdef __cplusplus
21
+
22
+ #endif //ifndef DAQP_H
@@ -0,0 +1,18 @@
1
+ #ifndef DAQP_PROX_H
2
+ # define DAQP_PROX_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "types.h"
9
+ #include "constants.h"
10
+ #include "daqp.h"
11
+
12
+ int daqp_prox(DAQPWorkspace *work);
13
+
14
+ # ifdef __cplusplus
15
+ }
16
+ # endif // ifdef __cplusplus
17
+
18
+ #endif //ifndef DAQP_PROX_H
@@ -0,0 +1,18 @@
1
+ #ifndef DAQP_FACTORIZATION_H
2
+ # define DAQP_FACTORIZATION_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "types.h"
9
+ #include "constants.h"
10
+
11
+ void update_LDL_add(DAQPWorkspace *work, const int add_ind);
12
+ void update_LDL_remove(DAQPWorkspace *work, const int rm_ind);
13
+
14
+ # ifdef __cplusplus
15
+ }
16
+ # endif // ifdef __cplusplus
17
+
18
+ #endif //ifndef DAQP_FACTORIZATION_H
@@ -0,0 +1,161 @@
1
+ #ifndef DAQP_TYPES_H
2
+ # define DAQP_TYPES_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #ifdef DAQP_SINGLE_PRECISION
9
+ typedef float c_float;
10
+ #else
11
+ typedef double c_float;
12
+ #endif
13
+
14
+ typedef struct{
15
+
16
+ // Data for the QP problem
17
+ //
18
+ // min 0.5 x'*H*x + f'x
19
+ // s.t lbA <= A*x <= ubA
20
+ // lb <= x <= ub
21
+ //
22
+ // n - dimension of x
23
+ // m - total number of constraints
24
+ // ms - number of simple bounds
25
+ // blower = [lb; lbA];
26
+ // bupper = [ub; ubA];
27
+ // (The number of rows in A is hence m-ms)
28
+
29
+ // sense define the state of the constraints
30
+ // (active, immutable, upper/lower, soft, binary).
31
+
32
+ int n;
33
+ int m;
34
+ int ms;
35
+
36
+ c_float* H;
37
+ c_float* f;
38
+
39
+ c_float* A;
40
+ c_float* bupper;
41
+ c_float* blower;
42
+
43
+ int* sense;
44
+
45
+ }DAQPProblem;
46
+
47
+ typedef struct{
48
+ c_float primal_tol;
49
+ c_float dual_tol;
50
+ c_float zero_tol;
51
+ c_float pivot_tol;
52
+ c_float progress_tol;
53
+
54
+ int cycle_tol;
55
+ int iter_limit;
56
+ c_float fval_bound;
57
+
58
+ c_float eps_prox;
59
+ c_float eta_prox;
60
+
61
+ c_float rho_soft;
62
+
63
+ c_float rel_subopt;
64
+ c_float abs_subopt;
65
+ }DAQPSettings;
66
+
67
+
68
+ typedef struct{
69
+ int bin_id;
70
+ int depth;
71
+ int WS_start;
72
+ int WS_end;
73
+ }DAQPNode;
74
+
75
+ typedef struct{
76
+ int* bin_ids;
77
+ int nb;
78
+ int neq;
79
+
80
+ DAQPNode* tree;
81
+ int n_nodes;
82
+
83
+ int* tree_WS;
84
+ int nWS;
85
+ int n_clean;
86
+ int* fixed_ids;
87
+
88
+ int nodecount;
89
+ int itercount;
90
+ }DAQPBnB;
91
+
92
+ typedef struct{
93
+ DAQPProblem* qp;
94
+ // LDP data
95
+ int n; // Number of primal variables
96
+ int m; // Number of constraints
97
+ int ms; // Number of simple bounds
98
+ c_float *M; // M' M is the Hessian of the dual objective function (dimensions: n x m)
99
+ c_float *dupper; // Linear part of dual objective function (dimensions: m x 1)
100
+ c_float *dlower; // Linear part of dual objective function (dimensions: m x 1)
101
+ c_float *Rinv; // Inverse of upper cholesky factor of primal Hessian
102
+ c_float *v; // v = R'\f (used to transform QP to LDP
103
+ int *sense; // State of constraints
104
+ c_float *scaling; // normalizations
105
+ c_float *RinvD; // in case Rinv is diagonal
106
+
107
+
108
+ // Iterates
109
+ c_float *x; // The final primal solution
110
+ c_float *xold; // The latest primal solution (used for proximal-point iteratios)
111
+
112
+ c_float* lam; // Dual iterate
113
+ c_float* lam_star; // Current constrained stationary point
114
+ c_float* u; // Stores Mk' lam_star
115
+ c_float fval;
116
+
117
+ // LDL factors (Mk Mk' = L D L')
118
+ c_float *L;
119
+ c_float *D;
120
+ // Intermittent variables (LDL')
121
+ c_float* xldl; // Solution to L xdldl = -dk
122
+ c_float* zldl; // zldl_i = xldl_i/D_i
123
+ int reuse_ind; // How much work that can be saved when solving Mk Mk' lam* = -dk
124
+
125
+ int *WS; // Working set, size: maximum number of constraints (n+ns+1)
126
+ int n_active; // Number of active contraints
127
+
128
+ int iterations;
129
+ int sing_ind; // Flag for denoting whether Mk Mk' is singular or not
130
+
131
+
132
+ // Soft constraint
133
+ c_float soft_slack;
134
+ #ifdef SOFT_WEIGHTS
135
+ // The softened objective is given by
136
+ // min 0.5 x'*H*x + f'x + 0.5 su'su+0.5*sl'sl,
137
+ // and the softened constraints are given by (similar for simple bounds)
138
+ // lbA-rho_ls*sl <= A*x <= ubA+rho_us*su,
139
+ // with the bounds sl >= d_ls, su >= d_us
140
+ // note that lbA/ubA is assumed to be shifted with rho_ls*d_ls and rho_us*d_us
141
+ // since the slacks are assumed to be active at their bounds by default.
142
+
143
+ // size of the following is m; values are only used if index set to SOFT.
144
+ c_float *d_ls;
145
+ c_float *d_us;
146
+ c_float *rho_ls;
147
+ c_float *rho_us;
148
+ #endif
149
+
150
+ // Settings
151
+ DAQPSettings* settings;
152
+
153
+ // BnB
154
+ DAQPBnB* bnb;
155
+ }DAQPWorkspace;
156
+
157
+ # ifdef __cplusplus
158
+ }
159
+ # endif // ifdef __cplusplus
160
+
161
+ #endif //ifndef DAQP_TYPES_H
@@ -0,0 +1,44 @@
1
+ #ifndef DAQP_UTILS_H
2
+ # define DAQP_UTILS_H
3
+
4
+ # ifdef __cplusplus
5
+ extern "C" {
6
+ # endif // ifdef __cplusplus
7
+
8
+ #include "daqp.h"
9
+ // Utils for transforming QP to LDP
10
+ int update_ldp(const int mask, DAQPWorkspace *work);
11
+ int update_Rinv(DAQPWorkspace *work);
12
+ void update_M(DAQPWorkspace *work, const int mask);
13
+ void update_v(c_float *f, DAQPWorkspace *work, const int mask);
14
+ void update_d(DAQPWorkspace *work);
15
+ void normalize_Rinv(DAQPWorkspace *work);
16
+ void normalize_M(DAQPWorkspace *work);
17
+ //
18
+ // Utils for profiling
19
+ #ifdef PROFILING
20
+ #ifdef _WIN32
21
+ #include <windows.h>
22
+ typedef struct{
23
+ LARGE_INTEGER start;
24
+ LARGE_INTEGER stop;
25
+ }DAQPtimer;
26
+ #else // not _WIN32
27
+ #include <time.h>
28
+ typedef struct{
29
+ struct timespec start;
30
+ struct timespec stop;
31
+ }DAQPtimer;
32
+ #endif // _WIN32
33
+
34
+
35
+ void tic(DAQPtimer *timer);
36
+ void toc(DAQPtimer *timer);
37
+ double get_time(DAQPtimer *timer);
38
+ #endif // PROFILING
39
+
40
+ # ifdef __cplusplus
41
+ }
42
+ # endif // ifdef __cplusplus
43
+
44
+ #endif //ifndef DAQP_UTILS_H
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Daniel Arnström
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -9,8 +9,7 @@ extern "C" {
9
9
  /*******************
10
10
  * OSQP Versioning *
11
11
  *******************/
12
- # define OSQP_VERSION ("0.6.2") /* string literals automatically null-terminated
13
- */
12
+ #include "version.h"
14
13
 
15
14
  /******************
16
15
  * Solver Status *
@@ -33,7 +32,7 @@ extern "C" {
33
32
  /*************************
34
33
  * Linear System Solvers *
35
34
  *************************/
36
- enum linsys_solver_type { QDLDL_SOLVER, MKL_PARDISO_SOLVER };
35
+ enum linsys_solver_type { QDLDL_SOLVER, MKL_PARDISO_SOLVER, UNKNOWN_SOLVER=99 };
37
36
  extern const char * LINSYS_SOLVER_NAME[];
38
37
 
39
38
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ This file is replaced by an auto-generated version.h
3
+ with an OSQP_VERSION obtained from a variable supplied
4
+ to cmake
5
+ */
6
+
7
+ #ifndef OSQP_VERSION
8
+ #define OSQP_VERSION "0.6.3"
9
+ #endif
casadi/lib/libtinyxml2.a CHANGED
Binary file
casadi/libCbcSolver.so CHANGED
Binary file
casadi/libCbcSolver.so.3 CHANGED
Binary file
Binary file
casadi/libClpSolver.so CHANGED
Binary file
casadi/libClpSolver.so.1 CHANGED
Binary file
Binary file
casadi/libbonmin.so CHANGED
Binary file
casadi/libbonmin.so.4 CHANGED
Binary file
casadi/libbonmin.so.4.8.9 CHANGED
Binary file
casadi/libcasadi.so CHANGED
Binary file
casadi/libcasadi.so.3.7 CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file