12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /**
- * @file struct_prob.h
- * @brief 定义优化问题(problem)结构体。本模块用来提高工程代码质量。
- * This is the definition of problem structure. For better code engineering.
- * @version 0.1
- * @date 2021-09-17
- *
- * @copyright Copyright (c) 2021
- *
- */
- #ifndef __STRUCT_PROB_H__
- #define __STRUCT_PROB_H__
- #include "csocp_config.h"
- /** CSOCP优化问题结构体 Structrue of CSOCP problem */
- struct c_prob_s {
- c_int n; /**< 变量数量 Number of variables */
- c_int m; /**< 不等式约束数量 Number of inequalities */
- c_int p; /**< 等式约束数量 Number of equalities */
- c_int degree; /**< 线性锥与二阶锥的数量和 Degree of the cone */
- c_spmat *A; /**< 等式约束矩阵A Equality matrix */
- c_spmat *G; /**< 不等式约束矩阵G Inequality matrix */
- c_real *c; /**< 目标函数向量c Objective costs */
- c_real *b; /**< 等式约束右端项b RHS of equalities */
- c_real *h; /**< 不等式约束右端项h RHS of cones */
- c_cone *cone; /**< 锥 Cone */
- c_kkt *kkt; /**< KKT系统 KKT System */
- c_param *param; /**< 参数 Parameters */
- c_real *facX; /**< 变量缩放系数 Scaling factors of variables */
- c_real *facA; /**< 等式约束矩阵A缩放系数 Scaling factors of equality matrix */
- c_real *facG; /**< 不等式约束矩阵G缩放系数 Scaling factors of inequality matrix */
- c_real *rx;
- c_real *ry;
- c_real *rz;
- c_real *dx1;
- c_real *dy1;
- c_real *dz1;
- c_real *dx2;
- c_real *dy2;
- c_real *dz2;
- c_real *dsaff;
- c_real *dzaff;
- c_real *dsaff_w;
- c_real *dzaff_w;
- c_real *lambda;
- c_real *x;
- c_real *y;
- c_real *z;
- c_real *s;
- c_attr *attr;
- c_real *best_x;
- c_real *best_y;
- c_real *best_z;
- c_real *best_s;
- c_attr *best_attr;
- };
- #endif
|