⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cplex.h

📁 著名的大规模线性规划求解器源码GLPK.C语言版本,可以修剪.内有详细帮助文档.
💻 H
字号:
/* cplex.h (CPLEX-like interface to GLPK API) *//************************************************************************  This code is part of GLPK (GNU Linear Programming Kit).**  Copyright (C) 2000,01,02,03,04,05,06,07,08,2009 Andrew Makhorin,*  Department for Applied Informatics, Moscow Aviation Institute,*  Moscow, Russia. All rights reserved. E-mail: <mao@mai2.rcnet.ru>.**  GLPK is free software: you can redistribute it and/or modify it*  under the terms of the GNU General Public License as published by*  the Free Software Foundation, either version 3 of the License, or*  (at your option) any later version.**  GLPK is distributed in the hope that it will be useful, but WITHOUT*  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY*  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public*  License for more details.**  You should have received a copy of the GNU General Public License*  along with GLPK. If not, see <http://www.gnu.org/licenses/>.***********************************************************************/#ifndef _CPLEX_H#define _CPLEX_H#ifdef __cplusplusextern "C" {#endiftypedef struct CPXENV CPXENV, *CPXENVptr;typedef struct CPXLP CPXLP, *CPXLPptr;#define CPX_VERSION                 900#define CPX_OFF                     0#define CPX_ON                      1#define CPX_INFBOUND                1e20/* control parameters: */#define CPX_PARAM_ADVIND            1001#define CPX_PARAM_AGGIND            1003#define CPX_PARAM_DPRIIND           1009#define CPX_PARAM_EPOPT             1014#define CPX_PARAM_EPPER             1015#define CPX_PARAM_EPRHS             1016#define CPX_PARAM_FASTMIP           1017 /* ??? */#define CPX_PARAM_SIMDISPLAY        1019#define CPX_PARAM_ITLIM             1020#define CPX_PARAM_OBJLLIM           1025#define CPX_PARAM_OBJULIM           1026#define CPX_PARAM_PERIND            1027#define CPX_PARAM_PPRIIND           1029#define CPX_PARAM_PREIND            1030#define CPX_PARAM_REINV             1031#define CPX_PARAM_SCRIND            1035#define CPX_PARAM_DATACHECK         1056/* CPX_PARAM_DPRIIND: */#define CPX_DPRIIND_AUTO            0#define CPX_DPRIIND_FULL            1#define CPX_DPRIIND_STEEP           2#define CPX_DPRIIND_FULL_STEEP      3#define CPX_DPRIIND_STEEPQSTART     4#define CPX_DPRIIND_DEVEX           5/* CPX_PARAM_PPRIIND: */#define CPX_PPRIIND_PARTIAL         (-1)#define CPX_PPRIIND_AUTO            0#define CPX_PPRIIND_DEVEX           1#define CPX_PPRIIND_STEEP           2#define CPX_PPRIIND_STEEPQSTART     3#define CPX_PPRIIND_FULL            4/* error codes: */#define CPXERR_NO_MEMORY            1001#define CPXERR_NO_ENVIRONMENT       1002#define CPXERR_BAD_ARGUMENT         1003#define CPXERR_NULL_POINTER         1004#define CPXERR_NO_PROBLEM           1009#define CPXERR_BAD_PARAM_NUM        1013#define CPXERR_PARAM_TOO_SMALL      1014#define CPXERR_PARAM_TOO_BIG        1015#define CPXERR_INDEX_RANGE          1200#define CPXERR_COL_INDEX_RANGE      1201#define CPXERR_ROW_INDEX_RANGE      1203#define CPXERR_NEGATIVE_SURPLUS     1207#define CPXERR_BAD_SENSE            1215#define CPXERR_NO_SOLN              1217#define CPXERR_NOT_FIXED            1221#define CPXERR_DUP_ENTRY            1222#define CPXERR_NULL_NAME            1224#define CPXERR_ARRAY_NOT_ASCENDING  1226#define CPXERR_COUNT_RANGE          1227#define CPXERR_BAD_LUB              1229#define CPXERR_BAD_STATUS           1253#define CPXERR_NO_BASIC_SOLN        1261#define CPXERR_BAD_CTYPE            3021/* CPXgetobjsen: */#define CPX_MIN                     1#define CPX_MAX                     (-1)/* CPXgetbase: */#define CPX_AT_LOWER                0#define CPX_BASIC                   1#define CPX_AT_UPPER                2#define CPX_FREE_SUPER              3/* CPXgetstat: */#define CPX_STAT_OPTIMAL            1#define CPX_STAT_UNBOUNDED          2#define CPX_STAT_INFEASIBLE         3#define CPX_STAT_INForUNBD          4#define CPX_STAT_OPTIMAL_INFEAS     5#define CPX_STAT_ABORT_IT_LIM       10#define CPX_STAT_ABORT_OBJ_LIM      12/* CPXgetmethod: */#define CPX_ALG_NONE                0#define CPX_ALG_PRIMAL              1#define CPX_ALG_DUAL                2#define CPX_ALG_BARRIER             4/* CPXsolninfo: */#define CPX_NO_SOLN                 0#define CPX_BASIC_SOLN              1#define CPX_NONBASIC_SOLN           2#define CPX_PRIMAL_SOLN             3int CPXaddcols(CPXENV *env, CPXLP *lp, int ccnt, int nzcnt,      const double obj[], const int cmatbeg[], const int cmatind[],      const double cmatval[], const double lb[], const double ub[],      char *colname[]);int CPXaddrows(CPXENV *env, CPXLP *lp, int ccnt, int rcnt, int nzcnt,      const double rhs[], const char sense[], const int rmatbeg[],      const int rmatind[], const double rmatval[], char *colname[],      char *rowname[]);int CPXbaropt(CPXENV *env, CPXLP *lp);int CPXbinvrow(CPXENV *env, CPXLP *lp, int i, double y[]);int CPXchgbds(CPXENV *env, CPXLP *lp, int cnt, const int indices[],      const char lu[], const double bd[]);int CPXchgsense(CPXENV *env, CPXLP *lp, int cnt, const int indices[],      const char sense[]);int CPXcloseCPLEX(CPXENV **env);int CPXcopybase(CPXENV *env, CPXLP *lp, const int cstat[],      const int rstat[]);int CPXcopybasednorms(CPXENV *env, CPXLP *lp, const int cstat[],      const int rstat[], const double dnorm[]);int CPXcopylp(CPXENV *env, CPXLP *lp, int numcols, int numrows,      int objsen, const double obj[], const double rhs[],      const char sense[], const int matbeg[], const int matcnt[],      const int matind[], const double matval[], const double lb[],      const double ub[], const double rngval[]);int CPXcopylpwnames(CPXENV *env, CPXLP *lp, int numcols, int numrows,      int objsen, const double obj[], const double rhs[],      const char sense[], const int matbeg[], const int matcnt[],      const int matind[], const double matval[], const double lb[],      const double ub[], const double rngval[], char *colname[],      char *rowname[]);CPXLP *CPXcreateprob(CPXENV *env, int *status, const char *probname);int CPXdelcols(CPXENV *env, CPXLP *lp, int begin, int end);int CPXdelrows(CPXENV *env, CPXLP *lp, int begin, int end);int CPXdelsetcols(CPXENV *env, CPXLP *lp, int delstat[]);int CPXdelsetrows(CPXENV *env, CPXLP *lp, int delstat[]);int CPXdualopt(CPXENV *env, CPXLP *lp);int CPXfreeprob(CPXENV *env, CPXLP **lp);int CPXgetbase(CPXENV *env, CPXLP *lp, int cstat[], int rstat[]);int CPXgetbasednorms(CPXENV *env, CPXLP *lp, int cstat[], int rstat[],      double dnorm[]);int CPXgetbhead(CPXENV *env, CPXLP *lp, int head[], double x[]);int CPXgetdblparam(CPXENV *env, int whichparam, double *value);int CPXgetdj(CPXENV *env, CPXLP *lp, double dj[], int begin, int end);char *CPXgeterrorstring(CPXENV *env, int errcode, char *buffer);int CPXgetijdiv(CPXENV *env, CPXLP *lp, int *idiv, int *jdiv);int CPXgetintparam(CPXENV *env, int whichparam, int *value);int CPXgetlb(CPXENV *env, CPXLP *lp, double lb[], int begin, int end);int CPXgetmethod(CPXENV *env, CPXLP *lp);int CPXgetnumcols(CPXENV *env, CPXLP *lp);int CPXgetnumnz(CPXENV *env, CPXLP *lp);int CPXgetnumrows(CPXENV *env, CPXLP *lp);int CPXgetobjval(CPXENV *env, CPXLP *lp, double *objval);int CPXgetpi(CPXENV *env, CPXLP *lp, double pi[], int begin, int end);int CPXgetsense(CPXENV *env, CPXLP *lp, char sense[], int begin,      int end);int CPXgetslack(CPXENV *env, CPXLP *lp, double slack[], int begin,      int end);int CPXgetstat(CPXENV *env, CPXLP *lp);int CPXgetub(CPXENV *env, CPXLP *lp, double ub[], int begin, int end);int CPXgetweight(CPXENV *env, CPXLP *lp, int rcnt, const int rmatbeg[],      const int rmatind[], const double rmatval[], double weight[],      int dpriind);int CPXgetx(CPXENV *env, CPXLP *lp, double x[], int begin, int end);int CPXinfodblparam(CPXENV *env, int whichparam, double *defvalue,      double *minvalue, double *maxvalue);int CPXinfointparam(CPXENV *env, int whichparam, int *defvalue,      int *minvalue, int *maxvalue);int CPXmdleave(const CPXENV *env, CPXLP *lp, const int goodlist[],      int goodlen, double downratio[], double upratio[]);int CPXnewrows(CPXENV *env, CPXLP *lp, int rcnt, const double rhs[],      const char sense[], const double rngval[], char *rowname[]);CPXENV *CPXopenCPLEX(int *status);int CPXpivotin(CPXENV *env, CPXLP *lp, const int rlist[], int rlen);int CPXpivotout(CPXENV *env, CPXLP *lp, const int clist[], int clen);int CPXprimopt(CPXENV *env, CPXLP *lp);int CPXsavwrite(CPXENV *env, CPXLP *lp, const char *filename);int CPXsetdblparam(CPXENV *env, int whichparam, double newvalue);int CPXsetintparam(CPXENV *env, int whichparam, int newvalue);int CPXsolninfo(CPXENV *env, CPXLP *lp, int *solnmethod, int *solntype,      int *pfeasind, int *dfeasind);int CPXstrongbranch(CPXENV *env, CPXLP *lp, const int goodlist[],      int goodlen, double downpen[], double uppen[], int itlim);#ifdef __cplusplus}#endif#endif/* eof */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -