COIN-OR::LEMON - Graph Library

source: glpk-cmake/examples/cplex/cplex.h @ 1:c445c931472f

Last change on this file since 1:c445c931472f was 1:c445c931472f, checked in by Alpar Juttner <alpar@…>, 14 years ago

Import glpk-4.45

  • Generated files and doc/notes are removed
File size: 10.0 KB
Line 
1/* cplex.h (CPLEX-like interface to GLPK API) */
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: <mao@gnu.org>.
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 _CPLEX_H
26#define _CPLEX_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32typedef struct CPXENV CPXENV, *CPXENVptr;
33typedef struct CPXLP CPXLP, *CPXLPptr;
34
35#define CPX_VERSION                 900
36
37#define CPX_OFF                     0
38#define CPX_ON                      1
39
40#define CPX_INFBOUND                1e20
41
42/* error codes: */
43#define CPXERR_NO_MEMORY            1001
44#define CPXERR_NO_ENVIRONMENT       1002
45#define CPXERR_BAD_ARGUMENT         1003
46#define CPXERR_NULL_POINTER         1004
47#define CPXERR_NO_PROBLEM           1009
48#define CPXERR_BAD_PARAM_NUM        1013
49#define CPXERR_PARAM_TOO_SMALL      1014
50#define CPXERR_PARAM_TOO_BIG        1015
51#define CPXERR_INDEX_RANGE          1200
52#define CPXERR_COL_INDEX_RANGE      1201
53#define CPXERR_ROW_INDEX_RANGE      1203
54#define CPXERR_NEGATIVE_SURPLUS     1207
55#define CPXERR_BAD_SENSE            1215
56#define CPXERR_NO_SOLN              1217
57#define CPXERR_NOT_FIXED            1221
58#define CPXERR_DUP_ENTRY            1222
59#define CPXERR_NULL_NAME            1224
60#define CPXERR_ARRAY_NOT_ASCENDING  1226
61#define CPXERR_COUNT_RANGE          1227
62#define CPXERR_BAD_LUB              1229
63#define CPXERR_BAD_STATUS           1253
64#define CPXERR_NO_BASIC_SOLN        1261
65#define CPXERR_NO_FILENAME          1421
66#define CPXERR_FAIL_OPEN_WRITE      1422
67#define CPXERR_BAD_FILETYPE         1424
68#define CPXERR_BAD_CTYPE            3021
69
70/* control parameters: */
71#define CPX_PARAM_ADVIND            1001
72#define CPX_PARAM_AGGIND            1003
73#define CPX_PARAM_DPRIIND           1009
74#define CPX_PARAM_EPOPT             1014
75#define CPX_PARAM_EPPER             1015
76#define CPX_PARAM_EPRHS             1016
77#define CPX_PARAM_FASTMIP           1017 /* ??? */
78#define CPX_PARAM_SIMDISPLAY        1019
79#define CPX_PARAM_ITLIM             1020
80#define CPX_PARAM_OBJLLIM           1025
81#define CPX_PARAM_OBJULIM           1026
82#define CPX_PARAM_PERIND            1027
83#define CPX_PARAM_PPRIIND           1029
84#define CPX_PARAM_PREIND            1030
85#define CPX_PARAM_REINV             1031
86#define CPX_PARAM_SCRIND            1035
87#define CPX_PARAM_DATACHECK         1056
88
89/* CPX_PARAM_DPRIIND: */
90#define CPX_DPRIIND_AUTO            0
91#define CPX_DPRIIND_FULL            1
92#define CPX_DPRIIND_STEEP           2
93#define CPX_DPRIIND_FULL_STEEP      3
94#define CPX_DPRIIND_STEEPQSTART     4
95#define CPX_DPRIIND_DEVEX           5
96
97/* CPX_PARAM_PPRIIND: */
98#define CPX_PPRIIND_PARTIAL         (-1)
99#define CPX_PPRIIND_AUTO            0
100#define CPX_PPRIIND_DEVEX           1
101#define CPX_PPRIIND_STEEP           2
102#define CPX_PPRIIND_STEEPQSTART     3
103#define CPX_PPRIIND_FULL            4
104
105/* CPXgetprobtype: */
106#define CPXPROB_LP                  0
107#define CPXPROB_MIP                 1
108#define CPXPROB_RELAXED             2
109#define CPXPROB_FIXED               3
110#define CPXPROB_QP                  5
111#define CPXPROB_ZEROEDQP            6
112
113/* CPXgetobjsen: */
114#define CPX_MIN                     1
115#define CPX_MAX                     (-1)
116
117/* CPXgetbase: */
118#define CPX_AT_LOWER                0
119#define CPX_BASIC                   1
120#define CPX_AT_UPPER                2
121#define CPX_FREE_SUPER              3
122
123/* CPXgetstat: */
124#define CPX_STAT_OPTIMAL            1
125#define CPX_STAT_UNBOUNDED          2
126#define CPX_STAT_INFEASIBLE         3
127#define CPX_STAT_INForUNBD          4
128#define CPX_STAT_OPTIMAL_INFEAS     5
129#define CPX_STAT_ABORT_IT_LIM       10
130#define CPX_STAT_ABORT_OBJ_LIM      12
131
132/* CPXgetmethod: */
133#define CPX_ALG_NONE                0
134#define CPX_ALG_PRIMAL              1
135#define CPX_ALG_DUAL                2
136#define CPX_ALG_BARRIER             4
137
138/* CPXsolninfo: */
139#define CPX_NO_SOLN                 0
140#define CPX_BASIC_SOLN              1
141#define CPX_NONBASIC_SOLN           2
142#define CPX_PRIMAL_SOLN             3
143
144int CPXaddcols(CPXENV *env, CPXLP *lp, int ccnt, int nzcnt,
145      const double obj[], const int cmatbeg[], const int cmatind[],
146      const double cmatval[], const double lb[], const double ub[],
147      char *colname[]);
148
149int CPXaddrows(CPXENV *env, CPXLP *lp, int ccnt, int rcnt, int nzcnt,
150      const double rhs[], const char sense[], const int rmatbeg[],
151      const int rmatind[], const double rmatval[], char *colname[],
152      char *rowname[]);
153
154int CPXbaropt(CPXENV *env, CPXLP *lp);
155
156int CPXbinvrow(CPXENV *env, CPXLP *lp, int i, double y[]);
157
158int CPXchgbds(CPXENV *env, CPXLP *lp, int cnt, const int indices[],
159      const char lu[], const double bd[]);
160
161int CPXchgcoeflist(CPXENV *env, CPXLP *lp, int numcoefs,
162      const int rowlist[], const int collist[], const double vallist[]);
163
164void CPXchgobjsen(CPXENV *env, CPXLP *lp, int maxormin);
165
166int CPXchgsense(CPXENV *env, CPXLP *lp, int cnt, const int indices[],
167      const char sense[]);
168
169int CPXcloseCPLEX(CPXENV **env);
170
171int CPXcopybase(CPXENV *env, CPXLP *lp, const int cstat[],
172      const int rstat[]);
173
174int CPXcopybasednorms(CPXENV *env, CPXLP *lp, const int cstat[],
175      const int rstat[], const double dnorm[]);
176
177int CPXcopylp(CPXENV *env, CPXLP *lp, int numcols, int numrows,
178      int objsen, const double obj[], const double rhs[],
179      const char sense[], const int matbeg[], const int matcnt[],
180      const int matind[], const double matval[], const double lb[],
181      const double ub[], const double rngval[]);
182
183int CPXcopylpwnames(CPXENV *env, CPXLP *lp, int numcols, int numrows,
184      int objsen, const double obj[], const double rhs[],
185      const char sense[], const int matbeg[], const int matcnt[],
186      const int matind[], const double matval[], const double lb[],
187      const double ub[], const double rngval[], char *colname[],
188      char *rowname[]);
189
190CPXLP *CPXcreateprob(CPXENV *env, int *status, const char *probname);
191
192int CPXdelcols(CPXENV *env, CPXLP *lp, int begin, int end);
193
194int CPXdelrows(CPXENV *env, CPXLP *lp, int begin, int end);
195
196int CPXdelsetcols(CPXENV *env, CPXLP *lp, int delstat[]);
197
198int CPXdelsetrows(CPXENV *env, CPXLP *lp, int delstat[]);
199
200int CPXdualopt(CPXENV *env, CPXLP *lp);
201
202int CPXfreeprob(CPXENV *env, CPXLP **lp);
203
204int CPXgetbase(CPXENV *env, CPXLP *lp, int cstat[], int rstat[]);
205
206int CPXgetbasednorms(CPXENV *env, CPXLP *lp, int cstat[], int rstat[],
207      double dnorm[]);
208
209int CPXgetbhead(CPXENV *env, CPXLP *lp, int head[], double x[]);
210
211int CPXgetdblparam(CPXENV *env, int whichparam, double *value);
212
213int CPXgetdj(CPXENV *env, CPXLP *lp, double dj[], int begin, int end);
214
215char *CPXgeterrorstring(CPXENV *env, int errcode, char *buffer);
216
217int CPXgetijdiv(CPXENV *env, CPXLP *lp, int *idiv, int *jdiv);
218
219int CPXgetintparam(CPXENV *env, int whichparam, int *value);
220
221int CPXgetlb(CPXENV *env, CPXLP *lp, double lb[], int begin, int end);
222
223int CPXgetmethod(CPXENV *env, CPXLP *lp);
224
225int CPXgetnumcols(CPXENV *env, CPXLP *lp);
226
227int CPXgetnumnz(CPXENV *env, CPXLP *lp);
228
229int CPXgetnumrows(CPXENV *env, CPXLP *lp);
230
231int CPXgetobjval(CPXENV *env, CPXLP *lp, double *objval);
232
233int CPXgetpi(CPXENV *env, CPXLP *lp, double pi[], int begin, int end);
234
235int CPXgetsense(CPXENV *env, CPXLP *lp, char sense[], int begin,
236      int end);
237
238int CPXgetslack(CPXENV *env, CPXLP *lp, double slack[], int begin,
239      int end);
240
241int CPXgetstat(CPXENV *env, CPXLP *lp);
242
243int CPXgetub(CPXENV *env, CPXLP *lp, double ub[], int begin, int end);
244
245int CPXgetweight(CPXENV *env, CPXLP *lp, int rcnt, const int rmatbeg[],
246      const int rmatind[], const double rmatval[], double weight[],
247      int dpriind);
248
249int CPXgetx(CPXENV *env, CPXLP *lp, double x[], int begin, int end);
250
251int CPXinfodblparam(CPXENV *env, int whichparam, double *defvalue,
252      double *minvalue, double *maxvalue);
253
254int CPXinfointparam(CPXENV *env, int whichparam, int *defvalue,
255      int *minvalue, int *maxvalue);
256
257int CPXlpopt(CPXENV *env, CPXLP *lp);
258
259int CPXmdleave(const CPXENV *env, CPXLP *lp, const int goodlist[],
260      int goodlen, double downratio[], double upratio[]);
261
262int CPXnewcols(CPXENV *env, CPXLP *lp, int ccnt, const double obj[],
263      const double lb[], const double ub[], const char ctype[],
264      char *colname[]);
265
266int CPXnewrows(CPXENV *env, CPXLP *lp, int rcnt, const double rhs[],
267      const char sense[], const double rngval[], char *rowname[]);
268
269CPXENV *CPXopenCPLEX(int *status);
270
271int CPXpivotin(CPXENV *env, CPXLP *lp, const int rlist[], int rlen);
272
273int CPXpivotout(CPXENV *env, CPXLP *lp, const int clist[], int clen);
274
275int CPXprimopt(CPXENV *env, CPXLP *lp);
276
277int CPXsavwrite(CPXENV *env, CPXLP *lp, const char *filename);
278
279int CPXsetdblparam(CPXENV *env, int whichparam, double newvalue);
280
281int CPXsetintparam(CPXENV *env, int whichparam, int newvalue);
282
283int CPXsolninfo(CPXENV *env, CPXLP *lp, int *solnmethod, int *solntype,
284      int *pfeasind, int *dfeasind);
285
286int CPXsolution(CPXENV *env, CPXLP *lp, int *lpstat, double *objval,
287      double x[], double pi[], double slack[], double dj[]);
288
289int CPXstrongbranch(CPXENV *env, CPXLP *lp, const int goodlist[],
290      int goodlen, double downpen[], double uppen[], int itlim);
291
292int CPXwriteprob(CPXENV *env, CPXLP *lp, const char *filename,
293      const char *filetype);
294
295#ifdef __cplusplus
296}
297#endif
298
299#endif
300
301/* eof */
Note: See TracBrowser for help on using the repository browser.