Debian Codegraph @

external/glpk/glpapi.h

raw symbols SCIP
1 /* glpapi.h (application program interface) */cxx . . $ `<file>/external/glpk/glpapi.h`/
2
3 /***********************************************************************
4 * This code is part of GLPK (GNU Linear Programming Kit).
5 *
6 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
7 * 2009, 2010 Andrew Makhorin, Department for Applied Informatics,
8 * Moscow Aviation Institute, Moscow, Russia. All rights reserved.
9 * E-mail: <[email protected]>.
10 *
11 * GLPK is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * GLPK is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 * License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with GLPK. If not, see <http://www.gnu.org/licenses/>.
23 ***********************************************************************/
24
25 #ifndef GLPAPI_H
26 #define GLPAPI_Hcxx . . $ `external/glpk/glpapi.h:26:9`!
27
28 #define GLP_PROB_DEFINEDcxx . . $ `external/glpk/glpapi.h:28:9`!
29 typedef struct glp_probcxx . . $ glp_prob# glp_probcxx . . $ glp_prob#;
30
31 #include "glpk.h"cxx . . $ `<file>/external/glpk/glpk.h`/
32 #include "glpavl.h"cxx . . $ `<file>/external/glpk/glpavl.h`/
33 #include "glpbfd.h"cxx . . $ `<file>/external/glpk/glpbfd.h`/
34
35 typedef struct GLPROWcxx . . $ GLPROW# GLPROWcxx . . $ GLPROW#;
36 typedef struct GLPCOLcxx . . $ GLPCOL# GLPCOLcxx . . $ GLPCOL#;
37 typedef struct GLPAIJcxx . . $ GLPAIJ# GLPAIJcxx . . $ GLPAIJ#;
38
39 #define GLP_PROB_MAGICcxx . . $ `external/glpk/glpapi.h:39:9`! 0xD7D9D6C2
40
41 struct glp_probcxx . . $ glp_prob#
42 { /* LP/MIP problem object */
43 int magiccxx . . $ glp_prob#magic.;
44 /* magic value used for debugging */
45 DMPcxx . . $ DMP# *poolcxx . . $ glp_prob#pool.;
46 /* memory pool to store problem object components */
47 glp_treecxx . . $ glp_tree# *treecxx . . $ glp_prob#tree.;
48 /* pointer to the search tree; set by the MIP solver when this
49 object is used in the tree as a core MIP object */
50 void *parmscxx . . $ glp_prob#parms.;
51 /* reserved for backward compatibility */
52 /*--------------------------------------------------------------*/
53 /* LP/MIP data */
54 char *namecxx . . $ glp_prob#name.;
55 /* problem name (1 to 255 chars); NULL means no name is assigned
56 to the problem */
57 char *objcxx . . $ glp_prob#obj.;
58 /* objective function name (1 to 255 chars); NULL means no name
59 is assigned to the objective function */
60 int dircxx . . $ glp_prob#dir.;
61 /* optimization direction flag (objective "sense"):
62 GLP_MIN - minimization
63 GLP_MAX - maximization */
64 double c0cxx . . $ glp_prob#c0.;
65 /* constant term of the objective function ("shift") */
66 int m_maxcxx . . $ glp_prob#m_max.;
67 /* length of the array of rows (enlarged automatically) */
68 int n_maxcxx . . $ glp_prob#n_max.;
69 /* length of the array of columns (enlarged automatically) */
70 int mcxx . . $ glp_prob#m.;
71 /* number of rows, 0 <= m <= m_max */
72 int ncxx . . $ glp_prob#n.;
73 /* number of columns, 0 <= n <= n_max */
74 int nnzcxx . . $ glp_prob#nnz.;
75 /* number of non-zero constraint coefficients, nnz >= 0 */
76 GLPROWcxx . . $ GLPROW# **rowcxx . . $ glp_prob#row.; /* GLPROW *row[1+m_max]; */
77 /* row[i], 1 <= i <= m, is a pointer to i-th row */
78 GLPCOLcxx . . $ GLPCOL# **colcxx . . $ glp_prob#col.; /* GLPCOL *col[1+n_max]; */
79 /* col[j], 1 <= j <= n, is a pointer to j-th column */
80 AVLcxx . . $ AVL# *r_treecxx . . $ glp_prob#r_tree.;
81 /* row index to find rows by their names; NULL means this index
82 does not exist */
83 AVLcxx . . $ AVL# *c_treecxx . . $ glp_prob#c_tree.;
84 /* column index to find columns by their names; NULL means this
85 index does not exist */
86 /*--------------------------------------------------------------*/
87 /* basis factorization (LP) */
88 int validcxx . . $ glp_prob#valid.;
89 /* the factorization is valid only if this flag is set */
90 int *headcxx . . $ glp_prob#head.; /* int head[1+m_max]; */
91 /* basis header (valid only if the factorization is valid);
92 head[i] = k is the ordinal number of auxiliary (1 <= k <= m)
93 or structural (m+1 <= k <= m+n) variable which corresponds to
94 i-th basic variable xB[i], 1 <= i <= m */
95 glp_bfcpcxx . . $ glp_bfcp# *bfcpcxx . . $ glp_prob#bfcp.;
96 /* basis factorization control parameters; may be NULL */
97 BFDcxx . . $ BFD# *bfdcxx . . $ glp_prob#bfd.; /* BFD bfd[1:m,1:m]; */
98 /* basis factorization driver; may be NULL */
99 /*--------------------------------------------------------------*/
100 /* basic solution (LP) */
101 int pbs_statcxx . . $ glp_prob#pbs_stat.;
102 /* primal basic solution status:
103 GLP_UNDEF - primal solution is undefined
104 GLP_FEAS - primal solution is feasible
105 GLP_INFEAS - primal solution is infeasible
106 GLP_NOFEAS - no primal feasible solution exists */
107 int dbs_statcxx . . $ glp_prob#dbs_stat.;
108 /* dual basic solution status:
109 GLP_UNDEF - dual solution is undefined
110 GLP_FEAS - dual solution is feasible
111 GLP_INFEAS - dual solution is infeasible
112 GLP_NOFEAS - no dual feasible solution exists */
113 double obj_valcxx . . $ glp_prob#obj_val.;
114 /* objective function value */
115 int it_cntcxx . . $ glp_prob#it_cnt.;
116 /* simplex method iteration count; increased by one on performing
117 one simplex iteration */
118 int somecxx . . $ glp_prob#some.;
119 /* ordinal number of some auxiliary or structural variable having
120 certain property, 0 <= some <= m+n */
121 /*--------------------------------------------------------------*/
122 /* interior-point solution (LP) */
123 int ipt_statcxx . . $ glp_prob#ipt_stat.;
124 /* interior-point solution status:
125 GLP_UNDEF - interior solution is undefined
126 GLP_OPT - interior solution is optimal
127 GLP_INFEAS - interior solution is infeasible
128 GLP_NOFEAS - no feasible solution exists */
129 double ipt_objcxx . . $ glp_prob#ipt_obj.;
130 /* objective function value */
131 /*--------------------------------------------------------------*/
132 /* integer solution (MIP) */
133 int mip_statcxx . . $ glp_prob#mip_stat.;
134 /* integer solution status:
135 GLP_UNDEF - integer solution is undefined
136 GLP_OPT - integer solution is optimal
137 GLP_FEAS - integer solution is feasible
138 GLP_NOFEAS - no integer solution exists */
139 double mip_objcxx . . $ glp_prob#mip_obj.;
140 /* objective function value */
141 };
142
143 struct GLPROWcxx . . $ GLPROW#
144 { /* LP/MIP row (auxiliary variable) */
145 int icxx . . $ GLPROW#i.;
146 /* ordinal number (1 to m) assigned to this row */
147 char *namecxx . . $ GLPROW#name.;
148 /* row name (1 to 255 chars); NULL means no name is assigned to
149 this row */
150 AVLNODEcxx . . $ AVLNODE# *nodecxx . . $ GLPROW#node.;
151 /* pointer to corresponding node in the row index; NULL means
152 that either the row index does not exist or this row has no
153 name assigned */
154 #if 1 /* 20/IX-2008 */
155 int levelcxx . . $ GLPROW#level.;
156 unsigned char origincxx . . $ GLPROW#origin.;
157 unsigned char klasscxx . . $ GLPROW#klass.;
158 #endif
159 int typecxx . . $ GLPROW#type.;
160 /* type of the auxiliary variable:
161 GLP_FR - free variable
162 GLP_LO - variable with lower bound
163 GLP_UP - variable with upper bound
164 GLP_DB - double-bounded variable
165 GLP_FX - fixed variable */
166 double lbcxx . . $ GLPROW#lb.; /* non-scaled */
167 /* lower bound; if the row has no lower bound, lb is zero */
168 double ubcxx . . $ GLPROW#ub.; /* non-scaled */
169 /* upper bound; if the row has no upper bound, ub is zero */
170 /* if the row type is GLP_FX, ub is equal to lb */
171 GLPAIJcxx . . $ GLPAIJ# *ptrcxx . . $ GLPROW#ptr.; /* non-scaled */
172 /* pointer to doubly linked list of constraint coefficients which
173 are placed in this row */
174 double riicxx . . $ GLPROW#rii.;
175 /* diagonal element r[i,i] of scaling matrix R for this row;
176 if the scaling is not used, r[i,i] is 1 */
177 int statcxx . . $ GLPROW#stat.;
178 /* status of the auxiliary variable:
179 GLP_BS - basic variable
180 GLP_NL - non-basic variable on lower bound
181 GLP_NU - non-basic variable on upper bound
182 GLP_NF - non-basic free variable
183 GLP_NS - non-basic fixed variable */
184 int bindcxx . . $ GLPROW#bind.;
185 /* if the auxiliary variable is basic, head[bind] refers to this
186 row, otherwise, bind is 0; this attribute is valid only if the
187 basis factorization is valid */
188 double primcxx . . $ GLPROW#prim.; /* non-scaled */
189 /* primal value of the auxiliary variable in basic solution */
190 double dualcxx . . $ GLPROW#dual.; /* non-scaled */
191 /* dual value of the auxiliary variable in basic solution */
192 double pvalcxx . . $ GLPROW#pval.; /* non-scaled */
193 /* primal value of the auxiliary variable in interior solution */
194 double dvalcxx . . $ GLPROW#dval.; /* non-scaled */
195 /* dual value of the auxiliary variable in interior solution */
196 double mipxcxx . . $ GLPROW#mipx.; /* non-scaled */
197 /* primal value of the auxiliary variable in integer solution */
198 };
199
200 struct GLPCOLcxx . . $ GLPCOL#
201 { /* LP/MIP column (structural variable) */
202 int jcxx . . $ GLPCOL#j.;
203 /* ordinal number (1 to n) assigned to this column */
204 char *namecxx . . $ GLPCOL#name.;
205 /* column name (1 to 255 chars); NULL means no name is assigned
206 to this column */
207 AVLNODEcxx . . $ AVLNODE# *nodecxx . . $ GLPCOL#node.;
208 /* pointer to corresponding node in the column index; NULL means
209 that either the column index does not exist or the column has
210 no name assigned */
211 int kindcxx . . $ GLPCOL#kind.;
212 /* kind of the structural variable:
213 GLP_CV - continuous variable
214 GLP_IV - integer or binary variable */
215 int typecxx . . $ GLPCOL#type.;
216 /* type of the structural variable:
217 GLP_FR - free variable
218 GLP_LO - variable with lower bound
219 GLP_UP - variable with upper bound
220 GLP_DB - double-bounded variable
221 GLP_FX - fixed variable */
222 double lbcxx . . $ GLPCOL#lb.; /* non-scaled */
223 /* lower bound; if the column has no lower bound, lb is zero */
224 double ubcxx . . $ GLPCOL#ub.; /* non-scaled */
225 /* upper bound; if the column has no upper bound, ub is zero */
226 /* if the column type is GLP_FX, ub is equal to lb */
227 double coefcxx . . $ GLPCOL#coef.; /* non-scaled */
228 /* objective coefficient at the structural variable */
229 GLPAIJcxx . . $ GLPAIJ# *ptrcxx . . $ GLPCOL#ptr.; /* non-scaled */
230 /* pointer to doubly linked list of constraint coefficients which
231 are placed in this column */
232 double sjjcxx . . $ GLPCOL#sjj.;
233 /* diagonal element s[j,j] of scaling matrix S for this column;
234 if the scaling is not used, s[j,j] is 1 */
235 int statcxx . . $ GLPCOL#stat.;
236 /* status of the structural variable:
237 GLP_BS - basic variable
238 GLP_NL - non-basic variable on lower bound
239 GLP_NU - non-basic variable on upper bound
240 GLP_NF - non-basic free variable
241 GLP_NS - non-basic fixed variable */
242 int bindcxx . . $ GLPCOL#bind.;
243 /* if the structural variable is basic, head[bind] refers to
244 this column; otherwise, bind is 0; this attribute is valid only
245 if the basis factorization is valid */
246 double primcxx . . $ GLPCOL#prim.; /* non-scaled */
247 /* primal value of the structural variable in basic solution */
248 double dualcxx . . $ GLPCOL#dual.; /* non-scaled */
249 /* dual value of the structural variable in basic solution */
250 double pvalcxx . . $ GLPCOL#pval.; /* non-scaled */
251 /* primal value of the structural variable in interior solution */
252 double dvalcxx . . $ GLPCOL#dval.; /* non-scaled */
253 /* dual value of the structural variable in interior solution */
254 double mipxcxx . . $ GLPCOL#mipx.; /* non-scaled */
255 /* primal value of the structural variable in integer solution */
256 };
257
258 struct GLPAIJcxx . . $ GLPAIJ#
259 { /* constraint coefficient a[i,j] */
260 GLPROWcxx . . $ GLPROW# *rowcxx . . $ GLPAIJ#row.;
261 /* pointer to row, where this coefficient is placed */
262 GLPCOLcxx . . $ GLPCOL# *colcxx . . $ GLPAIJ#col.;
263 /* pointer to column, where this coefficient is placed */
264 double valcxx . . $ GLPAIJ#val.;
265 /* numeric (non-zero) value of this coefficient */
266 GLPAIJcxx . . $ GLPAIJ# *r_prevcxx . . $ GLPAIJ#r_prev.;
267 /* pointer to previous coefficient in the same row */
268 GLPAIJcxx . . $ GLPAIJ# *r_nextcxx . . $ GLPAIJ#r_next.;
269 /* pointer to next coefficient in the same row */
270 GLPAIJcxx . . $ GLPAIJ# *c_prevcxx . . $ GLPAIJ#c_prev.;
271 /* pointer to previous coefficient in the same column */
272 GLPAIJcxx . . $ GLPAIJ# *c_nextcxx . . $ GLPAIJ#c_next.;
273 /* pointer to next coefficient in the same column */
274 };
275
276 void _glp_check_kktcxx . . $ _glp_check_kkt(d20aa8e221df6422).(glp_probcxx . . $ glp_prob# *P, int sol, int cond, double *ae_max,
277 int *ae_ind, double *re_max, int *re_ind);
278 /* check feasibility and optimality conditions */
279
280 #define lpx_put_solutioncxx . . $ `external/glpk/glpapi.h:280:9`! _glp_put_solution
281 void lpx_put_solutioncxx . . $ `external/glpk/glpapi.h:280:9`!(glp_probcxx . . $ glp_prob# *lp, int inval, const int *p_stat,
282 const int *d_stat, const double *obj_val, const int r_stat[],
283 const double r_prim[], const double r_dual[], const int c_stat[],
284 const double c_prim[], const double c_dual[]);
285 /* store basic solution components */
286
287 #define lpx_put_mip_solncxx . . $ `external/glpk/glpapi.h:287:9`! _glp_put_mip_soln
288 void lpx_put_mip_solncxx . . $ `external/glpk/glpapi.h:287:9`!(LPXcxx . . $ glp_prob# *lp, int i_stat, double row_mipx[],
289 double col_mipx[]);
290 /* store mixed integer solution components */
291
292 #if 1 /* 28/XI-2009 */
293 int _glp_analyze_rowcxx . . $ _glp_analyze_row(6a48674ece66b1bb).(glp_probcxx . . $ glp_prob# *P, int len, const int ind[],
294 const double val[], int type, double rhs, double eps, int *_piv,
295 double *_x, double *_dx, double *_y, double *_dy, double *_dz);
296 /* simulate one iteration of dual simplex method */
297 #endif
298
299 #if 1 /* 08/XII-2009 */
300 void _glp_mpl_init_randcxx . . $ _glp_mpl_init_rand(f523e2a130194e24).(glp_trancxx . . $ glp_tran# *tran, int seed);
301 #endif
302
303 #define glp_skpgencxx . . $ `external/glpk/glpapi.h:303:9`! _glp_skpgen
304 void glp_skpgencxx . . $ `external/glpk/glpapi.h:303:9`!(int n, int r, int type, int v, int s, int a[],
305 int *b, int c[]);
306 /* Pisinger's 0-1 single knapsack problem generator */
307
308 #if 1 /* 28/V-2010 */
309 int _glp_intopt1cxx . . $ _glp_intopt1(6369e4bd25f3670d).(glp_probcxx . . $ glp_prob# *P, const glp_iocpcxx . . $ glp_iocp# *parm);
310 #endif
311
312 #endif
313
314 /* eof */