lemon-project-template-glpk

annotate deps/glpk/examples/cplex/cplex.h @ 9:33de93886c88

Import GLPK 4.47
author Alpar Juttner <alpar@cs.elte.hu>
date Sun, 06 Nov 2011 20:59:10 +0100
parents
children
rev   line source
alpar@9 1 /* cplex.h (CPLEX-like interface to GLPK API) */
alpar@9 2
alpar@9 3 /***********************************************************************
alpar@9 4 * This code is part of GLPK (GNU Linear Programming Kit).
alpar@9 5 *
alpar@9 6 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
alpar@9 7 * 2009, 2010, 2011 Andrew Makhorin, Department for Applied Informatics,
alpar@9 8 * Moscow Aviation Institute, Moscow, Russia. All rights reserved.
alpar@9 9 * E-mail: <mao@gnu.org>.
alpar@9 10 *
alpar@9 11 * GLPK is free software: you can redistribute it and/or modify it
alpar@9 12 * under the terms of the GNU General Public License as published by
alpar@9 13 * the Free Software Foundation, either version 3 of the License, or
alpar@9 14 * (at your option) any later version.
alpar@9 15 *
alpar@9 16 * GLPK is distributed in the hope that it will be useful, but WITHOUT
alpar@9 17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
alpar@9 18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
alpar@9 19 * License for more details.
alpar@9 20 *
alpar@9 21 * You should have received a copy of the GNU General Public License
alpar@9 22 * along with GLPK. If not, see <http://www.gnu.org/licenses/>.
alpar@9 23 ***********************************************************************/
alpar@9 24
alpar@9 25 #ifndef _CPLEX_H
alpar@9 26 #define _CPLEX_H
alpar@9 27
alpar@9 28 #ifdef __cplusplus
alpar@9 29 extern "C" {
alpar@9 30 #endif
alpar@9 31
alpar@9 32 typedef struct CPXENV CPXENV, *CPXENVptr;
alpar@9 33 typedef struct CPXLP CPXLP, *CPXLPptr;
alpar@9 34
alpar@9 35 #define CPX_VERSION 900
alpar@9 36
alpar@9 37 #define CPX_OFF 0
alpar@9 38 #define CPX_ON 1
alpar@9 39
alpar@9 40 #define CPX_INFBOUND 1e20
alpar@9 41
alpar@9 42 /* error codes: */
alpar@9 43 #define CPXERR_NO_MEMORY 1001
alpar@9 44 #define CPXERR_NO_ENVIRONMENT 1002
alpar@9 45 #define CPXERR_BAD_ARGUMENT 1003
alpar@9 46 #define CPXERR_NULL_POINTER 1004
alpar@9 47 #define CPXERR_NO_PROBLEM 1009
alpar@9 48 #define CPXERR_BAD_PARAM_NUM 1013
alpar@9 49 #define CPXERR_PARAM_TOO_SMALL 1014
alpar@9 50 #define CPXERR_PARAM_TOO_BIG 1015
alpar@9 51 #define CPXERR_INDEX_RANGE 1200
alpar@9 52 #define CPXERR_COL_INDEX_RANGE 1201
alpar@9 53 #define CPXERR_ROW_INDEX_RANGE 1203
alpar@9 54 #define CPXERR_NEGATIVE_SURPLUS 1207
alpar@9 55 #define CPXERR_BAD_SENSE 1215
alpar@9 56 #define CPXERR_NO_SOLN 1217
alpar@9 57 #define CPXERR_NOT_FIXED 1221
alpar@9 58 #define CPXERR_DUP_ENTRY 1222
alpar@9 59 #define CPXERR_NULL_NAME 1224
alpar@9 60 #define CPXERR_ARRAY_NOT_ASCENDING 1226
alpar@9 61 #define CPXERR_COUNT_RANGE 1227
alpar@9 62 #define CPXERR_BAD_LUB 1229
alpar@9 63 #define CPXERR_BAD_STATUS 1253
alpar@9 64 #define CPXERR_NO_BASIC_SOLN 1261
alpar@9 65 #define CPXERR_NO_FILENAME 1421
alpar@9 66 #define CPXERR_FAIL_OPEN_WRITE 1422
alpar@9 67 #define CPXERR_BAD_FILETYPE 1424
alpar@9 68 #define CPXERR_BAD_CTYPE 3021
alpar@9 69
alpar@9 70 /* control parameters: */
alpar@9 71 #define CPX_PARAM_ADVIND 1001
alpar@9 72 #define CPX_PARAM_AGGIND 1003
alpar@9 73 #define CPX_PARAM_DPRIIND 1009
alpar@9 74 #define CPX_PARAM_EPOPT 1014
alpar@9 75 #define CPX_PARAM_EPPER 1015
alpar@9 76 #define CPX_PARAM_EPRHS 1016
alpar@9 77 #define CPX_PARAM_FASTMIP 1017 /* ??? */
alpar@9 78 #define CPX_PARAM_SIMDISPLAY 1019
alpar@9 79 #define CPX_PARAM_ITLIM 1020
alpar@9 80 #define CPX_PARAM_OBJLLIM 1025
alpar@9 81 #define CPX_PARAM_OBJULIM 1026
alpar@9 82 #define CPX_PARAM_PERIND 1027
alpar@9 83 #define CPX_PARAM_PPRIIND 1029
alpar@9 84 #define CPX_PARAM_PREIND 1030
alpar@9 85 #define CPX_PARAM_REINV 1031
alpar@9 86 #define CPX_PARAM_SCRIND 1035
alpar@9 87 #define CPX_PARAM_DATACHECK 1056
alpar@9 88
alpar@9 89 /* CPX_PARAM_DPRIIND: */
alpar@9 90 #define CPX_DPRIIND_AUTO 0
alpar@9 91 #define CPX_DPRIIND_FULL 1
alpar@9 92 #define CPX_DPRIIND_STEEP 2
alpar@9 93 #define CPX_DPRIIND_FULL_STEEP 3
alpar@9 94 #define CPX_DPRIIND_STEEPQSTART 4
alpar@9 95 #define CPX_DPRIIND_DEVEX 5
alpar@9 96
alpar@9 97 /* CPX_PARAM_PPRIIND: */
alpar@9 98 #define CPX_PPRIIND_PARTIAL (-1)
alpar@9 99 #define CPX_PPRIIND_AUTO 0
alpar@9 100 #define CPX_PPRIIND_DEVEX 1
alpar@9 101 #define CPX_PPRIIND_STEEP 2
alpar@9 102 #define CPX_PPRIIND_STEEPQSTART 3
alpar@9 103 #define CPX_PPRIIND_FULL 4
alpar@9 104
alpar@9 105 /* CPXgetprobtype: */
alpar@9 106 #define CPXPROB_LP 0
alpar@9 107 #define CPXPROB_MIP 1
alpar@9 108 #define CPXPROB_RELAXED 2
alpar@9 109 #define CPXPROB_FIXED 3
alpar@9 110 #define CPXPROB_QP 5
alpar@9 111 #define CPXPROB_ZEROEDQP 6
alpar@9 112
alpar@9 113 /* CPXgetobjsen: */
alpar@9 114 #define CPX_MIN 1
alpar@9 115 #define CPX_MAX (-1)
alpar@9 116
alpar@9 117 /* CPXgetbase: */
alpar@9 118 #define CPX_AT_LOWER 0
alpar@9 119 #define CPX_BASIC 1
alpar@9 120 #define CPX_AT_UPPER 2
alpar@9 121 #define CPX_FREE_SUPER 3
alpar@9 122
alpar@9 123 /* CPXgetstat: */
alpar@9 124 #define CPX_STAT_OPTIMAL 1
alpar@9 125 #define CPX_STAT_UNBOUNDED 2
alpar@9 126 #define CPX_STAT_INFEASIBLE 3
alpar@9 127 #define CPX_STAT_INForUNBD 4
alpar@9 128 #define CPX_STAT_OPTIMAL_INFEAS 5
alpar@9 129 #define CPX_STAT_ABORT_IT_LIM 10
alpar@9 130 #define CPX_STAT_ABORT_OBJ_LIM 12
alpar@9 131
alpar@9 132 /* CPXgetmethod: */
alpar@9 133 #define CPX_ALG_NONE 0
alpar@9 134 #define CPX_ALG_PRIMAL 1
alpar@9 135 #define CPX_ALG_DUAL 2
alpar@9 136 #define CPX_ALG_BARRIER 4
alpar@9 137
alpar@9 138 /* CPXsolninfo: */
alpar@9 139 #define CPX_NO_SOLN 0
alpar@9 140 #define CPX_BASIC_SOLN 1
alpar@9 141 #define CPX_NONBASIC_SOLN 2
alpar@9 142 #define CPX_PRIMAL_SOLN 3
alpar@9 143
alpar@9 144 int CPXaddcols(CPXENV *env, CPXLP *lp, int ccnt, int nzcnt,
alpar@9 145 const double obj[], const int cmatbeg[], const int cmatind[],
alpar@9 146 const double cmatval[], const double lb[], const double ub[],
alpar@9 147 char *colname[]);
alpar@9 148
alpar@9 149 int CPXaddrows(CPXENV *env, CPXLP *lp, int ccnt, int rcnt, int nzcnt,
alpar@9 150 const double rhs[], const char sense[], const int rmatbeg[],
alpar@9 151 const int rmatind[], const double rmatval[], char *colname[],
alpar@9 152 char *rowname[]);
alpar@9 153
alpar@9 154 int CPXbaropt(CPXENV *env, CPXLP *lp);
alpar@9 155
alpar@9 156 int CPXbinvrow(CPXENV *env, CPXLP *lp, int i, double y[]);
alpar@9 157
alpar@9 158 int CPXchgbds(CPXENV *env, CPXLP *lp, int cnt, const int indices[],
alpar@9 159 const char lu[], const double bd[]);
alpar@9 160
alpar@9 161 int CPXchgcoeflist(CPXENV *env, CPXLP *lp, int numcoefs,
alpar@9 162 const int rowlist[], const int collist[], const double vallist[]);
alpar@9 163
alpar@9 164 void CPXchgobjsen(CPXENV *env, CPXLP *lp, int maxormin);
alpar@9 165
alpar@9 166 int CPXchgsense(CPXENV *env, CPXLP *lp, int cnt, const int indices[],
alpar@9 167 const char sense[]);
alpar@9 168
alpar@9 169 int CPXcloseCPLEX(CPXENV **env);
alpar@9 170
alpar@9 171 int CPXcopybase(CPXENV *env, CPXLP *lp, const int cstat[],
alpar@9 172 const int rstat[]);
alpar@9 173
alpar@9 174 int CPXcopybasednorms(CPXENV *env, CPXLP *lp, const int cstat[],
alpar@9 175 const int rstat[], const double dnorm[]);
alpar@9 176
alpar@9 177 int CPXcopylp(CPXENV *env, CPXLP *lp, int numcols, int numrows,
alpar@9 178 int objsen, const double obj[], const double rhs[],
alpar@9 179 const char sense[], const int matbeg[], const int matcnt[],
alpar@9 180 const int matind[], const double matval[], const double lb[],
alpar@9 181 const double ub[], const double rngval[]);
alpar@9 182
alpar@9 183 int CPXcopylpwnames(CPXENV *env, CPXLP *lp, int numcols, int numrows,
alpar@9 184 int objsen, const double obj[], const double rhs[],
alpar@9 185 const char sense[], const int matbeg[], const int matcnt[],
alpar@9 186 const int matind[], const double matval[], const double lb[],
alpar@9 187 const double ub[], const double rngval[], char *colname[],
alpar@9 188 char *rowname[]);
alpar@9 189
alpar@9 190 CPXLP *CPXcreateprob(CPXENV *env, int *status, const char *probname);
alpar@9 191
alpar@9 192 int CPXdelcols(CPXENV *env, CPXLP *lp, int begin, int end);
alpar@9 193
alpar@9 194 int CPXdelrows(CPXENV *env, CPXLP *lp, int begin, int end);
alpar@9 195
alpar@9 196 int CPXdelsetcols(CPXENV *env, CPXLP *lp, int delstat[]);
alpar@9 197
alpar@9 198 int CPXdelsetrows(CPXENV *env, CPXLP *lp, int delstat[]);
alpar@9 199
alpar@9 200 int CPXdualopt(CPXENV *env, CPXLP *lp);
alpar@9 201
alpar@9 202 int CPXfreeprob(CPXENV *env, CPXLP **lp);
alpar@9 203
alpar@9 204 int CPXgetbase(CPXENV *env, CPXLP *lp, int cstat[], int rstat[]);
alpar@9 205
alpar@9 206 int CPXgetbasednorms(CPXENV *env, CPXLP *lp, int cstat[], int rstat[],
alpar@9 207 double dnorm[]);
alpar@9 208
alpar@9 209 int CPXgetbhead(CPXENV *env, CPXLP *lp, int head[], double x[]);
alpar@9 210
alpar@9 211 int CPXgetdblparam(CPXENV *env, int whichparam, double *value);
alpar@9 212
alpar@9 213 int CPXgetdj(CPXENV *env, CPXLP *lp, double dj[], int begin, int end);
alpar@9 214
alpar@9 215 char *CPXgeterrorstring(CPXENV *env, int errcode, char *buffer);
alpar@9 216
alpar@9 217 int CPXgetijdiv(CPXENV *env, CPXLP *lp, int *idiv, int *jdiv);
alpar@9 218
alpar@9 219 int CPXgetintparam(CPXENV *env, int whichparam, int *value);
alpar@9 220
alpar@9 221 int CPXgetlb(CPXENV *env, CPXLP *lp, double lb[], int begin, int end);
alpar@9 222
alpar@9 223 int CPXgetmethod(CPXENV *env, CPXLP *lp);
alpar@9 224
alpar@9 225 int CPXgetnumcols(CPXENV *env, CPXLP *lp);
alpar@9 226
alpar@9 227 int CPXgetnumnz(CPXENV *env, CPXLP *lp);
alpar@9 228
alpar@9 229 int CPXgetnumrows(CPXENV *env, CPXLP *lp);
alpar@9 230
alpar@9 231 int CPXgetobjval(CPXENV *env, CPXLP *lp, double *objval);
alpar@9 232
alpar@9 233 int CPXgetpi(CPXENV *env, CPXLP *lp, double pi[], int begin, int end);
alpar@9 234
alpar@9 235 int CPXgetsense(CPXENV *env, CPXLP *lp, char sense[], int begin,
alpar@9 236 int end);
alpar@9 237
alpar@9 238 int CPXgetslack(CPXENV *env, CPXLP *lp, double slack[], int begin,
alpar@9 239 int end);
alpar@9 240
alpar@9 241 int CPXgetstat(CPXENV *env, CPXLP *lp);
alpar@9 242
alpar@9 243 int CPXgetub(CPXENV *env, CPXLP *lp, double ub[], int begin, int end);
alpar@9 244
alpar@9 245 int CPXgetweight(CPXENV *env, CPXLP *lp, int rcnt, const int rmatbeg[],
alpar@9 246 const int rmatind[], const double rmatval[], double weight[],
alpar@9 247 int dpriind);
alpar@9 248
alpar@9 249 int CPXgetx(CPXENV *env, CPXLP *lp, double x[], int begin, int end);
alpar@9 250
alpar@9 251 int CPXinfodblparam(CPXENV *env, int whichparam, double *defvalue,
alpar@9 252 double *minvalue, double *maxvalue);
alpar@9 253
alpar@9 254 int CPXinfointparam(CPXENV *env, int whichparam, int *defvalue,
alpar@9 255 int *minvalue, int *maxvalue);
alpar@9 256
alpar@9 257 int CPXlpopt(CPXENV *env, CPXLP *lp);
alpar@9 258
alpar@9 259 int CPXmdleave(const CPXENV *env, CPXLP *lp, const int goodlist[],
alpar@9 260 int goodlen, double downratio[], double upratio[]);
alpar@9 261
alpar@9 262 int CPXnewcols(CPXENV *env, CPXLP *lp, int ccnt, const double obj[],
alpar@9 263 const double lb[], const double ub[], const char ctype[],
alpar@9 264 char *colname[]);
alpar@9 265
alpar@9 266 int CPXnewrows(CPXENV *env, CPXLP *lp, int rcnt, const double rhs[],
alpar@9 267 const char sense[], const double rngval[], char *rowname[]);
alpar@9 268
alpar@9 269 CPXENV *CPXopenCPLEX(int *status);
alpar@9 270
alpar@9 271 int CPXpivotin(CPXENV *env, CPXLP *lp, const int rlist[], int rlen);
alpar@9 272
alpar@9 273 int CPXpivotout(CPXENV *env, CPXLP *lp, const int clist[], int clen);
alpar@9 274
alpar@9 275 int CPXprimopt(CPXENV *env, CPXLP *lp);
alpar@9 276
alpar@9 277 int CPXsavwrite(CPXENV *env, CPXLP *lp, const char *filename);
alpar@9 278
alpar@9 279 int CPXsetdblparam(CPXENV *env, int whichparam, double newvalue);
alpar@9 280
alpar@9 281 int CPXsetintparam(CPXENV *env, int whichparam, int newvalue);
alpar@9 282
alpar@9 283 int CPXsolninfo(CPXENV *env, CPXLP *lp, int *solnmethod, int *solntype,
alpar@9 284 int *pfeasind, int *dfeasind);
alpar@9 285
alpar@9 286 int CPXsolution(CPXENV *env, CPXLP *lp, int *lpstat, double *objval,
alpar@9 287 double x[], double pi[], double slack[], double dj[]);
alpar@9 288
alpar@9 289 int CPXstrongbranch(CPXENV *env, CPXLP *lp, const int goodlist[],
alpar@9 290 int goodlen, double downpen[], double uppen[], int itlim);
alpar@9 291
alpar@9 292 int CPXwriteprob(CPXENV *env, CPXLP *lp, const char *filename,
alpar@9 293 const char *filetype);
alpar@9 294
alpar@9 295 #ifdef __cplusplus
alpar@9 296 }
alpar@9 297 #endif
alpar@9 298
alpar@9 299 #endif
alpar@9 300
alpar@9 301 /* eof */