From e22a32cd401cb4900315a4bcd1e13f57dd752630 Mon Sep 17 00:00:00 2001 From: Claus Jonathan Fritzemeier <clausjonathan.fritzemeier@hhu.de> Date: Wed, 17 Dec 2014 16:10:33 +0100 Subject: [PATCH] initial commit of version 1.2.11 --- DESCRIPTION | 20 + NAMESPACE | 880 ++++ R/cplex.R | 91 + R/cplexAPI.R | 3200 ++++++++++++ R/cplexConst.R | 861 ++++ R/cplexErrorClass.R | 103 + R/cplexPtrClass.R | 348 ++ R/cplex_checkAPI.R | 316 ++ R/cplex_longparamAPI.R | 72 + R/generics.R | 84 + R/zzz.R | 39 + cleanup | 4 + configure | 4986 +++++++++++++++++++ configure.ac | 293 ++ configure.win | 0 inst/INSTALL | 117 + inst/NEWS.Rd | 310 ++ inst/README | 6 + inst/c2r.map | 198 + man/addChannelCPLEX.Rd | 59 + man/addColsCPLEX.Rd | 88 + man/addFpDestCPLEX.Rd | 59 + man/addIndConstrCPLEX.Rd | 78 + man/addMIPstartsCPLEX.Rd | 80 + man/addQConstrCPLEX.Rd | 93 + man/addRowsCPLEX.Rd | 94 + man/baroptCPLEX.Rd | 58 + man/baseWriteCPLEX.Rd | 55 + man/basicPresolveCPLEX.Rd | 56 + man/boundSaCPLEX.Rd | 63 + man/cLpWriteCPLEX.Rd | 55 + man/checkAddColsCPLEX.Rd | 89 + man/checkAddRowsCPLEX.Rd | 94 + man/checkChgCoefListCPLEX.Rd | 70 + man/checkCopyColTypeCPLEX.Rd | 60 + man/checkCopyLpCPLEX.Rd | 102 + man/checkCopyLpwNamesCPLEX.Rd | 109 + man/checkCopyQPsepCPLEX.Rd | 60 + man/checkCopyQuadCPLEX.Rd | 73 + man/checkValsCPLEX.Rd | 63 + man/chgBndsCPLEX.Rd | 68 + man/chgCoefCPLEX.Rd | 73 + man/chgCoefListCPLEX.Rd | 64 + man/chgColNameCPLEX.Rd | 62 + man/chgColTypeCPLEX.Rd | 62 + man/chgColsBndsCPLEX.Rd | 66 + man/chgMIPstartsCPLEX.Rd | 81 + man/chgNameCPLEX.Rd | 63 + man/chgObjCPLEX.Rd | 62 + man/chgProbNameCPLEX.Rd | 55 + man/chgProbTypeCPLEX.Rd | 61 + man/chgQPcoefCPLEX.Rd | 65 + man/chgRhsCPLEX.Rd | 61 + man/chgRngValCPLEX.Rd | 62 + man/chgRowNameCPLEX.Rd | 63 + man/chgSenseCPLEX.Rd | 62 + man/chgTerminateCPLEX.Rd | 48 + man/cleanupCoefCPLEX.Rd | 56 + man/cloneProbCPLEX.Rd | 57 + man/closeEnvCPLEX.Rd | 52 + man/closeFileCPLEX.Rd | 50 + man/closeProbCPLEX.Rd | 49 + man/completelpCPLEX.Rd | 52 + man/copyBaseCPLEX.Rd | 60 + man/copyColTypeCPLEX.Rd | 55 + man/copyLpCPLEX.Rd | 97 + man/copyLpwNamesCPLEX.Rd | 104 + man/copyObjNameCPLEX.Rd | 55 + man/copyOrderCPLEX.Rd | 65 + man/copyPartBaseCPLEX.Rd | 75 + man/copyQPsepCPLEX.Rd | 55 + man/copyQuadCPLEX.Rd | 68 + man/copyStartCPLEX.Rd | 77 + man/cplexAPI-package.Rd | 98 + man/cplexConstants.Rd | 1663 +++++++ man/cplexError-class.Rd | 67 + man/cplexPtr-class.Rd | 115 + man/delChannelCPLEX.Rd | 56 + man/delColsCPLEX.Rd | 59 + man/delFpDestCPLEX.Rd | 60 + man/delIndConstrsCPLEX.Rd | 61 + man/delMIPstartsCPLEX.Rd | 59 + man/delNamesCPLEX.Rd | 53 + man/delProbCPLEX.Rd | 57 + man/delQConstrsCPLEX.Rd | 61 + man/delRowsCPLEX.Rd | 58 + man/delSetColsCPLEX.Rd | 56 + man/delSetRowsCPLEX.Rd | 56 + man/delTerminateCPLEX.Rd | 57 + man/disconnectChannelCPLEX.Rd | 58 + man/dualWriteCPLEX.Rd | 56 + man/dualoptCPLEX.Rd | 58 + man/feasOptCPLEX.Rd | 73 + man/fileputCPLEX.Rd | 53 + man/flushChannelCPLEX.Rd | 57 + man/flushStdChannelsCPLEX.Rd | 54 + man/freePresolveCPLEX.Rd | 53 + man/getBaseCPLEX.Rd | 56 + man/getBestObjValCPLEX.Rd | 53 + man/getChannelsCPLEX.Rd | 63 + man/getChgParmCPLEX.Rd | 53 + man/getCoefCPLEX.Rd | 59 + man/getColIndexCPLEX.Rd | 56 + man/getColInfeasCPLEX.Rd | 63 + man/getColNameCPLEX.Rd | 60 + man/getColTypeCPLEX.Rd | 64 + man/getColsCPLEX.Rd | 68 + man/getConflictCPLEX.Rd | 64 + man/getConflictExtCPLEX.Rd | 59 + man/getCutoffCPLEX.Rd | 53 + man/getDblParmCPLEX.Rd | 56 + man/getDblQualCPLEX.Rd | 61 + man/getDbsCntCPLEX.Rd | 52 + man/getDjCPLEX.Rd | 62 + man/getErrorStrCPLEX.Rd | 54 + man/getGradCPLEX.Rd | 61 + man/getIndConstrCPLEX.Rd | 74 + man/getInfoDblParmCPLEX.Rd | 59 + man/getInfoIntParmCPLEX.Rd | 59 + man/getInfoLongParmCPLEX.Rd | 64 + man/getInfoStrParmCPLEX.Rd | 55 + man/getIntParmCPLEX.Rd | 56 + man/getIntQualCPLEX.Rd | 57 + man/getItCntCPLEX.Rd | 52 + man/getLogFileCPLEX.Rd | 57 + man/getLongParmCPLEX.Rd | 60 + man/getLowBndsIdsCPLEX.Rd | 55 + man/getLowerBndsCPLEX.Rd | 59 + man/getMIPrelGapCPLEX.Rd | 57 + man/getMIPstartIndexCPLEX.Rd | 56 + man/getMIPstartNameCPLEX.Rd | 61 + man/getMIPstartsCPLEX.Rd | 75 + man/getMethodCPLEX.Rd | 57 + man/getNumColsCPLEX.Rd | 54 + man/getNumMIPstartsCPLEX.Rd | 53 + man/getNumNnzCPLEX.Rd | 53 + man/getNumQPnzCPLEX.Rd | 53 + man/getNumQuadCPLEX.Rd | 54 + man/getNumRowsCPLEX.Rd | 54 + man/getObjCPLEX.Rd | 59 + man/getObjDirCPLEX.Rd | 56 + man/getObjNameCPLEX.Rd | 53 + man/getObjOffsetCPLEX.Rd | 53 + man/getObjValCPLEX.Rd | 53 + man/getOrderCPLEX.Rd | 59 + man/getParmNameCPLEX.Rd | 55 + man/getParmNumCPLEX.Rd | 55 + man/getParmTypeCPLEX.Rd | 55 + man/getParmValCPLEX.Rd | 46 + man/getPhase1CntCPLEX.Rd | 52 + man/getPiCPLEX.Rd | 59 + man/getPreStatCPLEX.Rd | 62 + man/getProbNameCPLEX.Rd | 53 + man/getProbTypeCPLEX.Rd | 58 + man/getProbVarCPLEX.Rd | 61 + man/getQConstrCPLEX.Rd | 78 + man/getQPcoefCPLEX.Rd | 59 + man/getQuadCPLEX.Rd | 68 + man/getRedLpCPLEX.Rd | 57 + man/getRhsCPLEX.Rd | 61 + man/getRngValCPLEX.Rd | 61 + man/getRowIndexCPLEX.Rd | 56 + man/getRowInfeasCPLEX.Rd | 64 + man/getRowNameCPLEX.Rd | 61 + man/getRowsCPLEX.Rd | 68 + man/getSenseCPLEX.Rd | 61 + man/getSiftItCntCPLEX.Rd | 52 + man/getSiftPase1CntCPLEX.Rd | 52 + man/getSlackCPLEX.Rd | 61 + man/getStatCPLEX.Rd | 58 + man/getStatStrCPLEX.Rd | 55 + man/getStrParmCPLEX.Rd | 55 + man/getSubMethodCPLEX.Rd | 56 + man/getSubStatCPLEX.Rd | 50 + man/getTimeCPLEX.Rd | 53 + man/getUppBndsIdsCPLEX.Rd | 54 + man/getUpperBndsCPLEX.Rd | 59 + man/getVersionCPLEX.Rd | 48 + man/hybbaroptCPLEX.Rd | 62 + man/hybnetoptCPLEX.Rd | 63 + man/initProbCPLEX.Rd | 60 + man/lpoptCPLEX.Rd | 58 + man/mipoptCPLEX.Rd | 58 + man/newColsCPLEX.Rd | 77 + man/newRowsCPLEX.Rd | 71 + man/objSaCPLEX.Rd | 62 + man/openEnvCPLEX.Rd | 50 + man/openFileCPLEX.Rd | 58 + man/openProbCPLEX.Rd | 63 + man/ordWriteCPLEX.Rd | 58 + man/preslvWriteCPLEX.Rd | 62 + man/presolveCPLEX.Rd | 61 + man/primoptCPLEX.Rd | 58 + man/printTerminateCPLEX.Rd | 45 + man/qpoptCPLEX.Rd | 58 + man/readCopyBaseCPLEX.Rd | 55 + man/readCopyMIPstartsCPLEX.Rd | 55 + man/readCopyOrderCPLEX.Rd | 55 + man/readCopyParmCPLEX.Rd | 54 + man/readCopyProbCPLEX.Rd | 59 + man/readCopySolCPLEX.Rd | 56 + man/refineConflictCPLEX.Rd | 60 + man/refineConflictExtCPLEX.Rd | 74 + man/refineMIPstartConflictCPLEX.Rd | 63 + man/refineMIPstartConflictExtCPLEX.Rd | 77 + man/return_codeCPLEX.Rd | 42 + man/rhsSaCPLEX.Rd | 63 + man/setDblParmCPLEX.Rd | 57 + man/setDefaultParmCPLEX.Rd | 50 + man/setIntParmCPLEX.Rd | 57 + man/setLogFileCPLEX.Rd | 55 + man/setLongParmCPLEX.Rd | 63 + man/setObjDirCPLEX.Rd | 59 + man/setStrParmCPLEX.Rd | 57 + man/setTerminateCPLEX.Rd | 56 + man/siftoptCPLEX.Rd | 53 + man/solWriteCPLEX.Rd | 61 + man/solnInfoCPLEX.Rd | 65 + man/solutionCPLEX.Rd | 64 + man/status_codeCPLEX.Rd | 48 + man/tightenBndsCPLEX.Rd | 70 + man/tuneParmCPLEX.Rd | 83 + man/unscaleProbCPLEX.Rd | 53 + man/writeMIPstartsCPLEX.Rd | 63 + man/writeParmCPLEX.Rd | 54 + man/writeProbCPLEX.Rd | 59 + src/Makevars.in | 3 + src/Makevars.win | 2 + src/config.h.in | 7 + src/cplexAPI.c | 6506 +++++++++++++++++++++++++ src/cplexAPI.h | 702 +++ src/cplexR.c | 138 + src/cplexR.h | 165 + src/cplex_checkAPI.c | 459 ++ src/cplex_checkAPI.h | 83 + src/cplex_longparamAPI.c | 131 + src/cplex_longparamAPI.h | 48 + src/init.c | 266 + vignettes/cplexAPI.Rnw | 362 ++ 239 files changed, 35112 insertions(+) create mode 100644 DESCRIPTION create mode 100644 NAMESPACE create mode 100644 R/cplex.R create mode 100644 R/cplexAPI.R create mode 100644 R/cplexConst.R create mode 100644 R/cplexErrorClass.R create mode 100644 R/cplexPtrClass.R create mode 100644 R/cplex_checkAPI.R create mode 100644 R/cplex_longparamAPI.R create mode 100644 R/generics.R create mode 100644 R/zzz.R create mode 100755 cleanup create mode 100755 configure create mode 100644 configure.ac create mode 100644 configure.win create mode 100644 inst/INSTALL create mode 100644 inst/NEWS.Rd create mode 100644 inst/README create mode 100644 inst/c2r.map create mode 100644 man/addChannelCPLEX.Rd create mode 100644 man/addColsCPLEX.Rd create mode 100644 man/addFpDestCPLEX.Rd create mode 100644 man/addIndConstrCPLEX.Rd create mode 100644 man/addMIPstartsCPLEX.Rd create mode 100644 man/addQConstrCPLEX.Rd create mode 100644 man/addRowsCPLEX.Rd create mode 100644 man/baroptCPLEX.Rd create mode 100644 man/baseWriteCPLEX.Rd create mode 100644 man/basicPresolveCPLEX.Rd create mode 100644 man/boundSaCPLEX.Rd create mode 100644 man/cLpWriteCPLEX.Rd create mode 100644 man/checkAddColsCPLEX.Rd create mode 100644 man/checkAddRowsCPLEX.Rd create mode 100644 man/checkChgCoefListCPLEX.Rd create mode 100644 man/checkCopyColTypeCPLEX.Rd create mode 100644 man/checkCopyLpCPLEX.Rd create mode 100644 man/checkCopyLpwNamesCPLEX.Rd create mode 100644 man/checkCopyQPsepCPLEX.Rd create mode 100644 man/checkCopyQuadCPLEX.Rd create mode 100644 man/checkValsCPLEX.Rd create mode 100644 man/chgBndsCPLEX.Rd create mode 100644 man/chgCoefCPLEX.Rd create mode 100644 man/chgCoefListCPLEX.Rd create mode 100644 man/chgColNameCPLEX.Rd create mode 100644 man/chgColTypeCPLEX.Rd create mode 100644 man/chgColsBndsCPLEX.Rd create mode 100644 man/chgMIPstartsCPLEX.Rd create mode 100644 man/chgNameCPLEX.Rd create mode 100644 man/chgObjCPLEX.Rd create mode 100644 man/chgProbNameCPLEX.Rd create mode 100644 man/chgProbTypeCPLEX.Rd create mode 100644 man/chgQPcoefCPLEX.Rd create mode 100644 man/chgRhsCPLEX.Rd create mode 100644 man/chgRngValCPLEX.Rd create mode 100644 man/chgRowNameCPLEX.Rd create mode 100644 man/chgSenseCPLEX.Rd create mode 100644 man/chgTerminateCPLEX.Rd create mode 100644 man/cleanupCoefCPLEX.Rd create mode 100644 man/cloneProbCPLEX.Rd create mode 100644 man/closeEnvCPLEX.Rd create mode 100644 man/closeFileCPLEX.Rd create mode 100644 man/closeProbCPLEX.Rd create mode 100644 man/completelpCPLEX.Rd create mode 100644 man/copyBaseCPLEX.Rd create mode 100644 man/copyColTypeCPLEX.Rd create mode 100644 man/copyLpCPLEX.Rd create mode 100644 man/copyLpwNamesCPLEX.Rd create mode 100644 man/copyObjNameCPLEX.Rd create mode 100644 man/copyOrderCPLEX.Rd create mode 100644 man/copyPartBaseCPLEX.Rd create mode 100644 man/copyQPsepCPLEX.Rd create mode 100644 man/copyQuadCPLEX.Rd create mode 100644 man/copyStartCPLEX.Rd create mode 100644 man/cplexAPI-package.Rd create mode 100644 man/cplexConstants.Rd create mode 100644 man/cplexError-class.Rd create mode 100644 man/cplexPtr-class.Rd create mode 100644 man/delChannelCPLEX.Rd create mode 100644 man/delColsCPLEX.Rd create mode 100644 man/delFpDestCPLEX.Rd create mode 100644 man/delIndConstrsCPLEX.Rd create mode 100644 man/delMIPstartsCPLEX.Rd create mode 100644 man/delNamesCPLEX.Rd create mode 100644 man/delProbCPLEX.Rd create mode 100644 man/delQConstrsCPLEX.Rd create mode 100644 man/delRowsCPLEX.Rd create mode 100644 man/delSetColsCPLEX.Rd create mode 100644 man/delSetRowsCPLEX.Rd create mode 100644 man/delTerminateCPLEX.Rd create mode 100644 man/disconnectChannelCPLEX.Rd create mode 100644 man/dualWriteCPLEX.Rd create mode 100644 man/dualoptCPLEX.Rd create mode 100644 man/feasOptCPLEX.Rd create mode 100644 man/fileputCPLEX.Rd create mode 100644 man/flushChannelCPLEX.Rd create mode 100644 man/flushStdChannelsCPLEX.Rd create mode 100644 man/freePresolveCPLEX.Rd create mode 100644 man/getBaseCPLEX.Rd create mode 100644 man/getBestObjValCPLEX.Rd create mode 100644 man/getChannelsCPLEX.Rd create mode 100644 man/getChgParmCPLEX.Rd create mode 100644 man/getCoefCPLEX.Rd create mode 100644 man/getColIndexCPLEX.Rd create mode 100644 man/getColInfeasCPLEX.Rd create mode 100644 man/getColNameCPLEX.Rd create mode 100644 man/getColTypeCPLEX.Rd create mode 100644 man/getColsCPLEX.Rd create mode 100644 man/getConflictCPLEX.Rd create mode 100644 man/getConflictExtCPLEX.Rd create mode 100644 man/getCutoffCPLEX.Rd create mode 100644 man/getDblParmCPLEX.Rd create mode 100644 man/getDblQualCPLEX.Rd create mode 100644 man/getDbsCntCPLEX.Rd create mode 100644 man/getDjCPLEX.Rd create mode 100644 man/getErrorStrCPLEX.Rd create mode 100644 man/getGradCPLEX.Rd create mode 100644 man/getIndConstrCPLEX.Rd create mode 100644 man/getInfoDblParmCPLEX.Rd create mode 100644 man/getInfoIntParmCPLEX.Rd create mode 100644 man/getInfoLongParmCPLEX.Rd create mode 100644 man/getInfoStrParmCPLEX.Rd create mode 100644 man/getIntParmCPLEX.Rd create mode 100644 man/getIntQualCPLEX.Rd create mode 100644 man/getItCntCPLEX.Rd create mode 100644 man/getLogFileCPLEX.Rd create mode 100644 man/getLongParmCPLEX.Rd create mode 100644 man/getLowBndsIdsCPLEX.Rd create mode 100644 man/getLowerBndsCPLEX.Rd create mode 100644 man/getMIPrelGapCPLEX.Rd create mode 100644 man/getMIPstartIndexCPLEX.Rd create mode 100644 man/getMIPstartNameCPLEX.Rd create mode 100644 man/getMIPstartsCPLEX.Rd create mode 100644 man/getMethodCPLEX.Rd create mode 100644 man/getNumColsCPLEX.Rd create mode 100644 man/getNumMIPstartsCPLEX.Rd create mode 100644 man/getNumNnzCPLEX.Rd create mode 100644 man/getNumQPnzCPLEX.Rd create mode 100644 man/getNumQuadCPLEX.Rd create mode 100644 man/getNumRowsCPLEX.Rd create mode 100644 man/getObjCPLEX.Rd create mode 100644 man/getObjDirCPLEX.Rd create mode 100644 man/getObjNameCPLEX.Rd create mode 100644 man/getObjOffsetCPLEX.Rd create mode 100644 man/getObjValCPLEX.Rd create mode 100644 man/getOrderCPLEX.Rd create mode 100644 man/getParmNameCPLEX.Rd create mode 100644 man/getParmNumCPLEX.Rd create mode 100644 man/getParmTypeCPLEX.Rd create mode 100644 man/getParmValCPLEX.Rd create mode 100644 man/getPhase1CntCPLEX.Rd create mode 100644 man/getPiCPLEX.Rd create mode 100644 man/getPreStatCPLEX.Rd create mode 100644 man/getProbNameCPLEX.Rd create mode 100644 man/getProbTypeCPLEX.Rd create mode 100644 man/getProbVarCPLEX.Rd create mode 100644 man/getQConstrCPLEX.Rd create mode 100644 man/getQPcoefCPLEX.Rd create mode 100644 man/getQuadCPLEX.Rd create mode 100644 man/getRedLpCPLEX.Rd create mode 100644 man/getRhsCPLEX.Rd create mode 100644 man/getRngValCPLEX.Rd create mode 100644 man/getRowIndexCPLEX.Rd create mode 100644 man/getRowInfeasCPLEX.Rd create mode 100644 man/getRowNameCPLEX.Rd create mode 100644 man/getRowsCPLEX.Rd create mode 100644 man/getSenseCPLEX.Rd create mode 100644 man/getSiftItCntCPLEX.Rd create mode 100644 man/getSiftPase1CntCPLEX.Rd create mode 100644 man/getSlackCPLEX.Rd create mode 100644 man/getStatCPLEX.Rd create mode 100644 man/getStatStrCPLEX.Rd create mode 100644 man/getStrParmCPLEX.Rd create mode 100644 man/getSubMethodCPLEX.Rd create mode 100644 man/getSubStatCPLEX.Rd create mode 100644 man/getTimeCPLEX.Rd create mode 100644 man/getUppBndsIdsCPLEX.Rd create mode 100644 man/getUpperBndsCPLEX.Rd create mode 100644 man/getVersionCPLEX.Rd create mode 100644 man/hybbaroptCPLEX.Rd create mode 100644 man/hybnetoptCPLEX.Rd create mode 100644 man/initProbCPLEX.Rd create mode 100644 man/lpoptCPLEX.Rd create mode 100644 man/mipoptCPLEX.Rd create mode 100644 man/newColsCPLEX.Rd create mode 100644 man/newRowsCPLEX.Rd create mode 100644 man/objSaCPLEX.Rd create mode 100644 man/openEnvCPLEX.Rd create mode 100644 man/openFileCPLEX.Rd create mode 100644 man/openProbCPLEX.Rd create mode 100644 man/ordWriteCPLEX.Rd create mode 100644 man/preslvWriteCPLEX.Rd create mode 100644 man/presolveCPLEX.Rd create mode 100644 man/primoptCPLEX.Rd create mode 100644 man/printTerminateCPLEX.Rd create mode 100644 man/qpoptCPLEX.Rd create mode 100644 man/readCopyBaseCPLEX.Rd create mode 100644 man/readCopyMIPstartsCPLEX.Rd create mode 100644 man/readCopyOrderCPLEX.Rd create mode 100644 man/readCopyParmCPLEX.Rd create mode 100644 man/readCopyProbCPLEX.Rd create mode 100644 man/readCopySolCPLEX.Rd create mode 100644 man/refineConflictCPLEX.Rd create mode 100644 man/refineConflictExtCPLEX.Rd create mode 100644 man/refineMIPstartConflictCPLEX.Rd create mode 100644 man/refineMIPstartConflictExtCPLEX.Rd create mode 100644 man/return_codeCPLEX.Rd create mode 100644 man/rhsSaCPLEX.Rd create mode 100644 man/setDblParmCPLEX.Rd create mode 100644 man/setDefaultParmCPLEX.Rd create mode 100644 man/setIntParmCPLEX.Rd create mode 100644 man/setLogFileCPLEX.Rd create mode 100644 man/setLongParmCPLEX.Rd create mode 100644 man/setObjDirCPLEX.Rd create mode 100644 man/setStrParmCPLEX.Rd create mode 100644 man/setTerminateCPLEX.Rd create mode 100644 man/siftoptCPLEX.Rd create mode 100644 man/solWriteCPLEX.Rd create mode 100644 man/solnInfoCPLEX.Rd create mode 100644 man/solutionCPLEX.Rd create mode 100644 man/status_codeCPLEX.Rd create mode 100644 man/tightenBndsCPLEX.Rd create mode 100644 man/tuneParmCPLEX.Rd create mode 100644 man/unscaleProbCPLEX.Rd create mode 100644 man/writeMIPstartsCPLEX.Rd create mode 100644 man/writeParmCPLEX.Rd create mode 100644 man/writeProbCPLEX.Rd create mode 100644 src/Makevars.in create mode 100644 src/Makevars.win create mode 100644 src/config.h.in create mode 100644 src/cplexAPI.c create mode 100644 src/cplexAPI.h create mode 100644 src/cplexR.c create mode 100644 src/cplexR.h create mode 100644 src/cplex_checkAPI.c create mode 100644 src/cplex_checkAPI.h create mode 100644 src/cplex_longparamAPI.c create mode 100644 src/cplex_longparamAPI.h create mode 100644 src/init.c create mode 100644 vignettes/cplexAPI.Rnw diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..79ee241 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,20 @@ +Package: cplexAPI +Type: Package +Title: R Interface to C API of IBM ILOG CPLEX +Version: 1.2.11 +Date: 2014-07-28 +Authors@R: c(person("Gabriel", "Gelius-Dietrich", role = c("aut", "cre"), email = "geliudie@uni-duesseldorf.de")) +Depends: R (>= 2.6.0) +Imports: methods +Description: R Interface to C API of IBM ILOG CPLEX, depends on IBM ILOG CPLEX (>= 12.1) +SystemRequirements: IBM ILOG CPLEX (>= 12.1) +License: GPL-3 +LazyLoad: yes +Collate: generics.R cplexConst.R cplexErrorClass.R cplexPtrClass.R + cplex.R cplexAPI.R cplex_checkAPI.R cplex_longparamAPI.R zzz.R +Packaged: 2014-07-28 08:53:41 UTC; gabriel +Author: Gabriel Gelius-Dietrich [aut, cre] +Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +NeedsCompilation: yes +Repository: CRAN +Date/Publication: 2014-07-28 18:16:22 diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..5206eea --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,880 @@ +useDynLib(cplexAPI) + +import(methods) + +exportClass("cplexPtr") +exportClass("cplexError") + +export( +## methods +"err", +"errmsg", +"errnum", +"errnum<-", +"cplexPointer", +"cplexPtrType", +"cplexPtrType<-", +"isCPLEXprobPointer", +"isCPLEXenvPointer", +"isCPLEXfilePointer", +"isCPLEXchanPointer", +"isCPLEXtermPointer", +"isNULLpointerCPLEX", +"summary", +## function names +addChannelCPLEX, +addColsCPLEX, +addFpDestCPLEX, +addIndConstrCPLEX, +addMIPstartsCPLEX, +addRowsCPLEX, +addQConstrCPLEX, +baroptCPLEX, +baseWriteCPLEX, +basicPresolveCPLEX, +boundSaCPLEX, +chgBndsCPLEX, +chgCoefCPLEX, +chgCoefListCPLEX, +chgColNameCPLEX, +chgColsBndsCPLEX, +chgColTypeCPLEX, +chgMIPstartsCPLEX, +chgNameCPLEX, +chgObjCPLEX, +chgProbNameCPLEX, +chgProbTypeCPLEX, +chgQPcoefCPLEX, +chgRhsCPLEX, +chgRngValCPLEX, +chgRowNameCPLEX, +chgSenseCPLEX, +chgTerminateCPLEX, +cleanupCoefCPLEX, +cloneProbCPLEX, +closeEnvCPLEX, +closeFileCPLEX, +closeProbCPLEX, +cLpWriteCPLEX, +completelpCPLEX, +copyBaseCPLEX, +copyColTypeCPLEX, +copyLpCPLEX, +copyLpwNamesCPLEX, +copyObjNameCPLEX, +copyOrderCPLEX, +copyPartBaseCPLEX, +copyQPsepCPLEX, +copyQuadCPLEX, +copyStartCPLEX, +delChannelCPLEX, +delColsCPLEX, +delFpDestCPLEX, +delIndConstrsCPLEX, +delMIPstartsCPLEX, +delNamesCPLEX, +delProbCPLEX, +delQConstrsCPLEX, +delRowsCPLEX, +delSetColsCPLEX, +delSetRowsCPLEX, +delTerminateCPLEX, +disconnectChannelCPLEX, +dualoptCPLEX, +dualWriteCPLEX, +feasOptCPLEX, +fileputCPLEX, +flushChannelCPLEX, +flushStdChannelsCPLEX, +freePresolveCPLEX, +getBaseCPLEX, +getBestObjValCPLEX, +getChannelsCPLEX, +getChgParmCPLEX, +getCoefCPLEX, +getColIndexCPLEX, +getColInfeasCPLEX, +getColNameCPLEX, +getColsCPLEX, +getColTypeCPLEX, +getConflictCPLEX, +getConflictExtCPLEX, +getCutoffCPLEX, +getDblParmCPLEX, +getDblQualCPLEX, +getDbsCntCPLEX, +getDjCPLEX, +getErrorStrCPLEX, +getGradCPLEX, +getIndConstrCPLEX, +getInfoDblParmCPLEX, +getInfoIntParmCPLEX, +getInfoLongParmCPLEX, +getInfoStrParmCPLEX, +getIntParmCPLEX, +getIntQualCPLEX, +getItCntCPLEX, +getLogFileCPLEX, +getLongParmCPLEX, +getLowBndsIdsCPLEX, +getLowerBndsCPLEX, +getMethodCPLEX, +getMIPrelGapCPLEX, +getMIPstartIndexCPLEX, +getMIPstartNameCPLEX, +getMIPstartsCPLEX, +getNumColsCPLEX, +getNumMIPstartsCPLEX, +getNumNnzCPLEX, +getNumQuadCPLEX, +getOrderCPLEX, +getQConstrCPLEX, +getQPcoefCPLEX, +getNumQPnzCPLEX, +getNumRowsCPLEX, +getObjCPLEX, +getObjDirCPLEX, +getObjNameCPLEX, +getObjOffsetCPLEX, +getObjValCPLEX, +getParmNameCPLEX, +getParmNumCPLEX, +getParmTypeCPLEX, +getParmValCPLEX, +getPhase1CntCPLEX, +getPiCPLEX, +getPreStatCPLEX, +getProbNameCPLEX, +getProbTypeCPLEX, +getProbVarCPLEX, +getQuadCPLEX, +getRedLpCPLEX, +getRhsCPLEX, +getRngValCPLEX, +getRowIndexCPLEX, +getRowInfeasCPLEX, +getRowNameCPLEX, +getRowsCPLEX, +getSenseCPLEX, +getSiftItCntCPLEX, +getSiftPase1CntCPLEX, +getSlackCPLEX, +getStatCPLEX, +getStatStrCPLEX, +getStrParmCPLEX, +getSubMethodCPLEX, +getSubStatCPLEX, +getTimeCPLEX, +getUppBndsIdsCPLEX, +getUpperBndsCPLEX, +getVersionCPLEX, +hybbaroptCPLEX, +hybnetoptCPLEX, +initProbCPLEX, +lpoptCPLEX, +mipoptCPLEX, +newColsCPLEX, +newRowsCPLEX, +objSaCPLEX, +openEnvCPLEX, +openFileCPLEX, +openProbCPLEX, +ordWriteCPLEX, +preslvWriteCPLEX, +presolveCPLEX, +primoptCPLEX, +printTerminateCPLEX, +qpoptCPLEX, +readCopyBaseCPLEX, +readCopyMIPstartsCPLEX, +readCopyOrderCPLEX, +readCopyParmCPLEX, +readCopyProbCPLEX, +readCopySolCPLEX, +refineConflictCPLEX, +refineConflictExtCPLEX, +refineMIPstartConflictCPLEX, +refineMIPstartConflictExtCPLEX, +return_codeCPLEX, +rhsSaCPLEX, +setDblParmCPLEX, +setDefaultParmCPLEX, +setIntParmCPLEX, +setLogFileCPLEX, +setLongParmCPLEX, +setObjDirCPLEX, +setStrParmCPLEX, +setTerminateCPLEX, +siftoptCPLEX, +solnInfoCPLEX, +solutionCPLEX, +solWriteCPLEX, +status_codeCPLEX, +tightenBndsCPLEX, +tuneParmCPLEX, +unscaleProbCPLEX, +writeMIPstartsCPLEX, +writeParmCPLEX, +writeProbCPLEX, +## check function names +checkAddColsCPLEX, +checkAddRowsCPLEX, +checkChgCoefListCPLEX, +checkCopyColTypeCPLEX, +checkCopyLpCPLEX, +checkCopyLpwNamesCPLEX, +checkCopyQPsepCPLEX, +checkCopyQuadCPLEX, +checkValsCPLEX, +## parameter variable names +CPX_ALG_AUTOMATIC, +CPX_ALG_BAROPT, +CPX_ALG_BARRIER, +CPX_ALG_CONCURRENT, +CPX_ALG_DUAL, +CPX_ALG_FEASOPT, +CPX_ALG_MIP, +CPX_ALG_NET, +CPX_ALG_NONE, +CPX_ALG_PIVOT, +CPX_ALG_PIVOTIN, +CPX_ALG_PIVOTOUT, +CPX_ALG_PRIMAL, +CPX_ALG_ROBUST, +CPX_ALG_SIFTING, +CPX_AT_LOWER, +CPX_AT_UPPER, +CPX_BARORDER_AMD, +CPX_BARORDER_AMF, +CPX_BARORDER_AUTO, +CPX_BARORDER_ND, +CPX_BASIC_SOLN, +CPX_BASIC, +CPX_BINARY, +CPX_BRANCH_DOWN, +CPX_BRANCH_GLOBAL, +CPX_BRANCH_UP, +CPX_BRDIR_AUTO, +CPX_BRDIR_DOWN, +CPX_BRDIR_UP, +CPX_CON_ABS, +CPX_CON_DISJCST, +CPX_CON_INDDISJCST, +CPX_CON_INDICATOR, +CPX_CON_LAST_CONTYPE, +CPX_CON_LINEAR, +CPX_CON_LOWER_BOUND, +CPX_CON_MAXEXPR, +CPX_CON_MINEXPR, +CPX_CON_PWL, +CPX_CON_QUADRATIC, +CPX_CON_SETVAR, +CPX_CON_SETVARCARD, +CPX_CON_SETVARDOMAIN, +CPX_CON_SETVAREQ, +CPX_CON_SETVARINTERSECT, +CPX_CON_SETVARINTERSECTION, +CPX_CON_SETVARMAX, +CPX_CON_SETVARMEMBER, +CPX_CON_SETVARMIN, +CPX_CON_SETVARNEQ, +CPX_CON_SETVARNEQCST, +CPX_CON_SETVARNULLINTERSECT, +CPX_CON_SETVARSUBSET, +CPX_CON_SETVARSUM, +CPX_CON_SETVARUNION, +CPX_CON_SOS, +CPX_CON_UPPER_BOUND, +CPX_CONFLICT_EXCLUDED, +CPX_CONFLICT_LB, +CPX_CONFLICT_MEMBER, +CPX_CONFLICT_POSSIBLE_LB, +CPX_CONFLICT_POSSIBLE_MEMBER, +CPX_CONFLICT_POSSIBLE_UB, +CPX_CONFLICT_UB, +CPX_CONTINUOUS, +CPX_DPRIIND_AUTO, +CPX_DPRIIND_DEVEX, +CPX_DPRIIND_FULL_STEEP, +CPX_DPRIIND_FULL, +CPX_DPRIIND_STEEP, +CPX_DPRIIND_STEEPQSTART, +CPX_DUAL_OBJ, +CPX_EXACT_KAPPA, +CPX_FEASOPT_MIN_INF, +CPX_FEASOPT_MIN_QUAD, +CPX_FEASOPT_MIN_SUM, +CPX_FEASOPT_OPT_INF, +CPX_FEASOPT_OPT_QUAD, +CPX_FEASOPT_OPT_SUM, +CPX_FREE_SUPER, +CPX_IMPLIED_INTEGER_FEASIBLE, +CPX_INFBOUND, +CPX_INTEGER_FEASIBLE, +CPX_INTEGER_INFEASIBLE, +CPX_INTEGER, +CPX_KAPPA_ATTENTION, +CPX_KAPPA_ILLPOSED, +CPX_KAPPA_MAX, +CPX_KAPPA_STABLE, +CPX_KAPPA_SUSPICIOUS, +CPX_KAPPA_UNSTABLE, +CPX_KAPPA, +CPX_MAX_COMP_SLACK, +CPX_MAX_DUAL_INFEAS, +CPX_MAX_DUAL_RESIDUAL, +CPX_MAX_INDSLACK_INFEAS, +CPX_MAX_INT_INFEAS, +CPX_MAX_PI, +CPX_MAX_PRIMAL_INFEAS, +CPX_MAX_PRIMAL_RESIDUAL, +CPX_MAX_QCPRIMAL_RESIDUAL, +CPX_MAX_QCSLACK_INFEAS, +CPX_MAX_QCSLACK, +CPX_MAX_RED_COST, +CPX_MAX_SCALED_DUAL_INFEAS, +CPX_MAX_SCALED_DUAL_RESIDUAL, +CPX_MAX_SCALED_PI, +CPX_MAX_SCALED_PRIMAL_INFEAS, +CPX_MAX_SCALED_PRIMAL_RESIDUAL, +CPX_MAX_SCALED_RED_COST, +CPX_MAX_SCALED_SLACK, +CPX_MAX_SCALED_X, +CPX_MAX_SLACK, +CPX_MAX_X, +CPX_MAX, +CPX_MIN, +CPX_MIPEMPHASIS_BALANCED, +CPX_MIPEMPHASIS_BESTBOUND, +CPX_MIPEMPHASIS_FEASIBILITY, +CPX_MIPEMPHASIS_HIDDENFEAS, +CPX_MIPEMPHASIS_OPTIMALITY, +CPX_MIPKAPPA_AUTO, +CPX_MIPKAPPA_FULL, +CPX_MIPKAPPA_OFF, +CPX_MIPKAPPA_SAMPLE, +CPX_MIPORDER_BOUNDS, +CPX_MIPORDER_COST, +CPX_MIPORDER_SCALEDCOST, +CPX_MIPSEARCH_AUTO, +CPX_MIPSEARCH_DYNAMIC, +CPX_MIPSEARCH_TRADITIONAL, +CPX_MIPSTART_AUTO, +CPX_MIPSTART_CHECKFEAS, +CPX_MIPSTART_REPAIR, +CPX_MIPSTART_SOLVEFIXED, +CPX_MIPSTART_SOLVEMIP, +CPX_NO_SOLN, +CPX_NODESEL_BESTBOUND, +CPX_NODESEL_BESTEST_ALT, +CPX_NODESEL_BESTEST, +CPX_NODESEL_DFS, +CPX_NONBASIC_SOLN, +CPX_OBJ_GAP, +CPX_OFF, +CPX_ON, +CPX_PARALLEL_AUTO, +CPX_PARALLEL_DETERMINISTIC, +CPX_PARALLEL_OPPORTUNISTIC, +CPX_PARAM_ADVIND, +CPX_PARAM_AGGCUTLIM, +CPX_PARAM_AGGFILL, +CPX_PARAM_AGGIND, +CPX_PARAM_ALL_MAX, +CPX_PARAM_ALL_MIN, +CPX_PARAM_APIENCODING, +CPX_PARAM_AUXROOTTHREADS, +CPX_PARAM_BARALG, +CPX_PARAM_BARCOLNZ, +CPX_PARAM_BARCROSSALG, +CPX_PARAM_BARDISPLAY, +CPX_PARAM_BARDSTART, +CPX_PARAM_BAREPCOMP, +CPX_PARAM_BARGROWTH, +CPX_PARAM_BARITLIM, +CPX_PARAM_BARMAXCOR, +CPX_PARAM_BAROBJRNG, +CPX_PARAM_BARORDER, +CPX_PARAM_BARPSTART, +CPX_PARAM_BARQCPEPCOMP, +CPX_PARAM_BARSTARTALG, +CPX_PARAM_BASINTERVAL, +CPX_PARAM_BBINTERVAL, +CPX_PARAM_BNDSTRENIND, +CPX_PARAM_BRDIR, +CPX_PARAM_BTTOL, +CPX_PARAM_CALCQCPDUALS, +CPX_PARAM_CFILEMUL, +CPX_PARAM_CLIQUES, +CPX_PARAM_CLOCKTYPE, +CPX_PARAM_CLONELOG, +CPX_PARAM_COEREDIND, +CPX_PARAM_COLREADLIM, +CPX_PARAM_CONFLICTDISPLAY, +CPX_PARAM_COVERS, +CPX_PARAM_CRAIND, +CPX_PARAM_CUTLO, +CPX_PARAM_CUTPASS, +CPX_PARAM_CUTSFACTOR, +CPX_PARAM_CUTUP, +CPX_PARAM_DATACHECK, +CPX_PARAM_DEPIND, +CPX_PARAM_DETTILIM, +CPX_PARAM_DISJCUTS, +CPX_PARAM_DIVETYPE, +CPX_PARAM_DPRIIND, +CPX_PARAM_EACHCUTLIM, +CPX_PARAM_EPAGAP, +CPX_PARAM_EPGAP, +CPX_PARAM_EPINT, +CPX_PARAM_EPLIN, +CPX_PARAM_EPMRK, +CPX_PARAM_EPOPT_H, +CPX_PARAM_EPOPT, +CPX_PARAM_EPPER, +CPX_PARAM_EPRELAX, +CPX_PARAM_EPRHS_H, +CPX_PARAM_EPRHS, +CPX_PARAM_FASTMIP, +CPX_PARAM_FEASOPTMODE, +CPX_PARAM_FILEENCODING, +CPX_PARAM_FLOWCOVERS, +CPX_PARAM_FLOWPATHS, +CPX_PARAM_FPHEUR, +CPX_PARAM_FRACCAND, +CPX_PARAM_FRACCUTS, +CPX_PARAM_FRACPASS, +CPX_PARAM_GUBCOVERS, +CPX_PARAM_HEURFREQ, +CPX_PARAM_IMPLBD, +CPX_PARAM_INTSOLFILEPREFIX, +CPX_PARAM_INTSOLLIM, +CPX_PARAM_ITLIM, +CPX_PARAM_LANDPCUTS, +CPX_PARAM_LBHEUR, +CPX_PARAM_LPMETHOD, +CPX_PARAM_MCFCUTS, +CPX_PARAM_MEMORYEMPHASIS, +CPX_PARAM_MIPCBREDLP, +CPX_PARAM_MIPDISPLAY, +CPX_PARAM_MIPEMPHASIS, +CPX_PARAM_MIPINTERVAL, +CPX_PARAM_MIPKAPPASTATS, +CPX_PARAM_MIPORDIND, +CPX_PARAM_MIPORDTYPE, +CPX_PARAM_MIPSEARCH, +CPX_PARAM_MIQCPSTRAT, +CPX_PARAM_MIRCUTS, +CPX_PARAM_MPSLONGNUM, +CPX_PARAM_NETDISPLAY, +CPX_PARAM_NETEPOPT, +CPX_PARAM_NETEPRHS, +CPX_PARAM_NETFIND, +CPX_PARAM_NETITLIM, +CPX_PARAM_NETPPRIIND, +CPX_PARAM_NODEFILEIND, +CPX_PARAM_NODELIM, +CPX_PARAM_NODESEL, +CPX_PARAM_NUMERICALEMPHASIS, +CPX_PARAM_NZREADLIM, +CPX_PARAM_OBJDIF, +CPX_PARAM_OBJLLIM, +CPX_PARAM_OBJULIM, +CPX_PARAM_PARALLELMODE, +CPX_PARAM_PERIND, +CPX_PARAM_PERLIM, +CPX_PARAM_POLISHAFTEREPAGAP, +CPX_PARAM_POLISHAFTEREPGAP, +CPX_PARAM_POLISHAFTERINTSOL, +CPX_PARAM_POLISHAFTERNODE, +CPX_PARAM_POLISHAFTERTIME, +CPX_PARAM_POLISHTIME, +CPX_PARAM_POPULATELIM, +CPX_PARAM_PPRIIND, +CPX_PARAM_PREDUAL, +CPX_PARAM_PREIND, +CPX_PARAM_PRELINEAR, +CPX_PARAM_PREPASS, +CPX_PARAM_PRESLVND, +CPX_PARAM_PRICELIM, +CPX_PARAM_PROBE, +CPX_PARAM_PROBETIME, +CPX_PARAM_QPMAKEPSDIND, +CPX_PARAM_QPMETHOD, +CPX_PARAM_QPNZREADLIM, +CPX_PARAM_RAMPUPDETTILIM, +CPX_PARAM_RAMPUPDURATION, +CPX_PARAM_RAMPUPTILIM, +CPX_PARAM_REDUCE, +CPX_PARAM_REINV, +CPX_PARAM_RELAXPREIND, +CPX_PARAM_RELOBJDIF, +CPX_PARAM_REPAIRTRIES, +CPX_PARAM_REPEATPRESOLVE, +CPX_PARAM_REVERSEIND, +CPX_PARAM_RFILEMUL, +CPX_PARAM_RINSHEUR, +CPX_PARAM_ROWREADLIM, +CPX_PARAM_SCAIND, +CPX_PARAM_SCRIND, +CPX_PARAM_SIFTALG, +CPX_PARAM_SIFTDISPLAY, +CPX_PARAM_SIFTITLIM, +CPX_PARAM_SIMDISPLAY, +CPX_PARAM_SINGLIM, +CPX_PARAM_SINGTOL, +CPX_PARAM_SOLNPOOLAGAP, +CPX_PARAM_SOLNPOOLCAPACITY, +CPX_PARAM_SOLNPOOLGAP, +CPX_PARAM_SOLNPOOLINTENSITY, +CPX_PARAM_SOLNPOOLREPLACE, +CPX_PARAM_SOLUTIONTARGET, +CPX_PARAM_STARTALG, +CPX_PARAM_STRONGCANDLIM, +CPX_PARAM_STRONGITLIM, +CPX_PARAM_SUBALG, +CPX_PARAM_SUBMIPNODELIM, +CPX_PARAM_SYMMETRY, +CPX_PARAM_THREADS, +CPX_PARAM_TILIM, +CPX_PARAM_TRELIM, +CPX_PARAM_TUNINGDISPLAY, +CPX_PARAM_TUNINGMEASURE, +CPX_PARAM_TUNINGREPEAT, +CPX_PARAM_TUNINGTILIM, +CPX_PARAM_VARSEL, +CPX_PARAM_WORKDIR, +CPX_PARAM_WORKMEM, +CPX_PARAM_WRITELEVEL, +CPX_PARAM_XXXIND, +CPX_PARAM_ZEROHALFCUTS, +CPX_PARAMTYPE_DOUBLE, +CPX_PARAMTYPE_INT, +CPX_PARAMTYPE_LONG, +CPX_PARAMTYPE_NONE, +CPX_PARAMTYPE_STRING, +CPX_PPRIIND_AUTO, +CPX_PPRIIND_DEVEX, +CPX_PPRIIND_FULL, +CPX_PPRIIND_PARTIAL, +CPX_PPRIIND_STEEP, +CPX_PPRIIND_STEEPQSTART, +CPX_PRECOL_AGG, +CPX_PRECOL_FIX, +CPX_PRECOL_LOW, +CPX_PRECOL_OTHER, +CPX_PRECOL_UP, +CPX_PREREDUCE_DUALONLY, +CPX_PREREDUCE_NOPRIMALORDUAL, +CPX_PREREDUCE_PRIMALANDDUAL, +CPX_PREREDUCE_PRIMALONLY, +CPX_PREROW_AGG, +CPX_PREROW_OTHER, +CPX_PREROW_RED, +CPX_PRIMAL_OBJ, +CPX_PRIMAL_SOLN, +CPX_SEMICONT, +CPX_SEMIINT, +CPX_SOLNPOOL_DIV, +CPX_SOLNPOOL_FIFO, +CPX_SOLNPOOL_FILTER_DIVERSITY, +CPX_SOLNPOOL_FILTER_RANGE, +CPX_SOLNPOOL_OBJ, +CPX_SOLUTIONTARGET_AUTO, +CPX_SOLUTIONTARGET_FIRSTORDER, +CPX_SOLUTIONTARGET_OPTIMALCONVEX, +CPX_SOLUTIONTARGET_OPTIMALGLOBAL, +CPX_STAT_ABORT_DETTIME_LIM, +CPX_STAT_ABORT_DUAL_OBJ_LIM, +CPX_STAT_ABORT_IT_LIM, +CPX_STAT_ABORT_OBJ_LIM, +CPX_STAT_ABORT_PRIM_OBJ_LIM, +CPX_STAT_ABORT_TIME_LIM, +CPX_STAT_ABORT_USER, +CPX_STAT_CONFLICT_ABORT_CONTRADICTION, +CPX_STAT_CONFLICT_ABORT_DETTIME_LIM, +CPX_STAT_CONFLICT_ABORT_IT_LIM, +CPX_STAT_CONFLICT_ABORT_MEM_LIM, +CPX_STAT_CONFLICT_ABORT_NODE_LIM, +CPX_STAT_CONFLICT_ABORT_OBJ_LIM, +CPX_STAT_CONFLICT_ABORT_TIME_LIM, +CPX_STAT_CONFLICT_ABORT_USER, +CPX_STAT_CONFLICT_FEASIBLE, +CPX_STAT_CONFLICT_MINIMAL, +CPX_STAT_FEASIBLE_RELAXED_INF, +CPX_STAT_FEASIBLE_RELAXED_QUAD, +CPX_STAT_FEASIBLE_RELAXED_SUM, +CPX_STAT_FEASIBLE, +CPX_STAT_FIRSTORDER, +CPX_STAT_INFEASIBLE, +CPX_STAT_INForUNBD, +CPX_STAT_NUM_BEST, +CPX_STAT_OPTIMAL_FACE_UNBOUNDED, +CPX_STAT_OPTIMAL_INFEAS, +CPX_STAT_OPTIMAL_RELAXED_INF, +CPX_STAT_OPTIMAL_RELAXED_QUAD, +CPX_STAT_OPTIMAL_RELAXED_SUM, +CPX_STAT_OPTIMAL, +CPX_STAT_UNBOUNDED, +CPX_STR_PARAM_MAX, +CPX_SUM_COMP_SLACK, +CPX_SUM_DUAL_INFEAS, +CPX_SUM_DUAL_RESIDUAL, +CPX_SUM_INDSLACK_INFEAS, +CPX_SUM_INT_INFEAS, +CPX_SUM_PI, +CPX_SUM_PRIMAL_INFEAS, +CPX_SUM_PRIMAL_RESIDUAL, +CPX_SUM_QCPRIMAL_RESIDUAL, +CPX_SUM_QCSLACK_INFEAS, +CPX_SUM_QCSLACK, +CPX_SUM_RED_COST, +CPX_SUM_SCALED_DUAL_INFEAS, +CPX_SUM_SCALED_DUAL_RESIDUAL, +CPX_SUM_SCALED_PI, +CPX_SUM_SCALED_PRIMAL_INFEAS, +CPX_SUM_SCALED_PRIMAL_RESIDUAL, +CPX_SUM_SCALED_RED_COST, +CPX_SUM_SCALED_SLACK, +CPX_SUM_SCALED_X, +CPX_SUM_SLACK, +CPX_SUM_X, +CPX_TUNE_ABORT, +CPX_TUNE_AVERAGE, +CPX_TUNE_DETTILIM, +CPX_TUNE_MINMAX, +CPX_TUNE_TILIM, +CPX_TYPE_ANY, +CPX_TYPE_SOS1, +CPX_TYPE_SOS2, +CPX_TYPE_USER, +CPX_TYPE_VAR, +CPX_USECUT_FILTER, +CPX_USECUT_FORCE, +CPX_USECUT_PURGE, +CPX_VARSEL_DEFAULT, +CPX_VARSEL_MAXINFEAS, +CPX_VARSEL_MININFEAS, +CPX_VARSEL_PSEUDO, +CPX_VARSEL_PSEUDOREDUCED, +CPX_VARSEL_STRONG, +CPX_WRITELEVEL_ALLVARS, +CPX_WRITELEVEL_AUTO, +CPX_WRITELEVEL_DISCRETEVARS, +CPX_WRITELEVEL_NONZERODISCRETEVARS, +CPX_WRITELEVEL_NONZEROVARS, +CPXERR_NEGATIVE_SURPLUS, +CPXERR_NO_SENSIT, +CPXMIP_ABORT_FEAS, +CPXMIP_ABORT_INFEAS, +CPXMIP_ABORT_RELAXED, +CPXMIP_DETTIME_LIM_FEAS, +CPXMIP_DETTIME_LIM_INFEAS, +CPXMIP_FAIL_FEAS_NO_TREE, +CPXMIP_FAIL_FEAS, +CPXMIP_FAIL_INFEAS_NO_TREE, +CPXMIP_FAIL_INFEAS, +CPXMIP_FEASIBLE_RELAXED_INF, +CPXMIP_FEASIBLE_RELAXED_QUAD, +CPXMIP_FEASIBLE_RELAXED_SUM, +CPXMIP_FEASIBLE, +CPXMIP_INFEASIBLE, +CPXMIP_INForUNBD, +CPXMIP_MEM_LIM_FEAS, +CPXMIP_MEM_LIM_INFEAS, +CPXMIP_NODE_LIM_FEAS, +CPXMIP_NODE_LIM_INFEAS, +CPXMIP_OPTIMAL_INFEAS, +CPXMIP_OPTIMAL_POPULATED_TOL, +CPXMIP_OPTIMAL_POPULATED, +CPXMIP_OPTIMAL_RELAXED_INF, +CPXMIP_OPTIMAL_RELAXED_QUAD, +CPXMIP_OPTIMAL_RELAXED_SUM, +CPXMIP_OPTIMAL_TOL, +CPXMIP_OPTIMAL, +CPXMIP_POPULATESOL_LIM, +CPXMIP_SOL_LIM, +CPXMIP_TIME_LIM_FEAS, +CPXMIP_TIME_LIM_INFEAS, +CPXMIP_UNBOUNDED, +CPXNET_NO_DISPLAY_OBJECTIVE, +CPXNET_PENALIZED_OBJECTIVE, +CPXNET_PRICE_AUTO, +CPXNET_PRICE_MULT_PART, +CPXNET_PRICE_PARTIAL, +CPXNET_PRICE_SORT_MULT_PART, +CPXNET_TRUE_OBJECTIVE, +CPXPARAM_Advance, +CPXPARAM_Barrier_Algorithm, +CPXPARAM_Barrier_ColNonzeros, +CPXPARAM_Barrier_ConvergeTol, +CPXPARAM_Barrier_Crossover, +CPXPARAM_Barrier_Display, +CPXPARAM_Barrier_Limits_Corrections, +CPXPARAM_Barrier_Limits_Growth, +CPXPARAM_Barrier_Limits_Iteration, +CPXPARAM_Barrier_Limits_ObjRange, +CPXPARAM_Barrier_Ordering, +CPXPARAM_Barrier_QCPConvergeTol, +CPXPARAM_Barrier_StartAlg, +CPXPARAM_ClockType, +CPXPARAM_Conflict_Display, +CPXPARAM_DetTimeLimit, +CPXPARAM_DistMIP_Rampup_DetTimeLimit, +CPXPARAM_DistMIP_Rampup_Duration, +CPXPARAM_DistMIP_Rampup_TimeLimit, +CPXPARAM_Emphasis_Memory, +CPXPARAM_Emphasis_MIP, +CPXPARAM_Emphasis_Numerical, +CPXPARAM_Feasopt_Mode, +CPXPARAM_Feasopt_Tolerance, +CPXPARAM_LPMethod, +CPXPARAM_MIP_Cuts_Cliques, +CPXPARAM_MIP_Cuts_Covers, +CPXPARAM_MIP_Cuts_Disjunctive, +CPXPARAM_MIP_Cuts_FlowCovers, +CPXPARAM_MIP_Cuts_Gomory, +CPXPARAM_MIP_Cuts_GUBCovers, +CPXPARAM_MIP_Cuts_Implied, +CPXPARAM_MIP_Cuts_LiftProj, +CPXPARAM_MIP_Cuts_MCFCut, +CPXPARAM_MIP_Cuts_MIRCut, +CPXPARAM_MIP_Cuts_PathCut, +CPXPARAM_MIP_Cuts_ZeroHalfCut, +CPXPARAM_MIP_Display, +CPXPARAM_MIP_Interval, +CPXPARAM_MIP_Limits_AggForCut, +CPXPARAM_MIP_Limits_AuxRootThreads, +CPXPARAM_MIP_Limits_CutPasses, +CPXPARAM_MIP_Limits_CutsFactor, +CPXPARAM_MIP_Limits_EachCutLimit, +CPXPARAM_MIP_Limits_GomoryCand, +CPXPARAM_MIP_Limits_GomoryPass, +CPXPARAM_MIP_Limits_Nodes, +CPXPARAM_MIP_Limits_PolishTime, +CPXPARAM_MIP_Limits_Populate, +CPXPARAM_MIP_Limits_ProbeDetTime, +CPXPARAM_MIP_Limits_ProbeTime, +CPXPARAM_MIP_Limits_RepairTries, +CPXPARAM_MIP_Limits_Solutions, +CPXPARAM_MIP_Limits_StrongCand, +CPXPARAM_MIP_Limits_StrongIt, +CPXPARAM_MIP_Limits_SubMIPNodeLim, +CPXPARAM_MIP_Limits_TreeMemory, +CPXPARAM_MIP_OrderType, +CPXPARAM_MIP_PolishAfter_AbsMIPGap, +CPXPARAM_MIP_PolishAfter_DetTime, +CPXPARAM_MIP_PolishAfter_MIPGap, +CPXPARAM_MIP_PolishAfter_Nodes, +CPXPARAM_MIP_PolishAfter_Solutions, +CPXPARAM_MIP_PolishAfter_Time, +CPXPARAM_MIP_Pool_AbsGap, +CPXPARAM_MIP_Pool_Capacity, +CPXPARAM_MIP_Pool_Intensity, +CPXPARAM_MIP_Pool_RelGap, +CPXPARAM_MIP_Pool_Replace, +CPXPARAM_MIP_Strategy_Backtrack, +CPXPARAM_MIP_Strategy_BBInterval, +CPXPARAM_MIP_Strategy_Branch, +CPXPARAM_MIP_Strategy_CallbackReducedLP, +CPXPARAM_MIP_Strategy_Dive, +CPXPARAM_MIP_Strategy_File, +CPXPARAM_MIP_Strategy_FPHeur, +CPXPARAM_MIP_Strategy_HeuristicFreq, +CPXPARAM_MIP_Strategy_KappaStats, +CPXPARAM_MIP_Strategy_LBHeur, +CPXPARAM_MIP_Strategy_MIQCPStrat, +CPXPARAM_MIP_Strategy_NodeSelect, +CPXPARAM_MIP_Strategy_Order, +CPXPARAM_MIP_Strategy_PresolveNode, +CPXPARAM_MIP_Strategy_Probe, +CPXPARAM_MIP_Strategy_RINSHeur, +CPXPARAM_MIP_Strategy_Search, +CPXPARAM_MIP_Strategy_StartAlgorithm, +CPXPARAM_MIP_Strategy_SubAlgorithm, +CPXPARAM_MIP_Strategy_VariableSelect, +CPXPARAM_MIP_Tolerances_AbsMIPGap, +CPXPARAM_MIP_Tolerances_Integrality, +CPXPARAM_MIP_Tolerances_LowerCutoff, +CPXPARAM_MIP_Tolerances_MIPGap, +CPXPARAM_MIP_Tolerances_ObjDifference, +CPXPARAM_MIP_Tolerances_RelObjDifference, +CPXPARAM_MIP_Tolerances_UpperCutoff, +CPXPARAM_Network_Display, +CPXPARAM_Network_Iterations, +CPXPARAM_Network_NetFind, +CPXPARAM_Network_Pricing, +CPXPARAM_Network_Tolerances_Feasibility, +CPXPARAM_Network_Tolerances_Optimality, +CPXPARAM_Output_CloneLog, +CPXPARAM_Output_IntSolFilePrefix, +CPXPARAM_Output_MPSLong, +CPXPARAM_Output_WriteLevel, +CPXPARAM_Parallel, +CPXPARAM_Preprocessing_Aggregator, +CPXPARAM_Preprocessing_BoundStrength, +CPXPARAM_Preprocessing_CoeffReduce, +CPXPARAM_Preprocessing_Dependency, +CPXPARAM_Preprocessing_Dual, +CPXPARAM_Preprocessing_Fill, +CPXPARAM_Preprocessing_Linear, +CPXPARAM_Preprocessing_NumPass, +CPXPARAM_Preprocessing_Presolve, +CPXPARAM_Preprocessing_QCPDuals, +CPXPARAM_Preprocessing_QPMakePSD, +CPXPARAM_Preprocessing_Reduce, +CPXPARAM_Preprocessing_Relax, +CPXPARAM_Preprocessing_RepeatPresolve, +CPXPARAM_Preprocessing_Symmetry, +CPXPARAM_QPMethod, +CPXPARAM_RandomSeed, +CPXPARAM_Read_APIEncoding, +CPXPARAM_Read_Constraints, +CPXPARAM_Read_DataCheck, +CPXPARAM_Read_FileEncoding, +CPXPARAM_Read_Nonzeros, +CPXPARAM_Read_QPNonzeros, +CPXPARAM_Read_Scale, +CPXPARAM_Read_Variables, +CPXPARAM_ScreenOutput, +CPXPARAM_Sifting_Algorithm, +CPXPARAM_Sifting_Display, +CPXPARAM_Sifting_Iterations, +CPXPARAM_Simplex_Crash, +CPXPARAM_Simplex_DGradient, +CPXPARAM_Simplex_Display, +CPXPARAM_Simplex_Limits_Iterations, +CPXPARAM_Simplex_Limits_LowerObj, +CPXPARAM_Simplex_Limits_Perturbation, +CPXPARAM_Simplex_Limits_Singularity, +CPXPARAM_Simplex_Limits_UpperObj, +CPXPARAM_Simplex_Perturbation_Constant, +CPXPARAM_Simplex_Perturbation_Indicator, +CPXPARAM_Simplex_PGradient, +CPXPARAM_Simplex_Pricing, +CPXPARAM_Simplex_Refactor, +CPXPARAM_Simplex_Tolerances_Feasibility, +CPXPARAM_Simplex_Tolerances_Markowitz, +CPXPARAM_Simplex_Tolerances_Optimality, +CPXPARAM_SolutionTarget, +CPXPARAM_Threads, +CPXPARAM_TimeLimit, +CPXPARAM_Tune_DetTimeLimit, +CPXPARAM_Tune_Display, +CPXPARAM_Tune_Measure, +CPXPARAM_Tune_Repeat, +CPXPARAM_Tune_TimeLimit, +CPXPARAM_WorkDir, +CPXPARAM_WorkMem, +CPXPROB_FIXEDMILP, +CPXPROB_FIXEDMIQP, +CPXPROB_LP, +CPXPROB_MILP, +CPXPROB_MIQCP, +CPXPROB_MIQP, +CPXPROB_NODELP, +CPXPROB_NODEQCP, +CPXPROB_NODEQP, +CPXPROB_QCP, +CPXPROB_QP +) diff --git a/R/cplex.R b/R/cplex.R new file mode 100644 index 0000000..95d5bea --- /dev/null +++ b/R/cplex.R @@ -0,0 +1,91 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplex.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# for checkOptSol + +# return codes of ILOG CPLEX optimizations +return_codeCPLEX <- function(code) { + + if (code == 0) { + error <- "Optimization ended successfull" + } else { + error <- getErrorStrCPLEX(code) + } + + return(error) + +} + + +# status codes of ILOG CPLEX optimizations +status_codeCPLEX <- function(env, code) { + + return(getStatStrCPLEX(env, code)) + +} + + +#------------------------------------------------------------------------------# +# get values and names of non-default parameters +getParmValCPLEX <- function(env) { + + parmCname <- getChgParmCPLEX(env) + + if (!is.null(parmCname)) { + + parmType <- sapply(parmCname, function(x) getParmTypeCPLEX(env, x)) + parmCnameStr <- sapply(parmCname, function(x) getParmNameCPLEX(env, x)) + + intVal <- sapply(parmCname[parmType == CPX_PARAMTYPE_INT], + function(x) getIntParmCPLEX(env, x) + ) + dblVal <- sapply(parmCname[parmType == CPX_PARAMTYPE_DOUBLE], + function(x) getDblParmCPLEX(env, x) + ) + strVal <- sapply(parmCname[parmType == CPX_PARAMTYPE_STRING], + function(x) getStrParmCPLEX(env, x) + ) + + names(intVal) <- parmCnameStr[parmType == CPX_PARAMTYPE_INT] + names(dblVal) <- parmCnameStr[parmType == CPX_PARAMTYPE_DOUBLE] + names(strVal) <- parmCnameStr[parmType == CPX_PARAMTYPE_STRING] + + parms <- list(integer = intVal, double = dblVal, string = strVal) + + } + else { + parms <- parmCname + } + + return(parms) + +} + + + diff --git a/R/cplexAPI.R b/R/cplexAPI.R new file mode 100644 index 0000000..3a9cd87 --- /dev/null +++ b/R/cplexAPI.R @@ -0,0 +1,3200 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplexAPI.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# the interface # +#------------------------------------------------------------------------------# + +getErrorStrCPLEX <- function(err, env = NULL) { + + if (is.null(env)) { + Cenv <- as.null(env) + } + else { + Cenv <- cplexPointer(env) + } + + errmsg <- .Call("getErrorStr", PACKAGE = "cplexAPI", + Cenv, + as.integer(err) + ) + + return(errmsg) +} + + +#------------------------------------------------------------------------------# + +getStatStrCPLEX <- function(env, stat) { + + statmsg <- .Call("getStatStr", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(stat) + ) + + return(statmsg) +} + + +#------------------------------------------------------------------------------# + +closeEnvCPLEX <- function(env) { + + status <- .Call("closeEnv", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +openEnvCPLEX <- function(ptrtype = "cplex_env") { + + env <- .Call("openEnv", PACKAGE = "cplexAPI", + as.character(ptrtype) + ) + + envP <- cplex_EnvPointer(env) + + return(cplexError(envP)) +} + + +#------------------------------------------------------------------------------# + +delProbCPLEX <- function(env, lp) { + + status <- .Call("delProb", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +initProbCPLEX <- function(env, pname = "CPLEX_PROB", ptrtype = "cplex_prob") { + + prob <- .Call("initProb", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(pname), + as.character(ptrtype) + ) + + probP <- cplex_ProbPointer(prob) + + return(cplexError(probP)) +} + + +#------------------------------------------------------------------------------# + +cloneProbCPLEX <- function(env, lp, ptrtype = "cplex_prob") { + + clp <- .Call("cloneProb", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(ptrtype) + ) + + clpP <- cplex_ProbPointer(clp) + + return(cplexError(clpP)) +} + + +#------------------------------------------------------------------------------# + +getProbTypeCPLEX <- function(env, lp) { + + ptype <- .Call("getProbType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(ptype) +} + + +#------------------------------------------------------------------------------# + +chgProbTypeCPLEX <- function(env, lp, ptype) { + + status <- .Call("chgProbType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ptype) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getVersionCPLEX <- function(env) { + + version <- .Call("getVersion", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(version) + +} + + +#------------------------------------------------------------------------------# + +closeProbCPLEX <- function(prob) { + + status <- integer(2) + status[1] <- delProbCPLEX(prob[["env"]], prob[["lp"]]) + status[2] <- closeEnvCPLEX(prob[["env"]]) + return(status) + +} + + +#------------------------------------------------------------------------------# + +openProbCPLEX <- function(pname = "CPLEX_PROB", + ptrtypeENV = "cplex_env", + ptrtypePROB = "cplex_prob") { + + en <- openEnvCPLEX(ptrtype = ptrtypeENV) + if (!is(en, "cpxerr")) { + pr <- initProbCPLEX(env = en, + pname = pname, + ptrtype = ptrtypePROB) + } + else { + pr <- NULL + } + + return(list(env = en, lp = pr)) +} + + +#------------------------------------------------------------------------------# + +setDefaultParmCPLEX <- function(env) { + + status <- .Call("setDefaultParm", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +setIntParmCPLEX <- function(env, parm, value) { + + status <- .Call("setIntParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm), + as.integer(value) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getIntParmCPLEX <- function(env, parm) { + + value <- .Call("getIntParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(value)) +} + + +#------------------------------------------------------------------------------# + +getInfoIntParmCPLEX <- function(env, parm) { + + param <- .Call("getInfoIntParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(param)) +} + +#------------------------------------------------------------------------------# + +setDblParmCPLEX <- function(env, parm, value) { + + status <- .Call("setDblParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm), + as.numeric(value) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getDblParmCPLEX <- function(env, parm) { + + value <- .Call("getDblParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(value)) +} + + +#------------------------------------------------------------------------------# + +getInfoDblParmCPLEX <- function(env, parm) { + + param <- .Call("getInfoDblParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(param)) +} + + +#------------------------------------------------------------------------------# + +setStrParmCPLEX <- function(env, parm, value) { + + status <- .Call("setStrParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm), + as.character(value) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getStrParmCPLEX <- function(env, parm) { + + value <- .Call("getStrParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(value) +} + + +#------------------------------------------------------------------------------# + +getInfoStrParmCPLEX <- function(env, parm) { + + param <- .Call("getInfoStrParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(param) +} + + +#------------------------------------------------------------------------------# + +getParmNameCPLEX <- function(env, wparm) { + + nparm <- .Call("getParmName", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(wparm) + ) + + return(nparm) +} + + +#------------------------------------------------------------------------------# + +getParmNumCPLEX <- function(env, nparm) { + + numparm <- .Call("getParmNum", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(nparm) + ) + + return(numparm) +} + + +#------------------------------------------------------------------------------# + +readCopyParmCPLEX <- function(env, fname) { + + status <- .Call("readCopyParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +writeParmCPLEX <- function(env, fname) { + + status <- .Call("writeParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getParmTypeCPLEX <- function(env, parm) { + + status <- .Call("getParmType", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +getChgParmCPLEX <- function(env) { + + status <- .Call("getChgParm", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +setObjDirCPLEX <- function(env, lp, lpdir) { + + invisible( + .Call("setObjDir", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(lpdir) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +getObjDirCPLEX <- function(env, lp) { + + lpdir <- .Call("getObjDir", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(lpdir) +} + + +#------------------------------------------------------------------------------# + +copyLpCPLEX <- function(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, rngval = NULL + ) { + + if (is.null(rngval)) { + Crngval <- as.null(rngval) + } + else { + Crngval <- as.numeric(rngval) + } + + status <- .Call("copyLp", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nCols), + as.integer(nRows), + as.integer(lpdir), + as.numeric(objf), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + as.integer(matbeg), + as.integer(matcnt), + as.integer(matind), + as.numeric(matval), + as.numeric(lb), + as.numeric(ub), + Crngval + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyLpwNamesCPLEX <- function(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, + rngval = NULL, cnames = NULL, rnames = NULL) { + + if (is.null(rngval)) { + Crngval <- as.null(rngval) + } + else { + Crngval <- as.numeric(rngval) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + if (is.null(rnames)) { + Crnames <- as.null(rnames) + } + else { + Crnames <- as.character(rnames) + } + + status <- .Call("copyLpwNames", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nCols), + as.integer(nRows), + as.integer(lpdir), + as.numeric(objf), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + as.integer(matbeg), + as.integer(matcnt), + as.integer(matind), + as.numeric(matval), + as.numeric(lb), + as.numeric(ub), + Crngval, + Ccnames, + Crnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyQuadCPLEX <- function(env, lp, qmatbeg, qmatcnt, qmatind, qmatval) { + + status <- .Call("copyQuad", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(qmatbeg), + as.integer(qmatcnt), + as.integer(qmatind), + as.numeric(qmatval) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyQPsepCPLEX <- function(env, lp, qsepvec) { + + status <- .Call("copyQPsep", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.numeric(qsepvec) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +writeProbCPLEX <- function(env, lp, fname, ftype = NULL) { + + if (is.null(ftype)) { + Cftype <- as.null(ftype) + } + else { + Cftype <- as.character(ftype) + } + + status <- .Call("writeProb", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname), + Cftype + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +readCopyProbCPLEX <- function(env, lp, fname, ftype = NULL) { + + if (is.null(ftype)) { + Cftype <- as.null(ftype) + } + else { + Cftype <- as.character(ftype) + } + + status <- .Call("readCopyProb", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname), + Cftype + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +dualWriteCPLEX <- function(env, lp, fname) { + + status <- .Call("dualWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +presolveCPLEX <- function(env, lp, method) { + + preslv <- .Call("presolve", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(method) + ) + + return(preslv) +} + + +#------------------------------------------------------------------------------# + +getPreStatCPLEX <- function(env, lp) { + + prestat <- .Call("getPreStat", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(prestat)) +} + + +#------------------------------------------------------------------------------# + +basicPresolveCPLEX <- function(env, lp) { + + bpres <- .Call("basicPresolve", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(bpres)) +} + + +#------------------------------------------------------------------------------# + +preslvWriteCPLEX <- function(env, lp, fname) { + + off <- .Call("preslvWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(cplexError(off)) +} + + +#------------------------------------------------------------------------------# + +getRedLpCPLEX <- function(env, lp, ptrtype = "cplex_prob") { + + redlp <- .Call("getRedLp", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(ptrtype) + ) + + return(cplexError(redlp)) +} + + +#------------------------------------------------------------------------------# + +getObjOffsetCPLEX <- function(env, lp) { + + ooff <- .Call("getObjOffset", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(ooff)) +} + + +#------------------------------------------------------------------------------# + +unscaleProbCPLEX <- function(env, lp) { + + status <- .Call("unscaleProb", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +newRowsCPLEX <- function(env, lp, + nrows, rhs = NULL, sense = NULL, + rngval = NULL, rnames = NULL) { + + if (is.null(rhs)) { + Crhs <- as.null(rhs) + } + else { + Crhs <- as.numeric(rhs) + } + + if (is.null(sense)) { + Csense <- as.null(sense) + } + else { + Csense <- as.character(paste(sense, collapse = "")) + } + + if (is.null(rngval)) { + Crngval <- as.null(rngval) + } + else { + Crngval <- as.numeric(rngval) + } + + if (is.null(rnames)) { + Crnames <- as.null(rnames) + } + else { + Crnames <- as.character(rnames) + } + + status <- .Call("newRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nrows), + Crhs, + Csense, + Crngval, + Crnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +addRowsCPLEX <- function(env, lp, ncols, nrows, nnz, matbeg, matind, matval, + rhs = NULL, sense = NULL, + cnames = NULL, rnames = NULL) { + + if (is.null(rhs)) { + Crhs <- as.null(rhs) + } + else { + Crhs <- as.numeric(rhs) + } + + if (is.null(sense)) { + Csense <- as.null(sense) + } + else { + Csense <- as.character(paste(sense, collapse = "")) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + if (is.null(rnames)) { + Crnames <- as.null(rnames) + } + else { + Crnames <- as.character(rnames) + } + + status <- .Call("addRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(nrows), + as.integer(nnz), + Crhs, + Csense, + as.integer(matbeg), + as.integer(matind), + as.numeric(matval), + Ccnames, + Crnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getNumRowsCPLEX <- function(env, lp) { + + nrows <- .Call("getNumRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(nrows) +} + + +#------------------------------------------------------------------------------# + +delRowsCPLEX <- function(env, lp, begin, end) { + + status <- .Call("delRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +delSetRowsCPLEX <- function(env, lp, delstat) { + + indrows <- .Call("delSetRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(delstat) + ) + + return(indrows) +} + + +#------------------------------------------------------------------------------# + +newColsCPLEX <- function(env, lp, ncols, + obj = NULL, lb = NULL, ub = NULL, + xctype = NULL, cnames = NULL) { + + if (is.null(obj)) { + Cobj <- as.null(obj) + } + else { + Cobj <- as.numeric(obj) + } + + if (is.null(lb)) { + Clb <- as.null(lb) + } + else { + Clb <- as.numeric(lb) + } + + if (is.null(ub)) { + Cub <- as.null(ub) + } + else { + Cub <- as.numeric(ub) + } + + if (is.null(xctype)) { + Cxctype <- as.null(xctype) + } + else { + Cxctype <- as.character(paste(xctype, collapse = "")) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + status <- .Call("newCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + Cobj, + Clb, + Cub, + Cxctype, + Ccnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +addColsCPLEX <- function(env, lp, ncols, nnz, objf, matbeg, matind, matval, + lb = NULL, ub = NULL, cnames = NULL) { + + if (is.null(lb)) { + Clb <- as.null(lb) + } + else { + Clb <- as.numeric(lb) + } + + if (is.null(ub)) { + Cub <- as.null(ub) + } + else { + Cub <- as.numeric(ub) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + status <- .Call("addCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(nnz), + as.numeric(objf), + as.integer(matbeg), + as.integer(matind), + as.numeric(matval), + Clb, + Cub, + Ccnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getNumColsCPLEX <- function(env, lp) { + + ncols <- .Call("getNumCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(ncols) +} + + +#------------------------------------------------------------------------------# + +delColsCPLEX <- function(env, lp, begin, end) { + + status <- .Call("delCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +delSetColsCPLEX <- function(env, lp, delstat) { + + indcols <- .Call("delSetCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(delstat) + ) + + return(indcols) +} + + +#------------------------------------------------------------------------------# + +chgObjCPLEX <- function(env, lp, ncols, ind, val) { + + status <- .Call("chgObj", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(ind), + as.numeric(val) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getObjCPLEX <- function(env, lp, begin, end) { + + obj_coef <- .Call("getObj", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(obj_coef)) +} + + +#------------------------------------------------------------------------------# + +copyObjNameCPLEX <- function(env, lp, oname) { + + status <- .Call("copyObjName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(oname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getObjNameCPLEX <- function(env, lp) { + + objname <- .Call("getObjName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(objname)) +} + + +#------------------------------------------------------------------------------# + +chgCoefListCPLEX <- function(env, lp, nnz, ia, ja, ra) { + + status <- .Call("chgCoefList", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nnz), + as.integer(ia), + as.integer(ja), + as.numeric(ra) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgQPcoefCPLEX <- function(env, lp, i, j, val) { + + status <- .Call("chgQPcoef", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(i), + as.integer(j), + as.numeric(val) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgCoefCPLEX <- function(env, lp, i, j, val) { + + status <- .Call("chgCoef", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(i), + as.integer(j), + as.numeric(val) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getCoefCPLEX <- function(env, lp, i, j) { + + co <- .Call("getCoef", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(i), + as.integer(j) + ) + + return(cplexError(co)) +} + + +#------------------------------------------------------------------------------# + +getNumNnzCPLEX <- function(env, lp) { + + nnz <- .Call("getNumNnz", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(nnz) +} + + +#------------------------------------------------------------------------------# + +chgBndsCPLEX <- function(env, lp, ncols, ind, lu, bd) { + + status <- .Call("chgBnds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(ind), + as.character(paste(lu, collapse = "")), + as.numeric(bd) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgColsBndsCPLEX <- function(env, lp, j, lb, ub) { + + status <- .Call("chgColsBnds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(j), + as.numeric(lb), + as.numeric(ub) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +tightenBndsCPLEX <- function(env, lp, ncols, ind, lu, bd) { + + status <- .Call("tightenBnds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(ind), + as.character(paste(lu, collapse = "")), + as.numeric(bd) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgColTypeCPLEX <- function(env, lp, ncols, ind, xctype) { + + status <- .Call("chgColType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(ind), + as.character(paste(xctype, collapse = "")) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +getColTypeCPLEX <- function(env, lp, begin, end) { + + ctype <- .Call("getColType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + if ((is(ctype, "cpxerr")) || (is.null(ctype))) { + out <- ctype + } + else { + out <- unlist(strsplit(ctype, NULL)) + } + + return(out) +} + + +#------------------------------------------------------------------------------# + +copyColTypeCPLEX <- function(env, lp, xctype) { + + status <- .Call("copyColType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(paste(xctype, collapse = "")) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getLowerBndsCPLEX <- function(env, lp, begin, end) { + + lb <- .Call("getLowerBnds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(lb)) +} + + +#------------------------------------------------------------------------------# + +getUpperBndsCPLEX <- function(env, lp, begin, end) { + + ub <- .Call("getUpperBnds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(ub)) +} + + +#------------------------------------------------------------------------------# + +getLowBndsIdsCPLEX <- function(env, lp, ind) { + + ncols <- length(ind) + + lb <- .Call("getLowBndsIds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ind), + as.integer(ncols) + ) + + return(cplexError(lb)) +} + + +#------------------------------------------------------------------------------# + +getUppBndsIdsCPLEX <- function(env, lp, ind) { + + ncols <- length(ind) + + ub <- .Call("getUppBndsIds", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ind), + as.integer(ncols) + ) + + return(cplexError(ub)) +} + + +#------------------------------------------------------------------------------# + +chgRhsCPLEX <- function(env, lp, nrows, ind, val) { + + status <- .Call("chgRhs", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nrows), + as.integer(ind), + as.numeric(val) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getRhsCPLEX <- function(env, lp, begin, end) { + + status <- .Call("getRhs", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +chgSenseCPLEX <- function(env, lp, nrows, ind, sense) { + + status <- .Call("chgSense", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nrows), + as.integer(ind), + as.character(paste(sense, collapse = "")) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getSenseCPLEX <- function(env, lp, begin, end) { + + sense <- .Call("getSense", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + if ((is(sense, "cpxerr")) || (is.null(sense))) { + out <- sense + } + else { + out <- unlist(strsplit(sense, NULL)) + } + + return(cplexError(out)) +} + + +#------------------------------------------------------------------------------# + +delNamesCPLEX <- function(env, lp) { + + status <- .Call("delNames", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgProbNameCPLEX <- function(env, lp, probname) { + + status <- .Call("chgProbName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(probname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getProbNameCPLEX <- function(env, lp) { + + probname <- .Call("getProbName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(probname)) +} + + +#------------------------------------------------------------------------------# + +chgNameCPLEX <- function(env, lp, key, ij, name) { + + status <- .Call("chgName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(key), + as.integer(ij), + as.character(name) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgRowNameCPLEX <- function(env, lp, nnames, ind, names) { + + status <- .Call("chgRowName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nnames), + as.integer(ind), + as.character(names) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgColNameCPLEX <- function(env, lp, nnames, ind, names) { + + status <- .Call("chgColName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nnames), + as.integer(ind), + as.character(names) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getRowNameCPLEX <- function(env, lp, begin, end) { + + rname <- .Call("getRowName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rname)) +} + + +#------------------------------------------------------------------------------# + +getColNameCPLEX <- function(env, lp, begin, end) { + + cname <- .Call("getColName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(cname)) +} + + +#------------------------------------------------------------------------------# + +getColIndexCPLEX <- function(env, lp, cname) { + + cindex <- .Call("getColIndex", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(cname) + ) + + return(cplexError(cindex)) +} + + +#------------------------------------------------------------------------------# + +getRowIndexCPLEX <- function(env, lp, rname) { + + rindex <- .Call("getRowIndex", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(rname) + ) + + return(cplexError(rindex)) +} + + +#------------------------------------------------------------------------------# + +chgRngValCPLEX <- function(env, lp, nrows, ind, val) { + + status <- .Call("chgRngVal", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nrows), + as.integer(ind), + as.numeric(val) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getRngValCPLEX <- function(env, lp, begin, end) { + + rngval <- .Call("getRngVal", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rngval)) +} + + +#------------------------------------------------------------------------------# + +getRowsCPLEX <- function(env, lp, begin, end) { + + rows <- .Call("getRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rows)) +} + + +#------------------------------------------------------------------------------# + +getColsCPLEX <- function(env, lp, begin, end) { + + cols <- .Call("getCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(cols)) +} + + +#------------------------------------------------------------------------------# + +completelpCPLEX <- function(env, lp) { + + status <- .Call("completelp", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +cleanupCoefCPLEX <- function(env, lp, eps) { + + status <- .Call("cleanupCoef", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.numeric(eps) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyStartCPLEX <- function(env, lp, + cstat = NULL, rstat = NULL, + cprim = NULL, rprim = NULL, + cdual = NULL, rdual = NULL) { + + if (is.null(cstat)) { + Ccstat <- as.null(cstat) + } + else { + Ccstat <- as.integer(cstat) + } + + if (is.null(rstat)) { + Crstat <- as.null(rstat) + } + else { + Crstat <- as.integer(rstat) + } + + if (is.null(cprim)) { + Ccprim <- as.null(cprim) + } + else { + Ccprim <- as.numeric(cprim) + } + + if (is.null(rprim)) { + Crprim <- as.null(rprim) + } + else { + Crprim <- as.numeric(rprim) + } + + if (is.null(cdual)) { + Ccdual <- as.null(cdual) + } + else { + Ccdual <- as.numeric(cdual) + } + + if (is.null(rdual)) { + Crdual <- as.null(rdual) + } + else { + Crdual <- as.numeric(rdual) + } + + status <- .Call("copyStart", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + Ccstat, Crstat, + Ccprim, Crprim, + Ccdual, Crdual + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyBaseCPLEX <- function(env, lp, cstat, rstat) { + + status <- .Call("copyBase", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(cstat), + as.integer(rstat) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +copyPartBaseCPLEX <- function(env, lp, ncind, cind, cstat, + nrind, rind, rstat) { + + status <- .Call("copyPartBase", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncind), + as.integer(cind), + as.integer(cstat), + as.integer(nrind), + as.integer(rind), + as.integer(rstat) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getBaseCPLEX <- function(env, lp) { + + base <- .Call("getBase", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(base)) +} + + +#------------------------------------------------------------------------------# + +baseWriteCPLEX <- function(env, lp, fname) { + + status <- .Call("baseWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +readCopyBaseCPLEX <- function(env, lp, fname) { + + status <- .Call("readCopyBase", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +lpoptCPLEX <- function(env, lp) { + + status <- .Call("lpopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +primoptCPLEX <- function(env, lp) { + + status <- .Call("primopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +dualoptCPLEX <- function(env, lp) { + + status <- .Call("dualopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +baroptCPLEX <- function(env, lp) { + + status <- .Call("baropt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +hybbaroptCPLEX <- function(env, lp, method) { + + status <- .Call("hybbaropt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(method) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +hybnetoptCPLEX <- function(env, lp, method) { + + status <- .Call("hybnetopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(method) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +siftoptCPLEX <- function(env, lp) { + + status <- .Call("siftopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +mipoptCPLEX <- function(env, lp) { + + status <- .Call("mipopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +qpoptCPLEX <- function(env, lp) { + + status <- .Call("qpopt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getCutoffCPLEX <- function(env, lp) { + + coff <- .Call("getCutoff", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(coff)) +} + + +#------------------------------------------------------------------------------# + +getGradCPLEX <- function(env, lp, j) { + + grad <- .Call("getGrad", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(j) + ) + + return(cplexError(grad)) +} + + +#------------------------------------------------------------------------------# + +getItCntCPLEX <- function(env, lp) { + + itcnt <- .Call("getItCnt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(itcnt) +} + + +#------------------------------------------------------------------------------# + +getPhase1CntCPLEX <- function(env, lp) { + + pcnt <- .Call("getPhase1Cnt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(pcnt) +} + + + +#------------------------------------------------------------------------------# + +getSiftItCntCPLEX <- function(env, lp) { + + scnt <- .Call("getSiftItCnt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(scnt) +} + + +#------------------------------------------------------------------------------# + +getSiftPase1CntCPLEX <- function(env, lp) { + + spcnt <- .Call("getSiftPase1Cnt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(spcnt) +} + + +#------------------------------------------------------------------------------# + +getDbsCntCPLEX <- function(env, lp) { + + dcnt <- .Call("getDbsCnt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(dcnt) +} + + +#------------------------------------------------------------------------------# + +# feasOptCPLEX <- function(env, lp, +# rhs = NULL, rng = NULL, lb = NULL, ub = NULL) { +# +# if (is.null(rhs)) { +# Crhs <- as.null(rhs) +# } +# else { +# Crhs <- as.numeric(rhs) +# } +# +# if (is.null(rng)) { +# Crng <- as.null(rng) +# } +# else { +# Crng <- as.numeric(rng) +# } +# +# if (is.null(lb)) { +# Clb <- as.null(lb) +# } +# else { +# Clb <- as.numeric(lb) +# } +# +# if (is.null(ub)) { +# Cub <- as.null(ub) +# } +# else { +# Cub <- as.numeric(ub) +# } +# +# status <- .Call("feasOpt", PACKAGE = "cplexAPI", +# env, lp, +# Crhs, Crng, Clb, Cub +# ) +# +# return(status) +# } + +feasOptCPLEX <- function(env, lp, + rhs = FALSE, rng = FALSE, lb = FALSE, ub = FALSE) { + + status <- .Call("feasOpt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.logical(rhs), + as.logical(rng), + as.logical(lb), + as.logical(ub) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getColInfeasCPLEX <- function(env, lp, begin, end, sol = NULL) { + + if (is.null(sol)) { + Csol <- as.null(sol) + } + else { + Csol <- as.numeric(sol) + } + + colinfeas <- .Call("getColInfeas", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + Csol, + as.integer(begin), + as.integer(end) + ) + + return(cplexError(colinfeas)) +} + + +#------------------------------------------------------------------------------# + +getRowInfeasCPLEX <- function(env, lp, begin, end, sol = NULL) { + + if (is.null(sol)) { + Csol <- as.null(sol) + } + else { + Csol <- as.numeric(sol) + } + + rowinfeas <- .Call("getRowInfeas", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + Csol, + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rowinfeas)) +} + + +#------------------------------------------------------------------------------# + +refineConflictCPLEX <- function(env, lp) { + + rcconf <- .Call("refineConflict", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(rcconf)) +} + + +#------------------------------------------------------------------------------# + +refineConflictExtCPLEX <- function(env, lp, grpcnt, concnt, + grppref, grpbeg, grpind, grptype) { + + status <- .Call("refineConflictExt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(grpcnt), + as.integer(concnt), + as.numeric(grppref), + as.integer(grpbeg), + as.integer(grpind), + as.character(paste(grptype, collapse = "")) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getConflictCPLEX <- function(env, lp) { + + confl <- .Call("getConflict", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + +# if ( (is(confl, "cpxerr")) || (is.null(confl)) ) { +# trimconfl <- confl +# } +# else { +# trimconfl <- list(confstat = confl$confstat, +# rowind = confl$rowind[1:confl$confnumrows], +# rowbdstat = confl$rowbdstat[1:confl$confnumrows], +# colind = confl$colind[1:confl$confnumcols], +# colbdstat = confl$colbdstat[1:confl$confnumcols]) +# } +# +# return(trimconfl) + + return(cplexError(confl)) +} + + +#------------------------------------------------------------------------------# + +getConflictExtCPLEX <- function(env, lp, begin, end) { + + confle <- .Call("getConflictExt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(confle)) +} + + +#------------------------------------------------------------------------------# + +cLpWriteCPLEX <- function(env, lp, fname) { + + status <- .Call("cLpWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +freePresolveCPLEX <- function(env, lp) { + + status <- .Call("freePresolve", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getMethodCPLEX <- function(env, lp) { + + method <- .Call("getMethod", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(method) +} + + +#------------------------------------------------------------------------------# + +getSubMethodCPLEX <- function(env, lp) { + + submethod <- .Call("getSubMethod", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(submethod) +} + + +#------------------------------------------------------------------------------# + +getDblQualCPLEX <- function(env, lp, w) { + + dqual <- .Call("getDblQual", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(w) + ) + + return(cplexError(dqual)) +} + + +#------------------------------------------------------------------------------# + +getIntQualCPLEX <- function(env, lp, w) { + + iqual <- .Call("getIntQual", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(w) + ) + + return(cplexError(iqual)) +} + + +#------------------------------------------------------------------------------# + +solnInfoCPLEX <- function(env, lp) { + + solinf <- .Call("solnInfo", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(solinf)) +} + + +#------------------------------------------------------------------------------# + +solutionCPLEX <- function(env, lp) { + + sol <- .Call("solution", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(sol)) +} + + +#------------------------------------------------------------------------------# + +solWriteCPLEX <- function(env, lp, fname) { + + status <- .Call("solWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +readCopySolCPLEX <- function(env, lp, fname) { + + status <- .Call("readCopySol", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getStatCPLEX <- function(env, lp) { + + stat <- .Call("getStat", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(stat) +} + + +#------------------------------------------------------------------------------# + +getSubStatCPLEX <- function(env, lp) { + + substat <- .Call("getSubStat", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(substat) +} + + +#------------------------------------------------------------------------------# + +getObjValCPLEX <- function(env, lp) { + + obj <- .Call("getObjVal", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(obj)) +} + + +#------------------------------------------------------------------------------# + +getBestObjValCPLEX <- function(env, lp) { + + obj <- .Call("getBestObjVal", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(obj)) +} + + +#------------------------------------------------------------------------------# + +getMIPrelGapCPLEX <- function(env, lp) { + + gap <- .Call("getMIPrelGap", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(gap)) +} + + +#------------------------------------------------------------------------------# + +getProbVarCPLEX <- function(env, lp, begin, end) { + + xval <- .Call("getProbVar", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(xval)) +} + + +#------------------------------------------------------------------------------# + +getSlackCPLEX <- function(env, lp, begin, end) { + + slack <- .Call("getSlack", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(slack)) +} + + +#------------------------------------------------------------------------------# + +getPiCPLEX <- function(env, lp, begin, end) { + + pi <- .Call("getPi", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(pi)) +} + + +#------------------------------------------------------------------------------# + +getDjCPLEX <- function(env, lp, begin, end) { + + dj <- .Call("getDj", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(dj)) +} + + +#------------------------------------------------------------------------------# + +boundSaCPLEX <- function(env, lp, begin, end) { + + bndsa <- .Call("boundSa", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(bndsa)) +} + + +#------------------------------------------------------------------------------# + +objSaCPLEX <- function(env, lp, begin, end) { + + osa <- .Call("objSa", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(osa)) +} + + +#------------------------------------------------------------------------------# + +rhsSaCPLEX <- function(env, lp, begin, end) { + + rsa <- .Call("rhsSa", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rsa)) +} + + +#------------------------------------------------------------------------------# + +openFileCPLEX <- function(fname, ftype = "w", ptrtype = "cplex_file") { + + cpfile <- .Call("cplexfopen", PACKAGE = "cplexAPI", + as.character(fname), + as.character(ftype), + as.character(ptrtype) + ) + + cpfileP <- cplex_FilePointer(cpfile) + + return(cpfileP) +} + + +#------------------------------------------------------------------------------# + +closeFileCPLEX <- function(cpfile) { + + status <- .Call("cplexfclose", PACKAGE = "cplexAPI", + cplexPointer(cpfile) + ) + + return(cplexError(status)) +} + + +#------------------------------------------------------------------------------# + +fileputCPLEX <- function(cpfile, stuff = "") { + + status <- .Call("fileput", PACKAGE = "cplexAPI", + cplexPointer(cpfile), + as.character(stuff) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +setLogFileCPLEX <- function(env, cpfile = NULL) { + + if (is.null(cpfile)) { + Ccpfile <- as.null(cpfile) + } + else { + Ccpfile <- cplexPointer(cpfile) + } + + status <- .Call("setLogFile", PACKAGE = "cplexAPI", + cplexPointer(env), + Ccpfile + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getLogFileCPLEX <- function(env, ptrtype = "cplex_file") { + + cpfile <- .Call("getLogFile", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(ptrtype) + ) + + cpfileP <- cplex_FilePointer(cpfile) + + return(cplexError(cpfileP)) + +} + + +#------------------------------------------------------------------------------# + +getChannelsCPLEX <- function(env, ptrtype = "cplex_chan") { + + channels <- .Call("getChannels", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(ptrtype) + ) + + chanNames <- c("cpxresults", "cpxwarning", "cpxerror", "cpxlog") + chanP <- mapply(cplex_ChannelPointer, + chname = chanNames, + MoreArgs = list(pointer = channels)) + + return(cplexError(chanP)) +} + + +#------------------------------------------------------------------------------# + +flushStdChannelsCPLEX <- function(env) { + + status <- .Call("flushStdChannels", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +addChannelCPLEX <- function(env, ptrtype = "cplex_chan") { + + newch <- .Call("addChannel", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(ptrtype) + ) + + newchP <- cplex_ChannelPointer(newch) + + return(newchP) +} + + +#------------------------------------------------------------------------------# + +delChannelCPLEX <- function(env, newch) { + + invisible( + .Call("delChannel", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(newch) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +disconnectChannelCPLEX <- function(env, newch) { + + invisible( + .Call("disconnectChannel", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(newch) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +flushChannelCPLEX <- function(env, newch) { + + invisible( + .Call("flushChannel", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(newch) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +addFpDestCPLEX <- function(env, newch, cpfile) { + + status <- .Call("addFpDest", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(newch), + cplexPointer(cpfile) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +delFpDestCPLEX <- function(env, newch, cpfile) { + + status <- .Call("delFpDest", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(newch), + cplexPointer(cpfile) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getTimeCPLEX <- function(env) { + + timest <- .Call("getTime", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(cplexError(timest)) +} + + +#------------------------------------------------------------------------------# + +tuneParmCPLEX <- function(env, lp, + nIntP = 0, intP = NULL, intPv = NULL, + nDblP = 0, dblP = NULL, dblPv = NULL, + nStrP = 0, strP = NULL, strPv = NULL) { + + if (is.null(intP)) { + CintP <- as.null(intP) + } + else { + CintP <- as.integer(intP) + } + + if (is.null(intPv)) { + CintPv <- as.null(intPv) + } + else { + CintPv <- as.integer(intPv) + } + + if (is.null(dblP)) { + CdblP <- as.null(dblP) + } + else { + CdblP <- as.integer(dblP) + } + + if (is.null(dblPv)) { + CdblPv <- as.null(dblPv) + } + else { + CdblPv <- as.numeric(dblPv) + } + + if (is.null(strP)) { + CstrP <- as.null(strP) + } + else { + CstrP <- as.integer(strP) + } + + if (is.null(strPv)) { + CstrPv <- as.null(strPv) + } + else { + CstrPv <- as.character(strPv) + } + + tstat <- .Call("tuneParam", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nIntP), + CintP, CintPv, + as.integer(nDblP), + CdblP, CdblPv, + as.integer(nStrP), + CstrP, CstrPv + ) + + return(cplexError(tstat)) +} + + +#------------------------------------------------------------------------------# + +setTerminateCPLEX <- function(env, ptrtype = "cplex_term") { + + term <- .Call("setTerminate", PACKAGE = "cplexAPI", + cplexPointer(env), + as.character(ptrtype) + ) + + termP <- cplex_TermPointer(term) + + return(cplexError(termP)) +} + + +#------------------------------------------------------------------------------# + +delTerminateCPLEX <- function(env, tsig) { + + status <- .Call("delTerminate", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(tsig) + ) + + return(status) + +} + + +#------------------------------------------------------------------------------# + +chgTerminateCPLEX <- function(env, tval = 1) { + invisible( + .Call("chgTerminate", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(tval) + ) + ) +} + + +#------------------------------------------------------------------------------# + +printTerminateCPLEX <- function(env) { + + invisible(.Call("printTerminate", cplexPointer(env), PACKAGE = "cplexAPI")) + +} + + +#------------------------------------------------------------------------------# + +addMIPstartsCPLEX <- function(env, lp, mcnt, nzcnt, beg, varindices, + values, effortlevel, mipstartname = NULL) { + + if (is.null(mipstartname)) { + Cmipstartname <- as.null(mipstartname) + } + else { + Cmipstartname <- as.character(mipstartname) + } + + status <- .Call("addMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(mcnt), + as.integer(nzcnt), + as.integer(beg), + as.integer(varindices), + as.numeric(values), + as.integer(effortlevel), + Cmipstartname + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +chgMIPstartsCPLEX <- function(env, lp, mcnt, mipstartindices, nzcnt, + beg, varindices, values, effortlevel) { + + status <- .Call("chgMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(mcnt), + as.integer(mipstartindices), + as.integer(nzcnt), + as.integer(beg), + as.integer(varindices), + as.numeric(values), + as.integer(effortlevel) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getMIPstartsCPLEX <- function(env, lp, begin, end) { + + mips <- .Call("getMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(mips)) +} + + +#------------------------------------------------------------------------------# + +getNumMIPstartsCPLEX <- function(env, lp) { + + nmips <- .Call("getNumMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(nmips) +} + + +#------------------------------------------------------------------------------# + +delMIPstartsCPLEX <- function(env, lp, begin, end) { + + status <- .Call("delMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +writeMIPstartsCPLEX <- function(env, lp, fname, begin, end) { + + status <- .Call("writeMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname), + as.integer(begin), + as.integer(end) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +readCopyMIPstartsCPLEX <- function(env, lp, fname) { + + status <- .Call("readCopyMIPstarts", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getMIPstartNameCPLEX <- function(env, lp, begin, end) { + + rname <- .Call("getMIPstartName", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(rname)) +} + + +#------------------------------------------------------------------------------# + +getMIPstartIndexCPLEX <- function(env, lp, iname) { + + rindex <- .Call("getMIPstartIndex", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(iname) + ) + + return(cplexError(rindex)) +} + + +#------------------------------------------------------------------------------# + +refineMIPstartConflictCPLEX <- function(env, lp, mipstartindex) { + + rcconf <- .Call("refineMIPstartConflict", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(mipstartindex) + ) + + return(cplexError(rcconf)) +} + + +#------------------------------------------------------------------------------# + +refineMIPstartConflictExtCPLEX <- function(env, lp, mipstartindex, grpcnt, + concnt, grppref, grpbeg, grpind, + grptype) { + + status <- .Call("refineMIPstartConflictExt", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(mipstartindex), + as.integer(grpcnt), + as.integer(concnt), + as.numeric(grppref), + as.integer(grpbeg), + as.integer(grpind), + as.character(paste(grptype, collapse = "")) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getNumQPnzCPLEX <- function(env, lp) { + + nnz <- .Call("getNumQPnz", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(nnz) +} + + +#------------------------------------------------------------------------------# + +getNumQuadCPLEX <- function(env, lp) { + + nq <- .Call("getNumQuad", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(nq) +} + + +#------------------------------------------------------------------------------# + +getQPcoefCPLEX <- function(env, lp, i, j) { + + qcoef <- .Call("getQPcoef", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(i), + as.integer(j) + ) + + return(cplexError(qcoef)) +} + + +#------------------------------------------------------------------------------# + +getQuadCPLEX <- function(env, lp, begin, end) { + + cols <- .Call("getQuad", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(cols)) +} + + +#------------------------------------------------------------------------------# + +copyOrderCPLEX <- function(env, lp, cnt, indices, + priority = NULL, direction = NULL) { + + if (is.null(priority)) { + Cpriority <- as.null(priority) + } + else { + Cpriority <- as.integer(priority) + } + + if (is.null(direction)) { + Cdirection <- as.null(direction) + } + else { + Cdirection <- as.integer(direction) + } + + status <- .Call("copyOrder", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(cnt), + as.integer(indices), + Cpriority, + Cdirection + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getOrderCPLEX <- function(env, lp) { + + cols <- .Call("getOrder", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp) + ) + + return(cplexError(cols)) +} + + +#------------------------------------------------------------------------------# + +ordWriteCPLEX <- function(env, lp, fname) { + + status <- .Call("ordWrite", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +readCopyOrderCPLEX <- function(env, lp, fname) { + + status <- .Call("readCopyOrder", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(fname) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +addQConstrCPLEX <- function(env, lp, lzn, qzn, rhs, sense, + lind = NULL, lval = NULL, + qrow, qcol, qval, qname = NULL) { + + stopifnot(sense %in% c("L", "G")) + + if (is.null(lind)) { + Clind <- as.null(lind) + } + else { + Clind <- as.integer(lind) + } + + if (is.null(lval)) { + Clval <- as.null(lval) + } + else { + Clval <- as.numeric(lval) + } + + if (is.null(qname)) { + Cqname <- as.null(qname) + } + else { + Cqname <- as.character(qname) + } + + status <- .Call("addQConstr", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(lzn), + as.integer(qzn), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + Clind, + Clval, + as.integer(qrow), + as.integer(qcol), + as.numeric(qval), + Cqname + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +delQConstrsCPLEX <- function(env, lp, begin, end) { + + dq <- .Call("delQConstrs", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(dq)) +} + + +#------------------------------------------------------------------------------# + +getQConstrCPLEX <- function(env, lp, which) { + + qc <- .Call("getQConstr", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(which) + ) + + return(cplexError(qc)) +} + + +#------------------------------------------------------------------------------# + +addIndConstrCPLEX <- function(env, lp, indvar, complemented, nzcnt, rhs, + sense, linind, linval, indname = NULL) { + + if (is.null(indname)) { + Cindname <- as.null(indname) + } + else { + Cindname <- as.character(indname) + } + + stopifnot(sense %in% c("L", "G", "E")) + + status <- .Call("addIndConstr", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(indvar), + as.integer(complemented), + as.integer(nzcnt), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + as.integer(linind), + as.numeric(linval), + Cindname + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +delIndConstrsCPLEX <- function(env, lp, begin, end) { + + di <- .Call("delIndConstrs", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(begin), + as.integer(end) + ) + + return(cplexError(di)) +} + + +#------------------------------------------------------------------------------# + +getIndConstrCPLEX <- function(env, lp, which) { + + ic <- .Call("getIndConstr", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(which) + ) + + return(cplexError(ic)) +} diff --git a/R/cplexConst.R b/R/cplexConst.R new file mode 100644 index 0000000..0f79cac --- /dev/null +++ b/R/cplexConst.R @@ -0,0 +1,861 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplexConst.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# global variables (from cpxconst.h [12.6.0.0]) # +#------------------------------------------------------------------------------# + +# CPX_INFBOUND: Any bound bigger than this is treated as infinity +CPX_INFBOUND <- 1.0E+20 + +CPX_STR_PARAM_MAX <- 512 + + +# Types of parameters +CPX_PARAMTYPE_NONE <- 0L +CPX_PARAMTYPE_INT <- 1L +CPX_PARAMTYPE_DOUBLE <- 2L +CPX_PARAMTYPE_STRING <- 3L +CPX_PARAMTYPE_LONG <- 4L + + +#------------------------------------------------------------------------------# +# Values returned for 'stat' by solution +CPX_STAT_OPTIMAL <- 1L +CPX_STAT_UNBOUNDED <- 2L +CPX_STAT_INFEASIBLE <- 3L +CPX_STAT_INForUNBD <- 4L +CPX_STAT_OPTIMAL_INFEAS <- 5L +CPX_STAT_NUM_BEST <- 6L +CPX_STAT_ABORT_IT_LIM <- 10L +CPX_STAT_ABORT_TIME_LIM <- 11L +CPX_STAT_ABORT_OBJ_LIM <- 12L +CPX_STAT_ABORT_USER <- 13L +CPX_STAT_FEASIBLE_RELAXED_SUM <- 14L +CPX_STAT_OPTIMAL_RELAXED_SUM <- 15L +CPX_STAT_FEASIBLE_RELAXED_INF <- 16L +CPX_STAT_OPTIMAL_RELAXED_INF <- 17L +CPX_STAT_FEASIBLE_RELAXED_QUAD <- 18L +CPX_STAT_OPTIMAL_RELAXED_QUAD <- 19L +CPX_STAT_FEASIBLE <- 23L +CPX_STAT_ABORT_DETTIME_LIM <- 25L + + +#------------------------------------------------------------------------------# +# Solution type return values from CPXsolninfo +CPX_NO_SOLN <- 0L +CPX_BASIC_SOLN <- 1L +CPX_NONBASIC_SOLN <- 2L +CPX_PRIMAL_SOLN <- 3L + + +#------------------------------------------------------------------------------# +# Values of presolve 'stats' for columns and rows +CPX_PRECOL_LOW <- -1L # fixed to original lb +CPX_PRECOL_UP <- -2L # fixed to original ub +CPX_PRECOL_FIX <- -3L # fixed to some other value +CPX_PRECOL_AGG <- -4L # aggregated y = a*x + b +CPX_PRECOL_OTHER <- -5L # cannot be expressed by a linear combination + # of active variables in the presolved model + # -> crushing will fail if it has to touch + # such a variable + +CPX_PREROW_RED <- -1L # redundant row removed in presolved model +CPX_PREROW_AGG <- -2L # used to aggregate a variable +CPX_PREROW_OTHER <- -3L # other, for example merge two inequalities + # into a single equation + +#------------------------------------------------------------------------------# +# Generic constants +CPX_ON <- 1L +CPX_OFF <- 0L +CPX_MAX <- -1L +CPX_MIN <- 1L + + +#------------------------------------------------------------------------------# +# Primal simplex pricing algorithm +CPX_PPRIIND_PARTIAL <- -1L +CPX_PPRIIND_AUTO <- 0L +CPX_PPRIIND_DEVEX <- 1L +CPX_PPRIIND_STEEP <- 2L +CPX_PPRIIND_STEEPQSTART <- 3L +CPX_PPRIIND_FULL <- 4L + + +#------------------------------------------------------------------------------# +# Dual simplex pricing algorithm +CPX_DPRIIND_AUTO <- 0L +CPX_DPRIIND_FULL <- 1L +CPX_DPRIIND_STEEP <- 2L +CPX_DPRIIND_FULL_STEEP <- 3L +CPX_DPRIIND_STEEPQSTART <- 4L +CPX_DPRIIND_DEVEX <- 5L + + +#------------------------------------------------------------------------------# +# PARALLELMODE values +CPX_PARALLEL_DETERMINISTIC <- 1L +CPX_PARALLEL_AUTO <- 0L +CPX_PARALLEL_OPPORTUNISTIC <- -1L + + +#------------------------------------------------------------------------------# +# Values for CPX_PARAM_WRITELEVEL +CPX_WRITELEVEL_AUTO <- 0L +CPX_WRITELEVEL_ALLVARS <- 1L +CPX_WRITELEVEL_DISCRETEVARS <- 2L +CPX_WRITELEVEL_NONZEROVARS <- 3L +CPX_WRITELEVEL_NONZERODISCRETEVARS <- 4L + + +#------------------------------------------------------------------------------# +# Values for CPX_PARAM_SOLUTIONTARGET +CPX_SOLUTIONTARGET_AUTO <- 0L +CPX_SOLUTIONTARGET_OPTIMALCONVEX <- 1L +CPX_SOLUTIONTARGET_FIRSTORDER <- 2L +CPX_SOLUTIONTARGET_OPTIMALGLOBAL <- 3L + + +#------------------------------------------------------------------------------# +# LP/QP solution algorithms, used as possible values for +# CPX_PARAM_LPMETHOD/CPX_PARAM_QPMETHOD/CPX_PARAM_BARCROSSALG/ +# CPXgetmethod/... +CPX_ALG_NONE <- -1L +CPX_ALG_AUTOMATIC <- 0L +CPX_ALG_PRIMAL <- 1L +CPX_ALG_DUAL <- 2L +CPX_ALG_NET <- 3L +CPX_ALG_BARRIER <- 4L +CPX_ALG_SIFTING <- 5L +CPX_ALG_CONCURRENT <- 6L +CPX_ALG_BAROPT <- 7L +CPX_ALG_PIVOTIN <- 8L +CPX_ALG_PIVOTOUT <- 9L +CPX_ALG_PIVOT <- 10L +CPX_ALG_FEASOPT <- 11L +CPX_ALG_MIP <- 12L +CPX_ALG_ROBUST <- 13L + + +#------------------------------------------------------------------------------# +# Basis status values +CPX_AT_LOWER <- 0L +CPX_BASIC <- 1L +CPX_AT_UPPER <- 2L +CPX_FREE_SUPER <- 3L + + +#------------------------------------------------------------------------------# +# Variable types for ctype array +CPX_CONTINUOUS <- "C" +CPX_BINARY <- "B" +CPX_INTEGER <- "I" +CPX_SEMICONT <- "S" +CPX_SEMIINT <- "N" + + +#------------------------------------------------------------------------------# +# PREREDUCE settings +CPX_PREREDUCE_PRIMALANDDUAL <- 3L +CPX_PREREDUCE_DUALONLY <- 2L +CPX_PREREDUCE_PRIMALONLY <- 1L +CPX_PREREDUCE_NOPRIMALORDUAL <- 0L + + +#------------------------------------------------------------------------------# +# Conflict statuses +CPX_STAT_CONFLICT_FEASIBLE <- 30L +CPX_STAT_CONFLICT_MINIMAL <- 31L +CPX_STAT_CONFLICT_ABORT_CONTRADICTION <- 32L +CPX_STAT_CONFLICT_ABORT_TIME_LIM <- 33L +CPX_STAT_CONFLICT_ABORT_IT_LIM <- 34L +CPX_STAT_CONFLICT_ABORT_NODE_LIM <- 35L +CPX_STAT_CONFLICT_ABORT_OBJ_LIM <- 36L +CPX_STAT_CONFLICT_ABORT_MEM_LIM <- 37L +CPX_STAT_CONFLICT_ABORT_USER <- 38L +CPX_STAT_CONFLICT_ABORT_DETTIME_LIM <- 39L + + +#------------------------------------------------------------------------------# +# Conflict status values +CPX_CONFLICT_EXCLUDED <- -1L +CPX_CONFLICT_POSSIBLE_MEMBER <- 0L +CPX_CONFLICT_POSSIBLE_LB <- 1L +CPX_CONFLICT_POSSIBLE_UB <- 2L +CPX_CONFLICT_MEMBER <- 3L +CPX_CONFLICT_LB <- 4L +CPX_CONFLICT_UB <- 5L + + +#------------------------------------------------------------------------------# +# Problem Types +# Types 4, 9, and 12 are internal, the others are for users +CPXPROB_LP <- 0L +CPXPROB_MILP <- 1L +CPXPROB_FIXEDMILP <- 3L +CPXPROB_NODELP <- 4L +CPXPROB_QP <- 5L +CPXPROB_MIQP <- 7L +CPXPROB_FIXEDMIQP <- 8L +CPXPROB_NODEQP <- 9L +CPXPROB_QCP <- 10L +CPXPROB_MIQCP <- 11L +CPXPROB_NODEQCP <- 12L + + +#------------------------------------------------------------------------------# +# CPLEX Parameter numbers +CPX_PARAM_ADVIND <- 1001L +CPX_PARAM_AGGFILL <- 1002L +CPX_PARAM_AGGIND <- 1003L +CPX_PARAM_BASINTERVAL <- 1004L +CPX_PARAM_CFILEMUL <- 1005L +CPX_PARAM_CLOCKTYPE <- 1006L +CPX_PARAM_CRAIND <- 1007L +CPX_PARAM_DEPIND <- 1008L +CPX_PARAM_DPRIIND <- 1009L +CPX_PARAM_PRICELIM <- 1010L +CPX_PARAM_EPMRK <- 1013L +CPX_PARAM_EPOPT <- 1014L +CPX_PARAM_EPPER <- 1015L +CPX_PARAM_EPRHS <- 1016L +CPX_PARAM_FASTMIP <- 1017L +CPX_PARAM_SIMDISPLAY <- 1019L +CPX_PARAM_ITLIM <- 1020L +CPX_PARAM_ROWREADLIM <- 1021L +CPX_PARAM_NETFIND <- 1022L +CPX_PARAM_COLREADLIM <- 1023L +CPX_PARAM_NZREADLIM <- 1024L +CPX_PARAM_OBJLLIM <- 1025L +CPX_PARAM_OBJULIM <- 1026L +CPX_PARAM_PERIND <- 1027L +CPX_PARAM_PERLIM <- 1028L +CPX_PARAM_PPRIIND <- 1029L +CPX_PARAM_PREIND <- 1030L +CPX_PARAM_REINV <- 1031L +CPX_PARAM_REVERSEIND <- 1032L +CPX_PARAM_RFILEMUL <- 1033L +CPX_PARAM_SCAIND <- 1034L +CPX_PARAM_SCRIND <- 1035L +CPX_PARAM_SINGLIM <- 1037L +CPX_PARAM_SINGTOL <- 1038L +CPX_PARAM_TILIM <- 1039L +CPX_PARAM_XXXIND <- 1041L +CPX_PARAM_PREDUAL <- 1044L +CPX_PARAM_EPOPT_H <- 1049L +CPX_PARAM_EPRHS_H <- 1050L +CPX_PARAM_PREPASS <- 1052L +CPX_PARAM_DATACHECK <- 1056L +CPX_PARAM_REDUCE <- 1057L +CPX_PARAM_PRELINEAR <- 1058L +CPX_PARAM_LPMETHOD <- 1062L +CPX_PARAM_QPMETHOD <- 1063L +CPX_PARAM_WORKDIR <- 1064L +CPX_PARAM_WORKMEM <- 1065L +CPX_PARAM_THREADS <- 1067L +CPX_PARAM_CONFLICTDISPLAY <- 1074L +CPX_PARAM_SIFTDISPLAY <- 1076L +CPX_PARAM_SIFTALG <- 1077L +CPX_PARAM_SIFTITLIM <- 1078L +CPX_PARAM_MPSLONGNUM <- 1081L +CPX_PARAM_MEMORYEMPHASIS <- 1082L +CPX_PARAM_NUMERICALEMPHASIS <- 1083L +CPX_PARAM_FEASOPTMODE <- 1084L +CPX_PARAM_PARALLELMODE <- 1109L +CPX_PARAM_TUNINGMEASURE <- 1110L +CPX_PARAM_TUNINGREPEAT <- 1111L +CPX_PARAM_TUNINGTILIM <- 1112L +CPX_PARAM_TUNINGDISPLAY <- 1113L +CPX_PARAM_WRITELEVEL <- 1114L +CPX_PARAM_RANDOMSEED <- 1124L +CPX_PARAM_DETTILIM <- 1127L +CPX_PARAM_FILEENCODING <- 1129L +CPX_PARAM_APIENCODING <- 1130L +CPX_PARAM_SOLUTIONTARGET <- 1131L +CPX_PARAM_CLONELOG <- 1132L +CPX_PARAM_TUNINGDETTILIM <- 1139L + +# Barrier is in bardefs.h, MIP is in mipdefs.h, QP is in qpdefs.h +CPX_PARAM_ALL_MIN <- 1000L +CPX_PARAM_ALL_MAX <- 6000L + + +#------------------------------------------------------------------------------# +# Values for CPX_PARAM_TUNINGMEASURE +CPX_TUNE_AVERAGE <- 1L +CPX_TUNE_MINMAX <- 2L + + +#------------------------------------------------------------------------------# +# Values for incomplete tuning +CPX_TUNE_ABORT <- 1L +CPX_TUNE_TILIM <- 2L +CPX_TUNE_DETTILIM <- 3L + + +#------------------------------------------------------------------------------# +# Quality query identifiers +CPX_MAX_PRIMAL_INFEAS <- 1L +CPX_MAX_SCALED_PRIMAL_INFEAS <- 2L +CPX_SUM_PRIMAL_INFEAS <- 3L +CPX_SUM_SCALED_PRIMAL_INFEAS <- 4L +CPX_MAX_DUAL_INFEAS <- 5L +CPX_MAX_SCALED_DUAL_INFEAS <- 6L +CPX_SUM_DUAL_INFEAS <- 7L +CPX_SUM_SCALED_DUAL_INFEAS <- 8L +CPX_MAX_INT_INFEAS <- 9L +CPX_SUM_INT_INFEAS <- 10L +CPX_MAX_PRIMAL_RESIDUAL <- 11L +CPX_MAX_SCALED_PRIMAL_RESIDUAL <- 12L +CPX_SUM_PRIMAL_RESIDUAL <- 13L +CPX_SUM_SCALED_PRIMAL_RESIDUAL <- 14L +CPX_MAX_DUAL_RESIDUAL <- 15L +CPX_MAX_SCALED_DUAL_RESIDUAL <- 16L +CPX_SUM_DUAL_RESIDUAL <- 17L +CPX_SUM_SCALED_DUAL_RESIDUAL <- 18L +CPX_MAX_COMP_SLACK <- 19L +CPX_SUM_COMP_SLACK <- 21L +CPX_MAX_X <- 23L +CPX_MAX_SCALED_X <- 24L +CPX_MAX_PI <- 25L +CPX_MAX_SCALED_PI <- 26L +CPX_MAX_SLACK <- 27L +CPX_MAX_SCALED_SLACK <- 28L +CPX_MAX_RED_COST <- 29L +CPX_MAX_SCALED_RED_COST <- 30L +CPX_SUM_X <- 31L +CPX_SUM_SCALED_X <- 32L +CPX_SUM_PI <- 33L +CPX_SUM_SCALED_PI <- 34L +CPX_SUM_SLACK <- 35L +CPX_SUM_SCALED_SLACK <- 36L +CPX_SUM_RED_COST <- 37L +CPX_SUM_SCALED_RED_COST <- 38L +CPX_KAPPA <- 39L +CPX_OBJ_GAP <- 40L +CPX_DUAL_OBJ <- 41L +CPX_PRIMAL_OBJ <- 42L +CPX_MAX_QCPRIMAL_RESIDUAL <- 43L +CPX_SUM_QCPRIMAL_RESIDUAL <- 44L +CPX_MAX_QCSLACK_INFEAS <- 45L +CPX_SUM_QCSLACK_INFEAS <- 46L +CPX_MAX_QCSLACK <- 47L +CPX_SUM_QCSLACK <- 48L +CPX_MAX_INDSLACK_INFEAS <- 49L +CPX_SUM_INDSLACK_INFEAS <- 50L +CPX_EXACT_KAPPA <- 51L +CPX_KAPPA_STABLE <- 52L +CPX_KAPPA_SUSPICIOUS <- 53L +CPX_KAPPA_UNSTABLE <- 54L +CPX_KAPPA_ILLPOSED <- 55L +CPX_KAPPA_MAX <- 56L +CPX_KAPPA_ATTENTION <- 57L + + +#------------------------------------------------------------------------------# +# feasopt options +CPX_FEASOPT_MIN_SUM <- 0L +CPX_FEASOPT_OPT_SUM <- 1L +CPX_FEASOPT_MIN_INF <- 2L +CPX_FEASOPT_OPT_INF <- 3L +CPX_FEASOPT_MIN_QUAD <- 4L +CPX_FEASOPT_OPT_QUAD <- 5L + + +#------------------------------------------------------------------------------# + +CPX_STAT_OPTIMAL_FACE_UNBOUNDED <- 20L +CPX_STAT_ABORT_PRIM_OBJ_LIM <- 21L +CPX_STAT_ABORT_DUAL_OBJ_LIM <- 22L +CPX_STAT_FIRSTORDER <- 24L + +# Barrier parameters +CPX_PARAM_BARDSTART <- 3001L +CPX_PARAM_BAREPCOMP <- 3002L +CPX_PARAM_BARGROWTH <- 3003L +CPX_PARAM_BAROBJRNG <- 3004L +CPX_PARAM_BARPSTART <- 3005L +CPX_PARAM_BARALG <- 3007L +CPX_PARAM_BARCOLNZ <- 3009L +CPX_PARAM_BARDISPLAY <- 3010L +CPX_PARAM_BARITLIM <- 3012L +CPX_PARAM_BARMAXCOR <- 3013L +CPX_PARAM_BARORDER <- 3014L +CPX_PARAM_BARSTARTALG <- 3017L +CPX_PARAM_BARCROSSALG <- 3018L +CPX_PARAM_BARQCPEPCOMP <- 3020L + +# Optimizing Problems +CPX_BARORDER_AUTO <- 0L +CPX_BARORDER_AMD <- 1L +CPX_BARORDER_AMF <- 2L +CPX_BARORDER_ND <- 3L + + +#------------------------------------------------------------------------------# + +# MIP emphasis settings +CPX_MIPEMPHASIS_BALANCED <- 0L +CPX_MIPEMPHASIS_FEASIBILITY <- 1L +CPX_MIPEMPHASIS_OPTIMALITY <- 2L +CPX_MIPEMPHASIS_BESTBOUND <- 3L +CPX_MIPEMPHASIS_HIDDENFEAS <- 4L + +# Values for sostype and branch type +CPX_TYPE_VAR <- "0" +CPX_TYPE_SOS1 <- "1" +CPX_TYPE_SOS2 <- "2" +CPX_TYPE_USER <- "X" +CPX_TYPE_ANY <- "A" + +# Variable selection values +CPX_VARSEL_MININFEAS <- -1L +CPX_VARSEL_DEFAULT <- 0L +CPX_VARSEL_MAXINFEAS <- 1L +CPX_VARSEL_PSEUDO <- 2L +CPX_VARSEL_STRONG <- 3L +CPX_VARSEL_PSEUDOREDUCED <- 4L + +# Node selection values +CPX_NODESEL_DFS <- 0L +CPX_NODESEL_BESTBOUND <- 1L +CPX_NODESEL_BESTEST <- 2L +CPX_NODESEL_BESTEST_ALT <- 3L + +# Values for generated priority order +CPX_MIPORDER_COST <- 1L +CPX_MIPORDER_BOUNDS <- 2L +CPX_MIPORDER_SCALEDCOST <- 3L + +# Values for direction array +CPX_BRANCH_GLOBAL <- 0L +CPX_BRANCH_DOWN <- -1L +CPX_BRANCH_UP <- 1L + +# Values for CPX_PARAM_BRDIR +CPX_BRDIR_DOWN <- -1L +CPX_BRDIR_AUTO <- 0L +CPX_BRDIR_UP <- 1L + +# Values for CPX_PARAM_MIPSEARCH +CPX_MIPSEARCH_AUTO <- 0L +CPX_MIPSEARCH_TRADITIONAL <- 1L +CPX_MIPSEARCH_DYNAMIC <- 2L + +# Values for CPX_PARAM_MIPKAPPASTATS +CPX_MIPKAPPA_OFF <- -1L +CPX_MIPKAPPA_AUTO <- 0L +CPX_MIPKAPPA_SAMPLE <- 1L +CPX_MIPKAPPA_FULL <- 2L + +# Effort levels for MIP starts +CPX_MIPSTART_AUTO <- 0L +CPX_MIPSTART_CHECKFEAS <- 1L +CPX_MIPSTART_SOLVEFIXED <- 2L +CPX_MIPSTART_SOLVEMIP <- 3L +CPX_MIPSTART_REPAIR <- 4L + +# MIP Problem status codes +CPXMIP_OPTIMAL <- 101L +CPXMIP_OPTIMAL_TOL <- 102L +CPXMIP_INFEASIBLE <- 103L +CPXMIP_SOL_LIM <- 104L +CPXMIP_NODE_LIM_FEAS <- 105L +CPXMIP_NODE_LIM_INFEAS <- 106L +CPXMIP_TIME_LIM_FEAS <- 107L +CPXMIP_TIME_LIM_INFEAS <- 108L +CPXMIP_FAIL_FEAS <- 109L +CPXMIP_FAIL_INFEAS <- 110L +CPXMIP_MEM_LIM_FEAS <- 111L +CPXMIP_MEM_LIM_INFEAS <- 112L +CPXMIP_ABORT_FEAS <- 113L +CPXMIP_ABORT_INFEAS <- 114L +CPXMIP_OPTIMAL_INFEAS <- 115L +CPXMIP_FAIL_FEAS_NO_TREE <- 116L +CPXMIP_FAIL_INFEAS_NO_TREE <- 117L +CPXMIP_UNBOUNDED <- 118L +CPXMIP_INForUNBD <- 119L +CPXMIP_FEASIBLE_RELAXED_SUM <- 120L +CPXMIP_OPTIMAL_RELAXED_SUM <- 121L +CPXMIP_FEASIBLE_RELAXED_INF <- 122L +CPXMIP_OPTIMAL_RELAXED_INF <- 123L +CPXMIP_FEASIBLE_RELAXED_QUAD <- 124L +CPXMIP_OPTIMAL_RELAXED_QUAD <- 125L +CPXMIP_ABORT_RELAXED <- 126L +CPXMIP_FEASIBLE <- 127L +CPXMIP_POPULATESOL_LIM <- 128L +CPXMIP_OPTIMAL_POPULATED <- 129L +CPXMIP_OPTIMAL_POPULATED_TOL <- 130L +CPXMIP_DETTIME_LIM_FEAS <- 131L +CPXMIP_DETTIME_LIM_INFEAS <- 132L + +# Valid purgeable values for adding usercuts and lazyconstraints +CPX_USECUT_FORCE <- 0L +CPX_USECUT_PURGE <- 1L +CPX_USECUT_FILTER <- 2L + +# For CPXgetnodeintfeas +CPX_INTEGER_FEASIBLE <- 0L +CPX_INTEGER_INFEASIBLE <- 1L +CPX_IMPLIED_INTEGER_FEASIBLE <- 2L + +# MIP Parameter numbers +CPX_PARAM_BRDIR <- 2001L +CPX_PARAM_BTTOL <- 2002L +CPX_PARAM_CLIQUES <- 2003L +CPX_PARAM_COEREDIND <- 2004L +CPX_PARAM_COVERS <- 2005L +CPX_PARAM_CUTLO <- 2006L +CPX_PARAM_CUTUP <- 2007L +CPX_PARAM_EPAGAP <- 2008L +CPX_PARAM_EPGAP <- 2009L +CPX_PARAM_EPINT <- 2010L +CPX_PARAM_MIPDISPLAY <- 2012L +CPX_PARAM_MIPINTERVAL <- 2013L +CPX_PARAM_INTSOLLIM <- 2015L +CPX_PARAM_NODEFILEIND <- 2016L +CPX_PARAM_NODELIM <- 2017L +CPX_PARAM_NODESEL <- 2018L +CPX_PARAM_OBJDIF <- 2019L +CPX_PARAM_MIPORDIND <- 2020L +CPX_PARAM_RELOBJDIF <- 2022L +CPX_PARAM_STARTALG <- 2025L +CPX_PARAM_SUBALG <- 2026L +CPX_PARAM_TRELIM <- 2027L +CPX_PARAM_VARSEL <- 2028L +CPX_PARAM_BNDSTRENIND <- 2029L +CPX_PARAM_HEURFREQ <- 2031L +CPX_PARAM_MIPORDTYPE <- 2032L +CPX_PARAM_CUTSFACTOR <- 2033L +CPX_PARAM_RELAXPREIND <- 2034L +CPX_PARAM_PRESLVND <- 2037L +CPX_PARAM_BBINTERVAL <- 2039L +CPX_PARAM_FLOWCOVERS <- 2040L +CPX_PARAM_IMPLBD <- 2041L +CPX_PARAM_PROBE <- 2042L +CPX_PARAM_GUBCOVERS <- 2044L +CPX_PARAM_STRONGCANDLIM <- 2045L +CPX_PARAM_STRONGITLIM <- 2046L +CPX_PARAM_FRACCAND <- 2048L +CPX_PARAM_FRACCUTS <- 2049L +CPX_PARAM_FRACPASS <- 2050L +CPX_PARAM_FLOWPATHS <- 2051L +CPX_PARAM_MIRCUTS <- 2052L +CPX_PARAM_DISJCUTS <- 2053L +CPX_PARAM_AGGCUTLIM <- 2054L +CPX_PARAM_MIPCBREDLP <- 2055L +CPX_PARAM_CUTPASS <- 2056L +CPX_PARAM_MIPEMPHASIS <- 2058L +CPX_PARAM_SYMMETRY <- 2059L +CPX_PARAM_DIVETYPE <- 2060L +CPX_PARAM_RINSHEUR <- 2061L +CPX_PARAM_SUBMIPNODELIM <- 2062L +CPX_PARAM_LBHEUR <- 2063L +CPX_PARAM_REPEATPRESOLVE <- 2064L +CPX_PARAM_PROBETIME <- 2065L +CPX_PARAM_POLISHTIME <- 2066L +CPX_PARAM_REPAIRTRIES <- 2067L +CPX_PARAM_EPLIN <- 2068L +CPX_PARAM_EPRELAX <- 2073L +CPX_PARAM_FPHEUR <- 2098L +CPX_PARAM_EACHCUTLIM <- 2102L +CPX_PARAM_SOLNPOOLCAPACITY <- 2103L +CPX_PARAM_SOLNPOOLREPLACE <- 2104L +CPX_PARAM_SOLNPOOLGAP <- 2105L +CPX_PARAM_SOLNPOOLAGAP <- 2106L +CPX_PARAM_SOLNPOOLINTENSITY <- 2107L +CPX_PARAM_POPULATELIM <- 2108L +CPX_PARAM_MIPSEARCH <- 2109L +CPX_PARAM_MIQCPSTRAT <- 2110L +CPX_PARAM_ZEROHALFCUTS <- 2111L +CPX_PARAM_POLISHAFTEREPAGAP <- 2126L +CPX_PARAM_POLISHAFTEREPGAP <- 2127L +CPX_PARAM_POLISHAFTERNODE <- 2128L +CPX_PARAM_POLISHAFTERINTSOL <- 2129L +CPX_PARAM_POLISHAFTERTIME <- 2130L +CPX_PARAM_MCFCUTS <- 2134L +CPX_PARAM_MIPKAPPASTATS <- 2137L +CPX_PARAM_AUXROOTTHREADS <- 2139L +CPX_PARAM_INTSOLFILEPREFIX <- 2143L +CPX_PARAM_PROBEDETTIME <- 2150L +CPX_PARAM_POLISHAFTERDETTIME <- 2151L +CPX_PARAM_LANDPCUTS <- 2152L +CPX_PARAM_RAMPUPDURATION <- 2163L +CPX_PARAM_RAMPUPDETTILIM <- 2164L +CPX_PARAM_RAMPUPTILIM <- 2165L + +# Values for CPX_PARAM_SOLNPOOLREPLACE +CPX_SOLNPOOL_FIFO <- 0L +CPX_SOLNPOOL_OBJ <- 1L +CPX_SOLNPOOL_DIV <- 2L + +CPX_SOLNPOOL_FILTER_DIVERSITY <- 1L +CPX_SOLNPOOL_FILTER_RANGE <- 2L + + +#------------------------------------------------------------------------------# + +CPX_CON_LOWER_BOUND <- 1L +CPX_CON_UPPER_BOUND <- 2L +CPX_CON_LINEAR <- 3L +CPX_CON_QUADRATIC <- 4L +CPX_CON_SOS <- 5L +CPX_CON_INDICATOR <- 6L + +# internal types +CPX_CON_MINEXPR <- 7L +CPX_CON_MAXEXPR <- 8L +CPX_CON_PWL <- 9L +CPX_CON_ABS <- 9L # same as PWL since using it +CPX_CON_DISJCST <- 10L +CPX_CON_INDDISJCST <- 11L +CPX_CON_SETVAR <- 12L +CPX_CON_SETVARMEMBER <- 13L +CPX_CON_SETVARCARD <- 14L +CPX_CON_SETVARSUM <- 15L +CPX_CON_SETVARMIN <- 16L +CPX_CON_SETVARMAX <- 17L +CPX_CON_SETVARSUBSET <- 18L +CPX_CON_SETVARDOMAIN <- 19L +CPX_CON_SETVARUNION <- 20L +CPX_CON_SETVARINTERSECTION <- 21L +CPX_CON_SETVARNULLINTERSECT <- 22L +CPX_CON_SETVARINTERSECT <- 23L +CPX_CON_SETVAREQ <- 24L +CPX_CON_SETVARNEQ <- 25L +CPX_CON_SETVARNEQCST <- 26L +CPX_CON_LAST_CONTYPE <- 27L + + +#------------------------------------------------------------------------------# + +# Network parameters +CPX_PARAM_NETITLIM <- 5001L +CPX_PARAM_NETEPOPT <- 5002L +CPX_PARAM_NETEPRHS <- 5003L +CPX_PARAM_NETPPRIIND <- 5004L +CPX_PARAM_NETDISPLAY <- 5005L + +# NETOPT display values +CPXNET_NO_DISPLAY_OBJECTIVE <- 0L +CPXNET_TRUE_OBJECTIVE <- 1L +CPXNET_PENALIZED_OBJECTIVE <- 2L + +# NETOPT pricing parameters +CPXNET_PRICE_AUTO <- 0L +CPXNET_PRICE_PARTIAL <- 1L +CPXNET_PRICE_MULT_PART <- 2L +CPXNET_PRICE_SORT_MULT_PART <- 3L + + +#------------------------------------------------------------------------------# + +# Copying data +CPX_PARAM_QPNZREADLIM <- 4001L + +# Specify how to calculate duals for QCPs +CPX_PARAM_CALCQCPDUALS <- 4003L + +# presolve +CPX_PARAM_QPMAKEPSDIND <- 4010L + + +#------------------------------------------------------------------------------# +# Error codes + +# Callable library miscellaneous routines +CPXERR_NEGATIVE_SURPLUS <- 1207L +CPXERR_NO_SENSIT <- 1260L + + +#------------------------------------------------------------------------------# +# new parameter names introduced in IBM ILOG CPLEX version 12.6 + +CPXPARAM_Advance <- 1001L +CPXPARAM_Barrier_Algorithm <- 3007L +CPXPARAM_Barrier_ColNonzeros <- 3009L +CPXPARAM_Barrier_ConvergeTol <- 3002L +CPXPARAM_Barrier_Crossover <- 3018L +CPXPARAM_Barrier_Display <- 3010L +CPXPARAM_Barrier_Limits_Corrections <- 3013L +CPXPARAM_Barrier_Limits_Growth <- 3003L +CPXPARAM_Barrier_Limits_Iteration <- 3012L +CPXPARAM_Barrier_Limits_ObjRange <- 3004L +CPXPARAM_Barrier_Ordering <- 3014L +CPXPARAM_Barrier_QCPConvergeTol <- 3020L +CPXPARAM_Barrier_StartAlg <- 3017L +CPXPARAM_ClockType <- 1006L +CPXPARAM_Conflict_Display <- 1074L +CPXPARAM_DetTimeLimit <- 1127L +CPXPARAM_DistMIP_Rampup_DetTimeLimit <- 2164L +CPXPARAM_DistMIP_Rampup_Duration <- 2163L +CPXPARAM_DistMIP_Rampup_TimeLimit <- 2165L +CPXPARAM_Emphasis_Memory <- 1082L +CPXPARAM_Emphasis_MIP <- 2058L +CPXPARAM_Emphasis_Numerical <- 1083L +CPXPARAM_Feasopt_Mode <- 1084L +CPXPARAM_Feasopt_Tolerance <- 2073L +CPXPARAM_LPMethod <- 1062L +CPXPARAM_MIP_Cuts_Cliques <- 2003L +CPXPARAM_MIP_Cuts_Covers <- 2005L +CPXPARAM_MIP_Cuts_Disjunctive <- 2053L +CPXPARAM_MIP_Cuts_FlowCovers <- 2040L +CPXPARAM_MIP_Cuts_Gomory <- 2049L +CPXPARAM_MIP_Cuts_GUBCovers <- 2044L +CPXPARAM_MIP_Cuts_Implied <- 2041L +CPXPARAM_MIP_Cuts_LiftProj <- 2152L +CPXPARAM_MIP_Cuts_MCFCut <- 2134L +CPXPARAM_MIP_Cuts_MIRCut <- 2052L +CPXPARAM_MIP_Cuts_PathCut <- 2051L +CPXPARAM_MIP_Cuts_ZeroHalfCut <- 2111L +CPXPARAM_MIP_Display <- 2012L +CPXPARAM_MIP_Interval <- 2013L +CPXPARAM_MIP_Limits_AggForCut <- 2054L +CPXPARAM_MIP_Limits_AuxRootThreads <- 2139L +CPXPARAM_MIP_Limits_CutPasses <- 2056L +CPXPARAM_MIP_Limits_CutsFactor <- 2033L +CPXPARAM_MIP_Limits_EachCutLimit <- 2102L +CPXPARAM_MIP_Limits_GomoryCand <- 2048L +CPXPARAM_MIP_Limits_GomoryPass <- 2050L +CPXPARAM_MIP_Limits_Nodes <- 2017L +CPXPARAM_MIP_Limits_PolishTime <- 2066L +CPXPARAM_MIP_Limits_Populate <- 2108L +CPXPARAM_MIP_Limits_ProbeDetTime <- 2150L +CPXPARAM_MIP_Limits_ProbeTime <- 2065L +CPXPARAM_MIP_Limits_RepairTries <- 2067L +CPXPARAM_MIP_Limits_Solutions <- 2015L +CPXPARAM_MIP_Limits_StrongCand <- 2045L +CPXPARAM_MIP_Limits_StrongIt <- 2046L +CPXPARAM_MIP_Limits_SubMIPNodeLim <- 2062L +CPXPARAM_MIP_Limits_TreeMemory <- 2027L +CPXPARAM_MIP_OrderType <- 2032L +CPXPARAM_MIP_PolishAfter_AbsMIPGap <- 2126L +CPXPARAM_MIP_PolishAfter_DetTime <- 2151L +CPXPARAM_MIP_PolishAfter_MIPGap <- 2127L +CPXPARAM_MIP_PolishAfter_Nodes <- 2128L +CPXPARAM_MIP_PolishAfter_Solutions <- 2129L +CPXPARAM_MIP_PolishAfter_Time <- 2130L +CPXPARAM_MIP_Pool_AbsGap <- 2106L +CPXPARAM_MIP_Pool_Capacity <- 2103L +CPXPARAM_MIP_Pool_Intensity <- 2107L +CPXPARAM_MIP_Pool_RelGap <- 2105L +CPXPARAM_MIP_Pool_Replace <- 2104L +CPXPARAM_MIP_Strategy_Backtrack <- 2002L +CPXPARAM_MIP_Strategy_BBInterval <- 2039L +CPXPARAM_MIP_Strategy_Branch <- 2001L +CPXPARAM_MIP_Strategy_CallbackReducedLP <- 2055L +CPXPARAM_MIP_Strategy_Dive <- 2060L +CPXPARAM_MIP_Strategy_File <- 2016L +CPXPARAM_MIP_Strategy_FPHeur <- 2098L +CPXPARAM_MIP_Strategy_HeuristicFreq <- 2031L +CPXPARAM_MIP_Strategy_KappaStats <- 2137L +CPXPARAM_MIP_Strategy_LBHeur <- 2063L +CPXPARAM_MIP_Strategy_MIQCPStrat <- 2110L +CPXPARAM_MIP_Strategy_NodeSelect <- 2018L +CPXPARAM_MIP_Strategy_Order <- 2020L +CPXPARAM_MIP_Strategy_PresolveNode <- 2037L +CPXPARAM_MIP_Strategy_Probe <- 2042L +CPXPARAM_MIP_Strategy_RINSHeur <- 2061L +CPXPARAM_MIP_Strategy_Search <- 2109L +CPXPARAM_MIP_Strategy_StartAlgorithm <- 2025L +CPXPARAM_MIP_Strategy_SubAlgorithm <- 2026L +CPXPARAM_MIP_Strategy_VariableSelect <- 2028L +CPXPARAM_MIP_Tolerances_AbsMIPGap <- 2008L +CPXPARAM_MIP_Tolerances_Integrality <- 2010L +CPXPARAM_MIP_Tolerances_LowerCutoff <- 2006L +CPXPARAM_MIP_Tolerances_MIPGap <- 2009L +CPXPARAM_MIP_Tolerances_ObjDifference <- 2019L +CPXPARAM_MIP_Tolerances_RelObjDifference <- 2022L +CPXPARAM_MIP_Tolerances_UpperCutoff <- 2007L +CPXPARAM_Network_Display <- 5005L +CPXPARAM_Network_Iterations <- 5001L +CPXPARAM_Network_NetFind <- 1022L +CPXPARAM_Network_Pricing <- 5004L +CPXPARAM_Network_Tolerances_Feasibility <- 5003L +CPXPARAM_Network_Tolerances_Optimality <- 5002L +CPXPARAM_Output_CloneLog <- 1132L +CPXPARAM_Output_IntSolFilePrefix <- 2143L +CPXPARAM_Output_MPSLong <- 1081L +CPXPARAM_Output_WriteLevel <- 1114L +CPXPARAM_Parallel <- 1109L +CPXPARAM_Preprocessing_Aggregator <- 1003L +CPXPARAM_Preprocessing_BoundStrength <- 2029L +CPXPARAM_Preprocessing_CoeffReduce <- 2004L +CPXPARAM_Preprocessing_Dependency <- 1008L +CPXPARAM_Preprocessing_Dual <- 1044L +CPXPARAM_Preprocessing_Fill <- 1002L +CPXPARAM_Preprocessing_Linear <- 1058L +CPXPARAM_Preprocessing_NumPass <- 1052L +CPXPARAM_Preprocessing_Presolve <- 1030L +CPXPARAM_Preprocessing_QCPDuals <- 4003L +CPXPARAM_Preprocessing_QPMakePSD <- 4010L +CPXPARAM_Preprocessing_Reduce <- 1057L +CPXPARAM_Preprocessing_Relax <- 2034L +CPXPARAM_Preprocessing_RepeatPresolve <- 2064L +CPXPARAM_Preprocessing_Symmetry <- 2059L +CPXPARAM_QPMethod <- 1063L +CPXPARAM_RandomSeed <- 1124L +CPXPARAM_Read_APIEncoding <- 1130L +CPXPARAM_Read_Constraints <- 1021L +CPXPARAM_Read_DataCheck <- 1056L +CPXPARAM_Read_FileEncoding <- 1129L +CPXPARAM_Read_Nonzeros <- 1024L +CPXPARAM_Read_QPNonzeros <- 4001L +CPXPARAM_Read_Scale <- 1034L +CPXPARAM_Read_Variables <- 1023L +CPXPARAM_ScreenOutput <- 1035L +CPXPARAM_Sifting_Algorithm <- 1077L +CPXPARAM_Sifting_Display <- 1076L +CPXPARAM_Sifting_Iterations <- 1078L +CPXPARAM_Simplex_Crash <- 1007L +CPXPARAM_Simplex_DGradient <- 1009L +CPXPARAM_Simplex_Display <- 1019L +CPXPARAM_Simplex_Limits_Iterations <- 1020L +CPXPARAM_Simplex_Limits_LowerObj <- 1025L +CPXPARAM_Simplex_Limits_Perturbation <- 1028L +CPXPARAM_Simplex_Limits_Singularity <- 1037L +CPXPARAM_Simplex_Limits_UpperObj <- 1026L +CPXPARAM_Simplex_Perturbation_Constant <- 1015L +CPXPARAM_Simplex_Perturbation_Indicator <- 1027L +CPXPARAM_Simplex_PGradient <- 1029L +CPXPARAM_Simplex_Pricing <- 1010L +CPXPARAM_Simplex_Refactor <- 1031L +CPXPARAM_Simplex_Tolerances_Feasibility <- 1016L +CPXPARAM_Simplex_Tolerances_Markowitz <- 1013L +CPXPARAM_Simplex_Tolerances_Optimality <- 1014L +CPXPARAM_SolutionTarget <- 1131L +CPXPARAM_Threads <- 1067L +CPXPARAM_TimeLimit <- 1039L +CPXPARAM_Tune_DetTimeLimit <- 1139L +CPXPARAM_Tune_Display <- 1113L +CPXPARAM_Tune_Measure <- 1110L +CPXPARAM_Tune_Repeat <- 1111L +CPXPARAM_Tune_TimeLimit <- 1112L +CPXPARAM_WorkDir <- 1064L +CPXPARAM_WorkMem <- 1065L diff --git a/R/cplexErrorClass.R b/R/cplexErrorClass.R new file mode 100644 index 0000000..5825a97 --- /dev/null +++ b/R/cplexErrorClass.R @@ -0,0 +1,103 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cpxerrClass.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# definition of class cplexError # +#------------------------------------------------------------------------------# + + +# representation of class cplexError +setClass(Class = "cplexError", + representation( + errnum = "integer" + ) +) + + +#------------------------------------------------------------------------------# + +# contructor for class cplexError +cplexError <- function(err) { + + if(is(err, "cpxerr")) { + cErr <- new("cplexError", errnum = as.integer(err)) + } + else { + cErr <- err + } + + return(cErr) +} + + +#------------------------------------------------------------------------------# + +# errnum +setMethod("errnum", signature(object = "cplexError"), + function(object) { + return(object@errnum) + } +) + +setReplaceMethod("errnum", signature = (object = "cplexError"), + function(object, value) { + object@errnum <- value + return(object) + } +) + + +# err +setMethod("err", signature(object = "cplexError"), + function(object) { + msg <- getErrorStrCPLEX(object@errnum) + return(msg) + } +) + + +# errmsg +setMethod("errmsg", signature(object = "cplexError"), + function(object) { + msg <- getErrorStrCPLEX(object@errnum) + cat(msg) + } +) + + +#------------------------------------------------------------------------------# + +setMethod("show", signature(object = "cplexError"), + function(object) { + + cat("object of class ", dQuote("cplexError"), ".\n", sep = "") + cat(paste("Slot ", dQuote("errnum"), ": ", + errnum(object), "\n", sep = "")) + cat(paste("Error string: ", err(object), sep = "")) + } +) diff --git a/R/cplexPtrClass.R b/R/cplexPtrClass.R new file mode 100644 index 0000000..8fc3cdf --- /dev/null +++ b/R/cplexPtrClass.R @@ -0,0 +1,348 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplex_ptrClass.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# definition of class cplexPtr # +#------------------------------------------------------------------------------# + + +# representation of class cplexPtr +setClass(Class = "cplexPtr", + representation( + cplexPtrType = "character", + cplexPointer = "externalptr" + ) + #, contains = "externalptr" +) + + +#------------------------------------------------------------------------------# + +# contructor for class cplexPtr +setMethod(f = "initialize", + signature = "cplexPtr", + definition = function(.Object, p, w) { + + fn <- attr(p, which = "CPLEXfn", exact = TRUE) + + .Object@cplexPointer <- attr(p, which = w, exact = TRUE) + .Object@cplexPtrType <- as.character(p) + + attr(.Object@cplexPtrType, which = "CPLEXfn") <- fn + + return(.Object) + + } +) + + +# contructor for pointers to cplex envoronments +cplex_ProbPointer <- function(pointer) { + + if(is(pointer, "cplex_prob_ptr")) { + pObj <- new("cplexPtr", + p = pointer, + w = as.character("cplex_prob_ptr")) + } + else { + pObj <- pointer + } + + return(pObj) +} + +# contructor for pointers to cplex problem onjects +cplex_EnvPointer <- function(pointer) { + + if(is(pointer, "cplex_env_ptr")) { + pObj <- new("cplexPtr", + p = pointer, + w = as.character("cplex_env_ptr")) + } + else { + pObj <- pointer + } + + return(pObj) +} + +# contructor for pointers to cplex files +cplex_FilePointer <- function(pointer) { + + if(is(pointer, "cplex_file_ptr")) { + + pObj <- new("cplexPtr", + p = pointer, + w = as.character("cplex_file_ptr")) + } + else { + pObj <- pointer + } + + return(pObj) +} + +# contructor for pointers to cplex channels +cplex_ChannelPointer <- function(pointer, chname) { + + chn <- ifelse(missing(chname), "cplex_chan_ptr", chname) + + if(is(pointer, "cplex_chan_ptr")) { + pObj <- new("cplexPtr", + p = pointer, + w = as.character(chn)) + } + else { + pObj <- pointer + } + + return(pObj) +} + +# contructor for pointers to termination signals +cplex_TermPointer <- function(pointer) { + + if(is(pointer, "cplex_term_ptr")) { + pObj <- new("cplexPtr", + p = pointer, + w = as.character("cplex_term_ptr")) + } + else { + pObj <- pointer + } + + return(pObj) +} + + +#------------------------------------------------------------------------------# + +setMethod("isNULLpointerCPLEX", signature(object = "cplexPtr"), + function(object) { + return(.Call("isNULLptr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + +setMethod("isCPLEXprobPointer", signature(object = "cplexPtr"), + function(object) { + return(.Call("isCPLEXprobPtr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + +setMethod("isCPLEXenvPointer", signature(object = "cplexPtr"), + function(object) { + return(.Call("isCPLEXenvPtr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + +setMethod("isCPLEXfilePointer", signature(object = "cplexPtr"), + function(object) { + return(.Call("isCPLEXfilePtr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + +setMethod("isCPLEXchanPointer", signature(object = "cplexPtr"), + function(object) { + return(.Call("isCPLEXchanPtr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + +setMethod("isCPLEXtermPointer", signature(object = "cplexPtr"), + function(object) { + return(.Call("isCPLEXtermPtr", + PACKAGE = "cplexAPI", cplexPointer(object))) + } +) + + +#------------------------------------------------------------------------------# + +# cplexPtrType +setMethod("cplexPtrType", signature(object = "cplexPtr"), + function(object) { + return(object@cplexPtrType) + } +) + +setReplaceMethod("cplexPtrType", signature = (object = "cplexPtr"), + function(object, value) { + object@cplexPtrType <- value + return(object) + } +) + + +# cplexPointer +setMethod("cplexPointer", signature(object = "cplexPtr"), + function(object) { + return(object@cplexPointer) + } +) + + +#------------------------------------------------------------------------------# + +setMethod("show", signature(object = "cplexPtr"), + function(object) { + + fn <- NA + + if (isNULLpointerCPLEX(object)) { + ptrtype <- "NULL" + } + else { + if (isCPLEXprobPointer(object)) { + ptrtype <- "CPLEX problem object" + } + else if (isCPLEXenvPointer(object)) { + ptrtype <- "CPLEX environment" + } + else if (isCPLEXfilePointer(object)) { + ptrtype <- "CPLEX file" + fn <- attr(cplexPtrType(object), + which = "CPLEXfn", exact = TRUE) + } + else if (isCPLEXchanPointer(object)) { + ptrtype <- "CPLEX channel" + } + else if (isCPLEXtermPointer(object)) { + ptrtype <- "CPLEX termination signal" + } + else { + ptrtype <- "unknown" + } + } + + cat("object of class ", dQuote("cplexPtr"), + ": pointer to ", ptrtype, ".\n", sep = "") + cat(paste("Slot ", + dQuote("cplexPtrType"), ": ", + cplexPtrType(object), "\n", sep = "")) + cat(paste("Slot ", dQuote("cplexPointer"), ": ", sep = "")) + print(slot(object, "cplexPointer"), sep = "") + if (!is.na(fn)) { + cat(paste("Filename: ", dQuote(fn), "\n")) + } + } +) + + +#------------------------------------------------------------------------------# + +setMethod("summary", signature(object = "cplexPtr"), + function(object, ...) { + + if (isNULLpointerCPLEX(object)) { + cat("NULL pointer\n") + } + else { + if (isCPLEXprobPointer(object)) { + cat("CPLEX problem object\n") + cat(paste("Number of variables: ", + getNumColsCPLEX(lp = object, ...), "\n")) + cat(paste("Number of constraints:", + getNumRowsCPLEX(lp = object, ...), "\n")) + cat("\nSolution\n") + sol <- solutionCPLEX(lp = object, ...) + if (!is(sol, "cplexError")) { + nc <- getNumColsCPLEX(lp = object, ...) + nr <- getNumRowsCPLEX(lp = object, ...) + cat(paste("solution status:", + getStatStrCPLEX(stat = sol$lpstat, ...), "\n")) + + if (sol$lpstat == CPX_STAT_OPTIMAL) { + if (nc > 10) { + sx <- paste(paste(round(sol$x[1:10], digits = 2), + collapse = " ") + , "...") + sdj <- paste(paste(round(sol$dj[1:10], digits = 2), + collapse = " ") + , "...") + } + else { + sx <- paste(round(sol$x, digits = 2), + collapse = " ") + sdj <- paste(round(sol$dj, digits = 2), + collapse = " ") + } + + if (nr > 10) { + pi <- paste(paste(round(sol$pi[1:10], digits = 2), + collapse = " ") + , "...") + sl <- paste(paste(round(sol$slack[1:10],digits = 2), + collapse = " ") + , "...") + } + else { + pi <- paste(round(sol$pi, digits = 2), + collapse = " ") + sl <- paste(round(sol$slack, digits = 2), + collapse = " ") + } + + cat(paste("objective value: ", sol$objval, "\n")) + cat(paste("variable values: ", sx, "\n")) + cat(paste("dual variable values: ", pi, "\n")) + cat(paste("slack variable values: ", sl, "\n")) + cat(paste("variable reduced costs:", sdj, "\n")) + } + + cat("\nSolution information\n") + soln <- solnInfoCPLEX(lp = object, ...) + cat(paste("method: ", soln$method, "\n")) + cat(paste("solution type: ", soln$type, "\n")) + cat(paste("primal feasible:", soln$primal_feasible, "\n")) + cat(paste("dual feasible: ", soln$dual_feasible, "\n")) + + } + } + else if (isCPLEXenvPointer(object)) { + cat("CPLEX environment\n") + } + else if (isCPLEXfilePointer(object)) { + cat("CPLEX file\n") + } + else if (isCPLEXchanPointer(object)) { + cat("CPLEX channel\n") + } + else if (isCPLEXtermPointer(object)) { + cat("CPLEX termination signal\n") + } + else { + cat("unknown pointer\n") + } + } + return(invisible(NULL)) + } +) diff --git a/R/cplex_checkAPI.R b/R/cplex_checkAPI.R new file mode 100644 index 0000000..919e189 --- /dev/null +++ b/R/cplex_checkAPI.R @@ -0,0 +1,316 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplex_checkAPI.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# the interface (check) # +#------------------------------------------------------------------------------# + +checkCopyLpCPLEX <- function(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, + rngval = NULL + ) { + + if (is.null(rngval)) { + Crngval <- as.null(rngval) + } + else { + Crngval <- as.numeric(rngval) + } + + status <- .Call("checkCopyLp", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nCols), + as.integer(nRows), + as.integer(lpdir), + as.numeric(objf), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + as.integer(matbeg), + as.integer(matcnt), + as.integer(matind), + as.numeric(matval), + as.numeric(lb), + as.numeric(ub), + Crngval + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkCopyLpwNamesCPLEX <- function(env, lp, nCols, nRows, lpdir, objf, rhs, + sense, matbeg, matcnt, matind, matval, + lb, ub, rngval = NULL, + cnames = NULL, rnames = NULL) { + + if (is.null(rngval)) { + Crngval <- as.null(rngval) + } + else { + Crngval <- as.numeric(rngval) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + if (is.null(rnames)) { + Crnames <- as.null(rnames) + } + else { + Crnames <- as.character(rnames) + } + + status <- .Call("checkCopyLpwNames", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nCols), + as.integer(nRows), + as.integer(lpdir), + as.numeric(objf), + as.numeric(rhs), + as.character(paste(sense, collapse = "")), + as.integer(matbeg), + as.integer(matcnt), + as.integer(matind), + as.numeric(matval), + as.numeric(lb), + as.numeric(ub), + Crngval, + Ccnames, + Crnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkCopyQuadCPLEX <- function(env, lp, qmatbeg, qmatcnt, qmatind, qmatval) { + + status <- .Call("checkCopyQuad", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(qmatbeg), + as.integer(qmatcnt), + as.integer(qmatind), + as.numeric(qmatval) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkCopyQPsepCPLEX <- function(env, lp, qsepvec) { + + status <- .Call("checkCopyQPsep", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.numeric(qsepvec) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkAddRowsCPLEX <- function(env, lp, ncols, nrows, nnz, + matbeg, matind, matval, + rhs = NULL, sense = NULL, + cnames = NULL, rnames = NULL) { + + if (is.null(rhs)) { + Crhs <- as.null(rhs) + } + else { + Crhs <- as.numeric(rhs) + } + + if (is.null(sense)) { + Csense <- as.null(sense) + } + else { + Csense <- as.character(paste(sense, collapse = "")) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + if (is.null(rnames)) { + Crnames <- as.null(rnames) + } + else { + Crnames <- as.character(rnames) + } + + status <- .Call("checkAddRows", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(nrows), + as.integer(nnz), + Crhs, + Csense, + as.integer(matbeg), + as.integer(matind), + as.numeric(matval), + Ccnames, + Crnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkAddColsCPLEX <- function(env, lp, ncols, nnz, objf, matbeg, matind, matval, + lb = NULL, ub = NULL, cnames = NULL) { + + if (is.null(lb)) { + Clb <- as.null(lb) + } + else { + Clb <- as.numeric(lb) + } + + if (is.null(ub)) { + Cub <- as.null(ub) + } + else { + Cub <- as.numeric(ub) + } + + if (is.null(cnames)) { + Ccnames <- as.null(cnames) + } + else { + Ccnames <- as.character(cnames) + } + + status <- .Call("checkAddCols", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(ncols), + as.integer(nnz), + as.numeric(objf), + as.integer(matbeg), + as.integer(matind), + as.numeric(matval), + Clb, + Cub, + Ccnames + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkChgCoefListCPLEX <- function(env, lp, nnz, ia, ja, ra) { + + status <- .Call("checkChgCoefList", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nnz), + as.integer(ia), + as.integer(ja), + as.numeric(ra) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkCopyColTypeCPLEX <- function(env, lp, xctype) { + + status <- .Call("checkCopyColType", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.character(paste(xctype, collapse = "")) + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +checkValsCPLEX <- function(env, lp, nval, + rind = NULL, cind = NULL, val = NULL) { + + if (is.null(rind)) { + Crind <- as.null(rind) + } + else { + Crind <- as.integer(rind) + } + + if (is.null(cind)) { + Ccind <- as.null(cind) + } + else { + Ccind <- as.integer(cind) + } + + if (is.null(val)) { + Cval <- as.null(val) + } + else { + Cval <- as.numeric(val) + } + + status <- .Call("checkVals", PACKAGE = "cplexAPI", + cplexPointer(env), + cplexPointer(lp), + as.integer(nval), + Crind, + Ccind, + Cval + ) + + return(status) +} + diff --git a/R/cplex_longparamAPI.R b/R/cplex_longparamAPI.R new file mode 100644 index 0000000..0bfbaf0 --- /dev/null +++ b/R/cplex_longparamAPI.R @@ -0,0 +1,72 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# cplex_longparamAPI.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# the interface (CPX_PARAMTYPE_LONG) # +#------------------------------------------------------------------------------# + +setLongParmCPLEX <- function(env, parm, value) { + + status <- .Call("setLongParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm), + #as.integer(value) + as.numeric(value) + ) + return(status) + +} + + +#------------------------------------------------------------------------------# + +getLongParmCPLEX <- function(env, parm) { + + value <- .Call("getLongParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(value)) +} + + +#------------------------------------------------------------------------------# + +getInfoLongParmCPLEX <- function(env, parm) { + + param <- .Call("getInfoLongParm", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(parm) + ) + + return(cplexError(param)) +} + + + diff --git a/R/generics.R b/R/generics.R new file mode 100644 index 0000000..f20834a --- /dev/null +++ b/R/generics.R @@ -0,0 +1,84 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# generics.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# generics # +#------------------------------------------------------------------------------# + +setGeneric("summary") + + +setGeneric(name = "err", + def = function(object) { standardGeneric("err") } +) + +setGeneric(name = "errmsg", + def = function(object) { standardGeneric("errmsg") } +) + +setGeneric(name = "errnum", + def = function(object) { standardGeneric("errnum") } +) +setGeneric(name = "errnum<-", + def = function(object, value) { standardGeneric("errnum<-") } +) + +setGeneric(name = "cplexPointer", + def = function(object) { standardGeneric("cplexPointer") } +) + +setGeneric(name = "cplexPtrType", + def = function(object) { standardGeneric("cplexPtrType") } +) +setGeneric(name = "cplexPtrType<-", + def = function(object, value) { standardGeneric("cplexPtrType<-") } +) + +setGeneric(name = "isCPLEXprobPointer", + def = function(object) { standardGeneric("isCPLEXprobPointer") } +) + +setGeneric(name = "isCPLEXenvPointer", + def = function(object) { standardGeneric("isCPLEXenvPointer") } +) + +setGeneric(name = "isCPLEXfilePointer", + def = function(object) { standardGeneric("isCPLEXfilePointer") } +) + +setGeneric(name = "isCPLEXchanPointer", + def = function(object) { standardGeneric("isCPLEXchanPointer") } +) + +setGeneric(name = "isCPLEXtermPointer", + def = function(object) { standardGeneric("isCPLEXtermPointer") } +) + +setGeneric(name = "isNULLpointerCPLEX", + def = function(object) { standardGeneric("isNULLpointerCPLEX") } +) diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 0000000..00559f5 --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,39 @@ +#------------------------------------------------------------------------------# +# R Interface to C API of IBM ILOG CPLEX # +#------------------------------------------------------------------------------# + +# zzz.R +# R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. +# +# Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of cplexAPI. +# +# CplexAPI 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. +# +# CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. + + +.packageName <- "cplexAPI" + +.onLoad <- function(libname, pkgname) { + .Call("initCPLEX", PACKAGE = "cplexAPI") +} + +#.onAttach <- function(libname, pkgname) { +# tmp <- openEnvCPLEX() +# packageStartupMessage("using IBM ILOG CPLEX version ", getVersionCPLEX(tmp)) +# closeEnvCPLEX(tmp) +#} diff --git a/cleanup b/cleanup new file mode 100755 index 0000000..0607031 --- /dev/null +++ b/cleanup @@ -0,0 +1,4 @@ +#! /bin/sh + +rm -rf config.* autom4te.cache src/Makevars src/check.c src/config.h src/*.o +exit 0 diff --git a/configure b/configure new file mode 100755 index 0000000..9243ab7 --- /dev/null +++ b/configure @@ -0,0 +1,4986 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for cplexAPI 1.2.11. +# +# Report bugs to <geliudie@uni-duesseldorf.de>. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: geliudie@uni-duesseldorf.de about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='cplexAPI' +PACKAGE_TARNAME='cplexapi' +PACKAGE_VERSION='1.2.11' +PACKAGE_STRING='cplexAPI 1.2.11' +PACKAGE_BUGREPORT='geliudie@uni-duesseldorf.de' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +PKG_CPPFLAGS +PKG_LIBS +PKG_CFLAGS +EGREP +GREP +AWK +CPLEX_BIN +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_cplex_include +with_cplex_lib +with_cplex_link +with_cplex_cflags +with_cplex_dir +with_cplex_check +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures cplexAPI 1.2.11 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/cplexapi] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of cplexAPI 1.2.11:";; + esac + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-cplex-include=PATH + location of CPLEX include directory + --with-cplex-lib=PATH location of CPLEX callable library + --with-cplex-link libraries to pass to the linker + --with-cplex-cflags C flags for interface compilation + --with-cplex-dir CPLEX installation directory + --with-cplex-check=PATH location of CPLEX file check.c + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <geliudie@uni-duesseldorf.de>. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +cplexAPI configure 1.2.11 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------ ## +## Report this to geliudie@uni-duesseldorf.de ## +## ------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cplexAPI $as_me 1.2.11, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +## adopted from configure.ac in Rcplex_0.3-0 + + + + +: ${R_HOME=`R RHOME`} +if test -z "${R_HOME}"; then + echo "could not determine R_HOME" + exit 1 +fi + +CC=`"${R_HOME}/bin/R" CMD config CC` +CPP=`"${R_HOME}/bin/R" CMD config CPP` +CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_config_headers="$ac_config_headers src/config.h" + + + + +ARGS_OK="FALSE" + +if test -n "$PKG_CPPFLAGS" -a -n "$PKG_LIBS" ; then + ARGS_OK="TRUE" +else + if test -n "$PKG_CPPFLAGS" -o -n "$PKG_LIBS" ; then + as_fn_error $? "Please set both variables: PKG_CPPFLAGS AND PKG_LIBS" "$LINENO" 5 + fi +fi + + + + +# Check whether --with-cplex-include was given. +if test "${with_cplex_include+set}" = set; then : + withval=$with_cplex_include; CPLEX_INCLUDE=$withval +else + CPLEX_INCLUDE="" +fi + + + +# Check whether --with-cplex-lib was given. +if test "${with_cplex_lib+set}" = set; then : + withval=$with_cplex_lib; CPLEX_LIB=$withval +else + CPLEX_LIB="" +fi + + + +# Check whether --with-cplex-link was given. +if test "${with_cplex_link+set}" = set; then : + withval=$with_cplex_link; CPLEX_LINK=$withval +else + CPLEX_LINK="" +fi + + + +# Check whether --with-cplex-cflags was given. +if test "${with_cplex_cflags+set}" = set; then : + withval=$with_cplex_cflags; CPLEX_CFLAGS=$withval +else + CPLEX_CFLAGS="" +fi + + + +# Check whether --with-cplex-dir was given. +if test "${with_cplex_dir+set}" = set; then : + withval=$with_cplex_dir; CPLEX_DIR=$withval +else + CPLEX_DIR="" +fi + + + +# Check whether --with-cplex-check was given. +if test "${with_cplex_check+set}" = set; then : + withval=$with_cplex_check; CPLEX_CHECK=$withval +else + CPLEX_CHECK="" +fi + + + + +if test "$ARGS_OK" = "FALSE" ; then + + if test -n "$CPLEX_INCLUDE" -a -n "$CPLEX_LIB" ; then + + if test -d "$CPLEX_INCLUDE" ; then + PKG_CPPFLAGS="-I${CPLEX_INCLUDE}" + else + as_fn_error $? "directory $CPLEX_INCLUDE does not exist" "$LINENO" 5 + fi + + if test -d "$CPLEX_LIB" ; then + PKG_LIBS="-L${CPLEX_LIB}" + else + as_fn_error $? "directory $CPLEX_LIB does not exist" "$LINENO" 5 + fi + + if test -n "$CPLEX_LINK" ; then + PKG_LIBS="${PKG_LIBS} $CPLEX_LINK" + else + PKG_LIBS="${PKG_LIBS} -lcplex -lm -pthread" + fi + + if test -n "$CPLEX_CFLAGS" ; then + PKG_CFLAGS="$CPLEX_CFLAGS" + fi + + if test -n "${CPLEX_CHECK}" -a -r "${CPLEX_CHECK}/check.c" ; then + CPLEX_CHECK_PATH="${CPLEX_CHECK}" + NO_CHECK="FALSE" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find file 'check.c'" >&5 +$as_echo "$as_me: WARNING: cannot find file 'check.c'" >&2;} + NO_CHECK="TRUE" + fi + ARGS_OK="TRUE" + else + if test -n "$CPLEX_INCLUDE" -o -n "$CPLEX_LIB" ; then + as_fn_error $? "Please set both options: --with-cplex-include AND --with-cplex-lib" "$LINENO" 5 + fi + fi +fi + + +if test "$ARGS_OK" = "FALSE" -a -z "$CPLEX_DIR" ; then + + # Extract the first word of "cplex", so it can be a program name with args. +set dummy cplex; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CPLEX_BIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CPLEX_BIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_CPLEX_BIN="$CPLEX_BIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CPLEX_BIN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CPLEX_BIN" && ac_cv_path_CPLEX_BIN=""NONE"" + ;; +esac +fi +CPLEX_BIN=$ac_cv_path_CPLEX_BIN +if test -n "$CPLEX_BIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPLEX_BIN" >&5 +$as_echo "$CPLEX_BIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$CPLEX_BIN" = "NONE" ; then + as_fn_error $? "CPLEX interactive optimizer not found" "$LINENO" 5 + else + CPLEX_DIR=`$as_dirname -- "$CPLEX_BIN" || +$as_expr X"$CPLEX_BIN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$CPLEX_BIN" : 'X\(//\)[^/]' \| \ + X"$CPLEX_BIN" : 'X\(//\)$' \| \ + X"$CPLEX_BIN" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$CPLEX_BIN" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + MACHINE=`expr //$CPLEX_DIR : '.*/\(.*\)'` + CPLEX_DIR=`$as_dirname -- "$CPLEX_DIR" || +$as_expr X"$CPLEX_DIR" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$CPLEX_DIR" : 'X\(//\)[^/]' \| \ + X"$CPLEX_DIR" : 'X\(//\)$' \| \ + X"$CPLEX_DIR" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$CPLEX_DIR" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + if test -z "$MACHINE" -o ! -d "${CPLEX_DIR}/${MACHINE}" ; then + as_fn_error $? "could not determine platform type" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: platform type is $MACHINE" >&5 +$as_echo "$as_me: platform type is $MACHINE" >&6;} + CPLEX_DIR=`$as_dirname -- "$CPLEX_DIR" || +$as_expr X"$CPLEX_DIR" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$CPLEX_DIR" : 'X\(//\)[^/]' \| \ + X"$CPLEX_DIR" : 'X\(//\)$' \| \ + X"$CPLEX_DIR" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$CPLEX_DIR" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + fi +fi + + +if test "$ARGS_OK" = "FALSE" ; then + + for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + + + if test ! -d "$CPLEX_DIR/include" ; then + as_fn_error $? "CPLEX install directory not found: $CPLEX_DIR/include does not exist" "$LINENO" 5 + fi + + if test -z "$MACHINE" ; then + MACHINE=`ls -l ${CPLEX_DIR}/lib | ${AWK} '($1 ~ /^d/) { print $NF }' | head -n 1` + if test -z "$MACHINE" -o ! -d "$CPLEX_DIR/lib/${MACHINE}" ; then + as_fn_error $? "could not determine platform type" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: platform type is $MACHINE" >&5 +$as_echo "$as_me: platform type is $MACHINE" >&6;} + fi + + LIBFORMAT=`ls -l ${CPLEX_DIR}/lib/${MACHINE} | ${AWK} '($1 ~ /^d/) { print $NF }' | head -n 1` + if test -z "$LIBFORMAT" -o ! -d "${CPLEX_DIR}/lib/${MACHINE}/${LIBFORMAT}" ; then + as_fn_error $? "could not determine library type" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: library type is $LIBFORMAT" >&5 +$as_echo "$as_me: library type is $LIBFORMAT" >&6;} + + CPLEX_MAKEFILE="${CPLEX_DIR}/examples/${MACHINE}/${LIBFORMAT}/Makefile" + if test ! -f "$CPLEX_MAKEFILE" ; then + as_fn_error $? "could not find Makefile in $CPLEX_MAKEFILE" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: path to example Makefile is $CPLEX_MAKEFILE" >&5 +$as_echo "$as_me: path to example Makefile is $CPLEX_MAKEFILE" >&6;} + CPLEXLIBDIR="${CPLEX_DIR}/lib/${MACHINE}/${LIBFORMAT}" + + MAKEFILEVERSION=`${AWK} 'BEGIN {ORS = ""} /^CLNFLAGS/ { print $3 }' ${CPLEX_MAKEFILE}` + ## AC_MSG_NOTICE([version $MAKEFILEVERSION]) + + if test "${MAKEFILEVERSION}" = "-lcplex" ; then + CPLEX_LIBS="-L${CPLEXLIBDIR} `${AWK} 'BEGIN {ORS = " "} /^CLNFLAGS/ { for (i=3;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}`" + else + CPLEX_LIBS="-L${CPLEXLIBDIR} `${AWK} 'BEGIN {ORS = " "} /^CLNFLAGS/ { for (i=4;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}`" + fi + if test -z CPLEX_LIBS ; then + as_fn_error $? "could not get linker options from CPLEX example Makefile" "$LINENO" 5 + fi + ## AC_MSG_NOTICE([CPLEX_LIBS is $CPLEX_LIBS]) + + CPLEX_COPT=`${AWK} 'BEGIN {ORS = " "} /^COPT/ { for (i=3;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}` + if test -z CPLEX_COPT ; then + as_fn_error $? "could not get compiler options from CPLEX example Makefile" "$LINENO" 5 + fi + + CPLEX_CHECK_PATH="${CPLEX_DIR}/examples/src/c" + if test -r "${CPLEX_CHECK_PATH}/check.c" ; then + NO_CHECK="FALSE" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find file 'check.c'" >&5 +$as_echo "$as_me: WARNING: cannot find file 'check.c'" >&2;} + NO_CHECK="TRUE" + fi + + PKG_CFLAGS="$CPLEX_COPT" + PKG_CPPFLAGS="-I$CPLEX_DIR/include" + PKG_LIBS="$CPLEX_LIBS" + ARGS_OK="TRUE" +fi + + +if test ! "$ARGS_OK" = "TRUE" ; then + as_fn_error $? "no cplex installation found" "$LINENO" 5 +fi + + +if test -n "${CPLEX_CHECK_PATH}" -a "${NO_CHECK}" = "FALSE" ; then + if test -e "${CPLEX_CHECK_PATH}/check.c" -a -r "${CPLEX_CHECK_PATH}/check.c" ; then + cp ${CPLEX_CHECK_PATH}/check.c src/ + if test -r "src/check.c" ; then + echo "#define printf Rprintf" | cat - src/check.c > src/tmp.c + if test $? -ne 0 ; then + as_fn_error $? "modifying file 'check.c' failed" "$LINENO" 5 + fi + mv src/tmp.c src/check.c + if test -e "tmp.c" ; then + as_fn_error $? "removing file 'tmp.c' failed" "$LINENO" 5 + fi + +$as_echo "#define USE_CHECK 1" >>confdefs.h + + #AC_DEFINE([CPLEXX_NAMES], [1], [defined, if check.c can be used]) + PKG_CPPFLAGS="-DHAVE_CONFIG_H ${PKG_CPPFLAGS}" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: copying file check.c failed" >&5 +$as_echo "$as_me: WARNING: copying file check.c failed" >&2;} + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can not read file check.c" >&5 +$as_echo "$as_me: WARNING: can not read file check.c" >&2;} + fi +fi + + + +LIBS="${PKG_LIBS}" +CFLAGS="${CFLAGS} ${PKG_CFLAGS}" +CPPFLAGS="${CPPFLAGS} ${PKG_CPPFLAGS}" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_mongrel "$LINENO" "ilcplex/cplex.h" "ac_cv_header_ilcplex_cplex_h" "$ac_includes_default" +if test "x$ac_cv_header_ilcplex_cplex_h" = xyes; then : + +else + as_fn_error $? "Could not find cplex.h: + cplexAPI requires IBM ILOG CPLEX from http://www.ibm.com/. + use --with-cplex-include or PKG_CPPFLAGS to specify the include path." "$LINENO" 5 +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CPXopenCPLEX" >&5 +$as_echo_n "checking for library containing CPXopenCPLEX... " >&6; } +if ${ac_cv_search_CPXopenCPLEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char CPXopenCPLEX (); +int +main () +{ +return CPXopenCPLEX (); + ; + return 0; +} +_ACEOF +for ac_lib in '' cplex; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_CPXopenCPLEX=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_CPXopenCPLEX+:} false; then : + break +fi +done +if ${ac_cv_search_CPXopenCPLEX+:} false; then : + +else + ac_cv_search_CPXopenCPLEX=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CPXopenCPLEX" >&5 +$as_echo "$ac_cv_search_CPXopenCPLEX" >&6; } +ac_res=$ac_cv_search_CPXopenCPLEX +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + as_fn_error $? "Could not link to IBM ILOG CPLEX: + use --with-cplex-lib and --with-cplex-link or PKG_LIBS to specify the library path and the libraries to pass to the linker." "$LINENO" 5 +fi + + + + + + + +ac_config_files="$ac_config_files src/Makevars" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cplexAPI $as_me 1.2.11, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to <geliudie@uni-duesseldorf.de>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +cplexAPI config.status 1.2.11 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +exit 0 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..3f7e66e --- /dev/null +++ b/configure.ac @@ -0,0 +1,293 @@ +AC_INIT([cplexAPI], [1.2.11], [geliudie@uni-duesseldorf.de]) + +## adopted from configure.ac in Rcplex_0.3-0 + +dnl # -------------------------------------------------------------------- +dnl # global (environment) variables +dnl # -------------------------------------------------------------------- +dnl +dnl # PKG_CPPFLAGS C preprocessor flags -I... +dnl # PKG_CFLAGS C compiler flags +dnl # PKG_LIBS libraries -l... + + +dnl # -------------------------------------------------------------------- +dnl # R compiler and flags +dnl # -------------------------------------------------------------------- + +: ${R_HOME=`R RHOME`} +if test -z "${R_HOME}"; then + echo "could not determine R_HOME" + exit 1 +fi + +dnl # GNU R default settings +CC=`"${R_HOME}/bin/R" CMD config CC` +CPP=`"${R_HOME}/bin/R" CMD config CPP` +CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` +AC_PROG_CC +AC_PROG_CPP + + +dnl # -------------------------------------------------------------------- +dnl # template config.h.in +dnl # -------------------------------------------------------------------- + +AC_CONFIG_HEADERS([src/config.h]) + + +dnl # -------------------------------------------------------------------- +dnl # test for global variables +dnl # -------------------------------------------------------------------- + +ARGS_OK="FALSE" + +if test [ -n "$PKG_CPPFLAGS" -a -n "$PKG_LIBS" ] ; then + ARGS_OK="TRUE" +else + if test [ -n "$PKG_CPPFLAGS" -o -n "$PKG_LIBS" ] ; then + AC_MSG_ERROR([Please set both variables: PKG_CPPFLAGS AND PKG_LIBS]) + fi +fi + + +dnl # -------------------------------------------------------------------- +dnl # get arguments +dnl # -------------------------------------------------------------------- + +AC_ARG_WITH(cplex-include, + AC_HELP_STRING([--with-cplex-include=PATH], + [location of CPLEX include directory] + ), + [CPLEX_INCLUDE=$withval], + [CPLEX_INCLUDE=""]) + +AC_ARG_WITH(cplex-lib, + AC_HELP_STRING([--with-cplex-lib=PATH], + [location of CPLEX callable library] + ), + [CPLEX_LIB=$withval], + [CPLEX_LIB=""]) + +AC_ARG_WITH(cplex-link, + AS_HELP_STRING([--with-cplex-link], + [libraries to pass to the linker] + ), + CPLEX_LINK=$withval, + CPLEX_LINK="") + +AC_ARG_WITH(cplex-cflags, + AS_HELP_STRING([--with-cplex-cflags], + [C flags for interface compilation] + ), + CPLEX_CFLAGS=$withval, + CPLEX_CFLAGS="") + +AC_ARG_WITH(cplex-dir, + AS_HELP_STRING([--with-cplex-dir], + [CPLEX installation directory] + ), + CPLEX_DIR=$withval, + CPLEX_DIR="") + +dnl # CPLEX file check.c for debugging +AC_ARG_WITH(cplex-check, + AC_HELP_STRING([--with-cplex-check=PATH], + [location of CPLEX file check.c] + ), + [CPLEX_CHECK=$withval], + [CPLEX_CHECK=""]) + + +dnl # -------------------------------------------------------------------- +dnl # test arguments +dnl # -------------------------------------------------------------------- + +dnl # include and library directories +if test [ "$ARGS_OK" = "FALSE" ] ; then + + if test [ -n "$CPLEX_INCLUDE" -a -n "$CPLEX_LIB" ] ; then + + if test [ -d "$CPLEX_INCLUDE" ] ; then + PKG_CPPFLAGS="-I${CPLEX_INCLUDE}" + else + AC_MSG_ERROR([directory $CPLEX_INCLUDE does not exist]) + fi + + if test [ -d "$CPLEX_LIB" ] ; then + PKG_LIBS="-L${CPLEX_LIB}" + else + AC_MSG_ERROR([directory $CPLEX_LIB does not exist]) + fi + + if test [ -n "$CPLEX_LINK" ] ; then + PKG_LIBS="${PKG_LIBS} $CPLEX_LINK" + else + PKG_LIBS="${PKG_LIBS} -lcplex -lm -pthread" + fi + + if test [ -n "$CPLEX_CFLAGS" ] ; then + PKG_CFLAGS="$CPLEX_CFLAGS" + fi + +dnl # debugging routines + if test [ -n "${CPLEX_CHECK}" -a -r "${CPLEX_CHECK}/check.c" ] ; then + CPLEX_CHECK_PATH="${CPLEX_CHECK}" + NO_CHECK="FALSE" + else + AC_MSG_WARN([cannot find file 'check.c']) + NO_CHECK="TRUE" + fi + ARGS_OK="TRUE" + else + if test [ -n "$CPLEX_INCLUDE" -o -n "$CPLEX_LIB" ] ; then + AC_MSG_ERROR([Please set both options: --with-cplex-include AND --with-cplex-lib]) + fi + fi +fi + + +dnl # install directory (guess) +if test [ "$ARGS_OK" = "FALSE" -a -z "$CPLEX_DIR" ] ; then + + AC_PATH_PROG(CPLEX_BIN, cplex, "NONE") + + if test [ "$CPLEX_BIN" = "NONE" ] ; then + AC_MSG_ERROR([CPLEX interactive optimizer not found]) + else + CPLEX_DIR=`AS_DIRNAME(["$CPLEX_BIN"])` + MACHINE=`expr //$CPLEX_DIR : '.*/\(.*\)'` + CPLEX_DIR=`AS_DIRNAME(["$CPLEX_DIR"])` + if test [ -z "$MACHINE" -o ! -d "${CPLEX_DIR}/${MACHINE}" ] ; then + AC_MSG_ERROR([could not determine platform type]) + fi + AC_MSG_NOTICE([platform type is $MACHINE]) + CPLEX_DIR=`AS_DIRNAME(["$CPLEX_DIR"])` + fi +fi + + +dnl # install directory (--with-cplex-dir) +if test [ "$ARGS_OK" = "FALSE" ] ; then + +dnl check for awk + AC_PROG_AWK + + if test [ ! -d "$CPLEX_DIR/include" ] ; then + AC_MSG_ERROR([CPLEX install directory not found: $CPLEX_DIR/include does not exist]) + fi + + if test [ -z "$MACHINE" ] ; then + MACHINE=`ls -l ${CPLEX_DIR}/lib | ${AWK} '($1 ~ /^d/) { print $NF }' | head -n 1` + if test [ -z "$MACHINE" -o ! -d "$CPLEX_DIR/lib/${MACHINE}" ] ; then + AC_MSG_ERROR([could not determine platform type]) + fi + AC_MSG_NOTICE([platform type is $MACHINE]) + fi + + LIBFORMAT=`ls -l ${CPLEX_DIR}/lib/${MACHINE} | ${AWK} '($1 ~ /^d/) { print $NF }' | head -n 1` + if test [ -z "$LIBFORMAT" -o ! -d "${CPLEX_DIR}/lib/${MACHINE}/${LIBFORMAT}" ] ; then + AC_MSG_ERROR([could not determine library type]) + fi + AC_MSG_NOTICE([library type is $LIBFORMAT]) + + CPLEX_MAKEFILE="${CPLEX_DIR}/examples/${MACHINE}/${LIBFORMAT}/Makefile" + if test [! -f "$CPLEX_MAKEFILE" ] ; then + AC_MSG_ERROR([could not find Makefile in $CPLEX_MAKEFILE]) + fi + AC_MSG_NOTICE([path to example Makefile is $CPLEX_MAKEFILE]) + CPLEXLIBDIR="${CPLEX_DIR}/lib/${MACHINE}/${LIBFORMAT}" + + MAKEFILEVERSION=`${AWK} 'BEGIN {ORS = ""} /^CLNFLAGS/ { print $3 }' ${CPLEX_MAKEFILE}` + ## AC_MSG_NOTICE([version $MAKEFILEVERSION]) + + if test [ "${MAKEFILEVERSION}" = "-lcplex" ] ; then + CPLEX_LIBS="-L${CPLEXLIBDIR} `${AWK} 'BEGIN {ORS = " "} /^CLNFLAGS/ { for (i=3;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}`" + else + CPLEX_LIBS="-L${CPLEXLIBDIR} `${AWK} 'BEGIN {ORS = " "} /^CLNFLAGS/ { for (i=4;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}`" + fi + if test [ -z CPLEX_LIBS ] ; then + AC_MSG_ERROR([could not get linker options from CPLEX example Makefile]) + fi + ## AC_MSG_NOTICE([CPLEX_LIBS is $CPLEX_LIBS]) + + CPLEX_COPT=`${AWK} 'BEGIN {ORS = " "} /^COPT/ { for (i=3;i<=NF;++i) print $i }' ${CPLEX_MAKEFILE}` + if test [ -z CPLEX_COPT ] ; then + AC_MSG_ERROR([could not get compiler options from CPLEX example Makefile]) + fi + + CPLEX_CHECK_PATH="${CPLEX_DIR}/examples/src/c" + if test [ -r "${CPLEX_CHECK_PATH}/check.c" ] ; then + NO_CHECK="FALSE" + else + AC_MSG_WARN([cannot find file 'check.c']) + NO_CHECK="TRUE" + fi + + PKG_CFLAGS="$CPLEX_COPT" + PKG_CPPFLAGS="-I$CPLEX_DIR/include" + PKG_LIBS="$CPLEX_LIBS" + ARGS_OK="TRUE" +fi + + +if test [ ! "$ARGS_OK" = "TRUE" ] ; then + AC_MSG_ERROR([no cplex installation found]) +fi + + +dnl # debugging routines +if test [ -n "${CPLEX_CHECK_PATH}" -a "${NO_CHECK}" = "FALSE" ] ; then + if test [ -e "${CPLEX_CHECK_PATH}/check.c" -a -r "${CPLEX_CHECK_PATH}/check.c" ] ; then + cp ${CPLEX_CHECK_PATH}/check.c src/ + if test [ -r "src/check.c" ] ; then + echo "#define printf Rprintf" | cat - src/check.c > src/tmp.c + if test [ $? -ne 0 ] ; then + AC_MSG_ERROR([modifying file 'check.c' failed]) + fi + mv src/tmp.c src/check.c + if test [ -e "tmp.c" ] ; then + AC_MSG_ERROR([removing file 'tmp.c' failed]) + fi + AC_DEFINE([USE_CHECK], [1], [defined, if check.c can be used]) + #AC_DEFINE([CPLEXX_NAMES], [1], [defined, if check.c can be used]) + PKG_CPPFLAGS="-DHAVE_CONFIG_H ${PKG_CPPFLAGS}" + else + AC_MSG_WARN([copying file check.c failed]) + fi + else + AC_MSG_WARN([can not read file check.c]) + fi +fi + + +dnl # -------------------------------------------------------------------- +dnl # check header and library +dnl # -------------------------------------------------------------------- + +LIBS="${PKG_LIBS}" +CFLAGS="${CFLAGS} ${PKG_CFLAGS}" +CPPFLAGS="${CPPFLAGS} ${PKG_CPPFLAGS}" + +AC_CHECK_HEADER([ilcplex/cplex.h], , + AC_MSG_ERROR([Could not find cplex.h: + cplexAPI requires IBM ILOG CPLEX from http://www.ibm.com/. + use --with-cplex-include or PKG_CPPFLAGS to specify the include path.])) + + +AC_SEARCH_LIBS([CPXopenCPLEX], [cplex], , + AC_MSG_ERROR([Could not link to IBM ILOG CPLEX: + use --with-cplex-lib and --with-cplex-link or PKG_LIBS to specify the library path and the libraries to pass to the linker.])) + + +dnl # -------------------------------------------------------------------- +dnl # substitute src/Makevars +dnl # -------------------------------------------------------------------- + +AC_SUBST(PKG_CFLAGS) +AC_SUBST(PKG_LIBS) +AC_SUBST(PKG_CPPFLAGS) +AC_OUTPUT(src/Makevars) + +exit 0 diff --git a/configure.win b/configure.win new file mode 100644 index 0000000..e69de29 diff --git a/inst/INSTALL b/inst/INSTALL new file mode 100644 index 0000000..8d8b228 --- /dev/null +++ b/inst/INSTALL @@ -0,0 +1,117 @@ +GNU R package cplexAPI: R Interface to C API of IBM ILOG CPLEX + + +The installation procedure for the cplexAPI package needs to know where to +find the CPLEX include directory and where to find the callable library. + + +# ---------------------------------------------------------------------------- # +# Linux and MacOS X installation +# ---------------------------------------------------------------------------- # + +The locations of the CPLEX callable library and the CPLEX include directory +can be found in <cplex_dir>/README.html>, where <cplex_dir> is the CPLEX +installation directory. Also have a look at the variables CLNFLAGS and COPT +in the example Makefile of your CPLEX installation. There, the variable +CPLEXLIBDIR points to the callable library directory. + + +There are several ways of installing the cplexAPI package: + +1) Set variables PKG_CFLAGS, PKG_CPPFLAGS and PKG_LIBS directly, e.g.: + + R CMD INSTALL --configure-args =" \ + PKG_CFLAGS='-m64 -fPIC' \ + PKG_CPPFLAGS='-I<cplex_dir>/cplex/include' \ + PKG_LIBS='-L${CPLEXLIBDIR} -lcplex -m64 -lm -pthread'" \ + cplexAPI_x.x.x.tar.gz + + PKF_CFLAGS is optional, but both PKG_CPPFLAGS and PKG_LIBS must be given. + +2) Use --with-cplex-<ARG>: + + --with-cplex-include=PATH with PATH being the include directory of CPLEX + + --with-cplex-lib=PATH with PATH being the directory containing the + callable library of CPLEX. + + R CMD INSTALL --configure-args=" \ + --with-cplex-include=/path/to/include/dir \ + --with-cplex-lib=/path/to/lib/dir" cplexAPI_x.x.x.tar.gz + + When using --with-cplex-<ARG>, both arguments --with-cplex-lib and + --with-cplex-include must be given. + + --with-cplex-link=-l... libraries to path to the linker during + compilation. + + If --with-cplex-link is not given, '-lcplex -lm -pthread' will be used + as default. + + --with-cplex-cflags=... optional CFLAGS + + A further argument can be used in order to use the debuging routines included + in the C API of CPLEX: + + --with-cplex-check=PATH with PATH being the directory containing the + file check.c from the CPLEX examples directory. + + R CMD INSTALL --configure-args=" \ + --with-cplex-lib='/path/to/lib/dir' \ + --with-cplex-include='/path/to/include/dir' \ + --with-cplex-link='-lcplex -m64 -lm -pthread' \ + --with-cplex-cflags='-m64 -fPIC' \ + --with-cplex-check='/path/to/examples/dir/examples/src/c'" \ + cplexAPI_x.x.x.tar.gz + + +3) Give the location of the CPLEX installation: + + --with-cplex-dir=PATH + + with PATH being the CPLEX directory. This is not the CPLEX installation + directory <cplex_dir>, it is the directory including the lib/ include/ and + examples/ directory. Usually this is <cplex_dir>/cplex. + + R CMD INSTALL --configure-args=" + --with-cplex-dir='<cplex_dir>/cplex'" \ + cplexAPI_x.x.x.tar.gz + + This procedure will take the first system type and library format it finds. + Information reqired for the compilation is taken from the example Makefile. + + +4) Give no information: + + R CMD INSTALL cplexAPI_x.x.x.tar.gz + + This procedure will try to find the CPLEX interactive optimizer, or the + CPLEX_BIN environment variable pointing to the CPLEX interactive optimizer + will be used. The directory two levels above is used as CPLEX directory, all + other information is taken from teh CPLEX example Makefile as in #3 above. + + +# ---------------------------------------------------------------------------- # +# Windows installation +# ---------------------------------------------------------------------------- # + +For the installation on Windows systems the file Makewars.win in src/ is +required. The file looks like this: + +PKG_CPPFLAGS=-g -D_R_=1 -DUSE_R=1 -I"${CPLEX_STUDIO_DIR}\cplex\include" +PKG_LIBS=-L"${CPLEX_STUDIO_LIB32}" -L"${CPLEX_STUDIO_LIB64}" -lm -lcplex124 + +with the environment variable CPLEX_PATH being the installation directory +of CPLEX. This procedure was tested successfully on 32-bit Windows XP. + + +# ---------------------------------------------------------------------------- # + +See also: http://www.stats.ox.ac.uk/~ripley/Win64/W64porting.html + +If you want to have both 32- and 64 bit DLLs of libcplex in your PATH, +a good way is to set PATH in +R_HOME/etc/i386/Renviron.site for 32-bit and in +R_HOME/etc/x64/Renviron.site for 64-bit. +Also the variables CPLEX_STUDIO_DIR, CPLEX_STUDIO_LIB32 and +CPLEX_STUDIO_LIB64 can be set here. diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd new file mode 100644 index 0000000..7ebb4de --- /dev/null +++ b/inst/NEWS.Rd @@ -0,0 +1,310 @@ +%% cplexAPI Version History + +\name{NEWS} +\title{cplexAPI News} +\encoding{UTF-8} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.11 2014-07-28}{ + \itemize{ + \item added support for new parameter names introduced in IBM ILOG CPLEX + version 12.6 + \item fixed a bug in function \code{addQConstrCPLEX()} + \item added functions \code{getQConstrCPLEX()}, \code{delQConstrsCPLEX()}, + \code{addIndConstrCPLEX()}, \code{getIndConstrCPLEX()} and + \code{delIndConstrsCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.10 2013-09-28}{ + \itemize{ + \item added function \code{addQConstrCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.9 2013-05-23}{ + \itemize{ + \item added functions \code{copyOrderCPLEX()}, \code{getOrderCPLEX()}, + \code{readCopyOrderCPLEX} and \code{ordWriteCPLEX} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.8 2013-04-10}{ + \itemize{ + \item bugfix in function \code{getMIPrelGapCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.7 2013-04-08}{ + \itemize{ + \item added function \code{getMIPrelGapCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.6 2013-01-23}{ + \itemize{ + \item does not print the version number of IBM ILOG CPLEX on startup, + because of problems with IBM ILOG CPLEX versions less than 12.5 + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.5 2013-01-23}{ + \itemize{ + \item added support for IBM ILOG CPLEX version 12.5 + \item minor update in file \file{configure.ac} to be compatible with + IBM ILOG CPLEX version 12.5 + \item minor change in file \file{src/Makevars.win} + \item prints the version number of IBM ILOG CPLEX on startup + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.4 2012-12-19}{ + \itemize{ + \item added functions \code{copyQPsepCPLEX} and \code{checkCopyQPsepCPLEX} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.3 2012-10-01}{ + \itemize{ + \item added getMIPstartsCPLEX to \file{NAMESPACE} + \item added function \code{getBestObjValCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.2 2012-04-20}{ + \itemize{ + \item renamed \code{cplexPtr} method \code{isNULLpointer} to + \code{isNULLpointerCPLEX} + + \item renamed \code{cplexPtr} method \code{pType} to \code{cplexPtrType} + + \item renamed \code{cplexPtr} method \code{ptr} to \code{cplexPointer} + + \item renamed \code{cplexPtr} slot \code{pType} to \code{cplexPtrType} + + \item renamed \code{cplexPtr} slot \code{ptr} to \code{cplexPointer} + + \item updated \file{configure.ac} script, see \file{INSTALL} for updated + installation instructions + + \item updated \file{configure.ac} script: all \code{printf} commands in + \file{check.c} will be replaced trough \code{Rprintf} during configure + + \item file \file{NEWS} is now in \file{inst/NEWS.Rd} + + \item function \file{getMIPstartsCPLEX()} is not exported, it is not + working properly + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.1 2012-03-15}{ + \itemize{ + \item added functions \code{refineConflictExtCPLEX()}, + \code{getConflictExtCPLEX()}, + \code{refineMIPstartConflictCPLEX()}, + \code{refineMIPstartConflictExtCPLEX()}, + \code{getNumQPnzCPLEX()}, + \code{getNumQuadCPLEX()}, + \code{getQPcoefCPLEX()}, + \code{getQuadCPLEX()} and + \code{chgQPcoefCPLEX()}. + + \item exported API-functions are registered + + \item added finalizers for pointers to IBM ILOG CPLEX environments + + \item Functions like \code{openEnvCPLEX()} and \code{initProbCPLEX()} return + now instances of class \code{cplexPtr}. This class has two slots: + \tabular{ll}{ + pType \tab a character string giving the pointer type and \cr + ptr \tab a pointer to a C structure \cr + } + + \item updated package vignette + + \item C function \code{status_message()} now uses \code{REprintf} instead of + \code{fprintf} to printing to \code{stderr} + + \item C function \code{printTerminate()} uses Rprintf instead of printf + + \item added methods \code{isNULLpointer}, \code{isCPLEXprobPointer}, + \code{isCPLEXenvPointer}, \code{isCPLEXfilePointer}, + \code{isCPLEXchanPointer} and \code{isCPLEXtermPointer} for objects + of class \code{cplexPtr} + + \item method \code{show} for objects of class \code{cplexPtr} + + \item method \code{summary} for objects of class \code{cplexPtr} + + \item method \code{show} for objects of class \code{cplexError} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.2.0 2012-02-21}{ + \itemize{ + \item added functions \code{addMIPstartsCPLEX()}, + \code{chgMIPstartsCPLEX()}, + \code{getMIPstartsCPLEX()}, + \code{getNumMIPstartsCPLEX()}, + \code{delMIPstartsCPLEX()}, + \code{writeMIPstartsCPLEX()}, + \code{readCopyMIPstartsCPLEX()}, + \code{getMIPstartNameCPLEX()} and + \code{getMIPstartIndexCPLEX()}. + + \item added support for IBM ILOG CPLEX version 12.4 + + \item added \code{-Wl,-no_compact_unwind} to \file{configure.ac} for + MacOS X amd64 + + \item S3 class \code{cpxerr} is now S4 class \code{cplexError} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.9 2012-02-03}{ + \itemize{ + \item added functions \code{checkCopyQuadCPLEX()}, + \code{copyQuadCPLEX()} and + \code{qpoptCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.8 2011-08-24}{ + \itemize{ + \item minor update in \file{configure.ac} + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.7 2011-08-22}{ + \itemize{ + \item added compatibility to IBM ILOG CPLEX version 12.3: new functions + \code{getInfoLongParmCPLEX()}, \code{getLongParmCPLEX()} and + \code{setLongParmCPLEX()} + + \item removed argument \code{ncols} from \code{getLowBndsIdsCPLEX()} and + \code{getUppBndsIdsCPLEX()} + + \item \code{getStatStrCPLEX()} needs argument \code{env}, it can not be + \code{NULL} + + \item \code{getParmTypeCPLEX()} returns instance of class \code{cpxerr} when + failed + + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.6 2011-08-17}{ + \itemize{ + \item avoid changing parameters by assignment + \item some changes in S3 class \code{cpxerr}, new methods: + \tabular{ll}{ + \code{as.cpxerr} \tab default constructor \cr + \code{errmsg} \tab get error message \cr + \code{errnum} \tab get error number \cr + \code{err} \tab cat error message \cr + \code{'errnum<-'} \tab set/change error number \cr + } + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.5 2011-07-28}{ + \itemize{ + \item added \file{NAMESPACE} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.4 2011-07-27}{ + \itemize{ + \item removed file \file{COPYING} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.3 2011-07-27}{ + \itemize{ + \item updated package vignette + \item added files \file{INSTALL} and \file{README} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.2 2011-07-26}{ + \itemize{ + \item updated \file{configure.ac} script + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.1 2011-07-12}{ + \itemize{ + \item renamed from sybilCPLEX to \pkg{cplexAPI} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.0 2011-05-17}{ + \itemize{ + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.1 2010-12-14}{ + \itemize{ + \item fixed a bug in \code{chgRhsCPLEX()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.0 2010-08-19}{ + \itemize{ + \item initial public release + } +} + + + diff --git a/inst/README b/inst/README new file mode 100644 index 0000000..354a673 --- /dev/null +++ b/inst/README @@ -0,0 +1,6 @@ +GNU R package cplexAPI: R Interface to C API of IBM ILOG CPLEX + +The package cplexAPI requires a working installation of IBM ILOG CPLEX +(version >= 12.1). For regulary usage of IBM ILOG CPLEX, the environment +variable ILOG_LICENSE_FILE must be set to the location of the IBM ILOG CPLEX +license file. diff --git a/inst/c2r.map b/inst/c2r.map new file mode 100644 index 0000000..bf4b041 --- /dev/null +++ b/inst/c2r.map @@ -0,0 +1,198 @@ +#------------------------------------------------------------------------------# +# map IBM ILOG CPLEX function names to cplexAPI function names # +#------------------------------------------------------------------------------# + +# IBM ILOG CPLEX # cplexAPI + +CPXaddchannel <- cplexAPI::addChannelCPLEX +CPXaddcols <- cplexAPI::addColsCPLEX +CPXaddfpdest <- cplexAPI::addFpDestCPLEX +CPXaddindconstr <- cplexAPI::addIndConstrCPLEX +CPXaddmipstarts <- cplexAPI::addMIPstartsCPLEX +CPXaddrows <- cplexAPI::addRowsCPLEX +CPXaddqconstr <- cplexAPI::addQConstrCPLEX +CPXbaropt <- cplexAPI::baroptCPLEX +CPXmbasewrite <- cplexAPI::baseWriteCPLEX +CPXbasicpresolve <- cplexAPI::basicPresolveCPLEX +CPXboundsa <- cplexAPI::boundSaCPLEX +CPXclpwrite <- cplexAPI::cLpWriteCPLEX +CPXcheckaddcols <- cplexAPI::checkAddColsCPLEX +CPXcheckaddrows <- cplexAPI::checkAddRowsCPLEX +CPXcheckchgcoeflist <- cplexAPI::checkChgCoefListCPLEX +CPXcheckcopyctype <- cplexAPI::checkCopyColTypeCPLEX +CPXcheckcopylp <- cplexAPI::checkCopyLpCPLEX +CPXcheckcopylpwnames <- cplexAPI::checkCopyLpwNamesCPLEX +CPXcheckcopyqpsep <- cplexAPI::checkCopyQPsepCPLEX +CPXcheckcopyquad <- cplexAPI::checkCopyQuadCPLEX +CPXcheckvals <- cplexAPI::checkValsCPLEX +CPXchgbds <- cplexAPI::chgBndsCPLEX +CPXchgcoef <- cplexAPI::chgCoefCPLEX +CPXchgcoeflist <- cplexAPI::chgCoefListCPLEX +CPXchgcolname <- cplexAPI::chgColNameCPLEX +CPXchgctype <- cplexAPI::chgColTypeCPLEX +CPXchgmipstarts <- cplexAPI::chgMIPstartsCPLEX +CPXchgname <- cplexAPI::chgNameCPLEX +CPXchgobj <- cplexAPI::chgObjCPLEX +CPXchgprobname <- cplexAPI::chgProbNameCPLEX +CPXchgprobtype <- cplexAPI::chgProbTypeCPLEX +CPXchgqpcoef <- cplexAPI::chgQPcoefCPLEX +CPXchgrhs <- cplexAPI::chgRhsCPLEX +CPXchgrngval <- cplexAPI::chgRngValCPLEX +CPXchgrowname <- cplexAPI::chgRowNameCPLEX +CPXchgsense <- cplexAPI::chgSenseCPLEX +CPXcleanup <- cplexAPI::cleanupCoefCPLEX +CPXcloneprob <- cplexAPI::cloneProbCPLEX +CPXcloseCPLEX <- cplexAPI::closeEnvCPLEX +CPXfclose <- cplexAPI::closeFileCPLEX +CPXcompletelp <- cplexAPI::completelpCPLEX +CPXcopybase <- cplexAPI::copyBaseCPLEX +CPXcopyctype <- cplexAPI::copyColTypeCPLEX +CPXcopylp <- cplexAPI::copyLpCPLEX +CPXcopylpwnames <- cplexAPI::copyLpwNamesCPLEX +CPXcopyobjname <- cplexAPI::copyObjNameCPLEX +CPXcopyorder <- cplexAPI::copyOrderCPLEX +CPXcopypartialbase <- cplexAPI::copyPartBaseCPLEX +CPXcopyqpsep <- cplexAPI::copyQPsepCPLEX +CPXcopyquad <- cplexAPI::copyQuadCPLEX +CPXcopystart <- cplexAPI::copyStartCPLEX +CPXdelchannel <- cplexAPI::delChannelCPLEX +CPXdelcols <- cplexAPI::delColsCPLEX +CPXdelfpdest <- cplexAPI::delFpDestCPLEX +CPXdelindconstrs <- cplexAPI::delIndConstrsCPLEX +CPXdelmipstarts <- cplexAPI::delMIPstartsCPLEX +CPXdelnames <- cplexAPI::delNamesCPLEX +CPXdelqconstrs <- cplexAPI::delQConstrsCPLEX +CPXfreeprob <- cplexAPI::delProbCPLEX +CPXdelrows <- cplexAPI::delRowsCPLEX +CPXdelsetcols <- cplexAPI::delSetColsCPLEX +CPXdelsetrows <- cplexAPI::delSetRowsCPLEX +CPXsetterminate <- cplexAPI::delTerminateCPLEX +CPXdisconnectchannel <- cplexAPI::disconnectChannelCPLEX +CPXdualwrite <- cplexAPI::dualWriteCPLEX +CPXdualopt <- cplexAPI::dualoptCPLEX +CPXfeasopt <- cplexAPI::feasOptCPLEX +CPXfputs <- cplexAPI::fileputCPLEX +CPXflushchannel <- cplexAPI::flushChannelCPLEX +CPXflushstdchannels <- cplexAPI::flushStdChannelsCPLEX +CPXfreepresolve <- cplexAPI::freePresolveCPLEX +CPXgetbase <- cplexAPI::getBaseCPLEX +CPXgetbestobjval <- cplexAPI::getBestObjValCPLEX +CPXgetchannels <- cplexAPI::getChannelsCPLEX +CPXgetchgparam <- cplexAPI::getChgParmCPLEX +CPXgetcoef <- cplexAPI::getCoefCPLEX +CPXgetcolindex <- cplexAPI::getColIndexCPLEX +CPXgetcolinfeas <- cplexAPI::getColInfeasCPLEX +CPXgetcolname <- cplexAPI::getColNameCPLEX +CPXgetctype <- cplexAPI::getColTypeCPLEX +CPXgetcols <- cplexAPI::getColsCPLEX +CPXgetconflict <- cplexAPI::getConflictCPLEX +CPXgetconflictext <- cplexAPI::getConflictExtCPLEX +CPXgetcutoff <- cplexAPI::getCutoffCPLEX +CPXgetdblparam <- cplexAPI::getDblParmCPLEX +CPXgetdblquality <- cplexAPI::getDblQualCPLEX +CPXgetdsbcnt <- cplexAPI::getDbsCntCPLEX +CPXgetdj <- cplexAPI::getDjCPLEX +CPXgeterrorstring <- cplexAPI::getErrorStrCPLEX +CPXgetgrad <- cplexAPI::getGradCPLEX +CPXgetindconstr <- cplexAPI::getIndConstrCPLEX +CPXinfodblparam <- cplexAPI::getInfoDblParmCPLEX +CPXinfointparam <- cplexAPI::getInfoIntParmCPLEX +CPXinfolongparam <- cplexAPI::getInfoLongParmCPLEX +CPXinfostrparam <- cplexAPI::getInfoStrParmCPLEX +CPXgetintparam <- cplexAPI::getIntParmCPLEX +CPXgetintquality <- cplexAPI::getIntQualCPLEX +CPXgetitcnt <- cplexAPI::getItCntCPLEX +CPXgetlogfile <- cplexAPI::getLogFileCPLEX +CPXgetlongparam <- cplexAPI::getLongParmCPLEX +CPXgetlb <- cplexAPI::getLowerBndsCPLEX +CPXgetmiprelgap <- cplexAPI::getMIPrelGapCPLEX +CPXgetmipstartindex <- cplexAPI::getMIPstartIndexCPLEX +CPXgetmipstartname <- cplexAPI::getMIPstartNameCPLEX +CPXgetmipstarts <- cplexAPI::getMIPstartsCPLEX +CPXgetmethod <- cplexAPI::getMethodCPLEX +CPXgetnumcols <- cplexAPI::getNumColsCPLEX +CPXgetnummipstarts <- cplexAPI::getNumMIPstartsCPLEX +CPXgetnumnz <- cplexAPI::getNumNnzCPLEX +CPXgetnumqpnz <- cplexAPI::getNumQPnzCPLEX +CPXgetnumquad <- cplexAPI::getNumQuadCPLEX +CPXgetnumrows <- cplexAPI::getNumRowsCPLEX +CPXgetobj <- cplexAPI::getObjCPLEX +CPXgetobjsen <- cplexAPI::getObjDirCPLEX +CPXgetobjname <- cplexAPI::getObjNameCPLEX +CPXgetobjoffset <- cplexAPI::getObjOffsetCPLEX +CPXgetobjval <- cplexAPI::getObjValCPLEX +CPXgetorder <- cplexAPI::getOrderCPLEX +CPXgetparamname <- cplexAPI::getParmNameCPLEX +CPXgetparamnum <- cplexAPI::getParmNumCPLEX +CPXgetparamtype <- cplexAPI::getParmTypeCPLEX +CPXgetphase1cnt <- cplexAPI::getPhase1CntCPLEX +CPXgetpi <- cplexAPI::getPiCPLEX +CPXgetprestat <- cplexAPI::getPreStatCPLEX +CPXgetprobname <- cplexAPI::getProbNameCPLEX +CPXgetprobtype <- cplexAPI::getProbTypeCPLEX +CPXgetx <- cplexAPI::getProbVarCPLEX +CPXqindconstr <- cplexAPI::getQConstrCPLEX +CPXgetqpcoef <- cplexAPI::getQPcoefCPLEX +CPXgetquad <- cplexAPI::getQuadCPLEX +CPXgetredlp <- cplexAPI::getRedLpCPLEX +CPXgetrhs <- cplexAPI::getRhsCPLEX +CPXgetrngval <- cplexAPI::getRngValCPLEX +CPXgetrowindex <- cplexAPI::getRowIndexCPLEX +CPXgetrowinfeas <- cplexAPI::getRowInfeasCPLEX +CPXgetrowname <- cplexAPI::getRowNameCPLEX +CPXgetrows <- cplexAPI::getRowsCPLEX +CPXgetsense <- cplexAPI::getSenseCPLEX +CPXgetsiftitcnt <- cplexAPI::getSiftItCntCPLEX +CPXgetsiftphase1cnt <- cplexAPI::getSiftPase1CntCPLEX +CPXgetslack <- cplexAPI::getSlackCPLEX +CPXgetstat <- cplexAPI::getStatCPLEX +CPXgetstatstring <- cplexAPI::getStatStrCPLEX +CPXgetstrparam <- cplexAPI::getStrParmCPLEX +CPXgetsubmethod <- cplexAPI::getSubMethodCPLEX +CPXgetsubstat <- cplexAPI::getSubStatCPLEX +CPXgettime <- cplexAPI::getTimeCPLEX +CPXgetub <- cplexAPI::getUpperBndsCPLEX +CPXversion <- cplexAPI::getVersionCPLEX +CPXhybbaropt <- cplexAPI::hybbaroptCPLEX +CPXhybnetopt <- cplexAPI::hybnetoptCPLEX +CPXcreateprob <- cplexAPI::initProbCPLEX +CPXlpopt <- cplexAPI::lpoptCPLEX +CPXmipopt <- cplexAPI::mipoptCPLEX +CPXnewcols <- cplexAPI::newColsCPLEX +CPXnewrows <- cplexAPI::newRowsCPLEX +CPXobjsa <- cplexAPI::objSaCPLEX +CPXopenCPLEX <- cplexAPI::openEnvCPLEX +CPXfopen <- cplexAPI::openFileCPLEX +CPXordwrite <- cplexAPI::ordWriteCPLEX +CPXpreslvwrite <- cplexAPI::preslvWriteCPLEX +CPXpresolve <- cplexAPI::presolveCPLEX +CPXprimopt <- cplexAPI::primoptCPLEX +CPXqpopt <- cplexAPI::qpoptCPLEX +CPXreadcopybase <- cplexAPI::readCopyBaseCPLEX +CPXreadcopymipstarts <- cplexAPI::readCopyMIPstartsCPLEX +CPXreadcopyorder <- cplexAPI::readCopyOrderCPLEX +CPXreadcopyparam <- cplexAPI::readCopyParmCPLEX +CPXreadcopyprob <- cplexAPI::readCopyProbCPLEX +CPXreadcopysol <- cplexAPI::readCopySolCPLEX +CPXrefineconflict <- cplexAPI::refineConflictCPLEX +CPXrefineconflictext <- cplexAPI::refineConflictExtCPLEX +CPXrefinemipstartconflict <- cplexAPI::refineMIPstartConflictCPLEX +CPXrefinemipstartconflictext <- cplexAPI::refineMIPstartConflictExtCPLEX +CPXrhssa <- cplexAPI::rhsSaCPLEX +CPXsetdblparam <- cplexAPI::setDblParmCPLEX +CPXsetdefaults <- cplexAPI::setDefaultParmCPLEX +CPXsetintparam <- cplexAPI::setIntParmCPLEX +CPXsetlogfile <- cplexAPI::setLogFileCPLEX +CPXsetlongparam <- cplexAPI::setLongParmCPLEX +CPXchgobjsen <- cplexAPI::setObjDirCPLEX +CPXsetstrparam <- cplexAPI::setStrParmCPLEX +CPXsiftopt <- cplexAPI::siftoptCPLEX +CPXsolwrite <- cplexAPI::solWriteCPLEX +CPXsolninfo <- cplexAPI::solnInfoCPLEX +CPXsolution <- cplexAPI::solutionCPLEX +CPXtightenbds <- cplexAPI::tightenBndsCPLEX +CPXtuneparam <- cplexAPI::tuneParmCPLEX +CPXunscaleprob <- cplexAPI::unscaleProbCPLEX +CPXwritemipstarts <- cplexAPI::writeMIPstartsCPLEX +CPXwriteparam <- cplexAPI::writeParmCPLEX +CPXwriteprob <- cplexAPI::writeProbCPLEX diff --git a/man/addChannelCPLEX.Rd b/man/addChannelCPLEX.Rd new file mode 100644 index 0000000..435992a --- /dev/null +++ b/man/addChannelCPLEX.Rd @@ -0,0 +1,59 @@ +\name{addChannelCPLEX} +\alias{addChannelCPLEX} +\alias{CPXaddchannel} + +\title{ + Instantiates a New Channel Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddchannel}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addChannelCPLEX(env, ptrtype = "cplex_chan") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{addChannel} which calls the CPLEX + function \code{CPXaddchannel}. +} + +\value{ + If successful, addChannelCPLEX returns a pointer to the new channel object + (an instance of class \code{"\linkS4class{cplexPtr}"}); otherwise, it returns + \code{NULL}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{delChannelCPLEX}}, \code{\link{disconnectChannelCPLEX}}, + \code{\link{flushChannelCPLEX}}, \code{\link{flushStdChannelsCPLEX}}, + \code{\link{getChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/addColsCPLEX.Rd b/man/addColsCPLEX.Rd new file mode 100644 index 0000000..e69bbc4 --- /dev/null +++ b/man/addColsCPLEX.Rd @@ -0,0 +1,88 @@ +\name{addColsCPLEX} +\alias{addColsCPLEX} +\alias{CPXaddcols} + +\title{ + Adds Columns to a Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddcols}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addColsCPLEX(env, lp, ncols, nnz, objf, matbeg, matind, matval, + lb = NULL, ub = NULL, cnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of columns. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{objf}{ + Objective function coefficients. + } + \item{matbeg}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matind}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matval}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{lb}{ + Lower bounds of the new variables. + } + \item{ub}{ + Upper bounds of the new variables. + } + \item{cnames}{ + Names of the new variables. + } +} + +\details{ + Interface to the C function \code{addCols} which calls the CPLEX + function \code{CPXaddcols}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{checkAddColsCPLEX}}, \code{\link{addRowsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/addFpDestCPLEX.Rd b/man/addFpDestCPLEX.Rd new file mode 100644 index 0000000..5c4edf7 --- /dev/null +++ b/man/addFpDestCPLEX.Rd @@ -0,0 +1,59 @@ +\name{addFpDestCPLEX} +\alias{addFpDestCPLEX} +\alias{CPXaddfpdest} + +\title{ + Add a File to the List of Message Destinations for a Channel} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddfpdest}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addFpDestCPLEX(env, newch, cpfile) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{newch}{ + Pointer to an IBM ILOG CPLEX channel as returned by + \code{\link{addChannelCPLEX}}. + } + \item{cpfile}{ + Pointer to an IBM ILOG CPLEX file as returned by + \code{\link{openFileCPLEX}}. + } +} + +\details{ + Interface to the C function \code{addFpDest} which calls the CPLEX + function \code{CPXaddfpdest}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{delFpDestCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/addIndConstrCPLEX.Rd b/man/addIndConstrCPLEX.Rd new file mode 100644 index 0000000..82e7093 --- /dev/null +++ b/man/addIndConstrCPLEX.Rd @@ -0,0 +1,78 @@ +\name{addIndConstrCPLEX} +\alias{addIndConstrCPLEX} +\alias{CPXaddindconstr} + +\title{ + Adds an Indicator Constraint to the Specified CPLEX Problem Object +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddindconstr}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + addIndConstrCPLEX(env, lp, indvar, complemented, + nzcnt, rhs, sense, linind, linval, indname = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{indvar}{ + The binary variable that acts as the indicator for this constraint. + } + \item{complemented}{ + A Boolean value that specifies whether the indicator variable is complemented. + } + \item{nzcnt}{ + An integer that specifies the number of nonzero coefficients in the linear portion + of the indicator constraint. + } + \item{rhs}{ + The righthand side value for the linear portion of the indicator constraint. + } + \item{sense}{ + The sense of the linear portion of the indicator constraint. + } + \item{linind}{ + A vector that with \code{linval} defines the linear portion of the indicator + constraint. + } + \item{linval}{ + A vector that with linind defines the linear portion of the indicator constraint. + } + \item{indname}{ + The name of the constraint to be added (optional). + } +} + +\details{ + Interface to the C function \code{addIndConstr} which calls the CPLEX + function \code{CPXaddindconstr}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/addMIPstartsCPLEX.Rd b/man/addMIPstartsCPLEX.Rd new file mode 100644 index 0000000..0ffdbd5 --- /dev/null +++ b/man/addMIPstartsCPLEX.Rd @@ -0,0 +1,80 @@ +\name{addMIPstartsCPLEX} +\alias{addMIPstartsCPLEX} +\alias{CPXaddmipstarts} + +\title{ + Add Multiple MIP Starts to a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddmipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addMIPstartsCPLEX(env, lp, mcnt, nzcnt, beg, varindices, + values, effortlevel, mipstartname = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{mcnt}{ + Number of MIP starts to be added. + } + \item{nzcnt}{ + Number of variable values to be added. + } + \item{beg}{ + Array of length \code{mcnt} used with \code{varindices} and \code{values}. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{varindices}{ + Array of length \code{nzcnt} containing the numeric indices of the columns + corresponding to the variables which are assigned starting values. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{values}{ + Array of length \code{nzcnt} containing the values to use for the MIP + starts. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{effortlevel}{ + Array of length \code{mcnt}. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{mipstartname}{ + Names of the MIP starts. + } +} + +\details{ + Interface to the C function \code{addMIPstarts} which calls the CPLEX + function \code{CPXaddmipstarts}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/addQConstrCPLEX.Rd b/man/addQConstrCPLEX.Rd new file mode 100644 index 0000000..ba1984b --- /dev/null +++ b/man/addQConstrCPLEX.Rd @@ -0,0 +1,93 @@ +\name{addQConstrCPLEX} +\alias{addQConstrCPLEX} +\alias{CPXaddqconstr} + +\title{ + Add Quadratic Constraint to a Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddqconstr}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addQConstrCPLEX(env, lp, lzn, qzn, rhs, sense, + lind = NULL, lval = NULL, + qrow, qcol, qval, qname = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{lzn}{ + Number of nonzero constraint coefficients in the linear part of the + constraint. + } + \item{qzn}{ + Number of nonzero constraint coefficients in the quadratic part of the + constraint. + } + \item{rhs}{ + Righthand side term. + } + \item{sense}{ + The sense of the constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{lind}{ + Linear part of the quadratic constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{lval}{ + Linear part of the constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{qrow}{ + Quadratic part of the quadratic constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{qcol}{ + Quadratic part of the quadratic constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{qval}{ + Quadratic part of the quadratic constraint to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{qname}{ + Name of the constraint to be added. + } +} + +\details{ + Interface to the C function \code{addQConstr} which calls the CPLEX + function \code{CPXaddqconstr}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/addRowsCPLEX.Rd b/man/addRowsCPLEX.Rd new file mode 100644 index 0000000..99e650d --- /dev/null +++ b/man/addRowsCPLEX.Rd @@ -0,0 +1,94 @@ +\name{addRowsCPLEX} +\alias{addRowsCPLEX} +\alias{CPXaddrows} + +\title{ + Add Constraints to a Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXaddrows}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + addRowsCPLEX(env, lp, ncols, nrows, nnz, matbeg, matind, matval, + rhs = NULL, sense = NULL, + cnames = NULL, rnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of new columns in the constraints being added to the constraint + matrix. + } + \item{nrows}{ + Number of rows. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{matbeg}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matind}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matval}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{rhs}{ + Righthand side term for each constraint to be added. + } + \item{sense}{ + Sense of each constraint to be added. + } + \item{cnames}{ + Names of the new columns. + } + \item{rnames}{ + Names of the new rows. + } +} + +\details{ + Interface to the C function \code{addCols} which calls the CPLEX + function \code{CPXaddcols}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{checkAddRowsCPLEX}}, \code{\link{addColsCPLEX}}, + \code{\link{copyLpCPLEX}}, \code{\link{chgRngValCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/baroptCPLEX.Rd b/man/baroptCPLEX.Rd new file mode 100644 index 0000000..5426649 --- /dev/null +++ b/man/baroptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{baroptCPLEX} +\alias{baroptCPLEX} +\alias{CPXbaropt} + +\title{ + Solve LP, QP or QCP Problem by Means of the Barrier Algorithm +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXbaropt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + baroptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{baropt} which calls the CPLEX + function \code{CPXbaropt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/baseWriteCPLEX.Rd b/man/baseWriteCPLEX.Rd new file mode 100644 index 0000000..bedc91f --- /dev/null +++ b/man/baseWriteCPLEX.Rd @@ -0,0 +1,55 @@ +\name{baseWriteCPLEX} +\alias{baseWriteCPLEX} +\alias{CPXmbasewrite} + +\title{ + Write the Most Current Basis Associated With a CPLEX Problem Object to a File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXmbasewrite}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + baseWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + A filename. + } +} + +\details{ + Interface to the C function \code{baseWrite} which calls the CPLEX + function \code{CPXmbasewrite}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/basicPresolveCPLEX.Rd b/man/basicPresolveCPLEX.Rd new file mode 100644 index 0000000..dbb57d7 --- /dev/null +++ b/man/basicPresolveCPLEX.Rd @@ -0,0 +1,56 @@ +\name{basicPresolveCPLEX} +\alias{basicPresolveCPLEX} +\alias{CPXbasicpresolve} + +\title{ + Perform Bound Strengthening and Detect Redundant Rows +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXbasicpresolve}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + basicPresolveCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{basicPresolve} which calls the CPLEX + function \code{CPXbasicpresolve}. +} + +\value{ + If successfull, a list will be returned: + \item{redlb}{strengthened lower bounds} + \item{redub}{strengthened upper bounds} + \item{rstat}{status of the row} + Otherwise an object of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/boundSaCPLEX.Rd b/man/boundSaCPLEX.Rd new file mode 100644 index 0000000..97a84af --- /dev/null +++ b/man/boundSaCPLEX.Rd @@ -0,0 +1,63 @@ +\name{boundSaCPLEX} +\alias{boundSaCPLEX} +\alias{CPXboundsa} + +\title{ + Access Upper and Lower Sensitivity Ranges for Lower and Upper Variable Bounds +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXboundsa}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + boundSaCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Beginning of the range of ranges to be returned. + } + \item{end}{ + End of the range of ranges to be returned. + } +} + +\details{ + Interface to the C function \code{boundSa} which calls the CPLEX + function \code{CPXboundsa}. +} + +\value{ + If successfull, a list will be returned: + \item{lblower}{lower bound lower range values} + \item{lbupper}{lower bound upper range values} + \item{ublower}{upper bound lower range values} + \item{ubupper}{upper bound upper range values} + Otherwise an object of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/cLpWriteCPLEX.Rd b/man/cLpWriteCPLEX.Rd new file mode 100644 index 0000000..f29ce1a --- /dev/null +++ b/man/cLpWriteCPLEX.Rd @@ -0,0 +1,55 @@ +\name{cLpWriteCPLEX} +\alias{cLpWriteCPLEX} +\alias{CPXclpwrite} + +\title{ + Write an LP Format File Containing Identified Conflict +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXclpwrite}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + cLpWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to write to. + } +} + +\details{ + Interface to the C function \code{cLpWriteCPLEX} which calls the CPLEX + function \code{CPXclpwrite}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/checkAddColsCPLEX.Rd b/man/checkAddColsCPLEX.Rd new file mode 100644 index 0000000..fc6eb2f --- /dev/null +++ b/man/checkAddColsCPLEX.Rd @@ -0,0 +1,89 @@ +\name{checkAddColsCPLEX} +\alias{checkAddColsCPLEX} +\alias{CPXcheckaddcols} + +\title{ + Validate Arguments of the Corresponding \code{addColsCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckaddcols}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkAddColsCPLEX(env, lp, ncols, nnz, objf, matbeg, matind, matval, + lb = NULL, ub = NULL, cnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of columns. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{objf}{ + Objective function coefficients. + } + \item{matbeg}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matind}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matval}{ + Array that specifies the nonzero elements of the columns being added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{lb}{ + Lower bounds of the new variables. + } + \item{ub}{ + Upper bounds of the new variables. + } + \item{cnames}{ + Names of the new variables. + } +} + +\details{ + Interface to the C function \code{checkAddCols} which calls the CPLEX + function \code{CPXcheckaddcols}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addColsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/checkAddRowsCPLEX.Rd b/man/checkAddRowsCPLEX.Rd new file mode 100644 index 0000000..63c485e --- /dev/null +++ b/man/checkAddRowsCPLEX.Rd @@ -0,0 +1,94 @@ +\name{checkAddRowsCPLEX} +\alias{checkAddRowsCPLEX} +\alias{CPXcheckaddrows} + +\title{ + Validate Arguments of the Corresponding \code{addRowsCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckaddrows}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkAddRowsCPLEX(env, lp, ncols, nrows, nnz, matbeg, matind, matval, + rhs = NULL, sense = NULL, + cnames = NULL, rnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of new columns in the constraints being added to the constraint + matrix. + } + \item{nrows}{ + Number of rows. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{matbeg}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matind}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{matval}{ + An array used with rmatind and rmatval to define the rows to be added. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{rhs}{ + Righthand side term for each constraint to be added. + } + \item{sense}{ + Sense of each constraint to be added. + } + \item{cnames}{ + Names of the new columns. + } + \item{rnames}{ + Names of the new rows. + } +} + +\details{ + Interface to the C function \code{checkAddRows} which calls the CPLEX + function \code{CPXcheckaddrows}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addRowsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/checkChgCoefListCPLEX.Rd b/man/checkChgCoefListCPLEX.Rd new file mode 100644 index 0000000..57d79f8 --- /dev/null +++ b/man/checkChgCoefListCPLEX.Rd @@ -0,0 +1,70 @@ +\name{checkChgCoefListCPLEX} +\alias{checkChgCoefListCPLEX} +\alias{CPXcheckchgcoeflist} + +\title{ + Validate Arguments of the Corresponding \code{chgCoefListCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckchgcoeflist}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkChgCoefListCPLEX(env, lp, nnz, ia, ja, ra) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{ia}{ + Row indices of the nonzero elements. + } + \item{ja}{ + Column indices of the nonzero elements. + } + \item{ra}{ + Nonzero elements. + } +} + +\details{ + Interface to the C function \code{checkChgCoefList} which calls the CPLEX + function \code{CPXcheckchgcoeflist}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{chgCoefListCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/checkCopyColTypeCPLEX.Rd b/man/checkCopyColTypeCPLEX.Rd new file mode 100644 index 0000000..04fc571 --- /dev/null +++ b/man/checkCopyColTypeCPLEX.Rd @@ -0,0 +1,60 @@ +\name{checkCopyColTypeCPLEX} +\alias{checkCopyColTypeCPLEX} +\alias{CPXcheckcopyctype} + +\title{ + Validate Arguments of the Corresponding \code{copyColTypeCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckcopyctype}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkCopyColTypeCPLEX(env, lp, xctype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{xctype}{ + A vector containing the type of each column in the constraint matrix. + } +} + +\details{ + Interface to the C function \code{checkCopyColType} which calls the CPLEX + function \code{CPXcheckcopyctype}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{copyColTypeCPLEX}} +} + +\keyword{ optimize } diff --git a/man/checkCopyLpCPLEX.Rd b/man/checkCopyLpCPLEX.Rd new file mode 100644 index 0000000..63c9a4b --- /dev/null +++ b/man/checkCopyLpCPLEX.Rd @@ -0,0 +1,102 @@ +\name{checkCopyLpCPLEX} +\alias{checkCopyLpCPLEX} +\alias{CPXcheckcopylp} + +\title{ + Validate Arguments of the Corresponding \code{copyLpCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckcopylp}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkCopyLpCPLEX(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, rngval = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nCols}{ + Number of columns in the constraint matrix. + } + \item{nRows}{ + Number of rows in the constraint matrix. + } + \item{lpdir}{ + Single integer value that specifies whether the problem is a minimization + or maximization problem. + } + \item{objf}{ + The objective function coefficients. + } + \item{rhs}{ + The righthand side values for each constraint in the constraint matrix. + } + \item{sense}{ + The sense of each constraint in the constraint matrix. + } + \item{matbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{lb}{ + Containing the lower bound on each of the variables. + } + \item{ub}{ + Containing the lower bound on each of the variables. + } + \item{rngval}{ + Containing the range value of each ranged constraint. + } +} + +\details{ + Interface to the C function \code{checkCopyLp} which calls the CPLEX + function \code{CPXcheckcopylp}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{copyLpCPLEX}} +} + +\keyword{ optimize } diff --git a/man/checkCopyLpwNamesCPLEX.Rd b/man/checkCopyLpwNamesCPLEX.Rd new file mode 100644 index 0000000..d1b556e --- /dev/null +++ b/man/checkCopyLpwNamesCPLEX.Rd @@ -0,0 +1,109 @@ +\name{checkCopyLpwNamesCPLEX} +\alias{checkCopyLpwNamesCPLEX} +\alias{CPXcheckcopylpwnames} + +\title{ + Validate Arguments of the Corresponding \code{copyLpwNamesCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckcopylpwnames}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkCopyLpwNamesCPLEX(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, + rngval = NULL, cnames = NULL, rnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nCols}{ + Number of columns in the constraint matrix. + } + \item{nRows}{ + Number of rows in the constraint matrix. + } + \item{lpdir}{ + Single integer value that specifies whether the problem is a minimization + or maximization problem. + } + \item{objf}{ + The objective function coefficients. + } + \item{rhs}{ + The righthand side values for each constraint in the constraint matrix. + } + \item{sense}{ + The sense of each constraint in the constraint matrix. + } + \item{matbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{lb}{ + Containing the lower bound on each of the variables. + } + \item{ub}{ + Containing the lower bound on each of the variables. + } + \item{rngval}{ + Containing the range value of each ranged constraint. + } + \item{cnames}{ + Names of the matrix columns or, equivalently, the variable names. + } + \item{rnames}{ + Names of the matrix rows or, equivalently, the constraint names. + } +} + +\details{ + Interface to the C function \code{checkCopyLpwNames} which calls the CPLEX + function \code{CPXcheckcopylpwnames}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{copyLpwNamesCPLEX}} +} + +\keyword{ optimize } diff --git a/man/checkCopyQPsepCPLEX.Rd b/man/checkCopyQPsepCPLEX.Rd new file mode 100644 index 0000000..a91a0a6 --- /dev/null +++ b/man/checkCopyQPsepCPLEX.Rd @@ -0,0 +1,60 @@ +\name{checkCopyQPsepCPLEX} +\alias{checkCopyQPsepCPLEX} +\alias{CPXcheckcopyqpsep} + +\title{ + Validate Arguments of the Corresponding \code{copyQPsepCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckcopyqpsep}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkCopyQPsepCPLEX(env, lp, qsepvec) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{qsepvec}{ + A vector containing the quadratic coefficients. + } +} + +\details{ + Interface to the C function \code{checkCopyQPsep} which calls the CPLEX + function \code{CPXcheckcopyqpsep}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{copyQPsepCPLEX}} +} + +\keyword{ optimize } diff --git a/man/checkCopyQuadCPLEX.Rd b/man/checkCopyQuadCPLEX.Rd new file mode 100644 index 0000000..e98d7b4 --- /dev/null +++ b/man/checkCopyQuadCPLEX.Rd @@ -0,0 +1,73 @@ +\name{checkCopyQuadCPLEX} +\alias{checkCopyQuadCPLEX} +\alias{CPXcheckcopyquad} + +\title{ + Validate Arguments of the Corresponding \code{checkCopyQuadCPLEX} Routine +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckcopyquad}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + checkCopyQuadCPLEX(env, lp, qmatbeg, qmatcnt, qmatind, qmatval) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{qmatbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } +} + +\details{ + Interface to the C function \code{checkCopyQuad} which calls the CPLEX + function \code{CPXcheckcopyquad}. +} + +\value{ + Nonzero if it detects an error in the data; it returns zero if it does not + detect any data errors. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{copyQuadCPLEX}} +} + +\keyword{ optimize } diff --git a/man/checkValsCPLEX.Rd b/man/checkValsCPLEX.Rd new file mode 100644 index 0000000..87d1e87 --- /dev/null +++ b/man/checkValsCPLEX.Rd @@ -0,0 +1,63 @@ +\name{checkValsCPLEX} +\alias{checkValsCPLEX} +\alias{CPXcheckvals} + +\title{ + Check an Array of Indices and a Corresponding Array of Values for Input Errors +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcheckvals}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + checkValsCPLEX(env, lp, nval, rind = NULL, cind = NULL, val = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nval}{ + Number of values to be examined. + } + \item{rind}{ + Row indices. + } + \item{cind}{ + Column indices. + } + \item{val}{ + The values itself. + } +} + +\details{ + Interface to the C function \code{checkVals} which calls the CPLEX + function \code{CPXcheckvals}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgBndsCPLEX.Rd b/man/chgBndsCPLEX.Rd new file mode 100644 index 0000000..b1ad75c --- /dev/null +++ b/man/chgBndsCPLEX.Rd @@ -0,0 +1,68 @@ +\name{chgBndsCPLEX} +\alias{chgBndsCPLEX} +\alias{CPXchgbds} + +\title{ + Change the Lower or Upper Bounds on a Set of Variables of a Problem +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgbds}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + chgBndsCPLEX(env, lp, ncols, ind, lu, bd) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{lu}{ + A character vector, specifying whether an entry in \code{bd} is a upper + or a lower bound on variable \code{ind[j]}. + } + \item{bd}{ + Values of the lower or upper bounds of the variables present in \code{ind}. + } +} + +\details{ + Interface to the C function \code{chgBnds} which calls the CPLEX + function \code{CPXchgbds}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getLowerBndsCPLEX}}, \code{\link{getUpperBndsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/chgCoefCPLEX.Rd b/man/chgCoefCPLEX.Rd new file mode 100644 index 0000000..84142f7 --- /dev/null +++ b/man/chgCoefCPLEX.Rd @@ -0,0 +1,73 @@ +\name{chgCoefCPLEX} +\alias{chgCoefCPLEX} +\alias{CPXchgcoef} + +\title{ + Change a Single Coefficient in the Constraint Matrix, Linear Objective + Coefficients, Righthand Side, or Ranges of a CPLEX Problem Object +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgcoef}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + chgCoefCPLEX(env, lp, i, j, val) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{i}{ + An integer that specifies the numeric index of the row in which the + coefficient is located. The linear objective row is referenced + with \code{i = -1}. + } + \item{j}{ + An integer that specifies the numeric index of the column in which the + coefficient is located. The RHS column is referenced with \code{j = -1}. + The range value column is referenced with \code{j = -2}. If \code{j = -2} + is specified and row \code{i} is not a ranged row, an error status is + returned. + } + \item{val}{ + The new value for the coefficient being changed. + } +} + +\details{ + Interface to the C function \code{chgCoef} which calls the CPLEX + function \code{CPXchgcoef}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getNumRowsCPLEX}}, \code{\link{getNumColsCPLEX}}, + \code{\link{chgObjCPLEX}}, \code{\link{chgRhsCPLEX}}, + \code{\link{chgRngValCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/chgCoefListCPLEX.Rd b/man/chgCoefListCPLEX.Rd new file mode 100644 index 0000000..749a85a --- /dev/null +++ b/man/chgCoefListCPLEX.Rd @@ -0,0 +1,64 @@ +\name{chgCoefListCPLEX} +\alias{chgCoefListCPLEX} +\alias{CPXchgcoeflist} + +\title{ + Change a List of Matrix Coefficients of a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgcoeflist}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgCoefListCPLEX(env, lp, nnz, ia, ja, ra) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nnz}{ + Number of nonzero constraint coefficients. + } + \item{ia}{ + Row indices of the nonzero elements. + } + \item{ja}{ + Column indices of the nonzero elements. + } + \item{ra}{ + Nonzero elements. + } +} + +\details{ + Interface to the C function \code{chgcoeflist} which calls the CPLEX + function \code{CPXchgcoeflist}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgColNameCPLEX.Rd b/man/chgColNameCPLEX.Rd new file mode 100644 index 0000000..578fd14 --- /dev/null +++ b/man/chgColNameCPLEX.Rd @@ -0,0 +1,62 @@ +\name{chgColNameCPLEX} +\alias{chgColNameCPLEX} +\alias{CPXchgcolname} + +\title{ + Change the Names of Variables in a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgcolname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgColNameCPLEX(env, lp, nnames, ind, names) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nnames}{ + A vector that specifies the total number of variable names to be changed. + } + \item{ind}{ + A vector containing the numeric indices indices of the variables for + which the names are to be changed. + } + \item{names}{ + A vector containing the strings of the new variable names for + the columns specified in \code{ind}. + } +} +\details{ + Interface to the C function \code{chgColName} which calls the CPLEX + function \code{CPXchgcolname}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgColTypeCPLEX.Rd b/man/chgColTypeCPLEX.Rd new file mode 100644 index 0000000..2fa8e85 --- /dev/null +++ b/man/chgColTypeCPLEX.Rd @@ -0,0 +1,62 @@ +\name{chgColTypeCPLEX} +\alias{chgColTypeCPLEX} +\alias{CPXchgctype} + +\title{ + Change Types of a Set of Variables of a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgctype}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgColTypeCPLEX(env, lp, ncols, ind, xctype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{xctype}{ + A vector containing characters that represent the new types for the columns + specified in indices. + } +} + +\details{ + Interface to the C function \code{chgColType} which calls the CPLEX + function \code{CPXchgctype}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgColsBndsCPLEX.Rd b/man/chgColsBndsCPLEX.Rd new file mode 100644 index 0000000..4de81d5 --- /dev/null +++ b/man/chgColsBndsCPLEX.Rd @@ -0,0 +1,66 @@ +\name{chgColsBndsCPLEX} +\alias{chgColsBndsCPLEX} + +\title{ + Change Lower and Upper Bounds on a Set of Variables of a Problem +} + +\description{ + Set lower and upper bounds on a set of variables in one step. + If \code{lb[i] == ub[i]} the type of the bound is set to \code{"B"}, + otherwise \code{lb[i]} is set to \code{"L"} and \code{ub[i]} is set to + \code{"U"}. +} + +\usage{ + chgColsBndsCPLEX(env, lp, j, lb, ub) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{j}{ + An integer that specifies the numeric index of the column in which the + coefficient is located. + } + \item{lb}{ + A vector containing the lower bounds. + } + \item{ub}{ + A vector containing the upper bounds. + } +} + +\details{ + Interface to the C function \code{chgColsBnds} which calls the CPLEX + function \code{CPXchgbds}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{chgBndsCPLEX}}, \code{\link{tightenBndsCPLEX}} +} + +\keyword{ optimize } diff --git a/man/chgMIPstartsCPLEX.Rd b/man/chgMIPstartsCPLEX.Rd new file mode 100644 index 0000000..9c7c27c --- /dev/null +++ b/man/chgMIPstartsCPLEX.Rd @@ -0,0 +1,81 @@ +\name{chgMIPstartsCPLEX} +\alias{chgMIPstartsCPLEX} +\alias{CPXchgmipstarts} + +\title{ + Modify or Extend Multiple MIP Starts +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgmipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgMIPstartsCPLEX(env, lp, mcnt, mipstartindices, nzcnt, + beg, varindices, values, effortlevel) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{mcnt}{ + Number of MIP starts to be changed. + } + \item{mipstartindices}{ + Array of length \code{mcnt} containing the numeric indices of the MIP + starts to be changed. + } + \item{nzcnt}{ + Number of entries to be changed. + } + \item{beg}{ + Array of length \code{mcnt} used with \code{varindices} and \code{values}. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{varindices}{ + Aarray of length \code{nzcnt} containing the numeric indices of the columns + corresponding to the variables which are assigned starting values. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{values}{ + Array of length \code{nzcnt} containing the values to use for the MIP + starts. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } + \item{effortlevel}{ + Array of length \code{mcnt}. + Consult the IBM ILOG CPLEX documentation for more detailed information. + } +} + +\details{ + Interface to the C function \code{chgMIPstarts} which calls the CPLEX + function \code{CPXchgmipstarts}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgNameCPLEX.Rd b/man/chgNameCPLEX.Rd new file mode 100644 index 0000000..048f053 --- /dev/null +++ b/man/chgNameCPLEX.Rd @@ -0,0 +1,63 @@ +\name{chgNameCPLEX} +\alias{chgNameCPLEX} +\alias{CPXchgname} + +\title{ + Change the Name of a Constraint a Variable in a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgNameCPLEX(env, lp, key, ij, name) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{key}{ + A character to specify whether a row name or a column name should be + changed. + } + \item{ij}{ + An integer that specifies the numeric index of the column or row whose name + is to be changed. + } + \item{name}{ + A pointer to a character string containing the new name. + } +} + +\details{ + Interface to the C function \code{chgName} which calls the CPLEX + function \code{CPXchgname}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgObjCPLEX.Rd b/man/chgObjCPLEX.Rd new file mode 100644 index 0000000..f9668b2 --- /dev/null +++ b/man/chgObjCPLEX.Rd @@ -0,0 +1,62 @@ +\name{chgObjCPLEX} +\alias{chgObjCPLEX} +\alias{CPXchgobj} + +\title{ + Change Linear Objective Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgobj}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgObjCPLEX(env, lp, ncols, ind, val) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{val}{ + A vector containing the new values of the objective coefficients of the + variables specified in \code{ind}. + } +} + +\details{ + Interface to the C function \code{chgObj} which calls the CPLEX + function \code{CPXchgobj}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgProbNameCPLEX.Rd b/man/chgProbNameCPLEX.Rd new file mode 100644 index 0000000..18ebcdf --- /dev/null +++ b/man/chgProbNameCPLEX.Rd @@ -0,0 +1,55 @@ +\name{chgProbNameCPLEX} +\alias{chgProbNameCPLEX} +\alias{CPXchgprobname} + +\title{ + Change the Name of the Current Problem. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgprobname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgProbNameCPLEX(env, lp, probname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{probname}{ + The new name of the problem. + } +} + +\details{ + Interface to the C function \code{chgProbName} which calls the CPLEX + function \code{CPXchgprobname}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgProbTypeCPLEX.Rd b/man/chgProbTypeCPLEX.Rd new file mode 100644 index 0000000..a800ce9 --- /dev/null +++ b/man/chgProbTypeCPLEX.Rd @@ -0,0 +1,61 @@ +\name{chgProbTypeCPLEX} +\alias{chgProbTypeCPLEX} +\alias{CPXchgprobtype} + +\title{ + Change the Current Problem to a Related Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgprobtype}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + chgProbTypeCPLEX(env, lp, ptype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ptype}{ + A single integer value specifying the problem type. + } +} + +\details{ + Interface to the C function \code{chgProbType} which calls the CPLEX + function \code{CPXchgprobtype}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getProbTypeCPLEX}}, + \code{\link{cplexConstants}} section \dQuote{Problem Types}. +} + +\keyword{ optimize } + diff --git a/man/chgQPcoefCPLEX.Rd b/man/chgQPcoefCPLEX.Rd new file mode 100644 index 0000000..f491a88 --- /dev/null +++ b/man/chgQPcoefCPLEX.Rd @@ -0,0 +1,65 @@ +\name{chgQPcoefCPLEX} +\alias{chgQPcoefCPLEX} +\alias{CPXchgqpcoef} + +\title{ + Change a Single Coefficient in the Quadratic Objective of a Quadratic Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgqpcoef}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + chgQPcoefCPLEX(env, lp, i, j, val) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{i}{ + The first variable number. + } + \item{j}{ + The second variable number. + } + \item{val}{ + The new coefficient value. + } +} + +\details{ + Interface to the C function \code{chgQPcoef} which calls the CPLEX + function \code{CPXchgqpcoef}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{chgCoefCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/chgRhsCPLEX.Rd b/man/chgRhsCPLEX.Rd new file mode 100644 index 0000000..79d9adc --- /dev/null +++ b/man/chgRhsCPLEX.Rd @@ -0,0 +1,61 @@ +\name{chgRhsCPLEX} +\alias{chgRhsCPLEX} +\alias{CPXchgrhs} + +\title{ + Change Righthand Side Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgrhs}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgRhsCPLEX(env, lp, nrows, ind, val) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nrows}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{val}{ + A vector containing the new values of the objective coefficients of the + variables specified in \code{ind}. + } +} + +\details{ + Interface to the C function \code{chgRhs} which calls the CPLEX + function \code{CPXchgrhs}. +} +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgRngValCPLEX.Rd b/man/chgRngValCPLEX.Rd new file mode 100644 index 0000000..5ce3ef9 --- /dev/null +++ b/man/chgRngValCPLEX.Rd @@ -0,0 +1,62 @@ +\name{chgRngValCPLEX} +\alias{chgRngValCPLEX} +\alias{CPXchgrngval} + +\title{ + Change Range Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgrngval}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgRngValCPLEX(env, lp, nrows, ind, val) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nrows}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{val}{ + A vector containing the new values of the objective coefficients of the + variables specified in \code{ind}. + } +} + +\details{ + Interface to the C function \code{chgRngVal} which calls the CPLEX + function \code{CPXchgrngval}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgRowNameCPLEX.Rd b/man/chgRowNameCPLEX.Rd new file mode 100644 index 0000000..32dbf4b --- /dev/null +++ b/man/chgRowNameCPLEX.Rd @@ -0,0 +1,63 @@ +\name{chgRowNameCPLEX} +\alias{chgRowNameCPLEX} +\alias{CPXchgrowname} + +\title{ + Change Names of Linear Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgrowname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgRowNameCPLEX(env, lp, nnames, ind, names) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nnames}{ + A vector that specifies the total number of variable names to be changed. + } + \item{ind}{ + A vector containing the numeric indices indices of the variables for + which the names are to be changed. + } + \item{names}{ + A vector containing the strings of the new variable names for + the columns specified in ind. + } +} + +\details{ + Interface to the C function \code{chgRowName} which calls the CPLEX + function \code{CPXchgrowname}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgSenseCPLEX.Rd b/man/chgSenseCPLEX.Rd new file mode 100644 index 0000000..155b1b7 --- /dev/null +++ b/man/chgSenseCPLEX.Rd @@ -0,0 +1,62 @@ +\name{chgSenseCPLEX} +\alias{chgSenseCPLEX} +\alias{CPXchgsense} + +\title{ + Change Sense of a Set of Linear Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgsense}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + chgSenseCPLEX(env, lp, nrows, ind, sense) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nrows}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{sense}{ + A vector containing characters that tell the new sense of the linear + constraints specified in \code{ind}. + } +} + +\details{ + Interface to the C function \code{chgSense} which calls the CPLEX + function \code{CPXchgsense}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/chgTerminateCPLEX.Rd b/man/chgTerminateCPLEX.Rd new file mode 100644 index 0000000..8524e2b --- /dev/null +++ b/man/chgTerminateCPLEX.Rd @@ -0,0 +1,48 @@ +\name{chgTerminateCPLEX} +\alias{chgTerminateCPLEX} + +\title{ + Change Termination Signal +} + +\description{ + The function \code{chgTerminateCPLEX} changes termination signal. +} + +\usage{ + chgTerminateCPLEX(env, tval = 1) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{tval}{ + Single integer value. + } +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{setTerminateCPLEX}}, \code{\link{delTerminateCPLEX}}, + \code{\link{printTerminateCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/cleanupCoefCPLEX.Rd b/man/cleanupCoefCPLEX.Rd new file mode 100644 index 0000000..223f59d --- /dev/null +++ b/man/cleanupCoefCPLEX.Rd @@ -0,0 +1,56 @@ +\name{cleanupCoefCPLEX} +\alias{cleanupCoefCPLEX} +\alias{CPXcleanup} + +\title{ + change Problem Coefficients to Zero That are Smaller in Magnitude Than the + Tolerance Specified in the Argument eps +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcleanup}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + cleanupCoefCPLEX(env, lp, eps) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{eps}{ + Single numeric value giving the tolerance. + } +} + +\details{ + Interface to the C function \code{cleanupCoef} which calls the CPLEX + function \code{CPXcleanup}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/cloneProbCPLEX.Rd b/man/cloneProbCPLEX.Rd new file mode 100644 index 0000000..5b2f7a6 --- /dev/null +++ b/man/cloneProbCPLEX.Rd @@ -0,0 +1,57 @@ +\name{cloneProbCPLEX} +\alias{cloneProbCPLEX} +\alias{CPXcloneprob} + +\title{ + Copy a CPLEX Problem Object +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcloneprob}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + cloneProbCPLEX(env, lp, ptrtype = "cplex_prob") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{cloneProb} which calls the CPLEX + function \code{CPXcloneprob}. +} + +\value{ + If successful a pointer to the new CPLEX problem object as returned by + \code{\link{initProbCPLEX}} (an object of class + \code{"\linkS4class{cplexPtr}"}), otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/closeEnvCPLEX.Rd b/man/closeEnvCPLEX.Rd new file mode 100644 index 0000000..4295db2 --- /dev/null +++ b/man/closeEnvCPLEX.Rd @@ -0,0 +1,52 @@ +\name{closeEnvCPLEX} +\alias{closeEnvCPLEX} +\alias{CPXcloseCPLEX} + +\title{ + Free all of the Data Structures Associated With CPLEX +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcloseCPLEX}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + closeEnvCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{closeEnv} which calls the CPLEX + function \code{CPXcloseCPLEX}. +} + +\value{ + Zero if successful, otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{openEnvCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/closeFileCPLEX.Rd b/man/closeFileCPLEX.Rd new file mode 100644 index 0000000..2c34ff3 --- /dev/null +++ b/man/closeFileCPLEX.Rd @@ -0,0 +1,50 @@ +\name{closeFileCPLEX} +\alias{closeFileCPLEX} +\alias{CPXfclose} + +\title{ + Close a File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfclose}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + closeFileCPLEX(cpfile) +} + +\arguments{ + \item{cpfile}{ + A pointer to a file as returned by \code{\link{openFileCPLEX}}. + } +} + +\details{ + Interface to the C function \code{closeFile} which calls the CPLEX + function \code{CPXfclose}. +} + +\value{ + Zero if successful, otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{fileputCPLEX}}, \code{\link{openFileCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/closeProbCPLEX.Rd b/man/closeProbCPLEX.Rd new file mode 100644 index 0000000..460af02 --- /dev/null +++ b/man/closeProbCPLEX.Rd @@ -0,0 +1,49 @@ +\name{closeProbCPLEX} +\alias{closeProbCPLEX} + +\title{ + Close CPLEX Environment And Remove CPLEX Problem Object +} +\description{ + The function \code{closeProbCPLEX} closes a CPLEX environment and removes a + CPLEX problem object. +} +\usage{ + closeProbCPLEX(prob) +} + +\arguments{ + \item{prob}{ + A list containing a pointer to an IBM ILOG CPLEX environment and a Pointer + to an IBM ILOG CPLEX problem object. Both elements are objects of class + \code{"\linkS4class{cplexPtr}"} as returned by \code{\link{openProbCPLEX}}. + } +} + +\details{ + Interface to the C functions \code{delProb} and \code{closeEnv} calling CPLEX + functions \code{CPXcloseCPLEX} and \code{CPXfreeprob}. +} + +\value{ + An integer vector containing the return values of \code{CPXcloseCPLEX} and + \code{CPXfreeprob}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{openProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/completelpCPLEX.Rd b/man/completelpCPLEX.Rd new file mode 100644 index 0000000..4a6f2a1 --- /dev/null +++ b/man/completelpCPLEX.Rd @@ -0,0 +1,52 @@ +\name{completelpCPLEX} +\alias{completelpCPLEX} +\alias{CPXcompletelp} + +\title{ + Manage Modification Steps Closely +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcompletelp}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + completelpCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{completelpCPLEX} which calls the CPLEX + function \code{CPXcompletelp}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyBaseCPLEX.Rd b/man/copyBaseCPLEX.Rd new file mode 100644 index 0000000..7209d4f --- /dev/null +++ b/man/copyBaseCPLEX.Rd @@ -0,0 +1,60 @@ +\name{copyBaseCPLEX} +\alias{copyBaseCPLEX} +\alias{CPXcopybase} + +\title{ + Copies a Basis Into a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopybase}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyBaseCPLEX(env, lp, cstat, rstat) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{cstat}{ + A vector containing the basis status of the columns in the constraint + matrix. + } + \item{rstat}{ + A vector containing the basis status of the slack, or surplus, + or artificial variable associated with each row in the constraint matrix. + } +} + +\details{ + Interface to the C function \code{copyBase} which calls the CPLEX + function \code{CPXcopybase}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyColTypeCPLEX.Rd b/man/copyColTypeCPLEX.Rd new file mode 100644 index 0000000..5c7b591 --- /dev/null +++ b/man/copyColTypeCPLEX.Rd @@ -0,0 +1,55 @@ +\name{copyColTypeCPLEX} +\alias{copyColTypeCPLEX} +\alias{CPXcopyctype} + +\title{ + Copy Variable Type Information Into a Given Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgprobname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyColTypeCPLEX(env, lp, xctype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{xctype}{ + A vector containing the type of each column in the constraint matrix. + } +} + +\details{ + Interface to the C function \code{copyColType} which calls the CPLEX + function \code{CPXcopyctype}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyLpCPLEX.Rd b/man/copyLpCPLEX.Rd new file mode 100644 index 0000000..3a19862 --- /dev/null +++ b/man/copyLpCPLEX.Rd @@ -0,0 +1,97 @@ +\name{copyLpCPLEX} +\alias{copyLpCPLEX} +\alias{CPXcopylp} + +\title{ + Copy Data Defining an LP Problem to a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopylp}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyLpCPLEX(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, rngval = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nCols}{ + Number of columns in the constraint matrix. + } + \item{nRows}{ + Number of rows in the constraint matrix. + } + \item{lpdir}{ + Single integer value that specifies whether the problem is a minimization + or maximization problem. + } + \item{objf}{ + The objective function coefficients. + } + \item{rhs}{ + The righthand side values for each constraint in the constraint matrix. + } + \item{sense}{ + The sense of each constraint in the constraint matrix. + } + \item{matbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{lb}{ + Containing the lower bound on each of the variables. + } + \item{ub}{ + Containing the lower bound on each of the variables. + } + \item{rngval}{ + Containing the range value of each ranged constraint. + } +} + +\details{ + Interface to the C function \code{copyLp} which calls the CPLEX + function \code{CPXcopylp}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyLpwNamesCPLEX.Rd b/man/copyLpwNamesCPLEX.Rd new file mode 100644 index 0000000..faa79c3 --- /dev/null +++ b/man/copyLpwNamesCPLEX.Rd @@ -0,0 +1,104 @@ +\name{copyLpwNamesCPLEX} +\alias{copyLpwNamesCPLEX} +\alias{CPXcopylpwnames} + +\title{ + Copy Data Defining an LP Problem to a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopylpwnames}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyLpwNamesCPLEX(env, lp, nCols, nRows, lpdir, objf, rhs, sense, + matbeg, matcnt, matind, matval, lb, ub, + rngval = NULL, cnames = NULL, rnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nCols}{ + Number of columns in the constraint matrix. + } + \item{nRows}{ + Number of rows in the constraint matrix. + } + \item{lpdir}{ + Single integer value that specifies whether the problem is a minimization + or maximization problem. + } + \item{objf}{ + The objective function coefficients. + } + \item{rhs}{ + The righthand side values for each constraint in the constraint matrix. + } + \item{sense}{ + The sense of each constraint in the constraint matrix. + } + \item{matbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{matval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{lb}{ + Containing the lower bound on each of the variables. + } + \item{ub}{ + Containing the lower bound on each of the variables. + } + \item{rngval}{ + Containing the range value of each ranged constraint. + } + \item{cnames}{ + Names of the matrix columns or, equivalently, the variable names. + } + \item{rnames}{ + Names of the matrix rows or, equivalently, the constraint names. + } +} + +\details{ + Interface to the C function \code{copyLpwNames} which calls the CPLEX + function \code{CPXcopylpwnames}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyObjNameCPLEX.Rd b/man/copyObjNameCPLEX.Rd new file mode 100644 index 0000000..6e6d2a4 --- /dev/null +++ b/man/copyObjNameCPLEX.Rd @@ -0,0 +1,55 @@ +\name{copyObjNameCPLEX} +\alias{copyObjNameCPLEX} +\alias{CPXcopyobjname} + +\title{ + Copy a Name for the Objective Function Into a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopyobjname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyObjNameCPLEX(env, lp, oname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{oname}{ + A pointer to a character string containing the objective name. + } +} + +\details{ + Interface to the C function \code{copyObjName} which calls the CPLEX + function \code{CPXcopyobjname}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyOrderCPLEX.Rd b/man/copyOrderCPLEX.Rd new file mode 100644 index 0000000..24ff0c2 --- /dev/null +++ b/man/copyOrderCPLEX.Rd @@ -0,0 +1,65 @@ +\name{copyOrderCPLEX} +\alias{copyOrderCPLEX} +\alias{CPXcopyorder} + +\title{ + Copy Priority Order to CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopyorder}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyOrderCPLEX(env, lp, cnt, indices, priority = NULL, direction = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{cnt}{ + Number of entries. + } + \item{indices}{ + Indices of the columns corresponding to the integer variables that are + assigned priorities. + } + \item{priority}{ + Priorities assigned to the integer variables. + } + \item{direction}{ + Branching direction assigned to the integer variables. + } +} + +\details{ + Interface to the C function \code{copyOrder} which calls the CPLEX + function \code{CPXcopyorder}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyPartBaseCPLEX.Rd b/man/copyPartBaseCPLEX.Rd new file mode 100644 index 0000000..caa9093 --- /dev/null +++ b/man/copyPartBaseCPLEX.Rd @@ -0,0 +1,75 @@ +\name{copyPartBaseCPLEX} +\alias{copyPartBaseCPLEX} +\alias{CPXcopypartialbase} + +\title{ + Copies a partial basis into an LP problem object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopypartialbase}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + copyPartBaseCPLEX(env, lp, ncind, cind, cstat, nrind, rind, rstat) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncind}{ + An integer that specifies the number of variable or column status values + specified. + } + \item{cind}{ + A vector that contains the indices of the variables for which status values + are being specified. + } + \item{cstat}{ + A vector where the ith entry contains the status for variable + \code{cind[i]}. + } + \item{nrind}{ + An integer that specifies the number of slack, surplus, or artificial status + values specified. + } + \item{rind}{ + A vector rcnt that contains the indices of the slack, surplus, or artificial + variables for which status values are being specified. + } + \item{rstat}{ + A vector of where the \code{i}-th entry contains the status for slack, + surplus, or artificial \code{rind[i]}. + } +} + +\details{ + Interface to the C function \code{copyPartBase} which calls the CPLEX + function \code{CPXcopypartialbase}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyQPsepCPLEX.Rd b/man/copyQPsepCPLEX.Rd new file mode 100644 index 0000000..a968459 --- /dev/null +++ b/man/copyQPsepCPLEX.Rd @@ -0,0 +1,55 @@ +\name{copyQPsepCPLEX} +\alias{copyQPsepCPLEX} +\alias{CPXcopyqpsep} + +\title{ + Copy the Quadratic Objective Matrix Q for a Separable QP Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopyqpsep}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyQPsepCPLEX(env, lp, qsepvec) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{qsepvec}{ + A vector containing the quadratic coefficients. + } +} + +\details{ + Interface to the C function \code{copyQPsep} which calls the CPLEX + function \code{CPXcopyqpsep}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyQuadCPLEX.Rd b/man/copyQuadCPLEX.Rd new file mode 100644 index 0000000..c26a42d --- /dev/null +++ b/man/copyQuadCPLEX.Rd @@ -0,0 +1,68 @@ +\name{copyQuadCPLEX} +\alias{copyQuadCPLEX} +\alias{CPXcopyquad} + +\title{ + Copy a Quadratic Objective Matrix Q When Q is not Diagonal. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopyquad}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyQuadCPLEX(env, lp, qmatbeg, qmatcnt, qmatind, qmatval) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{qmatbeg}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatcnt}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatind}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } + \item{qmatval}{ + Array that defines the constraint matrix. Consult the IBM ILOG CPLEX + documentation for more detailed information. + } +} + +\details{ + Interface to the C function \code{copyQuad} which calls the CPLEX + function \code{CPXcopyquad}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/copyStartCPLEX.Rd b/man/copyStartCPLEX.Rd new file mode 100644 index 0000000..29275fd --- /dev/null +++ b/man/copyStartCPLEX.Rd @@ -0,0 +1,77 @@ +\name{copyStartCPLEX} +\alias{copyStartCPLEX} +\alias{CPXcopystart} + +\title{ + Provides Starting Information for Use in a Subsequent Call to a + Simplex Optimization Routine. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcopystart}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + copyStartCPLEX(env, lp, + cstat = NULL, rstat = NULL, + cprim = NULL, rprim = NULL, + cdual = NULL, rdual = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{cstat}{ + A vector containing the basis status of the columns in the constraint + matrix. + } + \item{rstat}{ + A vector containing the basis status of the slack, surplus, or artificial + variable associated with each row in the constraint matrix. + } + \item{cprim}{ + A vector containing the initial primal values of the column variables. + } + \item{rprim}{ + A vector containing the initial primal values of the slack (row) variables. + } + \item{cdual}{ + A vector containing the initial values of the reduced costs for the column + variables. + } + \item{rdual}{ + A vector containing the initial values of the dual variables for the rows. + } +} + +\details{ + Interface to the C function \code{copyStart} which calls the CPLEX + function \code{CPXcopyStart}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/cplexAPI-package.Rd b/man/cplexAPI-package.Rd new file mode 100644 index 0000000..de9ffc3 --- /dev/null +++ b/man/cplexAPI-package.Rd @@ -0,0 +1,98 @@ +\name{cplexAPI-package} + +\alias{cplexAPI-package} +\alias{cplexAPI} + +\docType{package} + +\title{ + R Interface to C API of IBM ILOG CPLEX +} + +\description{ + A low level interface to IBM ILOG CPLEX. +} + +\details{ + The package \code{cplexAPI} provides access to the callable library + of IBM ILOG CPLEX from within R. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ package } +\keyword{ optimize} + +\examples{ +# load package +library(cplexAPI) + +# Open a CPLEX environment +env <- openEnvCPLEX() + +# Create a problem object +prob <- initProbCPLEX(env) + +# Assign a name to the problem object +chgProbNameCPLEX(env, prob, "sample") + +# Prepare data structures for the problem object +# Number of columns and rows +nc <- 3 +nr <- 3 + +# Objective function +obj <- c(5, 4, 3) + +# Right hand side +rhs <- c(5, 11, 8) + +# Sense of the right hand side +sense <- rep("L", 3) + +# Variable lower bounds +lb <- rep(0, 3) + +# Variable upper bounds +ub <- rep(CPX_INFBOUND, 3) + +# Column and row names +cn <- c("x1", "x2", "x3") +rn <- c("q1", "q2", "q3") + +# The constraint matrix is passed in column major order format +# Be careful here: all indices start with 0! Begin indices of rows +beg <- c(0, 3, 6) + +# Number of non-zero elements per row +cnt <- rep(3, 3) + +# Column indices +ind <- c(0, 1, 2, 0, 1, 2, 0, 1, 2) + +# Non-zero elements +val <- c(2, 4, 3, 3, 1, 4, 1, 2, 2) + +# Load problem data +copyLpwNamesCPLEX(env, prob, nc, nr, CPX_MAX, obj, rhs, sense, + beg, cnt, ind, val, lb, ub, NULL, cn, rn) + +# Solve the problem using the simplex algorithm +lpoptCPLEX(env, prob) + +# Retrieve solution after optimization +solutionCPLEX(env, prob) + +# Free memory, allacated to the problem object +delProbCPLEX(env, prob) +closeEnvCPLEX(env) +} diff --git a/man/cplexConstants.Rd b/man/cplexConstants.Rd new file mode 100644 index 0000000..47db0e9 --- /dev/null +++ b/man/cplexConstants.Rd @@ -0,0 +1,1663 @@ +\name{cplexConstants} +\alias{cplexConstants} +\alias{cplex_Constants} +\alias{constantsCPLEX} + +\alias{CPX_ALG_AUTOMATIC} +\alias{CPX_ALG_BAROPT} +\alias{CPX_ALG_BARRIER} +\alias{CPX_ALG_CONCURRENT} +\alias{CPX_ALG_DUAL} +\alias{CPX_ALG_FEASOPT} +\alias{CPX_ALG_MIP} +\alias{CPX_ALG_NET} +\alias{CPX_ALG_NONE} +\alias{CPX_ALG_PIVOT} +\alias{CPX_ALG_PIVOTIN} +\alias{CPX_ALG_PIVOTOUT} +\alias{CPX_ALG_PRIMAL} +\alias{CPX_ALG_ROBUST} +\alias{CPX_ALG_SIFTING} +\alias{CPX_AT_LOWER} +\alias{CPX_AT_UPPER} +\alias{CPX_BARORDER_AMD} +\alias{CPX_BARORDER_AMF} +\alias{CPX_BARORDER_AUTO} +\alias{CPX_BARORDER_ND} +\alias{CPX_BASIC_SOLN} +\alias{CPX_BASIC} +\alias{CPX_BINARY} +\alias{CPX_BRANCH_DOWN} +\alias{CPX_BRANCH_GLOBAL} +\alias{CPX_BRANCH_UP} +\alias{CPX_BRDIR_AUTO} +\alias{CPX_BRDIR_DOWN} +\alias{CPX_BRDIR_UP} +\alias{CPX_CON_ABS} +\alias{CPX_CON_DISJCST} +\alias{CPX_CON_INDDISJCST} +\alias{CPX_CON_INDICATOR} +\alias{CPX_CON_LAST_CONTYPE} +\alias{CPX_CON_LINEAR} +\alias{CPX_CON_LOWER_BOUND} +\alias{CPX_CON_MAXEXPR} +\alias{CPX_CON_MINEXPR} +\alias{CPX_CON_PWL} +\alias{CPX_CON_QUADRATIC} +\alias{CPX_CON_SETVAR} +\alias{CPX_CON_SETVARCARD} +\alias{CPX_CON_SETVARDOMAIN} +\alias{CPX_CON_SETVAREQ} +\alias{CPX_CON_SETVARINTERSECT} +\alias{CPX_CON_SETVARINTERSECTION} +\alias{CPX_CON_SETVARMAX} +\alias{CPX_CON_SETVARMEMBER} +\alias{CPX_CON_SETVARMIN} +\alias{CPX_CON_SETVARNEQ} +\alias{CPX_CON_SETVARNEQCST} +\alias{CPX_CON_SETVARNULLINTERSECT} +\alias{CPX_CON_SETVARSUBSET} +\alias{CPX_CON_SETVARSUM} +\alias{CPX_CON_SETVARUNION} +\alias{CPX_CON_SOS} +\alias{CPX_CON_UPPER_BOUND} +\alias{CPX_CONFLICT_EXCLUDED} +\alias{CPX_CONFLICT_LB} +\alias{CPX_CONFLICT_MEMBER} +\alias{CPX_CONFLICT_POSSIBLE_LB} +\alias{CPX_CONFLICT_POSSIBLE_MEMBER} +\alias{CPX_CONFLICT_POSSIBLE_UB} +\alias{CPX_CONFLICT_UB} +\alias{CPX_CONTINUOUS} +\alias{CPX_DPRIIND_AUTO} +\alias{CPX_DPRIIND_DEVEX} +\alias{CPX_DPRIIND_FULL_STEEP} +\alias{CPX_DPRIIND_FULL} +\alias{CPX_DPRIIND_STEEP} +\alias{CPX_DPRIIND_STEEPQSTART} +\alias{CPX_DUAL_OBJ} +\alias{CPX_EXACT_KAPPA} +\alias{CPX_FEASOPT_MIN_INF} +\alias{CPX_FEASOPT_MIN_QUAD} +\alias{CPX_FEASOPT_MIN_SUM} +\alias{CPX_FEASOPT_OPT_INF} +\alias{CPX_FEASOPT_OPT_QUAD} +\alias{CPX_FEASOPT_OPT_SUM} +\alias{CPX_FREE_SUPER} +\alias{CPX_IMPLIED_INTEGER_FEASIBLE} +\alias{CPX_INFBOUND} +\alias{CPX_INTEGER_FEASIBLE} +\alias{CPX_INTEGER_INFEASIBLE} +\alias{CPX_INTEGER} +\alias{CPX_KAPPA_ATTENTION} +\alias{CPX_KAPPA_ILLPOSED} +\alias{CPX_KAPPA_MAX} +\alias{CPX_KAPPA_STABLE} +\alias{CPX_KAPPA_SUSPICIOUS} +\alias{CPX_KAPPA_UNSTABLE} +\alias{CPX_KAPPA} +\alias{CPX_MAX_COMP_SLACK} +\alias{CPX_MAX_DUAL_INFEAS} +\alias{CPX_MAX_DUAL_RESIDUAL} +\alias{CPX_MAX_INDSLACK_INFEAS} +\alias{CPX_MAX_INT_INFEAS} +\alias{CPX_MAX_PI} +\alias{CPX_MAX_PRIMAL_INFEAS} +\alias{CPX_MAX_PRIMAL_RESIDUAL} +\alias{CPX_MAX_QCPRIMAL_RESIDUAL} +\alias{CPX_MAX_QCSLACK_INFEAS} +\alias{CPX_MAX_QCSLACK} +\alias{CPX_MAX_RED_COST} +\alias{CPX_MAX_SCALED_DUAL_INFEAS} +\alias{CPX_MAX_SCALED_DUAL_RESIDUAL} +\alias{CPX_MAX_SCALED_PI} +\alias{CPX_MAX_SCALED_PRIMAL_INFEAS} +\alias{CPX_MAX_SCALED_PRIMAL_RESIDUAL} +\alias{CPX_MAX_SCALED_RED_COST} +\alias{CPX_MAX_SCALED_SLACK} +\alias{CPX_MAX_SCALED_X} +\alias{CPX_MAX_SLACK} +\alias{CPX_MAX_X} +\alias{CPX_MAX} +\alias{CPX_MIN} +\alias{CPX_MIPEMPHASIS_BALANCED} +\alias{CPX_MIPEMPHASIS_BESTBOUND} +\alias{CPX_MIPEMPHASIS_FEASIBILITY} +\alias{CPX_MIPEMPHASIS_HIDDENFEAS} +\alias{CPX_MIPEMPHASIS_OPTIMALITY} +\alias{CPX_MIPKAPPA_AUTO} +\alias{CPX_MIPKAPPA_FULL} +\alias{CPX_MIPKAPPA_OFF} +\alias{CPX_MIPKAPPA_SAMPLE} +\alias{CPX_MIPORDER_BOUNDS} +\alias{CPX_MIPORDER_COST} +\alias{CPX_MIPORDER_SCALEDCOST} +\alias{CPX_MIPSEARCH_AUTO} +\alias{CPX_MIPSEARCH_DYNAMIC} +\alias{CPX_MIPSEARCH_TRADITIONAL} +\alias{CPX_MIPSTART_AUTO} +\alias{CPX_MIPSTART_CHECKFEAS} +\alias{CPX_MIPSTART_REPAIR} +\alias{CPX_MIPSTART_SOLVEFIXED} +\alias{CPX_MIPSTART_SOLVEMIP} +\alias{CPX_NO_SOLN} +\alias{CPX_NODESEL_BESTBOUND} +\alias{CPX_NODESEL_BESTEST_ALT} +\alias{CPX_NODESEL_BESTEST} +\alias{CPX_NODESEL_DFS} +\alias{CPX_NONBASIC_SOLN} +\alias{CPX_OBJ_GAP} +\alias{CPX_OFF} +\alias{CPX_ON} +\alias{CPX_PARALLEL_AUTO} +\alias{CPX_PARALLEL_DETERMINISTIC} +\alias{CPX_PARALLEL_OPPORTUNISTIC} +\alias{CPX_PARAM_ADVIND} +\alias{CPX_PARAM_AGGCUTLIM} +\alias{CPX_PARAM_AGGFILL} +\alias{CPX_PARAM_AGGIND} +\alias{CPX_PARAM_ALL_MAX} +\alias{CPX_PARAM_ALL_MIN} +\alias{CPX_PARAM_APIENCODING} +\alias{CPX_PARAM_AUXROOTTHREADS} +\alias{CPX_PARAM_BARALG} +\alias{CPX_PARAM_BARCOLNZ} +\alias{CPX_PARAM_BARCROSSALG} +\alias{CPX_PARAM_BARDISPLAY} +\alias{CPX_PARAM_BARDSTART} +\alias{CPX_PARAM_BAREPCOMP} +\alias{CPX_PARAM_BARGROWTH} +\alias{CPX_PARAM_BARITLIM} +\alias{CPX_PARAM_BARMAXCOR} +\alias{CPX_PARAM_BAROBJRNG} +\alias{CPX_PARAM_BARORDER} +\alias{CPX_PARAM_BARPSTART} +\alias{CPX_PARAM_BARQCPEPCOMP} +\alias{CPX_PARAM_BARSTARTALG} +\alias{CPX_PARAM_BASINTERVAL} +\alias{CPX_PARAM_BBINTERVAL} +\alias{CPX_PARAM_BNDSTRENIND} +\alias{CPX_PARAM_BRDIR} +\alias{CPX_PARAM_BTTOL} +\alias{CPX_PARAM_CFILEMUL} +\alias{CPX_PARAM_CLIQUES} +\alias{CPX_PARAM_CLOCKTYPE} +\alias{CPX_PARAM_CLONELOG} +\alias{CPX_PARAM_COEREDIND} +\alias{CPX_PARAM_COLREADLIM} +\alias{CPX_PARAM_CONFLICTDISPLAY} +\alias{CPX_PARAM_COVERS} +\alias{CPX_PARAM_CRAIND} +\alias{CPX_PARAM_CUTLO} +\alias{CPX_PARAM_CUTPASS} +\alias{CPX_PARAM_CUTSFACTOR} +\alias{CPX_PARAM_CUTUP} +\alias{CPX_PARAM_DATACHECK} +\alias{CPX_PARAM_DEPIND} +\alias{CPX_PARAM_DETTILIM} +\alias{CPX_PARAM_DISJCUTS} +\alias{CPX_PARAM_DIVETYPE} +\alias{CPX_PARAM_DPRIIND} +\alias{CPX_PARAM_EACHCUTLIM} +\alias{CPX_PARAM_EPAGAP} +\alias{CPX_PARAM_EPGAP} +\alias{CPX_PARAM_EPINT} +\alias{CPX_PARAM_EPLIN} +\alias{CPX_PARAM_EPMRK} +\alias{CPX_PARAM_EPOPT_H} +\alias{CPX_PARAM_EPOPT} +\alias{CPX_PARAM_EPPER} +\alias{CPX_PARAM_EPRELAX} +\alias{CPX_PARAM_EPRHS_H} +\alias{CPX_PARAM_EPRHS} +\alias{CPX_PARAM_FASTMIP} +\alias{CPX_PARAM_FEASOPTMODE} +\alias{CPX_PARAM_FILEENCODING} +\alias{CPX_PARAM_FLOWCOVERS} +\alias{CPX_PARAM_FLOWPATHS} +\alias{CPX_PARAM_FPHEUR} +\alias{CPX_PARAM_FRACCAND} +\alias{CPX_PARAM_FRACCUTS} +\alias{CPX_PARAM_FRACPASS} +\alias{CPX_PARAM_GUBCOVERS} +\alias{CPX_PARAM_HEURFREQ} +\alias{CPX_PARAM_IMPLBD} +\alias{CPX_PARAM_INTSOLFILEPREFIX} +\alias{CPX_PARAM_INTSOLLIM} +\alias{CPX_PARAM_ITLIM} +\alias{CPX_PARAM_LBHEUR} +\alias{CPX_PARAM_LPMETHOD} +\alias{CPX_PARAM_MCFCUTS} +\alias{CPX_PARAM_MEMORYEMPHASIS} +\alias{CPX_PARAM_MIPCBREDLP} +\alias{CPX_PARAM_MIPDISPLAY} +\alias{CPX_PARAM_MIPEMPHASIS} +\alias{CPX_PARAM_MIPINTERVAL} +\alias{CPX_PARAM_MIPKAPPASTATS} +\alias{CPX_PARAM_MIPORDIND} +\alias{CPX_PARAM_MIPORDTYPE} +\alias{CPX_PARAM_MIPSEARCH} +\alias{CPX_PARAM_MIQCPSTRAT} +\alias{CPX_PARAM_MIRCUTS} +\alias{CPX_PARAM_MPSLONGNUM} +\alias{CPX_PARAM_NETDISPLAY} +\alias{CPX_PARAM_NETEPOPT} +\alias{CPX_PARAM_NETEPRHS} +\alias{CPX_PARAM_NETFIND} +\alias{CPX_PARAM_NETITLIM} +\alias{CPX_PARAM_NETPPRIIND} +\alias{CPX_PARAM_NODEFILEIND} +\alias{CPX_PARAM_NODELIM} +\alias{CPX_PARAM_NODESEL} +\alias{CPX_PARAM_NUMERICALEMPHASIS} +\alias{CPX_PARAM_NZREADLIM} +\alias{CPX_PARAM_OBJDIF} +\alias{CPX_PARAM_OBJLLIM} +\alias{CPX_PARAM_OBJULIM} +\alias{CPX_PARAM_PARALLELMODE} +\alias{CPX_PARAM_PERIND} +\alias{CPX_PARAM_PERLIM} +\alias{CPX_PARAM_POLISHAFTERDETTIME} +\alias{CPX_PARAM_POLISHAFTEREPAGAP} +\alias{CPX_PARAM_POLISHAFTEREPGAP} +\alias{CPX_PARAM_POLISHAFTERINTSOL} +\alias{CPX_PARAM_POLISHAFTERNODE} +\alias{CPX_PARAM_POLISHAFTERTIME} +\alias{CPX_PARAM_POLISHTIME} +\alias{CPX_PARAM_POPULATELIM} +\alias{CPX_PARAM_PPRIIND} +\alias{CPX_PARAM_PREDUAL} +\alias{CPX_PARAM_PREIND} +\alias{CPX_PARAM_PRELINEAR} +\alias{CPX_PARAM_PREPASS} +\alias{CPX_PARAM_PRESLVND} +\alias{CPX_PARAM_PRICELIM} +\alias{CPX_PARAM_PROBE} +\alias{CPX_PARAM_PROBEDETTIME} +\alias{CPX_PARAM_PROBETIME} +\alias{CPX_PARAM_QPMAKEPSDIND} +\alias{CPX_PARAM_QPMETHOD} +\alias{CPX_PARAM_QPNZREADLIM} +\alias{CPX_PARAM_RANDOMSEED} +\alias{CPX_PARAM_REDUCE} +\alias{CPX_PARAM_REINV} +\alias{CPX_PARAM_RELAXPREIND} +\alias{CPX_PARAM_RELOBJDIF} +\alias{CPX_PARAM_REPAIRTRIES} +\alias{CPX_PARAM_REPEATPRESOLVE} +\alias{CPX_PARAM_REVERSEIND} +\alias{CPX_PARAM_RFILEMUL} +\alias{CPX_PARAM_RINSHEUR} +\alias{CPX_PARAM_ROWREADLIM} +\alias{CPX_PARAM_SCAIND} +\alias{CPX_PARAM_SCRIND} +\alias{CPX_PARAM_SIFTALG} +\alias{CPX_PARAM_SIFTDISPLAY} +\alias{CPX_PARAM_SIFTITLIM} +\alias{CPX_PARAM_SIMDISPLAY} +\alias{CPX_PARAM_SINGLIM} +\alias{CPX_PARAM_SINGTOL} +\alias{CPX_PARAM_SOLNPOOLAGAP} +\alias{CPX_PARAM_SOLNPOOLCAPACITY} +\alias{CPX_PARAM_SOLNPOOLGAP} +\alias{CPX_PARAM_SOLNPOOLINTENSITY} +\alias{CPX_PARAM_SOLNPOOLREPLACE} +\alias{CPX_PARAM_SOLUTIONTARGET} +\alias{CPX_PARAM_STARTALG} +\alias{CPX_PARAM_STRONGCANDLIM} +\alias{CPX_PARAM_STRONGITLIM} +\alias{CPX_PARAM_SUBALG} +\alias{CPX_PARAM_SUBMIPNODELIM} +\alias{CPX_PARAM_SYMMETRY} +\alias{CPX_PARAM_THREADS} +\alias{CPX_PARAM_TILIM} +\alias{CPX_PARAM_TRELIM} +\alias{CPX_PARAM_TUNINGDETTILIM} +\alias{CPX_PARAM_TUNINGDISPLAY} +\alias{CPX_PARAM_TUNINGMEASURE} +\alias{CPX_PARAM_TUNINGREPEAT} +\alias{CPX_PARAM_TUNINGTILIM} +\alias{CPX_PARAM_VARSEL} +\alias{CPX_PARAM_WORKDIR} +\alias{CPX_PARAM_WORKMEM} +\alias{CPX_PARAM_WRITELEVEL} +\alias{CPX_PARAM_XXXIND} +\alias{CPX_PARAM_ZEROHALFCUTS} +\alias{CPX_PARAMTYPE_DOUBLE} +\alias{CPX_PARAMTYPE_INT} +\alias{CPX_PARAMTYPE_LONG} +\alias{CPX_PARAMTYPE_NONE} +\alias{CPX_PARAMTYPE_STRING} +\alias{CPX_PPRIIND_AUTO} +\alias{CPX_PPRIIND_DEVEX} +\alias{CPX_PPRIIND_FULL} +\alias{CPX_PPRIIND_PARTIAL} +\alias{CPX_PPRIIND_STEEP} +\alias{CPX_PPRIIND_STEEPQSTART} +\alias{CPX_PRECOL_AGG} +\alias{CPX_PRECOL_FIX} +\alias{CPX_PRECOL_LOW} +\alias{CPX_PRECOL_OTHER} +\alias{CPX_PRECOL_UP} +\alias{CPX_PREREDUCE_DUALONLY} +\alias{CPX_PREREDUCE_NOPRIMALORDUAL} +\alias{CPX_PREREDUCE_PRIMALANDDUAL} +\alias{CPX_PREREDUCE_PRIMALONLY} +\alias{CPX_PREROW_AGG} +\alias{CPX_PREROW_OTHER} +\alias{CPX_PREROW_RED} +\alias{CPX_PRIMAL_OBJ} +\alias{CPX_PRIMAL_SOLN} +\alias{CPX_SEMICONT} +\alias{CPX_SEMIINT} +\alias{CPX_SOLNPOOL_DIV} +\alias{CPX_SOLNPOOL_FIFO} +\alias{CPX_SOLNPOOL_FILTER_DIVERSITY} +\alias{CPX_SOLNPOOL_FILTER_RANGE} +\alias{CPX_SOLNPOOL_OBJ} +\alias{CPX_SOLUTIONTARGET_AUTO} +\alias{CPX_SOLUTIONTARGET_FIRSTORDER} +\alias{CPX_SOLUTIONTARGET_OPTIMALCONVEX} +\alias{CPX_STAT_ABORT_DETTIME_LIM} +\alias{CPX_STAT_ABORT_DUAL_OBJ_LIM} +\alias{CPX_STAT_ABORT_IT_LIM} +\alias{CPX_STAT_ABORT_OBJ_LIM} +\alias{CPX_STAT_ABORT_PRIM_OBJ_LIM} +\alias{CPX_STAT_ABORT_TIME_LIM} +\alias{CPX_STAT_ABORT_USER} +\alias{CPX_STAT_CONFLICT_ABORT_CONTRADICTION} +\alias{CPX_STAT_CONFLICT_ABORT_DETTIME_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_IT_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_MEM_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_NODE_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_OBJ_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_TIME_LIM} +\alias{CPX_STAT_CONFLICT_ABORT_USER} +\alias{CPX_STAT_CONFLICT_FEASIBLE} +\alias{CPX_STAT_CONFLICT_MINIMAL} +\alias{CPX_STAT_FEASIBLE_RELAXED_INF} +\alias{CPX_STAT_FEASIBLE_RELAXED_QUAD} +\alias{CPX_STAT_FEASIBLE_RELAXED_SUM} +\alias{CPX_STAT_FEASIBLE} +\alias{CPX_STAT_FIRSTORDER} +\alias{CPX_STAT_INFEASIBLE} +\alias{CPX_STAT_INForUNBD} +\alias{CPX_STAT_NUM_BEST} +\alias{CPX_STAT_OPTIMAL_FACE_UNBOUNDED} +\alias{CPX_STAT_OPTIMAL_INFEAS} +\alias{CPX_STAT_OPTIMAL_RELAXED_INF} +\alias{CPX_STAT_OPTIMAL_RELAXED_QUAD} +\alias{CPX_STAT_OPTIMAL_RELAXED_SUM} +\alias{CPX_STAT_OPTIMAL} +\alias{CPX_STAT_UNBOUNDED} +\alias{CPX_STR_PARAM_MAX} +\alias{CPX_SUM_COMP_SLACK} +\alias{CPX_SUM_DUAL_INFEAS} +\alias{CPX_SUM_DUAL_RESIDUAL} +\alias{CPX_SUM_INDSLACK_INFEAS} +\alias{CPX_SUM_INT_INFEAS} +\alias{CPX_SUM_PI} +\alias{CPX_SUM_PRIMAL_INFEAS} +\alias{CPX_SUM_PRIMAL_RESIDUAL} +\alias{CPX_SUM_QCPRIMAL_RESIDUAL} +\alias{CPX_SUM_QCSLACK_INFEAS} +\alias{CPX_SUM_QCSLACK} +\alias{CPX_SUM_RED_COST} +\alias{CPX_SUM_SCALED_DUAL_INFEAS} +\alias{CPX_SUM_SCALED_DUAL_RESIDUAL} +\alias{CPX_SUM_SCALED_PI} +\alias{CPX_SUM_SCALED_PRIMAL_INFEAS} +\alias{CPX_SUM_SCALED_PRIMAL_RESIDUAL} +\alias{CPX_SUM_SCALED_RED_COST} +\alias{CPX_SUM_SCALED_SLACK} +\alias{CPX_SUM_SCALED_X} +\alias{CPX_SUM_SLACK} +\alias{CPX_SUM_X} +\alias{CPX_TUNE_ABORT} +\alias{CPX_TUNE_AVERAGE} +\alias{CPX_TUNE_DETTILIM} +\alias{CPX_TUNE_MINMAX} +\alias{CPX_TUNE_TILIM} +\alias{CPX_TYPE_ANY} +\alias{CPX_TYPE_SOS1} +\alias{CPX_TYPE_SOS2} +\alias{CPX_TYPE_USER} +\alias{CPX_TYPE_VAR} +\alias{CPX_USECUT_FILTER} +\alias{CPX_USECUT_FORCE} +\alias{CPX_USECUT_PURGE} +\alias{CPX_VARSEL_DEFAULT} +\alias{CPX_VARSEL_MAXINFEAS} +\alias{CPX_VARSEL_MININFEAS} +\alias{CPX_VARSEL_PSEUDO} +\alias{CPX_VARSEL_PSEUDOREDUCED} +\alias{CPX_VARSEL_STRONG} +\alias{CPX_WRITELEVEL_ALLVARS} +\alias{CPX_WRITELEVEL_AUTO} +\alias{CPX_WRITELEVEL_DISCRETEVARS} +\alias{CPX_WRITELEVEL_NONZERODISCRETEVARS} +\alias{CPX_WRITELEVEL_NONZEROVARS} +\alias{CPXERR_NEGATIVE_SURPLUS} +\alias{CPXERR_NO_SENSIT} +\alias{CPXMIP_ABORT_FEAS} +\alias{CPXMIP_ABORT_INFEAS} +\alias{CPXMIP_ABORT_RELAXED} +\alias{CPXMIP_DETTIME_LIM_FEAS} +\alias{CPXMIP_DETTIME_LIM_INFEAS} +\alias{CPXMIP_FAIL_FEAS_NO_TREE} +\alias{CPXMIP_FAIL_FEAS} +\alias{CPXMIP_FAIL_INFEAS_NO_TREE} +\alias{CPXMIP_FAIL_INFEAS} +\alias{CPXMIP_FEASIBLE_RELAXED_INF} +\alias{CPXMIP_FEASIBLE_RELAXED_QUAD} +\alias{CPXMIP_FEASIBLE_RELAXED_SUM} +\alias{CPXMIP_FEASIBLE} +\alias{CPXMIP_INFEASIBLE} +\alias{CPXMIP_INForUNBD} +\alias{CPXMIP_MEM_LIM_FEAS} +\alias{CPXMIP_MEM_LIM_INFEAS} +\alias{CPXMIP_NODE_LIM_FEAS} +\alias{CPXMIP_NODE_LIM_INFEAS} +\alias{CPXMIP_OPTIMAL_INFEAS} +\alias{CPXMIP_OPTIMAL_POPULATED_TOL} +\alias{CPXMIP_OPTIMAL_POPULATED} +\alias{CPXMIP_OPTIMAL_RELAXED_INF} +\alias{CPXMIP_OPTIMAL_RELAXED_QUAD} +\alias{CPXMIP_OPTIMAL_RELAXED_SUM} +\alias{CPXMIP_OPTIMAL_TOL} +\alias{CPXMIP_OPTIMAL} +\alias{CPXMIP_POPULATESOL_LIM} +\alias{CPXMIP_SOL_LIM} +\alias{CPXMIP_TIME_LIM_FEAS} +\alias{CPXMIP_TIME_LIM_INFEAS} +\alias{CPXMIP_UNBOUNDED} +\alias{CPXNET_NO_DISPLAY_OBJECTIVE} +\alias{CPXNET_PENALIZED_OBJECTIVE} +\alias{CPXNET_PRICE_AUTO} +\alias{CPXNET_PRICE_MULT_PART} +\alias{CPXNET_PRICE_PARTIAL} +\alias{CPXNET_PRICE_SORT_MULT_PART} +\alias{CPXNET_TRUE_OBJECTIVE} +\alias{CPXPROB_FIXEDMILP} +\alias{CPXPROB_FIXEDMIQP} +\alias{CPXPROB_LP} +\alias{CPXPROB_MILP} +\alias{CPXPROB_MIQCP} +\alias{CPXPROB_MIQP} +\alias{CPXPROB_NODELP} +\alias{CPXPROB_NODEQCP} +\alias{CPXPROB_NODEQP} +\alias{CPXPROB_QCP} +\alias{CPXPROB_QP} +\alias{CPX_PARAM_CALCQCPDUALS} +\alias{CPX_PARAM_LANDPCUTS} +\alias{CPX_PARAM_RAMPUPDETTILIM} +\alias{CPX_PARAM_RAMPUPDURATION} +\alias{CPX_PARAM_RAMPUPTILIM} +\alias{CPX_SOLUTIONTARGET_OPTIMALGLOBAL} +\alias{CPXPARAM_Advance} +\alias{CPXPARAM_Barrier_Algorithm} +\alias{CPXPARAM_Barrier_ColNonzeros} +\alias{CPXPARAM_Barrier_ConvergeTol} +\alias{CPXPARAM_Barrier_Crossover} +\alias{CPXPARAM_Barrier_Display} +\alias{CPXPARAM_Barrier_Limits_Corrections} +\alias{CPXPARAM_Barrier_Limits_Growth} +\alias{CPXPARAM_Barrier_Limits_Iteration} +\alias{CPXPARAM_Barrier_Limits_ObjRange} +\alias{CPXPARAM_Barrier_Ordering} +\alias{CPXPARAM_Barrier_QCPConvergeTol} +\alias{CPXPARAM_Barrier_StartAlg} +\alias{CPXPARAM_ClockType} +\alias{CPXPARAM_Conflict_Display} +\alias{CPXPARAM_DetTimeLimit} +\alias{CPXPARAM_DistMIP_Rampup_DetTimeLimit} +\alias{CPXPARAM_DistMIP_Rampup_Duration} +\alias{CPXPARAM_DistMIP_Rampup_TimeLimit} +\alias{CPXPARAM_Emphasis_Memory} +\alias{CPXPARAM_Emphasis_MIP} +\alias{CPXPARAM_Emphasis_Numerical} +\alias{CPXPARAM_Feasopt_Mode} +\alias{CPXPARAM_Feasopt_Tolerance} +\alias{CPXPARAM_LPMethod} +\alias{CPXPARAM_MIP_Cuts_Cliques} +\alias{CPXPARAM_MIP_Cuts_Covers} +\alias{CPXPARAM_MIP_Cuts_Disjunctive} +\alias{CPXPARAM_MIP_Cuts_FlowCovers} +\alias{CPXPARAM_MIP_Cuts_Gomory} +\alias{CPXPARAM_MIP_Cuts_GUBCovers} +\alias{CPXPARAM_MIP_Cuts_Implied} +\alias{CPXPARAM_MIP_Cuts_LiftProj} +\alias{CPXPARAM_MIP_Cuts_MCFCut} +\alias{CPXPARAM_MIP_Cuts_MIRCut} +\alias{CPXPARAM_MIP_Cuts_PathCut} +\alias{CPXPARAM_MIP_Cuts_ZeroHalfCut} +\alias{CPXPARAM_MIP_Display} +\alias{CPXPARAM_MIP_Interval} +\alias{CPXPARAM_MIP_Limits_AggForCut} +\alias{CPXPARAM_MIP_Limits_AuxRootThreads} +\alias{CPXPARAM_MIP_Limits_CutPasses} +\alias{CPXPARAM_MIP_Limits_CutsFactor} +\alias{CPXPARAM_MIP_Limits_EachCutLimit} +\alias{CPXPARAM_MIP_Limits_GomoryCand} +\alias{CPXPARAM_MIP_Limits_GomoryPass} +\alias{CPXPARAM_MIP_Limits_Nodes} +\alias{CPXPARAM_MIP_Limits_PolishTime} +\alias{CPXPARAM_MIP_Limits_Populate} +\alias{CPXPARAM_MIP_Limits_ProbeDetTime} +\alias{CPXPARAM_MIP_Limits_ProbeTime} +\alias{CPXPARAM_MIP_Limits_RepairTries} +\alias{CPXPARAM_MIP_Limits_Solutions} +\alias{CPXPARAM_MIP_Limits_StrongCand} +\alias{CPXPARAM_MIP_Limits_StrongIt} +\alias{CPXPARAM_MIP_Limits_SubMIPNodeLim} +\alias{CPXPARAM_MIP_Limits_TreeMemory} +\alias{CPXPARAM_MIP_OrderType} +\alias{CPXPARAM_MIP_PolishAfter_AbsMIPGap} +\alias{CPXPARAM_MIP_PolishAfter_DetTime} +\alias{CPXPARAM_MIP_PolishAfter_MIPGap} +\alias{CPXPARAM_MIP_PolishAfter_Nodes} +\alias{CPXPARAM_MIP_PolishAfter_Solutions} +\alias{CPXPARAM_MIP_PolishAfter_Time} +\alias{CPXPARAM_MIP_Pool_AbsGap} +\alias{CPXPARAM_MIP_Pool_Capacity} +\alias{CPXPARAM_MIP_Pool_Intensity} +\alias{CPXPARAM_MIP_Pool_RelGap} +\alias{CPXPARAM_MIP_Pool_Replace} +\alias{CPXPARAM_MIP_Strategy_Backtrack} +\alias{CPXPARAM_MIP_Strategy_BBInterval} +\alias{CPXPARAM_MIP_Strategy_Branch} +\alias{CPXPARAM_MIP_Strategy_CallbackReducedLP} +\alias{CPXPARAM_MIP_Strategy_Dive} +\alias{CPXPARAM_MIP_Strategy_File} +\alias{CPXPARAM_MIP_Strategy_FPHeur} +\alias{CPXPARAM_MIP_Strategy_HeuristicFreq} +\alias{CPXPARAM_MIP_Strategy_KappaStats} +\alias{CPXPARAM_MIP_Strategy_LBHeur} +\alias{CPXPARAM_MIP_Strategy_MIQCPStrat} +\alias{CPXPARAM_MIP_Strategy_NodeSelect} +\alias{CPXPARAM_MIP_Strategy_Order} +\alias{CPXPARAM_MIP_Strategy_PresolveNode} +\alias{CPXPARAM_MIP_Strategy_Probe} +\alias{CPXPARAM_MIP_Strategy_RINSHeur} +\alias{CPXPARAM_MIP_Strategy_Search} +\alias{CPXPARAM_MIP_Strategy_StartAlgorithm} +\alias{CPXPARAM_MIP_Strategy_SubAlgorithm} +\alias{CPXPARAM_MIP_Strategy_VariableSelect} +\alias{CPXPARAM_MIP_Tolerances_AbsMIPGap} +\alias{CPXPARAM_MIP_Tolerances_Integrality} +\alias{CPXPARAM_MIP_Tolerances_LowerCutoff} +\alias{CPXPARAM_MIP_Tolerances_MIPGap} +\alias{CPXPARAM_MIP_Tolerances_ObjDifference} +\alias{CPXPARAM_MIP_Tolerances_RelObjDifference} +\alias{CPXPARAM_MIP_Tolerances_UpperCutoff} +\alias{CPXPARAM_Network_Display} +\alias{CPXPARAM_Network_Iterations} +\alias{CPXPARAM_Network_NetFind} +\alias{CPXPARAM_Network_Pricing} +\alias{CPXPARAM_Network_Tolerances_Feasibility} +\alias{CPXPARAM_Network_Tolerances_Optimality} +\alias{CPXPARAM_Output_CloneLog} +\alias{CPXPARAM_Output_IntSolFilePrefix} +\alias{CPXPARAM_Output_MPSLong} +\alias{CPXPARAM_Output_WriteLevel} +\alias{CPXPARAM_Parallel} +\alias{CPXPARAM_Preprocessing_Aggregator} +\alias{CPXPARAM_Preprocessing_BoundStrength} +\alias{CPXPARAM_Preprocessing_CoeffReduce} +\alias{CPXPARAM_Preprocessing_Dependency} +\alias{CPXPARAM_Preprocessing_Dual} +\alias{CPXPARAM_Preprocessing_Fill} +\alias{CPXPARAM_Preprocessing_Linear} +\alias{CPXPARAM_Preprocessing_NumPass} +\alias{CPXPARAM_Preprocessing_Presolve} +\alias{CPXPARAM_Preprocessing_QCPDuals} +\alias{CPXPARAM_Preprocessing_QPMakePSD} +\alias{CPXPARAM_Preprocessing_Reduce} +\alias{CPXPARAM_Preprocessing_Relax} +\alias{CPXPARAM_Preprocessing_RepeatPresolve} +\alias{CPXPARAM_Preprocessing_Symmetry} +\alias{CPXPARAM_QPMethod} +\alias{CPXPARAM_RandomSeed} +\alias{CPXPARAM_Read_APIEncoding} +\alias{CPXPARAM_Read_Constraints} +\alias{CPXPARAM_Read_DataCheck} +\alias{CPXPARAM_Read_FileEncoding} +\alias{CPXPARAM_Read_Nonzeros} +\alias{CPXPARAM_Read_QPNonzeros} +\alias{CPXPARAM_Read_Scale} +\alias{CPXPARAM_Read_Variables} +\alias{CPXPARAM_ScreenOutput} +\alias{CPXPARAM_Sifting_Algorithm} +\alias{CPXPARAM_Sifting_Display} +\alias{CPXPARAM_Sifting_Iterations} +\alias{CPXPARAM_Simplex_Crash} +\alias{CPXPARAM_Simplex_DGradient} +\alias{CPXPARAM_Simplex_Display} +\alias{CPXPARAM_Simplex_Limits_Iterations} +\alias{CPXPARAM_Simplex_Limits_LowerObj} +\alias{CPXPARAM_Simplex_Limits_Perturbation} +\alias{CPXPARAM_Simplex_Limits_Singularity} +\alias{CPXPARAM_Simplex_Limits_UpperObj} +\alias{CPXPARAM_Simplex_Perturbation_Constant} +\alias{CPXPARAM_Simplex_Perturbation_Indicator} +\alias{CPXPARAM_Simplex_PGradient} +\alias{CPXPARAM_Simplex_Pricing} +\alias{CPXPARAM_Simplex_Refactor} +\alias{CPXPARAM_Simplex_Tolerances_Feasibility} +\alias{CPXPARAM_Simplex_Tolerances_Markowitz} +\alias{CPXPARAM_Simplex_Tolerances_Optimality} +\alias{CPXPARAM_SolutionTarget} +\alias{CPXPARAM_Threads} +\alias{CPXPARAM_TimeLimit} +\alias{CPXPARAM_Tune_DetTimeLimit} +\alias{CPXPARAM_Tune_Display} +\alias{CPXPARAM_Tune_Measure} +\alias{CPXPARAM_Tune_Repeat} +\alias{CPXPARAM_Tune_TimeLimit} +\alias{CPXPARAM_WorkDir} +\alias{CPXPARAM_WorkMem} + +\title{ + Constants, Parameters, Return and Status Codes of IBM ILOG CPLEX +} + +\description{ + This is a list containing constants used by IBM ILOG CPLEX. Cunsult the IBM + ILOG CPLEX manual for more information, in praticular for the use of control + parameters. +} + + +%------------------------------------------------------------------------------ +\section{General Parameters}{ + \tabular{ll}{ + \code{CPX_INFBOUND} \tab \code{1.0E+20} \cr + \code{CPX_STR_PARAM_MAX} \tab \code{512} \cr + } +} + +%------------------------------------------------------------------------------ +\section{Types of parameters}{ + \tabular{ll}{ + \code{CPX_PARAMTYPE_NONE} \tab \code{0} \cr + \code{CPX_PARAMTYPE_INT} \tab \code{1} \cr + \code{CPX_PARAMTYPE_DOUBLE} \tab \code{2} \cr + \code{CPX_PARAMTYPE_STRING} \tab \code{3} \cr + \code{CPX_PARAMTYPE_LONG} \tab \code{4} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values returned for \code{stat} by solution}{ + \tabular{ll}{ + \code{CPX_STAT_OPTIMAL} \tab \code{1} \cr + \code{CPX_STAT_UNBOUNDED} \tab \code{2} \cr + \code{CPX_STAT_INFEASIBLE} \tab \code{3} \cr + \code{CPX_STAT_INForUNBD} \tab \code{4} \cr + \code{CPX_STAT_OPTIMAL_INFEAS} \tab \code{5} \cr + \code{CPX_STAT_NUM_BEST} \tab \code{6} \cr + \code{CPX_STAT_ABORT_IT_LIM} \tab \code{10} \cr + \code{CPX_STAT_ABORT_TIME_LIM} \tab \code{11} \cr + \code{CPX_STAT_ABORT_OBJ_LIM} \tab \code{12} \cr + \code{CPX_STAT_ABORT_USER} \tab \code{13} \cr + \code{CPX_STAT_FEASIBLE_RELAXED_SUM} \tab \code{14} \cr + \code{CPX_STAT_OPTIMAL_RELAXED_SUM} \tab \code{15} \cr + \code{CPX_STAT_FEASIBLE_RELAXED_INF} \tab \code{16} \cr + \code{CPX_STAT_OPTIMAL_RELAXED_INF} \tab \code{17} \cr + \code{CPX_STAT_FEASIBLE_RELAXED_QUAD} \tab \code{18} \cr + \code{CPX_STAT_OPTIMAL_RELAXED_QUAD} \tab \code{19} \cr + \code{CPX_STAT_FEASIBLE} \tab \code{23} \cr + \code{CPX_STAT_ABORT_DETTIME_LIM} \tab \code{25} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Solution type return values from \code{CPXsolninfo}}{ + \tabular{ll}{ + \code{CPX_NO_SOLN} \tab \code{0} \cr + \code{CPX_BASIC_SOLN} \tab \code{1} \cr + \code{CPX_NONBASIC_SOLN} \tab \code{2} \cr + \code{CPX_PRIMAL_SOLN} \tab \code{3} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values of presolve \code{stats} for columns and rows}{ + \tabular{lll}{ + \code{CPX_PRECOL_LOW} \tab \code{-1} \tab fixed to original lb \cr + \code{CPX_PRECOL_UP} \tab \code{-2} \tab fixed to original ub \cr + \code{CPX_PRECOL_FIX} \tab \code{-3} \tab fixed to some other value \cr + \code{CPX_PRECOL_AGG} \tab \code{-4} \tab aggregated \eqn{y = a \times x + b}{y = a*x + b} \cr + \code{CPX_PRECOL_OTHER} \tab \code{-5} \tab cannot be expressed by a linear combination of active variables in the presolved model crushing will fail if it has to touch such a variable \cr + \code{CPX_PREROW_RED} \tab \code{-1} \tab redundant row removed in presolved model \cr + \code{CPX_PREROW_AGG} \tab \code{-2} \tab used to aggregate a variable \cr + \code{CPX_PREROW_OTHER} \tab \code{-3} \tab other, for example merge two inequalities into a single equation \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Generic constants}{ + \tabular{ll}{ + \code{CPX_ON} \tab \code{1} \cr + \code{CPX_OFF} \tab \code{0} \cr + \code{CPX_MAX} \tab \code{-1} \cr + \code{CPX_MIN} \tab \code{1} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Primal simplex pricing algorithm}{ + \tabular{ll}{ + \code{CPX_PPRIIND_PARTIAL} \tab \code{-1} \cr + \code{CPX_PPRIIND_AUTO} \tab \code{0} \cr + \code{CPX_PPRIIND_DEVEX} \tab \code{1} \cr + \code{CPX_PPRIIND_STEEP} \tab \code{2} \cr + \code{CPX_PPRIIND_STEEPQSTART} \tab \code{3} \cr + \code{CPX_PPRIIND_FULL} \tab \code{4} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Dual simplex pricing algorithm}{ + \tabular{ll}{ + \code{CPX_DPRIIND_AUTO} \tab \code{0} \cr + \code{CPX_DPRIIND_FULL} \tab \code{1} \cr + \code{CPX_DPRIIND_STEEP} \tab \code{2} \cr + \code{CPX_DPRIIND_FULL_STEEP} \tab \code{3} \cr + \code{CPX_DPRIIND_STEEPQSTART} \tab \code{4} \cr + \code{CPX_DPRIIND_DEVEX} \tab \code{5} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{PARALLELMODE values}{ + \tabular{ll}{ + \code{CPX_PARALLEL_DETERMINISTIC} \tab \code{1} \cr + \code{CPX_PARALLEL_AUTO} \tab \code{0} \cr + \code{CPX_PARALLEL_OPPORTUNISTIC} \tab \code{-1} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values for \code{CPX_PARAM_WRITELEVEL}}{ + \tabular{ll}{ + \code{CPX_WRITELEVEL_AUTO} \tab \code{0} \cr + \code{CPX_WRITELEVEL_ALLVARS} \tab \code{1} \cr + \code{CPX_WRITELEVEL_DISCRETEVARS} \tab \code{2} \cr + \code{CPX_WRITELEVEL_NONZEROVARS} \tab \code{3} \cr + \code{CPX_WRITELEVEL_NONZERODISCRETEVARS} \tab \code{4} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values for \code{CPX_PARAM_SOLUTIONTARGET}}{ + \tabular{ll}{ + \code{CPX_SOLUTIONTARGET_AUTO} \tab \code{0} \cr + \code{CPX_SOLUTIONTARGET_OPTIMALCONVEX} \tab \code{1} \cr + \code{CPX_SOLUTIONTARGET_FIRSTORDER} \tab \code{2} \cr + \code{CPX_SOLUTIONTARGET_OPTIMALGLOBAL} \tab \code{3} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{LP/QP solution algorithms}{ +Used as possible values for \code{CPX_PARAM_LPMETHOD}, \code{CPX_PARAM_QPMETHOD}, \code{CPX_PARAM_BARCROSSALG}, \code{CPXgetmethod}, \dots + \tabular{ll}{ + \code{CPX_ALG_NONE} \tab \code{-1} \cr + \code{CPX_ALG_AUTOMATIC} \tab \code{0} \cr + \code{CPX_ALG_PRIMAL} \tab \code{1} \cr + \code{CPX_ALG_DUAL} \tab \code{2} \cr + \code{CPX_ALG_NET} \tab \code{3} \cr + \code{CPX_ALG_BARRIER} \tab \code{4} \cr + \code{CPX_ALG_SIFTING} \tab \code{5} \cr + \code{CPX_ALG_CONCURRENT} \tab \code{6} \cr + \code{CPX_ALG_BAROPT} \tab \code{7} \cr + \code{CPX_ALG_PIVOTIN} \tab \code{8} \cr + \code{CPX_ALG_PIVOTOUT} \tab \code{9} \cr + \code{CPX_ALG_PIVOT} \tab \code{10} \cr + \code{CPX_ALG_FEASOPT} \tab \code{11} \cr + \code{CPX_ALG_MIP} \tab \code{12} \cr + \code{CPX_ALG_ROBUST} \tab \code{13} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Basis status values}{ + \tabular{ll}{ + \code{CPX_AT_LOWER} \tab \code{0} \cr + \code{CPX_BASIC} \tab \code{1} \cr + \code{CPX_AT_UPPER} \tab \code{2} \cr + \code{CPX_FREE_SUPER} \tab \code{3} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Variable types for ctype array}{ + \tabular{ll}{ + \code{CPX_CONTINUOUS} \tab \code{"C"} \cr + \code{CPX_BINARY} \tab \code{"B"} \cr + \code{CPX_INTEGER} \tab \code{"I"} \cr + \code{CPX_SEMICONT} \tab \code{"S"} \cr + \code{CPX_SEMIINT} \tab \code{"N"} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{PREREDUCE settings}{ + \tabular{ll}{ + \code{CPX_PREREDUCE_PRIMALANDDUAL} \tab \code{3} \cr + \code{CPX_PREREDUCE_DUALONLY} \tab \code{2} \cr + \code{CPX_PREREDUCE_PRIMALONLY} \tab \code{1} \cr + \code{CPX_PREREDUCE_NOPRIMALORDUAL} \tab \code{0} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Conflict statuses}{ + \tabular{ll}{ + \code{CPX_STAT_CONFLICT_FEASIBLE} \tab \code{30} \cr + \code{CPX_STAT_CONFLICT_MINIMAL} \tab \code{31} \cr + \code{CPX_STAT_CONFLICT_ABORT_CONTRADICTION} \tab \code{32} \cr + \code{CPX_STAT_CONFLICT_ABORT_TIME_LIM} \tab \code{33} \cr + \code{CPX_STAT_CONFLICT_ABORT_IT_LIM} \tab \code{34} \cr + \code{CPX_STAT_CONFLICT_ABORT_NODE_LIM} \tab \code{35} \cr + \code{CPX_STAT_CONFLICT_ABORT_OBJ_LIM} \tab \code{36} \cr + \code{CPX_STAT_CONFLICT_ABORT_MEM_LIM} \tab \code{37} \cr + \code{CPX_STAT_CONFLICT_ABORT_USER} \tab \code{38} \cr + \code{CPX_STAT_CONFLICT_ABORT_DETTIME_LIM} \tab \code{39} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Conflict status values}{ + \tabular{ll}{ + \code{CPX_CONFLICT_EXCLUDED} \tab \code{-1} \cr + \code{CPX_CONFLICT_POSSIBLE_MEMBER} \tab \code{0} \cr + \code{CPX_CONFLICT_POSSIBLE_LB} \tab \code{1} \cr + \code{CPX_CONFLICT_POSSIBLE_UB} \tab \code{2} \cr + \code{CPX_CONFLICT_MEMBER} \tab \code{3} \cr + \code{CPX_CONFLICT_LB} \tab \code{4} \cr + \code{CPX_CONFLICT_UB} \tab \code{5} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Problem Types}{ +Types \code{4}, \code{9}, and \code{12} are internal, the others are for users. + \tabular{ll}{ + \code{CPXPROB_LP} \tab \code{0} \cr + \code{CPXPROB_MILP} \tab \code{1} \cr + \code{CPXPROB_FIXEDMILP} \tab \code{3} \cr + \code{CPXPROB_NODELP} \tab \code{4} \cr + \code{CPXPROB_QP} \tab \code{5} \cr + \code{CPXPROB_MIQP} \tab \code{7} \cr + \code{CPXPROB_FIXEDMIQP} \tab \code{8} \cr + \code{CPXPROB_NODEQP} \tab \code{9} \cr + \code{CPXPROB_QCP} \tab \code{10} \cr + \code{CPXPROB_MIQCP} \tab \code{11} \cr + \code{CPXPROB_NODEQCP} \tab \code{12} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{CPLEX Parameter numbers}{ + \tabular{ll}{ + \code{CPX_PARAM_ADVIND} \tab \code{1001} \cr + \code{CPX_PARAM_AGGFILL} \tab \code{1002} \cr + \code{CPX_PARAM_AGGIND} \tab \code{1003} \cr + \code{CPX_PARAM_BASINTERVAL} \tab \code{1004} \cr + \code{CPX_PARAM_CFILEMUL} \tab \code{1005} \cr + \code{CPX_PARAM_CLOCKTYPE} \tab \code{1006} \cr + \code{CPX_PARAM_CRAIND} \tab \code{1007} \cr + \code{CPX_PARAM_DEPIND} \tab \code{1008} \cr + \code{CPX_PARAM_DPRIIND} \tab \code{1009} \cr + \code{CPX_PARAM_PRICELIM} \tab \code{1010} \cr + \code{CPX_PARAM_EPMRK} \tab \code{1013} \cr + \code{CPX_PARAM_EPOPT} \tab \code{1014} \cr + \code{CPX_PARAM_EPPER} \tab \code{1015} \cr + \code{CPX_PARAM_EPRHS} \tab \code{1016} \cr + \code{CPX_PARAM_FASTMIP} \tab \code{1017} \cr + \code{CPX_PARAM_SIMDISPLAY} \tab \code{1019} \cr + \code{CPX_PARAM_ITLIM} \tab \code{1020} \cr + \code{CPX_PARAM_ROWREADLIM} \tab \code{1021} \cr + \code{CPX_PARAM_NETFIND} \tab \code{1022} \cr + \code{CPX_PARAM_COLREADLIM} \tab \code{1023} \cr + \code{CPX_PARAM_NZREADLIM} \tab \code{1024} \cr + \code{CPX_PARAM_OBJLLIM} \tab \code{1025} \cr + \code{CPX_PARAM_OBJULIM} \tab \code{1026} \cr + \code{CPX_PARAM_PERIND} \tab \code{1027} \cr + \code{CPX_PARAM_PERLIM} \tab \code{1028} \cr + \code{CPX_PARAM_PPRIIND} \tab \code{1029} \cr + \code{CPX_PARAM_PREIND} \tab \code{1030} \cr + \code{CPX_PARAM_REINV} \tab \code{1031} \cr + \code{CPX_PARAM_REVERSEIND} \tab \code{1032} \cr + \code{CPX_PARAM_RFILEMUL} \tab \code{1033} \cr + \code{CPX_PARAM_SCAIND} \tab \code{1034} \cr + \code{CPX_PARAM_SCRIND} \tab \code{1035} \cr + \code{CPX_PARAM_SINGLIM} \tab \code{1037} \cr + \code{CPX_PARAM_SINGTOL} \tab \code{1038} \cr + \code{CPX_PARAM_TILIM} \tab \code{1039} \cr + \code{CPX_PARAM_XXXIND} \tab \code{1041} \cr + \code{CPX_PARAM_PREDUAL} \tab \code{1044} \cr + \code{CPX_PARAM_EPOPT_H} \tab \code{1049} \cr + \code{CPX_PARAM_EPRHS_H} \tab \code{1050} \cr + \code{CPX_PARAM_PREPASS} \tab \code{1052} \cr + \code{CPX_PARAM_DATACHECK} \tab \code{1056} \cr + \code{CPX_PARAM_REDUCE} \tab \code{1057} \cr + \code{CPX_PARAM_PRELINEAR} \tab \code{1058} \cr + \code{CPX_PARAM_LPMETHOD} \tab \code{1062} \cr + \code{CPX_PARAM_QPMETHOD} \tab \code{1063} \cr + \code{CPX_PARAM_WORKDIR} \tab \code{1064} \cr + \code{CPX_PARAM_WORKMEM} \tab \code{1065} \cr + \code{CPX_PARAM_THREADS} \tab \code{1067} \cr + \code{CPX_PARAM_CONFLICTDISPLAY} \tab \code{1074} \cr + \code{CPX_PARAM_SIFTDISPLAY} \tab \code{1076} \cr + \code{CPX_PARAM_SIFTALG} \tab \code{1077} \cr + \code{CPX_PARAM_SIFTITLIM} \tab \code{1078} \cr + \code{CPX_PARAM_MPSLONGNUM} \tab \code{1081} \cr + \code{CPX_PARAM_MEMORYEMPHASIS} \tab \code{1082} \cr + \code{CPX_PARAM_NUMERICALEMPHASIS} \tab \code{1083} \cr + \code{CPX_PARAM_FEASOPTMODE} \tab \code{1084} \cr + \code{CPX_PARAM_PARALLELMODE} \tab \code{1109} \cr + \code{CPX_PARAM_TUNINGMEASURE} \tab \code{1110} \cr + \code{CPX_PARAM_TUNINGREPEAT} \tab \code{1111} \cr + \code{CPX_PARAM_TUNINGTILIM} \tab \code{1112} \cr + \code{CPX_PARAM_TUNINGDISPLAY} \tab \code{1113} \cr + \code{CPX_PARAM_WRITELEVEL} \tab \code{1114} \cr + \code{CPX_PARAM_RANDOMSEED} \tab \code{1124} \cr + \code{CPX_PARAM_DETTILIM} \tab \code{1127} \cr + \code{CPX_PARAM_FILEENCODING} \tab \code{1129} \cr + \code{CPX_PARAM_APIENCODING} \tab \code{1130} \cr + \code{CPX_PARAM_SOLUTIONTARGET} \tab \code{1131} \cr + \code{CPX_PARAM_CLONELOG} \tab \code{1132} \cr + \code{CPX_PARAM_TUNINGDETTILIM} \tab \code{1139} \cr + + \code{CPX_PARAM_ALL_MIN} \tab \code{1000} \cr + \code{CPX_PARAM_ALL_MAX} \tab \code{6000} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values for \code{CPX_PARAM_TUNINGMEASURE}}{ + \tabular{ll}{ + \code{CPX_TUNE_AVERAGE} \tab \code{1} \cr + \code{CPX_TUNE_MINMAX} \tab \code{2} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Values for incomplete tuning}{ + \tabular{ll}{ + \code{CPX_TUNE_ABORT} \tab \code{1} \cr + \code{CPX_TUNE_TILIM} \tab \code{2} \cr + \code{CPX_TUNE_DETTILIM} \tab \code{3} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Quality query identifiers}{ + \tabular{ll}{ + \code{CPX_MAX_PRIMAL_INFEAS} \tab \code{1} \cr + \code{CPX_MAX_SCALED_PRIMAL_INFEAS} \tab \code{2} \cr + \code{CPX_SUM_PRIMAL_INFEAS} \tab \code{3} \cr + \code{CPX_SUM_SCALED_PRIMAL_INFEAS} \tab \code{4} \cr + \code{CPX_MAX_DUAL_INFEAS} \tab \code{5} \cr + \code{CPX_MAX_SCALED_DUAL_INFEAS} \tab \code{6} \cr + \code{CPX_SUM_DUAL_INFEAS} \tab \code{7} \cr + \code{CPX_SUM_SCALED_DUAL_INFEAS} \tab \code{8} \cr + \code{CPX_MAX_INT_INFEAS} \tab \code{9} \cr + \code{CPX_SUM_INT_INFEAS} \tab \code{10} \cr + \code{CPX_MAX_PRIMAL_RESIDUAL} \tab \code{11} \cr + \code{CPX_MAX_SCALED_PRIMAL_RESIDUAL} \tab \code{12} \cr + \code{CPX_SUM_PRIMAL_RESIDUAL} \tab \code{13} \cr + \code{CPX_SUM_SCALED_PRIMAL_RESIDUAL} \tab \code{14} \cr + \code{CPX_MAX_DUAL_RESIDUAL} \tab \code{15} \cr + \code{CPX_MAX_SCALED_DUAL_RESIDUAL} \tab \code{16} \cr + \code{CPX_SUM_DUAL_RESIDUAL} \tab \code{17} \cr + \code{CPX_SUM_SCALED_DUAL_RESIDUAL} \tab \code{18} \cr + \code{CPX_MAX_COMP_SLACK} \tab \code{19} \cr + \code{CPX_SUM_COMP_SLACK} \tab \code{21} \cr + \code{CPX_MAX_X} \tab \code{23} \cr + \code{CPX_MAX_SCALED_X} \tab \code{24} \cr + \code{CPX_MAX_PI} \tab \code{25} \cr + \code{CPX_MAX_SCALED_PI} \tab \code{26} \cr + \code{CPX_MAX_SLACK} \tab \code{27} \cr + \code{CPX_MAX_SCALED_SLACK} \tab \code{28} \cr + \code{CPX_MAX_RED_COST} \tab \code{29} \cr + \code{CPX_MAX_SCALED_RED_COST} \tab \code{30} \cr + \code{CPX_SUM_X} \tab \code{31} \cr + \code{CPX_SUM_SCALED_X} \tab \code{32} \cr + \code{CPX_SUM_PI} \tab \code{33} \cr + \code{CPX_SUM_SCALED_PI} \tab \code{34} \cr + \code{CPX_SUM_SLACK} \tab \code{35} \cr + \code{CPX_SUM_SCALED_SLACK} \tab \code{36} \cr + \code{CPX_SUM_RED_COST} \tab \code{37} \cr + \code{CPX_SUM_SCALED_RED_COST} \tab \code{38} \cr + \code{CPX_KAPPA} \tab \code{39} \cr + \code{CPX_OBJ_GAP} \tab \code{40} \cr + \code{CPX_DUAL_OBJ} \tab \code{41} \cr + \code{CPX_PRIMAL_OBJ} \tab \code{42} \cr + \code{CPX_MAX_QCPRIMAL_RESIDUAL} \tab \code{43} \cr + \code{CPX_SUM_QCPRIMAL_RESIDUAL} \tab \code{44} \cr + \code{CPX_MAX_QCSLACK_INFEAS} \tab \code{45} \cr + \code{CPX_SUM_QCSLACK_INFEAS} \tab \code{46} \cr + \code{CPX_MAX_QCSLACK} \tab \code{47} \cr + \code{CPX_SUM_QCSLACK} \tab \code{48} \cr + \code{CPX_MAX_INDSLACK_INFEAS} \tab \code{49} \cr + \code{CPX_SUM_INDSLACK_INFEAS} \tab \code{50} \cr + \code{CPX_EXACT_KAPPA} \tab \code{51} \cr + \code{CPX_KAPPA_STABLE} \tab \code{52} \cr + \code{CPX_KAPPA_SUSPICIOUS} \tab \code{53} \cr + \code{CPX_KAPPA_UNSTABLE} \tab \code{54} \cr + \code{CPX_KAPPA_ILLPOSED} \tab \code{55} \cr + \code{CPX_KAPPA_MAX} \tab \code{56} \cr + \code{CPX_KAPPA_ATTENTION} \tab \code{57} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{feasopt options}{ + \tabular{ll}{ + \code{CPX_FEASOPT_MIN_SUM} \tab \code{0} \cr + \code{CPX_FEASOPT_OPT_SUM} \tab \code{1} \cr + \code{CPX_FEASOPT_MIN_INF} \tab \code{2} \cr + \code{CPX_FEASOPT_OPT_INF} \tab \code{3} \cr + \code{CPX_FEASOPT_MIN_QUAD} \tab \code{4} \cr + \code{CPX_FEASOPT_OPT_QUAD} \tab \code{5} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{File: \code{barconst.h}}{ + \tabular{ll}{ + \code{CPX_STAT_OPTIMAL_FACE_UNBOUNDED} \tab \code{20} \cr + \code{CPX_STAT_ABORT_PRIM_OBJ_LIM} \tab \code{21} \cr + \code{CPX_STAT_ABORT_DUAL_OBJ_LIM} \tab \code{22} \cr + \code{CPX_STAT_FIRSTORDER} \tab \code{24} \cr + } +} + +\section{Barrier parameters}{ + \tabular{ll}{ + \code{CPX_PARAM_BARDSTART} \tab \code{3001} \cr + \code{CPX_PARAM_BAREPCOMP} \tab \code{3002} \cr + \code{CPX_PARAM_BARGROWTH} \tab \code{3003} \cr + \code{CPX_PARAM_BAROBJRNG} \tab \code{3004} \cr + \code{CPX_PARAM_BARPSTART} \tab \code{3005} \cr + \code{CPX_PARAM_BARALG} \tab \code{3007} \cr + \code{CPX_PARAM_BARCOLNZ} \tab \code{3009} \cr + \code{CPX_PARAM_BARDISPLAY} \tab \code{3010} \cr + \code{CPX_PARAM_BARITLIM} \tab \code{3012} \cr + \code{CPX_PARAM_BARMAXCOR} \tab \code{3013} \cr + \code{CPX_PARAM_BARORDER} \tab \code{3014} \cr + \code{CPX_PARAM_BARSTARTALG} \tab \code{3017} \cr + \code{CPX_PARAM_BARCROSSALG} \tab \code{3018} \cr + \code{CPX_PARAM_BARQCPEPCOMP} \tab \code{3020} \cr + } +} + +\section{Optimizing Problems}{ + \tabular{ll}{ + \code{CPX_BARORDER_AUTO} \tab \code{0} \cr + \code{CPX_BARORDER_AMD} \tab \code{1} \cr + \code{CPX_BARORDER_AMF} \tab \code{2} \cr + \code{CPX_BARORDER_ND} \tab \code{3} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{MIP emphasis settings}{ + \tabular{ll}{ + \code{CPX_MIPEMPHASIS_BALANCED} \tab \code{0} \cr + \code{CPX_MIPEMPHASIS_FEASIBILITY} \tab \code{1} \cr + \code{CPX_MIPEMPHASIS_OPTIMALITY} \tab \code{2} \cr + \code{CPX_MIPEMPHASIS_BESTBOUND} \tab \code{3} \cr + \code{CPX_MIPEMPHASIS_HIDDENFEAS} \tab \code{4} \cr + } +} + +\section{Values for sostype and branch type}{ + \tabular{ll}{ + \code{CPX_TYPE_VAR} \tab \code{"0"} \cr + \code{CPX_TYPE_SOS1} \tab \code{"1"} \cr + \code{CPX_TYPE_SOS2} \tab \code{"2"} \cr + \code{CPX_TYPE_USER} \tab \code{"X"} \cr + \code{CPX_TYPE_ANY} \tab \code{"A"} \cr + } +} + +\section{Variable selection values}{ + \tabular{ll}{ + \code{CPX_VARSEL_MININFEAS} \tab \code{-1} \cr + \code{CPX_VARSEL_DEFAULT} \tab \code{0} \cr + \code{CPX_VARSEL_MAXINFEAS} \tab \code{1} \cr + \code{CPX_VARSEL_PSEUDO} \tab \code{2} \cr + \code{CPX_VARSEL_STRONG} \tab \code{3} \cr + \code{CPX_VARSEL_PSEUDOREDUCED} \tab \code{4} \cr + } +} + +\section{Node selection values}{ + \tabular{ll}{ + \code{CPX_NODESEL_DFS} \tab \code{0} \cr + \code{CPX_NODESEL_BESTBOUND} \tab \code{1} \cr + \code{CPX_NODESEL_BESTEST} \tab \code{2} \cr + \code{CPX_NODESEL_BESTEST_ALT} \tab \code{3} \cr + } +} + +\section{Values for generated priority order}{ + \tabular{ll}{ + \code{CPX_MIPORDER_COST} \tab \code{1} \cr + \code{CPX_MIPORDER_BOUNDS} \tab \code{2} \cr + \code{CPX_MIPORDER_SCALEDCOST} \tab \code{3} \cr + } +} + +\section{Values for direction array}{ + \tabular{ll}{ + \code{CPX_BRANCH_GLOBAL} \tab \code{0} \cr + \code{CPX_BRANCH_DOWN} \tab \code{-1} \cr + \code{CPX_BRANCH_UP} \tab \code{1} \cr + } +} + +\section{Values for \code{CPX_PARAM_BRDIR}}{ + \tabular{ll}{ + \code{CPX_BRDIR_DOWN} \tab \code{-1} \cr + \code{CPX_BRDIR_AUTO} \tab \code{0} \cr + \code{CPX_BRDIR_UP} \tab \code{1} \cr + } +} + +\section{Values for \code{CPX_PARAM_MIPSEARCH}}{ + \tabular{ll}{ + \code{CPX_MIPSEARCH_AUTO} \tab \code{0} \cr + \code{CPX_MIPSEARCH_TRADITIONAL} \tab \code{1} \cr + \code{CPX_MIPSEARCH_DYNAMIC} \tab \code{2} \cr + } +} + +\section{Values for \code{CPX_PARAM_MIPKAPPASTATS}}{ + \tabular{ll}{ + \code{CPX_MIPKAPPA_OFF} \tab \code{-1} \cr + \code{CPX_MIPKAPPA_AUTO} \tab \code{0} \cr + \code{CPX_MIPKAPPA_SAMPLE} \tab \code{1} \cr + \code{CPX_MIPKAPPA_FULL} \tab \code{2} \cr + } +} + +\section{Effort levels for MIP starts}{ + \tabular{ll}{ + \code{CPX_MIPSTART_AUTO} \tab \code{0} \cr + \code{CPX_MIPSTART_CHECKFEAS} \tab \code{1} \cr + \code{CPX_MIPSTART_SOLVEFIXED} \tab \code{2} \cr + \code{CPX_MIPSTART_SOLVEMIP} \tab \code{3} \cr + \code{CPX_MIPSTART_REPAIR} \tab \code{4} \cr + } +} + +\section{MIP Problem status codes}{ + \tabular{ll}{ + \code{CPXMIP_OPTIMAL} \tab \code{101} \cr + \code{CPXMIP_OPTIMAL_TOL} \tab \code{102} \cr + \code{CPXMIP_INFEASIBLE} \tab \code{103} \cr + \code{CPXMIP_SOL_LIM} \tab \code{104} \cr + \code{CPXMIP_NODE_LIM_FEAS} \tab \code{105} \cr + \code{CPXMIP_NODE_LIM_INFEAS} \tab \code{106} \cr + \code{CPXMIP_TIME_LIM_FEAS} \tab \code{107} \cr + \code{CPXMIP_TIME_LIM_INFEAS} \tab \code{108} \cr + \code{CPXMIP_FAIL_FEAS} \tab \code{109} \cr + \code{CPXMIP_FAIL_INFEAS} \tab \code{110} \cr + \code{CPXMIP_MEM_LIM_FEAS} \tab \code{111} \cr + \code{CPXMIP_MEM_LIM_INFEAS} \tab \code{112} \cr + \code{CPXMIP_ABORT_FEAS} \tab \code{113} \cr + \code{CPXMIP_ABORT_INFEAS} \tab \code{114} \cr + \code{CPXMIP_OPTIMAL_INFEAS} \tab \code{115} \cr + \code{CPXMIP_FAIL_FEAS_NO_TREE} \tab \code{116} \cr + \code{CPXMIP_FAIL_INFEAS_NO_TREE} \tab \code{117} \cr + \code{CPXMIP_UNBOUNDED} \tab \code{118} \cr + \code{CPXMIP_INForUNBD} \tab \code{119} \cr + \code{CPXMIP_FEASIBLE_RELAXED_SUM} \tab \code{120} \cr + \code{CPXMIP_OPTIMAL_RELAXED_SUM} \tab \code{121} \cr + \code{CPXMIP_FEASIBLE_RELAXED_INF} \tab \code{122} \cr + \code{CPXMIP_OPTIMAL_RELAXED_INF} \tab \code{123} \cr + \code{CPXMIP_FEASIBLE_RELAXED_QUAD} \tab \code{124} \cr + \code{CPXMIP_OPTIMAL_RELAXED_QUAD} \tab \code{125} \cr + \code{CPXMIP_ABORT_RELAXED} \tab \code{126} \cr + \code{CPXMIP_FEASIBLE} \tab \code{127} \cr + \code{CPXMIP_POPULATESOL_LIM} \tab \code{128} \cr + \code{CPXMIP_OPTIMAL_POPULATED} \tab \code{129} \cr + \code{CPXMIP_OPTIMAL_POPULATED_TOL} \tab \code{130} \cr + \code{CPXMIP_DETTIME_LIM_FEAS} \tab \code{131} \cr + \code{CPXMIP_DETTIME_LIM_INFEAS} \tab \code{132} \cr + } +} + +\section{Valid purgeable values for adding usercuts and lazyconstraints}{ + \tabular{ll}{ + \code{CPX_USECUT_FORCE} \tab \code{0} \cr + \code{CPX_USECUT_PURGE} \tab \code{1} \cr + \code{CPX_USECUT_FILTER} \tab \code{2} \cr + } +} + +\section{For \code{CPXgetnodeintfeas}}{ + \tabular{ll}{ + \code{CPX_INTEGER_FEASIBLE} \tab \code{0} \cr + \code{CPX_INTEGER_INFEASIBLE} \tab \code{1} \cr + \code{CPX_IMPLIED_INTEGER_FEASIBLE} \tab \code{2} \cr + } +} + +\section{MIP Parameter numbers}{ + \tabular{ll}{ + \code{CPX_PARAM_BRDIR} \tab \code{2001} \cr + \code{CPX_PARAM_BTTOL} \tab \code{2002} \cr + \code{CPX_PARAM_CLIQUES} \tab \code{2003} \cr + \code{CPX_PARAM_COEREDIND} \tab \code{2004} \cr + \code{CPX_PARAM_COVERS} \tab \code{2005} \cr + \code{CPX_PARAM_CUTLO} \tab \code{2006} \cr + \code{CPX_PARAM_CUTUP} \tab \code{2007} \cr + \code{CPX_PARAM_EPAGAP} \tab \code{2008} \cr + \code{CPX_PARAM_EPGAP} \tab \code{2009} \cr + \code{CPX_PARAM_EPINT} \tab \code{2010} \cr + \code{CPX_PARAM_MIPDISPLAY} \tab \code{2012} \cr + \code{CPX_PARAM_MIPINTERVAL} \tab \code{2013} \cr + \code{CPX_PARAM_INTSOLLIM} \tab \code{2015} \cr + \code{CPX_PARAM_NODEFILEIND} \tab \code{2016} \cr + \code{CPX_PARAM_NODELIM} \tab \code{2017} \cr + \code{CPX_PARAM_NODESEL} \tab \code{2018} \cr + \code{CPX_PARAM_OBJDIF} \tab \code{2019} \cr + \code{CPX_PARAM_MIPORDIND} \tab \code{2020} \cr + \code{CPX_PARAM_RELOBJDIF} \tab \code{2022} \cr + \code{CPX_PARAM_STARTALG} \tab \code{2025} \cr + \code{CPX_PARAM_SUBALG} \tab \code{2026} \cr + \code{CPX_PARAM_TRELIM} \tab \code{2027} \cr + \code{CPX_PARAM_VARSEL} \tab \code{2028} \cr + \code{CPX_PARAM_BNDSTRENIND} \tab \code{2029} \cr + \code{CPX_PARAM_HEURFREQ} \tab \code{2031} \cr + \code{CPX_PARAM_MIPORDTYPE} \tab \code{2032} \cr + \code{CPX_PARAM_CUTSFACTOR} \tab \code{2033} \cr + \code{CPX_PARAM_RELAXPREIND} \tab \code{2034} \cr + \code{CPX_PARAM_PRESLVND} \tab \code{2037} \cr + \code{CPX_PARAM_BBINTERVAL} \tab \code{2039} \cr + \code{CPX_PARAM_FLOWCOVERS} \tab \code{2040} \cr + \code{CPX_PARAM_IMPLBD} \tab \code{2041} \cr + \code{CPX_PARAM_PROBE} \tab \code{2042} \cr + \code{CPX_PARAM_GUBCOVERS} \tab \code{2044} \cr + \code{CPX_PARAM_STRONGCANDLIM} \tab \code{2045} \cr + \code{CPX_PARAM_STRONGITLIM} \tab \code{2046} \cr + \code{CPX_PARAM_FRACCAND} \tab \code{2048} \cr + \code{CPX_PARAM_FRACCUTS} \tab \code{2049} \cr + \code{CPX_PARAM_FRACPASS} \tab \code{2050} \cr + \code{CPX_PARAM_FLOWPATHS} \tab \code{2051} \cr + \code{CPX_PARAM_MIRCUTS} \tab \code{2052} \cr + \code{CPX_PARAM_DISJCUTS} \tab \code{2053} \cr + \code{CPX_PARAM_AGGCUTLIM} \tab \code{2054} \cr + \code{CPX_PARAM_MIPCBREDLP} \tab \code{2055} \cr + \code{CPX_PARAM_CUTPASS} \tab \code{2056} \cr + \code{CPX_PARAM_MIPEMPHASIS} \tab \code{2058} \cr + \code{CPX_PARAM_SYMMETRY} \tab \code{2059} \cr + \code{CPX_PARAM_DIVETYPE} \tab \code{2060} \cr + \code{CPX_PARAM_RINSHEUR} \tab \code{2061} \cr + \code{CPX_PARAM_SUBMIPNODELIM} \tab \code{2062} \cr + \code{CPX_PARAM_LBHEUR} \tab \code{2063} \cr + \code{CPX_PARAM_REPEATPRESOLVE} \tab \code{2064} \cr + \code{CPX_PARAM_PROBETIME} \tab \code{2065} \cr + \code{CPX_PARAM_POLISHTIME} \tab \code{2066} \cr + \code{CPX_PARAM_REPAIRTRIES} \tab \code{2067} \cr + \code{CPX_PARAM_EPLIN} \tab \code{2068} \cr + \code{CPX_PARAM_EPRELAX} \tab \code{2073} \cr + \code{CPX_PARAM_FPHEUR} \tab \code{2098} \cr + \code{CPX_PARAM_EACHCUTLIM} \tab \code{2102} \cr + \code{CPX_PARAM_SOLNPOOLCAPACITY} \tab \code{2103} \cr + \code{CPX_PARAM_SOLNPOOLREPLACE} \tab \code{2104} \cr + \code{CPX_PARAM_SOLNPOOLGAP} \tab \code{2105} \cr + \code{CPX_PARAM_SOLNPOOLAGAP} \tab \code{2106} \cr + \code{CPX_PARAM_SOLNPOOLINTENSITY} \tab \code{2107} \cr + \code{CPX_PARAM_POPULATELIM} \tab \code{2108} \cr + \code{CPX_PARAM_MIPSEARCH} \tab \code{2109} \cr + \code{CPX_PARAM_MIQCPSTRAT} \tab \code{2110} \cr + \code{CPX_PARAM_ZEROHALFCUTS} \tab \code{2111} \cr + \code{CPX_PARAM_POLISHAFTEREPAGAP} \tab \code{2126} \cr + \code{CPX_PARAM_POLISHAFTEREPGAP} \tab \code{2127} \cr + \code{CPX_PARAM_POLISHAFTERNODE} \tab \code{2128} \cr + \code{CPX_PARAM_POLISHAFTERINTSOL} \tab \code{2129} \cr + \code{CPX_PARAM_POLISHAFTERTIME} \tab \code{2130} \cr + \code{CPX_PARAM_MCFCUTS} \tab \code{2134} \cr + \code{CPX_PARAM_MIPKAPPASTATS} \tab \code{2137} \cr + \code{CPX_PARAM_AUXROOTTHREADS} \tab \code{2139} \cr + \code{CPX_PARAM_INTSOLFILEPREFIX} \tab \code{2143} \cr + \code{CPX_PARAM_PROBEDETTIME} \tab \code{2150} \cr + \code{CPX_PARAM_POLISHAFTERDETTIME} \tab \code{2151} \cr + \code{CPX_PARAM_LANDPCUTS} \tab \code{2152} \cr + \code{CPX_PARAM_RAMPUPDURATION} \tab \code{2163} \cr + \code{CPX_PARAM_RAMPUPDETTILIM} \tab \code{2164} \cr + \code{CPX_PARAM_RAMPUPTILIM} \tab \code{2165} \cr + } +} + +\section{Values for \code{CPX_PARAM_SOLNPOOLREPLACE}}{ + \tabular{ll}{ + \code{CPX_SOLNPOOL_FIFO} \tab \code{0} \cr + \code{CPX_SOLNPOOL_OBJ} \tab \code{1} \cr + \code{CPX_SOLNPOOL_DIV} \tab \code{2} \cr + + \code{CPX_SOLNPOOL_FILTER_DIVERSITY} \tab \code{1} \cr + \code{CPX_SOLNPOOL_FILTER_RANGE} \tab \code{2} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{File: \code{gcconst.h}}{ + \tabular{ll}{ + \code{CPX_CON_LOWER_BOUND} \tab \code{1} \cr + \code{CPX_CON_UPPER_BOUND} \tab \code{2} \cr + \code{CPX_CON_LINEAR} \tab \code{3} \cr + \code{CPX_CON_QUADRATIC} \tab \code{4} \cr + \code{CPX_CON_SOS} \tab \code{5} \cr + \code{CPX_CON_INDICATOR} \tab \code{6} \cr + } +} + +\section{internal types}{ + \tabular{ll}{ + \code{CPX_CON_MINEXPR} \tab \code{7} \cr + \code{CPX_CON_MAXEXPR} \tab \code{8} \cr + \code{CPX_CON_PWL} \tab \code{9} \cr + \code{CPX_CON_ABS} \tab \code{9} \cr + \code{CPX_CON_DISJCST} \tab \code{10} \cr + \code{CPX_CON_INDDISJCST} \tab \code{11} \cr + \code{CPX_CON_SETVAR} \tab \code{12} \cr + \code{CPX_CON_SETVARMEMBER} \tab \code{13} \cr + \code{CPX_CON_SETVARCARD} \tab \code{14} \cr + \code{CPX_CON_SETVARSUM} \tab \code{15} \cr + \code{CPX_CON_SETVARMIN} \tab \code{16} \cr + \code{CPX_CON_SETVARMAX} \tab \code{17} \cr + \code{CPX_CON_SETVARSUBSET} \tab \code{18} \cr + \code{CPX_CON_SETVARDOMAIN} \tab \code{19} \cr + \code{CPX_CON_SETVARUNION} \tab \code{20} \cr + \code{CPX_CON_SETVARINTERSECTION} \tab \code{21} \cr + \code{CPX_CON_SETVARNULLINTERSECT} \tab \code{22} \cr + \code{CPX_CON_SETVARINTERSECT} \tab \code{23} \cr + \code{CPX_CON_SETVAREQ} \tab \code{24} \cr + \code{CPX_CON_SETVARNEQ} \tab \code{25} \cr + \code{CPX_CON_SETVARNEQCST} \tab \code{26} \cr + \code{CPX_CON_LAST_CONTYPE} \tab \code{27} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Network parameters}{ + \tabular{ll}{ + \code{CPX_PARAM_NETITLIM} \tab \code{5001} \cr + \code{CPX_PARAM_NETEPOPT} \tab \code{5002} \cr + \code{CPX_PARAM_NETEPRHS} \tab \code{5003} \cr + \code{CPX_PARAM_NETPPRIIND} \tab \code{5004} \cr + \code{CPX_PARAM_NETDISPLAY} \tab \code{5005} \cr + } +} + +\section{NETOPT display values}{ + \tabular{ll}{ + \code{CPXNET_NO_DISPLAY_OBJECTIVE} \tab \code{0} \cr + \code{CPXNET_TRUE_OBJECTIVE} \tab \code{1} \cr + \code{CPXNET_PENALIZED_OBJECTIVE} \tab \code{2} \cr + } +} + +\section{NETOPT pricing parameters}{ + \tabular{ll}{ + \code{CPXNET_PRICE_AUTO} \tab \code{0} \cr + \code{CPXNET_PRICE_PARTIAL} \tab \code{1} \cr + \code{CPXNET_PRICE_MULT_PART} \tab \code{2} \cr + \code{CPXNET_PRICE_SORT_MULT_PART} \tab \code{3} \cr + } +} + + +\section{Copying data}{ + \tabular{ll}{ + \code{CPX_PARAM_QPNZREADLIM} \tab \code{4001} \cr + } +} + +\section{Specify how to calculate duals for QCPs}{ + \tabular{ll}{ + \code{CPX_PARAM_CALCQCPDUALS} \tab \code{4003} \cr + } +} + +\section{presolve}{ + \tabular{ll}{ + \code{CPX_PARAM_QPMAKEPSDIND} \tab \code{4010} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Error codes}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXERR_NEGATIVE_SURPLUS} \tab \code{1207} \cr + \code{CPXERR_NO_SENSIT} \tab \code{1260} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{new parameter names introduced in IBM ILOG CPLEX version 12.6}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXPARAM_Advance} \tab \code{1001} \cr + \code{CPXPARAM_Barrier_Algorithm} \tab \code{3007} \cr + \code{CPXPARAM_Barrier_ColNonzeros} \tab \code{3009} \cr + \code{CPXPARAM_Barrier_ConvergeTol} \tab \code{3002} \cr + \code{CPXPARAM_Barrier_Crossover} \tab \code{3018} \cr + \code{CPXPARAM_Barrier_Display} \tab \code{3010} \cr + \code{CPXPARAM_Barrier_Limits_Corrections} \tab \code{3013} \cr + \code{CPXPARAM_Barrier_Limits_Growth} \tab \code{3003} \cr + \code{CPXPARAM_Barrier_Limits_Iteration} \tab \code{3012} \cr + \code{CPXPARAM_Barrier_Limits_ObjRange} \tab \code{3004} \cr + \code{CPXPARAM_Barrier_Ordering} \tab \code{3014} \cr + \code{CPXPARAM_Barrier_QCPConvergeTol} \tab \code{3020} \cr + \code{CPXPARAM_Barrier_StartAlg} \tab \code{3017} \cr + \code{CPXPARAM_ClockType} \tab \code{1006} \cr + \code{CPXPARAM_Conflict_Display} \tab \code{1074} \cr + \code{CPXPARAM_DetTimeLimit} \tab \code{1127} \cr + \code{CPXPARAM_DistMIP_Rampup_DetTimeLimit} \tab \code{2164} \cr + \code{CPXPARAM_DistMIP_Rampup_Duration} \tab \code{2163} \cr + \code{CPXPARAM_DistMIP_Rampup_TimeLimit} \tab \code{2165} \cr + \code{CPXPARAM_Emphasis_Memory} \tab \code{1082} \cr + \code{CPXPARAM_Emphasis_MIP} \tab \code{2058} \cr + \code{CPXPARAM_Emphasis_Numerical} \tab \code{1083} \cr + \code{CPXPARAM_Feasopt_Mode} \tab \code{1084} \cr + \code{CPXPARAM_Feasopt_Tolerance} \tab \code{2073} \cr + \code{CPXPARAM_LPMethod} \tab \code{1062} \cr + \code{CPXPARAM_MIP_Cuts_Cliques} \tab \code{2003} \cr + \code{CPXPARAM_MIP_Cuts_Covers} \tab \code{2005} \cr + \code{CPXPARAM_MIP_Cuts_Disjunctive} \tab \code{2053} \cr + \code{CPXPARAM_MIP_Cuts_FlowCovers} \tab \code{2040} \cr + \code{CPXPARAM_MIP_Cuts_Gomory} \tab \code{2049} \cr + \code{CPXPARAM_MIP_Cuts_GUBCovers} \tab \code{2044} \cr + \code{CPXPARAM_MIP_Cuts_Implied} \tab \code{2041} \cr + \code{CPXPARAM_MIP_Cuts_LiftProj} \tab \code{2152} \cr + \code{CPXPARAM_MIP_Cuts_MCFCut} \tab \code{2134} \cr + \code{CPXPARAM_MIP_Cuts_MIRCut} \tab \code{2052} \cr + \code{CPXPARAM_MIP_Cuts_PathCut} \tab \code{2051} \cr + \code{CPXPARAM_MIP_Cuts_ZeroHalfCut} \tab \code{2111} \cr + \code{CPXPARAM_MIP_Display} \tab \code{2012} \cr + \code{CPXPARAM_MIP_Interval} \tab \code{2013} \cr + \code{CPXPARAM_MIP_Limits_AggForCut} \tab \code{2054} \cr + \code{CPXPARAM_MIP_Limits_AuxRootThreads} \tab \code{2139} \cr + \code{CPXPARAM_MIP_Limits_CutPasses} \tab \code{2056} \cr + \code{CPXPARAM_MIP_Limits_CutsFactor} \tab \code{2033} \cr + \code{CPXPARAM_MIP_Limits_EachCutLimit} \tab \code{2102} \cr + \code{CPXPARAM_MIP_Limits_GomoryCand} \tab \code{2048} \cr + \code{CPXPARAM_MIP_Limits_GomoryPass} \tab \code{2050} \cr + \code{CPXPARAM_MIP_Limits_Nodes} \tab \code{2017} \cr + \code{CPXPARAM_MIP_Limits_PolishTime} \tab \code{2066} \cr + \code{CPXPARAM_MIP_Limits_Populate} \tab \code{2108} \cr + \code{CPXPARAM_MIP_Limits_ProbeDetTime} \tab \code{2150} \cr + \code{CPXPARAM_MIP_Limits_ProbeTime} \tab \code{2065} \cr + \code{CPXPARAM_MIP_Limits_RepairTries} \tab \code{2067} \cr + \code{CPXPARAM_MIP_Limits_Solutions} \tab \code{2015} \cr + \code{CPXPARAM_MIP_Limits_StrongCand} \tab \code{2045} \cr + \code{CPXPARAM_MIP_Limits_StrongIt} \tab \code{2046} \cr + \code{CPXPARAM_MIP_Limits_SubMIPNodeLim} \tab \code{2062} \cr + \code{CPXPARAM_MIP_Limits_TreeMemory} \tab \code{2027} \cr + \code{CPXPARAM_MIP_OrderType} \tab \code{2032} \cr + \code{CPXPARAM_MIP_PolishAfter_AbsMIPGap} \tab \code{2126} \cr + \code{CPXPARAM_MIP_PolishAfter_DetTime} \tab \code{2151} \cr + \code{CPXPARAM_MIP_PolishAfter_MIPGap} \tab \code{2127} \cr + \code{CPXPARAM_MIP_PolishAfter_Nodes} \tab \code{2128} \cr + \code{CPXPARAM_MIP_PolishAfter_Solutions} \tab \code{2129} \cr + \code{CPXPARAM_MIP_PolishAfter_Time} \tab \code{2130} \cr + \code{CPXPARAM_MIP_Pool_AbsGap} \tab \code{2106} \cr + \code{CPXPARAM_MIP_Pool_Capacity} \tab \code{2103} \cr + \code{CPXPARAM_MIP_Pool_Intensity} \tab \code{2107} \cr + \code{CPXPARAM_MIP_Pool_RelGap} \tab \code{2105} \cr + \code{CPXPARAM_MIP_Pool_Replace} \tab \code{2104} \cr + \code{CPXPARAM_MIP_Strategy_Backtrack} \tab \code{2002} \cr + \code{CPXPARAM_MIP_Strategy_BBInterval} \tab \code{2039} \cr + \code{CPXPARAM_MIP_Strategy_Branch} \tab \code{2001} \cr + \code{CPXPARAM_MIP_Strategy_CallbackReducedLP} \tab \code{2055} \cr + \code{CPXPARAM_MIP_Strategy_Dive} \tab \code{2060} \cr + \code{CPXPARAM_MIP_Strategy_File} \tab \code{2016} \cr + \code{CPXPARAM_MIP_Strategy_FPHeur} \tab \code{2098} \cr + \code{CPXPARAM_MIP_Strategy_HeuristicFreq} \tab \code{2031} \cr + \code{CPXPARAM_MIP_Strategy_KappaStats} \tab \code{2137} \cr + \code{CPXPARAM_MIP_Strategy_LBHeur} \tab \code{2063} \cr + \code{CPXPARAM_MIP_Strategy_MIQCPStrat} \tab \code{2110} \cr + \code{CPXPARAM_MIP_Strategy_NodeSelect} \tab \code{2018} \cr + \code{CPXPARAM_MIP_Strategy_Order} \tab \code{2020} \cr + \code{CPXPARAM_MIP_Strategy_PresolveNode} \tab \code{2037} \cr + \code{CPXPARAM_MIP_Strategy_Probe} \tab \code{2042} \cr + \code{CPXPARAM_MIP_Strategy_RINSHeur} \tab \code{2061} \cr + \code{CPXPARAM_MIP_Strategy_Search} \tab \code{2109} \cr + \code{CPXPARAM_MIP_Strategy_StartAlgorithm} \tab \code{2025} \cr + \code{CPXPARAM_MIP_Strategy_SubAlgorithm} \tab \code{2026} \cr + \code{CPXPARAM_MIP_Strategy_VariableSelect} \tab \code{2028} \cr + \code{CPXPARAM_MIP_Tolerances_AbsMIPGap} \tab \code{2008} \cr + \code{CPXPARAM_MIP_Tolerances_Integrality} \tab \code{2010} \cr + \code{CPXPARAM_MIP_Tolerances_LowerCutoff} \tab \code{2006} \cr + \code{CPXPARAM_MIP_Tolerances_MIPGap} \tab \code{2009} \cr + \code{CPXPARAM_MIP_Tolerances_ObjDifference} \tab \code{2019} \cr + \code{CPXPARAM_MIP_Tolerances_RelObjDifference} \tab \code{2022} \cr + \code{CPXPARAM_MIP_Tolerances_UpperCutoff} \tab \code{2007} \cr + \code{CPXPARAM_Network_Display} \tab \code{5005} \cr + \code{CPXPARAM_Network_Iterations} \tab \code{5001} \cr + \code{CPXPARAM_Network_NetFind} \tab \code{1022} \cr + \code{CPXPARAM_Network_Pricing} \tab \code{5004} \cr + \code{CPXPARAM_Network_Tolerances_Feasibility} \tab \code{5003} \cr + \code{CPXPARAM_Network_Tolerances_Optimality} \tab \code{5002} \cr + \code{CPXPARAM_Output_CloneLog} \tab \code{1132} \cr + \code{CPXPARAM_Output_IntSolFilePrefix} \tab \code{2143} \cr + \code{CPXPARAM_Output_MPSLong} \tab \code{1081} \cr + \code{CPXPARAM_Output_WriteLevel} \tab \code{1114} \cr + \code{CPXPARAM_Parallel} \tab \code{1109} \cr + \code{CPXPARAM_Preprocessing_Aggregator} \tab \code{1003} \cr + \code{CPXPARAM_Preprocessing_BoundStrength} \tab \code{2029} \cr + \code{CPXPARAM_Preprocessing_CoeffReduce} \tab \code{2004} \cr + \code{CPXPARAM_Preprocessing_Dependency} \tab \code{1008} \cr + \code{CPXPARAM_Preprocessing_Dual} \tab \code{1044} \cr + \code{CPXPARAM_Preprocessing_Fill} \tab \code{1002} \cr + \code{CPXPARAM_Preprocessing_Linear} \tab \code{1058} \cr + \code{CPXPARAM_Preprocessing_NumPass} \tab \code{1052} \cr + \code{CPXPARAM_Preprocessing_Presolve} \tab \code{1030} \cr + \code{CPXPARAM_Preprocessing_QCPDuals} \tab \code{4003} \cr + \code{CPXPARAM_Preprocessing_QPMakePSD} \tab \code{4010} \cr + \code{CPXPARAM_Preprocessing_Reduce} \tab \code{1057} \cr + \code{CPXPARAM_Preprocessing_Relax} \tab \code{2034} \cr + \code{CPXPARAM_Preprocessing_RepeatPresolve} \tab \code{2064} \cr + \code{CPXPARAM_Preprocessing_Symmetry} \tab \code{2059} \cr + \code{CPXPARAM_QPMethod} \tab \code{1063} \cr + \code{CPXPARAM_RandomSeed} \tab \code{1124} \cr + \code{CPXPARAM_Read_APIEncoding} \tab \code{1130} \cr + \code{CPXPARAM_Read_Constraints} \tab \code{1021} \cr + \code{CPXPARAM_Read_DataCheck} \tab \code{1056} \cr + \code{CPXPARAM_Read_FileEncoding} \tab \code{1129} \cr + \code{CPXPARAM_Read_Nonzeros} \tab \code{1024} \cr + \code{CPXPARAM_Read_QPNonzeros} \tab \code{4001} \cr + \code{CPXPARAM_Read_Scale} \tab \code{1034} \cr + \code{CPXPARAM_Read_Variables} \tab \code{1023} \cr + \code{CPXPARAM_ScreenOutput} \tab \code{1035} \cr + \code{CPXPARAM_Sifting_Algorithm} \tab \code{1077} \cr + \code{CPXPARAM_Sifting_Display} \tab \code{1076} \cr + \code{CPXPARAM_Sifting_Iterations} \tab \code{1078} \cr + \code{CPXPARAM_Simplex_Crash} \tab \code{1007} \cr + \code{CPXPARAM_Simplex_DGradient} \tab \code{1009} \cr + \code{CPXPARAM_Simplex_Display} \tab \code{1019} \cr + \code{CPXPARAM_Simplex_Limits_Iterations} \tab \code{1020} \cr + \code{CPXPARAM_Simplex_Limits_LowerObj} \tab \code{1025} \cr + \code{CPXPARAM_Simplex_Limits_Perturbation} \tab \code{1028} \cr + \code{CPXPARAM_Simplex_Limits_Singularity} \tab \code{1037} \cr + \code{CPXPARAM_Simplex_Limits_UpperObj} \tab \code{1026} \cr + \code{CPXPARAM_Simplex_Perturbation_Constant} \tab \code{1015} \cr + \code{CPXPARAM_Simplex_Perturbation_Indicator} \tab \code{1027} \cr + \code{CPXPARAM_Simplex_PGradient} \tab \code{1029} \cr + \code{CPXPARAM_Simplex_Pricing} \tab \code{1010} \cr + \code{CPXPARAM_Simplex_Refactor} \tab \code{1031} \cr + \code{CPXPARAM_Simplex_Tolerances_Feasibility} \tab \code{1016} \cr + \code{CPXPARAM_Simplex_Tolerances_Markowitz} \tab \code{1013} \cr + \code{CPXPARAM_Simplex_Tolerances_Optimality} \tab \code{1014} \cr + \code{CPXPARAM_SolutionTarget} \tab \code{1131} \cr + \code{CPXPARAM_Threads} \tab \code{1067} \cr + \code{CPXPARAM_TimeLimit} \tab \code{1039} \cr + \code{CPXPARAM_Tune_DetTimeLimit} \tab \code{1139} \cr + \code{CPXPARAM_Tune_Display} \tab \code{1113} \cr + \code{CPXPARAM_Tune_Measure} \tab \code{1110} \cr + \code{CPXPARAM_Tune_Repeat} \tab \code{1111} \cr + \code{CPXPARAM_Tune_TimeLimit} \tab \code{1112} \cr + \code{CPXPARAM_WorkDir} \tab \code{1064} \cr + \code{CPXPARAM_WorkMem} \tab \code{1065} \cr + } +} + + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{return_codeCPLEX}}, \code{\link{status_codeCPLEX}}, + \code{\link{getParmValCPLEX}} +} + +\keyword{ optimize } + + diff --git a/man/cplexError-class.Rd b/man/cplexError-class.Rd new file mode 100644 index 0000000..8ead318 --- /dev/null +++ b/man/cplexError-class.Rd @@ -0,0 +1,67 @@ +\name{cplexError-class} + +\Rdversion{1.1} +\docType{class} + +\alias{cplexError-class} +\alias{cplexError} +\alias{err,cplexError-method} +\alias{errmsg,cplexError-method} +\alias{errnum,cplexError-method} +\alias{errnum<-,cplexError-method} +\alias{err} +\alias{errmsg} +\alias{errnum} +\alias{errnum<-} + +\title{Class \code{"cplexError"}} + +\description{ + Objects of class \code{cpxerr} are returned by various functions of + \pkg{cplexAPI}, in order to distinguish a status (error) code from a + successfull result. +} + +\section{Objects from the Class}{ + Objects can be created by calls of the form \code{cplexError(err)}, with + \code{err} beeing an error code of IBM ILOG CPLEX. +} + +\section{Slots}{ + \describe{ + \item{\code{errnum}:}{ + Object of class \code{"integer"} containing the error code. + } + } +} + +\section{Methods}{ + \describe{ + \item{err}{\code{signature(object = "cplexError")}: + Prints an error message string corresponding to the error code. + } + \item{errmsg}{\code{signature(object = "cplexError")}: + Returns an error message string corresponding to the error code. + } + \item{errnum}{\code{signature(object = "cplexError")}: + Gets the error code. + } + \item{errnum<-}{\code{signature(object = "cplexError")}: + Sets the error code. + } + } +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/cplexPtr-class.Rd b/man/cplexPtr-class.Rd new file mode 100644 index 0000000..d04a245 --- /dev/null +++ b/man/cplexPtr-class.Rd @@ -0,0 +1,115 @@ +\name{cplexPtr-class} + +\Rdversion{1.1} +\docType{class} + +\alias{cplexPtr-class} +\alias{cplexPtr} +\alias{isCPLEXchanPointer,cplexPtr-method} +\alias{isCPLEXenvPointer,cplexPtr-method} +\alias{isCPLEXfilePointer,cplexPtr-method} +\alias{isCPLEXprobPointer,cplexPtr-method} +\alias{isCPLEXtermPointer,cplexPtr-method} +\alias{isNULLpointerCPLEX,cplexPtr-method} +\alias{cplexPointer,cplexPtr-method} +\alias{summary,cplexPtr-method} +\alias{cplexPtrType,cplexPtr-method} +\alias{cplexPtrType<-,cplexPtr-method} +\alias{isCPLEXchanPointer} +\alias{isCPLEXenvPointer} +\alias{isCPLEXfilePointer} +\alias{isCPLEXprobPointer} +\alias{isCPLEXtermPointer} +\alias{isNULLpointerCPLEX} +\alias{cplexPointer} +\alias{cplexPtrType} +\alias{cplexPtrType<-} + +\title{Class \code{"cplexPtr"}} + +\description{ + Structure of the class \code{"cplexPtr"}. Objects of that class are + used to hold pointers to C structures used by IBM ILOG CPLEX. +} + +\section{Objects from the Class}{ + Objects can be created by calls of the form\cr + \code{env <- openEnvCPLEX()} and/or\cr + \code{prob <- initProbCPLEX(env))}. +} + +\section{Slots}{ + \describe{ + \item{\code{cplexPtrType}:}{ + Object of class \code{"character"} giving the pointer type. + } + \item{\code{cplexPointer}:}{ + Object of class \code{"externalptr"} containig the pointer to a + C structure. + } + } +} + +\section{Methods}{ + \describe{ + \item{isCPLEXchanPointer}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a pointer to a + CPLEX channel, otherwise \code{FALSE}. + } + \item{isCPLEXenvPointer}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a pointer to a + CPLEX environment, otherwise \code{FALSE}. + } + \item{isCPLEXfilePointer}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a pointer to a + CPLEX file, otherwise \code{FALSE}. + } + \item{isCPLEXprobPointer}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a pointer to a + CPLEX problem object, otherwise \code{FALSE}. + } + \item{isCPLEXtermPointer}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a pointer to a + CPLEX termination signal, otherwise \code{FALSE}. + } + \item{isNULLpointerCPLEX}{\code{signature(object = "cplexPtr")}: + returns \code{TRUE} if \code{cplexPointer(object)} is a NULL pointer, + otherwise \code{FALSE}. + } + \item{cplexPointer}{\code{signature(object = "cplexPtr")}: + gets the \code{cplexPointer} slot. + } + \item{summary}{\code{signature(object = "cplexPtr")}: + prints a summary of the problem object to the command line. If a + solution is available, it prints also information retrieved by + \code{\link{solutionCPLEX}} and \code{\link{solnInfoCPLEX}}. If no + solution is available, it prints the corresponding error message. + The method returns invisibly \code{NULL}. The CPLEX environment pointer + is needed as second argument \code{env} to \code{summary}. + } + \item{cplexPtrType}{\code{signature(object = "cplexPtr")}: + gets the \code{cplexPtrType} slot. + } + \item{cplexPtrType<-}{\code{signature(object = "cplexPtr")}: + sets the \code{cplexPtrType} slot. + } + } +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{openEnvCPLEX}} and \code{\link{initProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/delChannelCPLEX.Rd b/man/delChannelCPLEX.Rd new file mode 100644 index 0000000..d0b37c0 --- /dev/null +++ b/man/delChannelCPLEX.Rd @@ -0,0 +1,56 @@ +\name{delChannelCPLEX} +\alias{delChannelCPLEX} +\alias{CPXdelchannel} + +\title{ + Flushes all Message Destinations for a Channel +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelchannel}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + delChannelCPLEX(env, newch) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{newch}{ + A pointer to the channel containing the message destinations as returned by + \code{\link{CPXaddchannel}}. + } +} + +\details{ + Interface to the C function \code{delChannel} which calls the CPLEX + function \code{CPXdelchannel}. +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addChannelCPLEX}}, \code{\link{disconnectChannelCPLEX}}, + \code{\link{flushChannelCPLEX}}, \code{\link{flushStdChannelsCPLEX}}, + \code{\link{getChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/delColsCPLEX.Rd b/man/delColsCPLEX.Rd new file mode 100644 index 0000000..a2fa012 --- /dev/null +++ b/man/delColsCPLEX.Rd @@ -0,0 +1,59 @@ +\name{delColsCPLEX} +\alias{delColsCPLEX} +\alias{CPXdelcols} + +\title{ + Delete all Columns in a Specified Range +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelcols}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delColsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Integer value, numeric index of the first column to be deleted. + } + \item{end}{ + Integer value, numeric index of the last column to be deleted. + } +} + +\details{ + Interface to the C function \code{delCols} which calls the CPLEX + function \code{CPXdelcols}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delFpDestCPLEX.Rd b/man/delFpDestCPLEX.Rd new file mode 100644 index 0000000..339ec5b --- /dev/null +++ b/man/delFpDestCPLEX.Rd @@ -0,0 +1,60 @@ +\name{delFpDestCPLEX} +\alias{delFpDestCPLEX} +\alias{CPXdelfpdest} + +\title{ + Remove a File from the List of Message Destinations for a Channel +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelfpdest}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delFpDestCPLEX(env, newch, cpfile) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{newch}{ + A pointer to the channel for which destinations are to be deleted as + returned by \code{\link{CPXaddchannel}}. + } + \item{cpfile}{ + Pointer to an IBM ILOG CPLEX file as returned by + \code{\link{openFileCPLEX}}. + } +} + +\details{ + Interface to the C function \code{delFpDest} which calls the CPLEX + function \code{CPXdelfpdest}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addFpDestCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/delIndConstrsCPLEX.Rd b/man/delIndConstrsCPLEX.Rd new file mode 100644 index 0000000..255ef53 --- /dev/null +++ b/man/delIndConstrsCPLEX.Rd @@ -0,0 +1,61 @@ +\name{delIndConstrsCPLEX} +\alias{delIndConstrsCPLEX} +\alias{CPXdelindconstrs} + +\title{ + Delete a Range of Indicator Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelindconstrs}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + delIndConstrsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer that specifies the numeric index of the first indicator constraint to be + deleted. + } + \item{end}{ + An integer that specifies the numeric index of the last indicator constraint to be + deleted. + } +} + +\details{ + Interface to the C function \code{delIndConstrs} which calls the CPLEX + function \code{CPXdelindconstrs}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delMIPstartsCPLEX.Rd b/man/delMIPstartsCPLEX.Rd new file mode 100644 index 0000000..3bb40b3 --- /dev/null +++ b/man/delMIPstartsCPLEX.Rd @@ -0,0 +1,59 @@ +\name{delMIPstartsCPLEX} +\alias{delMIPstartsCPLEX} +\alias{CPXdelmipstarts} + +\title{ + Delete a Range MIP Starts +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelmipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + delMIPstartsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the numeric index of the first MIP start to be + deleted. + } + \item{end}{ + An integer specifying the numeric index of the last MIP start to be deleted. + } +} + +\details{ + Interface to the C function \code{delMIPstarts} which calls the CPLEX + function \code{CPXdelmipstarts}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/delNamesCPLEX.Rd b/man/delNamesCPLEX.Rd new file mode 100644 index 0000000..bb5698f --- /dev/null +++ b/man/delNamesCPLEX.Rd @@ -0,0 +1,53 @@ +\name{delNamesCPLEX} +\alias{delNamesCPLEX} +\alias{CPXdelnames} + +\title{ + Remove all Names Assigned to Rows and Columns +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelnames}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delNamesCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{delNames} which calls the CPLEX + function \code{CPXdelnames}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delProbCPLEX.Rd b/man/delProbCPLEX.Rd new file mode 100644 index 0000000..a020fd7 --- /dev/null +++ b/man/delProbCPLEX.Rd @@ -0,0 +1,57 @@ +\name{delProbCPLEX} +\alias{delProbCPLEX} +\alias{CPXfreeprob} + +\title{ + Remove Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfreeprob}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delProbCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{delProb} which calls the CPLEX + function \code{CPXfreeprob}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{initProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/delQConstrsCPLEX.Rd b/man/delQConstrsCPLEX.Rd new file mode 100644 index 0000000..b5aa7c8 --- /dev/null +++ b/man/delQConstrsCPLEX.Rd @@ -0,0 +1,61 @@ +\name{delQConstrsCPLEX} +\alias{delQConstrsCPLEX} +\alias{CPXdelqconstrs} + +\title{ + Delete a Range of Quadratic Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelqconstrs}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + delQConstrsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer that specifies the numeric index of the first quadratic constraint to be + deleted. + } + \item{end}{ + An integer that specifies the numeric index of the last quadratic constraint to be + deleted. + } +} + +\details{ + Interface to the C function \code{delQConstrs} which calls the CPLEX + function \code{CPXdelqconstrs}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delRowsCPLEX.Rd b/man/delRowsCPLEX.Rd new file mode 100644 index 0000000..6da8810 --- /dev/null +++ b/man/delRowsCPLEX.Rd @@ -0,0 +1,58 @@ +\name{delRowsCPLEX} +\alias{delRowsCPLEX} +\alias{CPXdelrows} + +\title{ + Delete a Range of Rows +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelrows}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delRowsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Integer value, numeric index of the first row to be deleted. + } + \item{end}{ + Integer value, numeric index of the last row to be deleted. + } +} + +\details{ + Interface to the C function \code{delRows} which calls the CPLEX + function \code{CPXdelrows}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delSetColsCPLEX.Rd b/man/delSetColsCPLEX.Rd new file mode 100644 index 0000000..495bd09 --- /dev/null +++ b/man/delSetColsCPLEX.Rd @@ -0,0 +1,56 @@ +\name{delSetColsCPLEX} +\alias{delSetColsCPLEX} +\alias{CPXdelsetcols} + +\title{ + Delete a Set of Columns +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelsetcols}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delSetColsCPLEX(env, lp, delstat) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{delstat}{ + An array specifying the columns to be deleted. + } +} + +\details{ + Interface to the C function \code{delSetCols} which calls the CPLEX + function \code{CPXdelsetcols}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delSetRowsCPLEX.Rd b/man/delSetRowsCPLEX.Rd new file mode 100644 index 0000000..ab5b1e1 --- /dev/null +++ b/man/delSetRowsCPLEX.Rd @@ -0,0 +1,56 @@ +\name{delSetRowsCPLEX} +\alias{delSetRowsCPLEX} +\alias{CPXdelsetrows} + +\title{ + Delete a Set of Rows +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdelsetrows}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delSetRowsCPLEX(env, lp, delstat) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{delstat}{ + An array specifying the rows to be deleted. + } +} + +\details{ + Interface to the C function \code{delSetRows} which calls the CPLEX + function \code{CPXdelsetrows}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/delTerminateCPLEX.Rd b/man/delTerminateCPLEX.Rd new file mode 100644 index 0000000..f3bdf6d --- /dev/null +++ b/man/delTerminateCPLEX.Rd @@ -0,0 +1,57 @@ +\name{delTerminateCPLEX} +\alias{delTerminateCPLEX} +\alias{CPXsetterminate} + +\title{ + Terminate CPLEX gracefully +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetterminate}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + delTerminateCPLEX(env, tsig) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{tsig}{ + Pointer to termination signal as returned by + \code{\link{setTerminateCPLEX}}. + } +} + +\details{ + Interface to the C function \code{setTerminate} which calls the CPLEX + function \code{CPXsetterminate}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{setTerminateCPLEX}}, \code{\link{printTerminateCPLEX}}, + \code{\link{chgTerminateCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/disconnectChannelCPLEX.Rd b/man/disconnectChannelCPLEX.Rd new file mode 100644 index 0000000..4ad7acc --- /dev/null +++ b/man/disconnectChannelCPLEX.Rd @@ -0,0 +1,58 @@ +\name{disconnectChannelCPLEX} +\alias{disconnectChannelCPLEX} +\alias{CPXdisconnectchannel} + +\title{ + Flush all Message Destinations Associated with a Channel +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdisconnectchannel}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + disconnectChannelCPLEX(env, newch) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{newch}{ + A pointer to the channel containing the message destinations as returned by + \code{\link{CPXaddchannel}}. + } +} + +\details{ + Interface to the C function \code{disconnectChannel} which calls the CPLEX + function \code{CPXdisconnectchannel}. +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addChannelCPLEX}}, \code{\link{delChannelCPLEX}}, + \code{\link{flushChannelCPLEX}}, \code{\link{flushStdChannelsCPLEX}}, + \code{\link{getChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/dualWriteCPLEX.Rd b/man/dualWriteCPLEX.Rd new file mode 100644 index 0000000..0c544a6 --- /dev/null +++ b/man/dualWriteCPLEX.Rd @@ -0,0 +1,56 @@ +\name{dualWriteCPLEX} +\alias{dualWriteCPLEX} +\alias{CPXdualwrite} + +\title{ + Write a Dual Formulation of the Current CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdualwrite}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + dualWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to write to. + } +} + +\details{ + Interface to the C function \code{dualWrite} which calls the CPLEX + function \code{CPXdualwrite}. +} + +\value{ + Zero if successful, otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/dualoptCPLEX.Rd b/man/dualoptCPLEX.Rd new file mode 100644 index 0000000..6d22794 --- /dev/null +++ b/man/dualoptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{dualoptCPLEX} +\alias{dualoptCPLEX} +\alias{CPXdualopt} + +\title{ + Find a Problem Solution Using the Dual Simplex Algorithm +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXdualopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + dualoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{dualopt} which calls the CPLEX + function \code{CPXdualopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/feasOptCPLEX.Rd b/man/feasOptCPLEX.Rd new file mode 100644 index 0000000..5fcd2b0 --- /dev/null +++ b/man/feasOptCPLEX.Rd @@ -0,0 +1,73 @@ +\name{feasOptCPLEX} +\alias{feasOptCPLEX} +\alias{CPXfeasopt} + +\title{ + Compute a Minimum-Cost Relaxation +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfeasopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + feasOptCPLEX(env, lp, rhs = FALSE, rng = FALSE, lb = FALSE, ub = FALSE) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{rhs}{ + If set to \code{FALSE} no right hand side value is allowed to be relaxed. + } + \item{rng}{ + If set to \code{FALSE} no range values are allowed to be relaxed. + } + \item{lb}{ + If set to \code{FALSE} no lower bound of any variable is allowed to be + relaxed. + } + \item{ub}{ + If set to \code{FALSE} no lower bound of any variable is allowed to be + relaxed. + } +} + +\details{ + Interface to the C function \code{feasOpt} which calls the CPLEX + function \code{CPXfeasopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solutionCPLEX}}, \code{\link{getRowInfeasCPLEX}}, + \code{\link{getColInfeasCPLEX}}, \code{\link{solnInfoCPLEX}}, + \code{\link{getStatCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/fileputCPLEX.Rd b/man/fileputCPLEX.Rd new file mode 100644 index 0000000..09b987d --- /dev/null +++ b/man/fileputCPLEX.Rd @@ -0,0 +1,53 @@ +\name{fileputCPLEX} +\alias{fileputCPLEX} +\alias{CPXfputs} + +\title{ + Write to File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfputs}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + fileputCPLEX(cpfile, stuff = "") +} + +\arguments{ + \item{cpfile}{ + A pointer to a file as returned by \code{\link{openFileCPLEX}}. + } + \item{stuff}{ + A character string to be written to the file. + } +} + +\details{ + Interface to the C function \code{fileput} which calls the CPLEX + function \code{CPXfputs}. +} + +\value{ + A nonnegative value if successful, otherwise \code{EOF}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{closeFileCPLEX}}, \code{\link{openFileCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/flushChannelCPLEX.Rd b/man/flushChannelCPLEX.Rd new file mode 100644 index 0000000..3f20603 --- /dev/null +++ b/man/flushChannelCPLEX.Rd @@ -0,0 +1,57 @@ +\name{flushChannelCPLEX} +\alias{flushChannelCPLEX} +\alias{CPXflushchannel} + +\title{ + Flush All Message Destinations Associated With a Channel +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXflushchannel}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + flushChannelCPLEX(env, newch) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{newch}{ + Pointer to a channel object as returned by \code{\link{addChannelCPLEX}}. + } +} + +\details{ + Interface to the C function \code{flushChannel} which calls the CPLEX + function \code{CPXflushchannel}. +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addChannelCPLEX}}, \code{\link{delChannelCPLEX}}, + \code{\link{disconnectChannelCPLEX}}, \code{\link{flushStdChannelsCPLEX}}, + \code{\link{getChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/flushStdChannelsCPLEX.Rd b/man/flushStdChannelsCPLEX.Rd new file mode 100644 index 0000000..a56e592 --- /dev/null +++ b/man/flushStdChannelsCPLEX.Rd @@ -0,0 +1,54 @@ +\name{flushStdChannelsCPLEX} +\alias{flushStdChannelsCPLEX} +\alias{CPXflushstdchannels} + +\title{ + Flushes the Output Buffers of the Four Standard Channels +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXflushstdchannels}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + flushStdChannelsCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{flushStdChannels} which calls the CPLEX + function \code{CPXflushstdchannels}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addChannelCPLEX}}, \code{\link{delChannelCPLEX}}, + \code{\link{disconnectChannelCPLEX}}, \code{\link{flushChannelCPLEX}}, + \code{\link{getChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/freePresolveCPLEX.Rd b/man/freePresolveCPLEX.Rd new file mode 100644 index 0000000..37acd05 --- /dev/null +++ b/man/freePresolveCPLEX.Rd @@ -0,0 +1,53 @@ +\name{freePresolveCPLEX} +\alias{freePresolveCPLEX} +\alias{CPXfreepresolve} + +\title{ + Free Presolved Problem From the LP Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfreepresolve}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + freePresolveCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{freePresolve} which calls the CPLEX + function \code{CPXfreepresolve}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getBaseCPLEX.Rd b/man/getBaseCPLEX.Rd new file mode 100644 index 0000000..3b599d6 --- /dev/null +++ b/man/getBaseCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getBaseCPLEX} +\alias{getBaseCPLEX} +\alias{CPXgetbase} + +\title{ + Access Basis Resident in a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetbase}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getBaseCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getBase} which calls the CPLEX + function \code{CPXgetbase}. +} + +\value{ + If successful a list is returned: + \item{cstat }{basis status of the columns in the CPLEX problem object} + \item{rstat }{basis status of the artificial, slack, or surplus variable + associated with each row in the constraint matrix} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getBestObjValCPLEX.Rd b/man/getBestObjValCPLEX.Rd new file mode 100644 index 0000000..f50d289 --- /dev/null +++ b/man/getBestObjValCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getBestObjValCPLEX} +\alias{getBestObjValCPLEX} +\alias{CPXgetbestobjval} + +\title{ + Access the Currently Best Known Bound of all the Remaining Open Nodes in a Branch-And-Cut Tree +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetbestobjval}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getBestObjValCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getBestObjVal} which calls the CPLEX + function \code{CPXgetbestobjval}. +} + +\value{ + Objective value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getChannelsCPLEX.Rd b/man/getChannelsCPLEX.Rd new file mode 100644 index 0000000..34fd1de --- /dev/null +++ b/man/getChannelsCPLEX.Rd @@ -0,0 +1,63 @@ +\name{getChannelsCPLEX} +\alias{getChannelsCPLEX} +\alias{CPXgetchannels} + +\title{ + Obtain Pointers to the Four Default Channels +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetchannels}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getChannelsCPLEX(env, ptrtype = "cplex_chan") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{getChannels} which calls the CPLEX + function \code{CPXgetchannels}. +} + +\value{ + If successful a list is returned: + \item{cpxresults }{address of the channel corresponding to \code{cpxresults}} + \item{cpxwarning }{address of the channel corresponding to \code{cpxwarning}} + \item{cpxerror }{address of the channel corresponding to \code{cpxerror}} + \item{cpxlog }{address of the channel corresponding to \code{cpxlog}} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. Each list element is an + object of class \code{"\linkS4class{cplexPtr}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{addChannelCPLEX}}, \code{\link{delChannelCPLEX}}, + \code{\link{disconnectChannelCPLEX}}, \code{\link{flushChannelCPLEX}}, + \code{\link{flushStdChannelsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getChgParmCPLEX.Rd b/man/getChgParmCPLEX.Rd new file mode 100644 index 0000000..4132598 --- /dev/null +++ b/man/getChgParmCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getChgParmCPLEX} +\alias{getChgParmCPLEX} +\alias{CPXgetchgparam} + +\title{ + Get Parameter Numbers for Parameters Which are Not Set at Their Default Values +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetchgparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getChgParmCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{getChgParm} which calls the CPLEX + function \code{CPXgetchgparam}. +} + +\value{ + A vector containing integer values (unique parameter identifiers) for + parameters which are not set at their default values, otherwise an instance + of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getCoefCPLEX.Rd b/man/getCoefCPLEX.Rd new file mode 100644 index 0000000..beb8f0e --- /dev/null +++ b/man/getCoefCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getCoefCPLEX} +\alias{getCoefCPLEX} +\alias{CPXgetcoef} + +\title{ + Access a Single Constraint Matrix Coefficient +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcoef}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getCoefCPLEX(env, lp, i, j) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{i}{ + An integer specifying the numeric index of the row. + } + \item{j}{ + An integer specifying the numeric index of the column. + } +} + +\details{ + Interface to the C function \code{getCoef} which calls the CPLEX + function \code{CPXgetcoef}. +} + +\value{ + Matrix coefficient value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getColIndexCPLEX.Rd b/man/getColIndexCPLEX.Rd new file mode 100644 index 0000000..9240bf2 --- /dev/null +++ b/man/getColIndexCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getColIndexCPLEX} +\alias{getColIndexCPLEX} +\alias{CPXgetcolindex} + +\title{ + Search for the Index Number of the Specified Column +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcolindex}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getColIndexCPLEX(env, lp, cname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{cname}{ + A column name to search for. + } +} + +\details{ + Interface to the C function \code{getColIndex} which calls the CPLEX + function \code{CPXgetcolindex}. +} + +\value{ + Column number if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getColInfeasCPLEX.Rd b/man/getColInfeasCPLEX.Rd new file mode 100644 index 0000000..3699633 --- /dev/null +++ b/man/getColInfeasCPLEX.Rd @@ -0,0 +1,63 @@ +\name{getColInfeasCPLEX} +\alias{getColInfeasCPLEX} +\alias{CPXgetcolinfeas} + +\title{ + Compute Infeasibility of a Given Solution for a Range of Variables +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcolinfeas}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + getColInfeasCPLEX(env, lp, begin, end, sol = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of variables whose + infeasibility is to be returned. + } + \item{end}{ + An integer specifying the end of the range of variables whose infeasibility + is to be returned. + } + \item{sol}{ + The solution whose infeasibility is to be computed. + } +} + +\details{ + Interface to the C function \code{getColInfeas} which calls the CPLEX + function \code{CPXgetcolinfeas}. +} + +\value{ + infeasibility values if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getColNameCPLEX.Rd b/man/getColNameCPLEX.Rd new file mode 100644 index 0000000..6378b4a --- /dev/null +++ b/man/getColNameCPLEX.Rd @@ -0,0 +1,60 @@ +\name{getColNameCPLEX} +\alias{getColNameCPLEX} +\alias{CPXgetcolname} + +\title{ + Access a Range of Column Names +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcolname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getColNameCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of column names to be + returned. + } + \item{end}{ + An integer specifying the end of the range of column names to be returned. + } +} + +\details{ + Interface to the C function \code{getColName} which calls the CPLEX + function \code{CPXgetcolname}. +} + +\value{ + Column names if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getColTypeCPLEX.Rd b/man/getColTypeCPLEX.Rd new file mode 100644 index 0000000..b59f3ea --- /dev/null +++ b/man/getColTypeCPLEX.Rd @@ -0,0 +1,64 @@ +\name{getColTypeCPLEX} +\alias{getColTypeCPLEX} +\alias{CPXgetctype} + +\title{ + Access Types for a Range of Variables +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetctype}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getColTypeCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of the types to be + returned. + } + \item{end}{ + An integer specifying the end of the range of the types to be returned. + } +} + +\details{ + Interface to the C function \code{getColType} which calls the CPLEX + function \code{CPXgetctype}. +} + +\value{ + Column types if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getColsCPLEX.Rd b/man/getColsCPLEX.Rd new file mode 100644 index 0000000..a2d8bf9 --- /dev/null +++ b/man/getColsCPLEX.Rd @@ -0,0 +1,68 @@ +\name{getColsCPLEX} +\alias{getColsCPLEX} +\alias{CPXgetcols} + +\title{ + Accesses a Range of Columns of the Constraint Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcols}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getColsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of columns to be returned. + } + \item{end}{ + An integer specifying the end of the range of columns to be returned. + } +} + +\details{ + Interface to the C function \code{getCols} which calls the CPLEX + function \code{CPXgetcols}. +} + +\value{ + If successful a list is returned: + \item{matbeg }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{matind }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{matval }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getConflictCPLEX.Rd b/man/getConflictCPLEX.Rd new file mode 100644 index 0000000..b9a071e --- /dev/null +++ b/man/getConflictCPLEX.Rd @@ -0,0 +1,64 @@ +\name{getConflictCPLEX} +\alias{getConflictCPLEX} +\alias{CPXgetconflict} + +\title{ + Return Linear Constraints and Variables Belonging to a Conflict +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetconflict}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getConflictCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getConflict} which calls the CPLEX + function \code{CPXgetconflict}. +} + +\value{ + If successful a list is returned: + \item{confstat }{status of the conflict} + \item{confnumrows }{number of rows in the conflict} + \item{rowind }{indices of the constraints that participate in the conflict} + \item{rowbdstat }{conflict status of the rows} + \item{confnumcols }{number of columns in the conflict} + \item{colind }{indices of the variables that participate in the conflict} + \item{colbdstat }{conflict status of the columns} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getConflictExtCPLEX.Rd b/man/getConflictExtCPLEX.Rd new file mode 100644 index 0000000..ce820c7 --- /dev/null +++ b/man/getConflictExtCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getConflictExtCPLEX} +\alias{getConflictExtCPLEX} +\alias{CPXgetconflictext} + +\title{ + Get Conflict Status Codes +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetconflictext}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getConflictExtCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + The index of the first group. + } + \item{end}{ + The index of the last group. + } +} + +\details{ + Interface to the C function \code{getConflictExt} which calls the CPLEX + function \code{CPXgetconflictext}. +} + +\value{ + Specified values denoting the conflict status if successful, otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getCutoffCPLEX.Rd b/man/getCutoffCPLEX.Rd new file mode 100644 index 0000000..93e4c8e --- /dev/null +++ b/man/getCutoffCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getCutoffCPLEX} +\alias{getCutoffCPLEX} +\alias{CPXgetcutoff} + +\title{ + Access MIP Cutoff Value Being Used During Mixed Integer Optimization. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetcutoff}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getCutoffCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getCutoff} which calls the CPLEX + function \code{CPXgetcutoff}. +} + +\value{ + Value of the cutoff if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getDblParmCPLEX.Rd b/man/getDblParmCPLEX.Rd new file mode 100644 index 0000000..d0f2e6b --- /dev/null +++ b/man/getDblParmCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getDblParmCPLEX} +\alias{getDblParmCPLEX} +\alias{CPXgetdblparam} + +\title{ + Obtain the Current Value of a CPLEX Parameter of Type Double +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetdblparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getDblParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getDblParm} which calls the CPLEX + function \code{CPXgetdblparam}. +} + +\value{ + Parameter value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getDblQualCPLEX.Rd b/man/getDblQualCPLEX.Rd new file mode 100644 index 0000000..e04b6d7 --- /dev/null +++ b/man/getDblQualCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getDblQualCPLEX} +\alias{getDblQualCPLEX} +\alias{CPXgetdblquality} + +\title{ + Access Double-Valued Information About the Quality of the Current Solution of + a Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetdblquality}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getDblQualCPLEX(env, lp, w) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{w}{ + An Integer specifying the quality value to be retrieved. + } +} + +\details{ + Interface to the C function \code{getDblQual} which calls the CPLEX + function \code{CPXgetdblquality}. +} + +\value{ + Requested quality value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getDbsCntCPLEX.Rd b/man/getDbsCntCPLEX.Rd new file mode 100644 index 0000000..d892a4a --- /dev/null +++ b/man/getDbsCntCPLEX.Rd @@ -0,0 +1,52 @@ +\name{getDbsCntCPLEX} +\alias{getDbsCntCPLEX} +\alias{CPXgetdsbcnt} + +\title{ + Access the Number of Dual Super-Basic Variables in the Current Solution +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetdsbcnt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getDbsCntCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getDbsCnt} which calls the CPLEX + function \code{CPXgetdsbcnt}. +} + +\value{ + Number of dual super-basic variables if a solution exists, otherwise zero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getDjCPLEX.Rd b/man/getDjCPLEX.Rd new file mode 100644 index 0000000..29f6797 --- /dev/null +++ b/man/getDjCPLEX.Rd @@ -0,0 +1,62 @@ +\name{getDjCPLEX} +\alias{getDjCPLEX} +\alias{CPXgetdj} + +\title{ + Accesses Reduced Costs for a Range of Variables of a Linear or Quadratic + Program +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetdj}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getDjCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of reduced-cost values to + be returned. + } + \item{end}{ + An integer specifying the end of the range of reduced-costs values to be + returned. + } +} + +\details{ + Interface to the C function \code{getDj} which calls the CPLEX + function \code{CPXgetdj}. +} + +\value{ + Reduced costs if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getErrorStrCPLEX.Rd b/man/getErrorStrCPLEX.Rd new file mode 100644 index 0000000..8be34c4 --- /dev/null +++ b/man/getErrorStrCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getErrorStrCPLEX} +\alias{getErrorStrCPLEX} +\alias{CPXgeterrorstring} + +\title{ + Return an Error Message String Corresponding to an Error Code +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgeterrorstring}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getErrorStrCPLEX(err, env = NULL) +} + +\arguments{ + \item{err}{ + The error code to be translated. + } + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{getErrorStr} which calls the CPLEX + function \code{CPXgeterrorstring}. +} + +\value{ + A single character value containing the error message string. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getStatStrCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getGradCPLEX.Rd b/man/getGradCPLEX.Rd new file mode 100644 index 0000000..66082d1 --- /dev/null +++ b/man/getGradCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getGradCPLEX} +\alias{getGradCPLEX} +\alias{CPXgetgrad} + +\title{ + Project the Impact of Making Changes to Optimal Variable Values or Objective + Function Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetgrad}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getGradCPLEX(env, lp, j) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{j}{ + An integer specifying the index of the column of interest. + } +} + +\details{ + Interface to the C function \code{getGrad} which calls the CPLEX + function \code{CPXgetgrad}. +} + +\value{ + If successful a list is returned: + \item{head }{listing of the indices of the basic variables in the order in + which they appear in the basis.} + \item{y }{coefficients of the \code{j}-th column relative to the current + basis.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getIndConstrCPLEX.Rd b/man/getIndConstrCPLEX.Rd new file mode 100644 index 0000000..008fbd1 --- /dev/null +++ b/man/getIndConstrCPLEX.Rd @@ -0,0 +1,74 @@ +\name{getIndConstrCPLEX} +\alias{getIndConstrCPLEX} +\alias{CPXgetindconstr} + +\title{ + Access a Specified Indicator Constraint on the Variables of a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetindconstr}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + getIndConstrCPLEX(env, lp, which) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{which}{ + An integer specifying which indicator constraint to return. + } +} + +\details{ + Interface to the C function \code{getIndConstr} which calls the CPLEX + function \code{CPXgetindconstr}. +} + +\value{ + If successful a list is returned: + \item{indvar }{Index of the binary indicator variable. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{complemented}{Boolean value that specifies whether the indicator variable is + complemented. Consult the IBM ILOG CPLEX documentation for more + detailed information.} + \item{rhs }{Righthand side value of the linear portion of the indicator + constraint. Consult the IBM ILOG CPLEX documentation for more + detailed information.} + \item{sense }{Sense of the linear portion of the constraint. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{linind }{Variable indices of the entries of \code{linval}. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{linval }{Coefficients of the linear portion of the specified indicator + constraint. Consult the IBM ILOG CPLEX documentation for more + detailed information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getInfoDblParmCPLEX.Rd b/man/getInfoDblParmCPLEX.Rd new file mode 100644 index 0000000..15f7f25 --- /dev/null +++ b/man/getInfoDblParmCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getInfoDblParmCPLEX} +\alias{getInfoDblParmCPLEX} +\alias{CPXinfodblparam} + +\title{ + Obtain Default, Minimum and Maximum Values of a Parameter of Type Double +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXinfodblparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getInfoDblParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getInfoDblParm} which calls the CPLEX + function \code{CPXinfodblparam}. +} + +\value{ + If successful a list is returned: + \item{defvalue }{default value} + \item{minvalue }{minimum value} + \item{maxvalue }{maximum value} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getInfoIntParmCPLEX.Rd b/man/getInfoIntParmCPLEX.Rd new file mode 100644 index 0000000..29496f7 --- /dev/null +++ b/man/getInfoIntParmCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getInfoIntParmCPLEX} +\alias{getInfoIntParmCPLEX} +\alias{CPXinfointparam} + +\title{ + Obtain Default, Minimum and Maximum Values of a Parameter of Type CPXINT +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXinfointparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getInfoIntParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getInfoIntParm} which calls the CPLEX + function \code{CPXinfointparam}. +} + +\value{ + If successful a list is returned: + \item{defvalue }{default value} + \item{minvalue }{minimum value} + \item{maxvalue }{maximum value} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getInfoLongParmCPLEX.Rd b/man/getInfoLongParmCPLEX.Rd new file mode 100644 index 0000000..8d9a9f7 --- /dev/null +++ b/man/getInfoLongParmCPLEX.Rd @@ -0,0 +1,64 @@ +\name{getInfoLongParmCPLEX} +\alias{getInfoLongParmCPLEX} +\alias{CPXinfolongparam} + +\title{ + Obtain Default, Minimum and Maximum Values of a Parameter of Type CPXLONG +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXinfolongparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getInfoLongParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getInfoLongParm} which calls the CPLEX + function \code{CPXinfolongparam}. +} + +\value{ + If successful a list is returned: + \item{defvalue }{default value} + \item{minvalue }{minimum value} + \item{maxvalue }{maximum value} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\note{ + In order to get a 64 bit integer value from \code{CPXinfolongparam}, + datatype \code{numeric} is used. All return values will be numeric. +} + +\seealso{ + \code{\link{getInfoIntParmCPLEX}}, \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getInfoStrParmCPLEX.Rd b/man/getInfoStrParmCPLEX.Rd new file mode 100644 index 0000000..b2ff782 --- /dev/null +++ b/man/getInfoStrParmCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getInfoStrParmCPLEX} +\alias{getInfoStrParmCPLEX} +\alias{CPXinfostrparam} + +\title{ + Obtain Default Value of a String Parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXinfostrparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getInfoStrParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getInfoStrParm} which calls the CPLEX + function \code{CPXinfostrparam}. +} + +\value{ + A single character value. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getIntParmCPLEX.Rd b/man/getIntParmCPLEX.Rd new file mode 100644 index 0000000..1582e7b --- /dev/null +++ b/man/getIntParmCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getIntParmCPLEX} +\alias{getIntParmCPLEX} +\alias{CPXgetintparam} + +\title{ + Obtain the Current Value of a CPLEX Parameter of Type CPXINT +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetintparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getIntParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getIntParm} which calls the CPLEX + function \code{CPXgetintparam}. +} + +\value{ + Parameter value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getIntQualCPLEX.Rd b/man/getIntQualCPLEX.Rd new file mode 100644 index 0000000..90cd286 --- /dev/null +++ b/man/getIntQualCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getIntQualCPLEX} +\alias{getIntQualCPLEX} +\alias{CPXgetintquality} + +\title{ + Access Integer-Valued Information About the Quality of the Current Solution of + a Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetintquality}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getIntQualCPLEX(env, lp, w) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{w}{ + An Integer specifying the quality value to be retrieved. + } +} + +\details{ + Interface to the C function \code{getIntQual} which calls the CPLEX + function \code{CPXgetintquality}. +} + +\value{ + Requested quality value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getItCntCPLEX.Rd b/man/getItCntCPLEX.Rd new file mode 100644 index 0000000..728e571 --- /dev/null +++ b/man/getItCntCPLEX.Rd @@ -0,0 +1,52 @@ +\name{getItCntCPLEX} +\alias{getItCntCPLEX} +\alias{CPXgetitcnt} + +\title{ + Access the Total Number of Simplex Iterations to Solve an LP Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetitcnt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getItCntCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getItCnt} which calls the CPLEX + function \code{CPXgetitcnt}. +} + +\value{ + Total iteration count if solution exists, otherwise zero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getLogFileCPLEX.Rd b/man/getLogFileCPLEX.Rd new file mode 100644 index 0000000..ee276f1 --- /dev/null +++ b/man/getLogFileCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getLogFileCPLEX} +\alias{getLogFileCPLEX} +\alias{CPXgetlogfile} + +\title{ + Access log file to Which Messages are Written +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetlogfile}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getLogFileCPLEX(env, ptrtype = "cplex_file") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{getLogFile} which calls the CPLEX + function \code{CPXgetlogfile}. +} + +\value{ + If successful, a pointer to the CPLEX file is returnd + (an instance of class \code{"\linkS4class{cplexPtr}"}), otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{setLogFileCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getLongParmCPLEX.Rd b/man/getLongParmCPLEX.Rd new file mode 100644 index 0000000..76a19ab --- /dev/null +++ b/man/getLongParmCPLEX.Rd @@ -0,0 +1,60 @@ +\name{getLongParmCPLEX} +\alias{getLongParmCPLEX} +\alias{CPXgetlongparam} + +\title{ + Obtain Current Value of a Parameter of Type CPXLONG +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetlongparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getLongParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getLongParm} which calls the CPLEX + function \code{CPXgetlongparam}. +} + +\value{ + Parameter value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\note{ + In order to get a 64 bit integer value from \code{CPXgetlongparam}, + datatype \code{numeric} is used. The return value will be numeric. +} + +\seealso{ + \code{\link{getIntParmCPLEX}}, \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getLowBndsIdsCPLEX.Rd b/man/getLowBndsIdsCPLEX.Rd new file mode 100644 index 0000000..9e0c954 --- /dev/null +++ b/man/getLowBndsIdsCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getLowBndsIdsCPLEX} +\alias{getLowBndsIdsCPLEX} + +\title{ + Retrieve Lower Bounds on Variables +} + +\description{ + The function retrieves the lower bounds on specified variables. +} + +\usage{ + getLowBndsIdsCPLEX(env, lp, ind) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ind}{ + Column indices of variables (remember: first index is \code{0}). + } +} + +\value{ + A numeric vector containing the lower bounds on the specified variables. + If not successfull an instance of class \code{"\linkS4class{cplexError}"} is + returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getLowerBndsCPLEX}} +} + +\keyword{ optimize } + + diff --git a/man/getLowerBndsCPLEX.Rd b/man/getLowerBndsCPLEX.Rd new file mode 100644 index 0000000..9735224 --- /dev/null +++ b/man/getLowerBndsCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getLowerBndsCPLEX} +\alias{getLowerBndsCPLEX} +\alias{CPXgetlb} + +\title{ + Access a Range of Lower Bounds on Variables +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetlb}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getLowerBndsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Beginning of the range of lower bounds to be returned. + } + \item{end}{ + End of the range of lower bounds to be returned. + } +} + +\details{ + Interface to the C function \code{getLowerBnds} which calls the CPLEX + function \code{CPXgetlb}. +} + +\value{ + A numeric vector containing the lower bounds on the specified variables. + If not successfull an instance of class \code{"\linkS4class{cplexError}"} is + returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getMIPrelGapCPLEX.Rd b/man/getMIPrelGapCPLEX.Rd new file mode 100644 index 0000000..5c0fa84 --- /dev/null +++ b/man/getMIPrelGapCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getMIPrelGapCPLEX} +\alias{getMIPrelGapCPLEX} +\alias{CPXgetmiprelgap} + +\title{ + Access Relative Objective Gap for a MIP Optimization +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetmiprelgap}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getMIPrelGapCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getMIPrelGap} which calls the CPLEX + function \code{CPXgetmiprelgap}. +} + +\value{ + Relative Objective Gap if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getObjValCPLEX}}, \code{\link{getBestObjValCPLEX}} +} + +\keyword{ optimize } diff --git a/man/getMIPstartIndexCPLEX.Rd b/man/getMIPstartIndexCPLEX.Rd new file mode 100644 index 0000000..05df59a --- /dev/null +++ b/man/getMIPstartIndexCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getMIPstartIndexCPLEX} +\alias{getMIPstartIndexCPLEX} +\alias{CPXgetmipstartindex} + +\title{ + Search for the Index Number of the Specified MIP Start +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetmipstartindex}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getMIPstartIndexCPLEX(env, lp, iname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{iname}{ + A MIP start name to search for. + } +} + +\details{ + Interface to the C function \code{getMIPstartIndex} which calls the CPLEX + function \code{CPXgetmipstartindex}. +} + +\value{ + Index number of the specified MIP start if successful, otherwise an instance + of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getMIPstartNameCPLEX.Rd b/man/getMIPstartNameCPLEX.Rd new file mode 100644 index 0000000..eef3a14 --- /dev/null +++ b/man/getMIPstartNameCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getMIPstartNameCPLEX} +\alias{getMIPstartNameCPLEX} +\alias{CPXgetmipstartname} + +\title{ + Access a Range of Names of MIP Starts +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetmipstartname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getMIPstartNameCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of + MIP starts to be returned. + } + \item{end}{ + An integer specifying the end of the range of + MIP starts to be returned. + } +} + +\details{ + Interface to the C function \code{getMIPstartName} which calls the CPLEX + function \code{CPXgetmipstartname}. +} + +\value{ + Names of the MIP starts if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getMIPstartsCPLEX.Rd b/man/getMIPstartsCPLEX.Rd new file mode 100644 index 0000000..56c2864 --- /dev/null +++ b/man/getMIPstartsCPLEX.Rd @@ -0,0 +1,75 @@ +\name{getMIPstartsCPLEX} +\alias{getMIPstartsCPLEX} +\alias{CPXgetmipstarts} + +\title{ + Access a Range of MIP Starts of a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetmipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getMIPstartsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of + MIP starts to be returned. + } + \item{end}{ + An integer specifying the end of the range of + MIP starts to be returned. + } +} + +\details{ + Interface to the C function \code{getMIPstarts} which calls the CPLEX + function \code{CPXgetmipstarts}. +} + +\value{ + If successful a list is returned: + \item{beg }{Array specifying where each of the requested MIP starts + begins in the arrays \code{varindices} and \code{values}. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{varindices }{Array containing the numeric indices of the columns + corresponding to the variables which are assigned starting + values. Consult the IBM ILOG CPLEX documentation for more + detailed information.} + \item{values }{Array containing the values of the MIP starts. Consult the + IBM ILOG CPLEX documentation for more detailed + information.} + \item{effortlevel }{Array containing the effort level for each MIP start + requested. Consult the IBM ILOG CPLEX documentation for + more detailed information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getMethodCPLEX.Rd b/man/getMethodCPLEX.Rd new file mode 100644 index 0000000..a588509 --- /dev/null +++ b/man/getMethodCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getMethodCPLEX} +\alias{getMethodCPLEX} +\alias{CPXgetmethod} + +\title{ + Obtain Solution Algorithm +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetmethod}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getMethodCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getMethod} which calls the CPLEX + function \code{CPXgetmethod}. +} + +\value{ + A single integer value specifying the solution algorithm. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} section \dQuote{LP/QP solution algorithms}. +} + +\keyword{ optimize } + diff --git a/man/getNumColsCPLEX.Rd b/man/getNumColsCPLEX.Rd new file mode 100644 index 0000000..3b79fd6 --- /dev/null +++ b/man/getNumColsCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getNumColsCPLEX} +\alias{getNumColsCPLEX} +\alias{CPXgetnumcols} + +\title{ + Access the Number of Columns in the Constraint Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnumcols}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getNumColsCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumCols} which calls the CPLEX + function \code{CPXgetnumcols}. +} + +\value{ + If successful the number of variables is returned. If \code{env} or \code{lp} + do not exist, zero is returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getNumMIPstartsCPLEX.Rd b/man/getNumMIPstartsCPLEX.Rd new file mode 100644 index 0000000..ae7cf7c --- /dev/null +++ b/man/getNumMIPstartsCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getNumMIPstartsCPLEX} +\alias{getNumMIPstartsCPLEX} +\alias{CPXgetnummipstarts} + +\title{ + Access the Number of MIP Starts in the CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnummipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getNumMIPstartsCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumMIPstarts} which calls the CPLEX + function \code{CPXgetnummipstarts}. +} + +\value{ + If successful the number of MIP starts is returned. If \code{env} or \code{lp} + do not exist, zero is returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getNumNnzCPLEX.Rd b/man/getNumNnzCPLEX.Rd new file mode 100644 index 0000000..36cab40 --- /dev/null +++ b/man/getNumNnzCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getNumNnzCPLEX} +\alias{getNumNnzCPLEX} +\alias{CPXgetnumnz} + +\title{ + Access the Number of Nonzero Elements in the Constraint Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnumnz}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getNumNnzCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumNnz} which calls the CPLEX + function \code{CPXgetnumnz}. +} + +\value{ + Zero if the problem object or environment does not exist, otherwise the number + of nonzero elements. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getNumQPnzCPLEX.Rd b/man/getNumQPnzCPLEX.Rd new file mode 100644 index 0000000..b832997 --- /dev/null +++ b/man/getNumQPnzCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getNumQPnzCPLEX} +\alias{getNumQPnzCPLEX} +\alias{CPXgetnumqpnz} + +\title{ + Return the Number of Nonzeros in the Q Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnumqpnz}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getNumQPnzCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumQPnz} which calls the CPLEX + function \code{CPXgetnumqpnz}. +} + +\value{ + If successful the number of nonzeros in the Q matrix is returned. + If \code{env} or \code{lp} do not exist, zero is returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getNumQuadCPLEX.Rd b/man/getNumQuadCPLEX.Rd new file mode 100644 index 0000000..44c02cc --- /dev/null +++ b/man/getNumQuadCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getNumQuadCPLEX} +\alias{getNumQuadCPLEX} +\alias{CPXgetnumquad} + +\title{ + Return the Number of Variables That Have Quadratic Objective Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnumquad}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getNumQuadCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumQuad} which calls the CPLEX + function \code{CPXgetnumquad}. +} + +\value{ + If successful the number of variables that have quadratic objective + coefficients is returned. If \code{env} or \code{lp} do not exist, zero is + returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getNumRowsCPLEX.Rd b/man/getNumRowsCPLEX.Rd new file mode 100644 index 0000000..385c63a --- /dev/null +++ b/man/getNumRowsCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getNumRowsCPLEX} +\alias{getNumRowsCPLEX} +\alias{CPXgetnumrows} + +\title{ + Access the Number of Rows in the Constraint Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetnumcols}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getNumRowsCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getNumRows} which calls the CPLEX + function \code{CPXgetnumrows}. +} + +\value{ + If successful the number of rows is returned. If \code{env} or \code{lp} + do not exist, zero is returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getObjCPLEX.Rd b/man/getObjCPLEX.Rd new file mode 100644 index 0000000..48e3ecc --- /dev/null +++ b/man/getObjCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getObjCPLEX} +\alias{getObjCPLEX} +\alias{CPXgetobj} + +\title{ + Access a Range of Objective Function Coefficients of a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetobj}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getObjCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of objective function coefficients to be returned + } + \item{end}{ + An integer specifying the end of the range of objective function coefficients to be returned. + } +} + +\details{ + Interface to the C function \code{getObj} which calls the CPLEX + function \code{CPXgetobj}. +} + +\value{ + Specified objective coefficients if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getObjDirCPLEX.Rd b/man/getObjDirCPLEX.Rd new file mode 100644 index 0000000..6ae6d92 --- /dev/null +++ b/man/getObjDirCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getObjDirCPLEX} +\alias{getObjDirCPLEX} +\alias{CPXgetobjsen} + +\title{ + Access the Direction of Optimization +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetobjsen}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getObjDirCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getObjDir} which calls the CPLEX + function \code{CPXgetobjsen}. +} + +\value{ + Zero if the problem object or environment does not exist, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getObjNameCPLEX.Rd b/man/getObjNameCPLEX.Rd new file mode 100644 index 0000000..e85d20c --- /dev/null +++ b/man/getObjNameCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getObjNameCPLEX} +\alias{getObjNameCPLEX} +\alias{CPXgetobjname} + +\title{ + Access the Name of the Objective Row of a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetobjname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getObjNameCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getObjName} which calls the CPLEX + function \code{CPXgetobjname}. +} + +\value{ + Name of the objective row if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getObjOffsetCPLEX.Rd b/man/getObjOffsetCPLEX.Rd new file mode 100644 index 0000000..c2e993a --- /dev/null +++ b/man/getObjOffsetCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getObjOffsetCPLEX} +\alias{getObjOffsetCPLEX} +\alias{CPXgetobjoffset} + +\title{ + Objective Offset Between the Original Problem and the Presolved Problem. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetobjoffset}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getObjOffsetCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getObjOffset} which calls the CPLEX + function \code{CPXgetobjoffset}. +} + +\value{ + Objective offset value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getObjValCPLEX.Rd b/man/getObjValCPLEX.Rd new file mode 100644 index 0000000..c4a695d --- /dev/null +++ b/man/getObjValCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getObjValCPLEX} +\alias{getObjValCPLEX} +\alias{CPXgetobjval} + +\title{ + Access Solution Objective Value +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetobjval}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getObjValCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getObjVal} which calls the CPLEX + function \code{CPXgetobjval}. +} + +\value{ + Objective value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getOrderCPLEX.Rd b/man/getOrderCPLEX.Rd new file mode 100644 index 0000000..beb9e0f --- /dev/null +++ b/man/getOrderCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getOrderCPLEX} +\alias{getOrderCPLEX} +\alias{CPXgetorder} + +\title{ + Access MIP Priority Order Information +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetorder}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getOrderCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getOrder} which calls the CPLEX + function \code{CPXgetorder}. +} + +\value{ + If successful a list is returned: + \item{indices }{indices of the variables in the order} + \item{priority }{priority values} + \item{direction }{preferred branching directions} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getParmNameCPLEX.Rd b/man/getParmNameCPLEX.Rd new file mode 100644 index 0000000..c6c342c --- /dev/null +++ b/man/getParmNameCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getParmNameCPLEX} +\alias{getParmNameCPLEX} +\alias{CPXgetparamname} + +\title{ + Obtain the Name of a CPLEX Parameter, Given the Symbolic Constant +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetparamname}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getParmNameCPLEX(env, wparm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{wparm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getParmName} which calls the CPLEX + function \code{CPXgetparamname}. +} + +\value{ + A single character value. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getParmNumCPLEX.Rd b/man/getParmNumCPLEX.Rd new file mode 100644 index 0000000..2ffafbd --- /dev/null +++ b/man/getParmNumCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getParmNumCPLEX} +\alias{getParmNumCPLEX} +\alias{CPXgetparamnum} + +\title{ + Obtain the Reference Number of a CPLEX Parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetparamnum}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getParmNumCPLEX(env, nparm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{nparm}{ + A single character value containing the name of the parameter. + } +} + +\details{ + Interface to the C function \code{getParmNum} which calls the CPLEX + function \code{CPXgetparamnum}. +} + +\value{ + A single integer value. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getParmTypeCPLEX.Rd b/man/getParmTypeCPLEX.Rd new file mode 100644 index 0000000..e5b168a --- /dev/null +++ b/man/getParmTypeCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getParmTypeCPLEX} +\alias{getParmTypeCPLEX} +\alias{CPXgetparamtype} + +\title{ + Obtain the Type of a CPLEX Parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetparamtype}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getParmTypeCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getParmType} which calls the CPLEX + function \code{CPXgetparamtype}. +} + +\value{ + A single integer value if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getParmValCPLEX.Rd b/man/getParmValCPLEX.Rd new file mode 100644 index 0000000..8dcc844 --- /dev/null +++ b/man/getParmValCPLEX.Rd @@ -0,0 +1,46 @@ +\name{getParmValCPLEX} +\alias{getParmValCPLEX} + +\title{ + Values and Names of Parameters Having Non-Default Values +} + +\description{ + The function \code{getParmValCPLEX} retrieves the names and actual values + of all IBM ILOG CPLEX parameters, which do not have their default values. +} + +\usage{ + getParmValCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\value{ + Either a list containing all non-default parameters and their values or + \code{NULL}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} and \code{\link{getChgParmCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getPhase1CntCPLEX.Rd b/man/getPhase1CntCPLEX.Rd new file mode 100644 index 0000000..3c71bc7 --- /dev/null +++ b/man/getPhase1CntCPLEX.Rd @@ -0,0 +1,52 @@ +\name{getPhase1CntCPLEX} +\alias{getPhase1CntCPLEX} +\alias{CPXgetphase1cnt} + +\title{ + Access Number of Phase I Iterations +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetphase1cnt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getPhase1CntCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getPhase1Cnt} which calls the CPLEX + function \code{CPXgetphase1cnt}. +} + +\value{ + Zero if no solution exists, otherwise Phase I iteration count. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getPiCPLEX.Rd b/man/getPiCPLEX.Rd new file mode 100644 index 0000000..0197e4f --- /dev/null +++ b/man/getPiCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getPiCPLEX} +\alias{getPiCPLEX} +\alias{CPXgetpi} + +\title{ + Access Dual Values for a Range of Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetpi}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getPiCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of dual values to be returned. + } + \item{end}{ + An integer specifying the end of the range of dual values to be returned. + } +} + +\details{ + Interface to the C function \code{getPi} which calls the CPLEX + function \code{CPXgetpi}. +} + +\value{ + Values of the dual variables if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getPreStatCPLEX.Rd b/man/getPreStatCPLEX.Rd new file mode 100644 index 0000000..6d224f0 --- /dev/null +++ b/man/getPreStatCPLEX.Rd @@ -0,0 +1,62 @@ +\name{getPreStatCPLEX} +\alias{getPreStatCPLEX} +\alias{CPXgetprestat} + +\title{ + Access Presolve Status Information for Columns and Rows +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetprestat}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getPreStatCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getPreStat} which calls the CPLEX + function \code{CPXgetprestat}. +} + +\value{ + If successful a list is returned: + \item{prestat }{status of the presolved problem} + \item{pcstat }{presolve status values of the columns} + \item{prstat }{presolve status values of the rows} + \item{ocstat }{presolve status values of the columns of the presolved problem} + \item{orstat }{presolve status values of the rows of the presolved problem} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getProbNameCPLEX.Rd b/man/getProbNameCPLEX.Rd new file mode 100644 index 0000000..68a07c2 --- /dev/null +++ b/man/getProbNameCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getProbNameCPLEX} +\alias{getProbNameCPLEX} +\alias{CPXgetprobname} + +\title{ + Access Problem Name +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetprobname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getProbNameCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getProbName} which calls the CPLEX + function \code{CPXgetprobname}. +} + +\value{ + Name of the problem if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getProbTypeCPLEX.Rd b/man/getProbTypeCPLEX.Rd new file mode 100644 index 0000000..6d421bb --- /dev/null +++ b/man/getProbTypeCPLEX.Rd @@ -0,0 +1,58 @@ +\name{getProbTypeCPLEX} +\alias{getProbTypeCPLEX} +\alias{CPXgetprobtype} + +\title{ + Access Problem Type +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetprobtype}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getProbTypeCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getProbType} which calls the CPLEX + function \code{CPXgetprobtype}. +} + +\value{ + A single integer value specifying the problem type. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{chgProbTypeCPLEX}}, + \code{\link{cplexConstants}} section \dQuote{Problem Types}. +} + +\keyword{ optimize } + diff --git a/man/getProbVarCPLEX.Rd b/man/getProbVarCPLEX.Rd new file mode 100644 index 0000000..38d328c --- /dev/null +++ b/man/getProbVarCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getProbVarCPLEX} +\alias{getProbVarCPLEX} +\alias{CPXgetx} + +\title{ + Access the Solution Values for a Range of Problem Variables +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetx}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getProbVarCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of variable + values to be returned. + } + \item{end}{ + An integer specifying the end of the range of variable + values to be returned. + } +} + +\details{ + Interface to the C function \code{getProbVar} which calls the CPLEX + function \code{CPXgetx}. +} + +\value{ + Values of the primal variables if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getQConstrCPLEX.Rd b/man/getQConstrCPLEX.Rd new file mode 100644 index 0000000..6c44faa --- /dev/null +++ b/man/getQConstrCPLEX.Rd @@ -0,0 +1,78 @@ +\name{getQConstrCPLEX} +\alias{getQConstrCPLEX} +\alias{CPXgetqconstr} + +\title{ + Access a Specified Quadratic Constraint on the Variables of a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetqconstr}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getQConstrCPLEX(env, lp, which) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{which}{ + An integer specifying which quadratic constraint to return. + } +} + +\details{ + Interface to the C function \code{getQConstr} which calls the CPLEX + function \code{CPXgetqconstr}. +} + +\value{ + If successful a list is returned: + \item{rhs }{Righthand-side value of the quadratic constraint. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{sense }{Character specifying the sense of the constraint. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{linind }{Variable indices of the entries of \code{linval}. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{linval }{Linear coefficients of the specified constraint. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{quadrow }{Variable indices of the entries of \code{quadval}. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{quadcol }{Variable indices of the entries of \code{quadval}. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{quadval }{Quadratic coefficients of the specified constraint. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getQPcoefCPLEX.Rd b/man/getQPcoefCPLEX.Rd new file mode 100644 index 0000000..2e02a87 --- /dev/null +++ b/man/getQPcoefCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getQPcoefCPLEX} +\alias{getQPcoefCPLEX} +\alias{CPXgetqpcoef} + +\title{ + Access the Quadratic Coefficient in the Matrix Q +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetqpcoef}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getQPcoefCPLEX(env, lp, i, j) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{i}{ + The row number in Q. + } + \item{j}{ + The row column in Q. + } +} + +\details{ + Interface to the C function \code{getQPcoef} which calls the CPLEX + function \code{CPXgetqpcoef}. +} + +\value{ + Specified quadratic coefficient in the matrix Q if successful, otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getQuadCPLEX.Rd b/man/getQuadCPLEX.Rd new file mode 100644 index 0000000..cd7ed9e --- /dev/null +++ b/man/getQuadCPLEX.Rd @@ -0,0 +1,68 @@ +\name{getQuadCPLEX} +\alias{getQuadCPLEX} +\alias{CPXgetquad} + +\title{ + Access a Range of Columns of the Matrix Q of a Model With a Quadratic + Objective Function +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetquad}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + getQuadCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of columns to be returned. + } + \item{end}{ + An integer specifying the end of the range of columns to be returned. + } +} + +\details{ + Interface to the C function \code{getQuad} which calls the CPLEX + function \code{CPXgetquad}. +} + +\value{ + If successful a list is returned: + \item{qmatbeg }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{qmatind }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{qmatval }{Array that specifies the nonzero elements of the columns. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRedLpCPLEX.Rd b/man/getRedLpCPLEX.Rd new file mode 100644 index 0000000..5129f74 --- /dev/null +++ b/man/getRedLpCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getRedLpCPLEX} +\alias{getRedLpCPLEX} +\alias{CPXgetredlp} + +\title{ + Get a Pointer for the Presolved Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetredlp}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRedLpCPLEX(env, lp, ptrtype = "cplex_prob") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{getRedLp} which calls the CPLEX + function \code{CPXgetredlp}. +} + +\value{ + Pointer for the presolved problem if successful (an instance of class + \code{"\linkS4class{cplexPtr}"}), otherwise an instance of + class \code{"\linkS4class{cplexError}"} or \code{NULL}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRhsCPLEX.Rd b/man/getRhsCPLEX.Rd new file mode 100644 index 0000000..53c1438 --- /dev/null +++ b/man/getRhsCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getRhsCPLEX} +\alias{getRhsCPLEX} +\alias{CPXgetrhs} + +\title{ + Access Righthand Side Coefficients for a Range of Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrhs}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRhsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of righthand + side terms to be returned. + } + \item{end}{ + An integer specifying the end of the range of righthand + side terms to be returned. + } +} + +\details{ + Interface to the C function \code{getRhs} which calls the CPLEX + function \code{CPXgetrhs}. +} + +\value{ + Specified righthand side coefficients if successful, otherwise an instance of + class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRngValCPLEX.Rd b/man/getRngValCPLEX.Rd new file mode 100644 index 0000000..47cf305 --- /dev/null +++ b/man/getRngValCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getRngValCPLEX} +\alias{getRngValCPLEX} +\alias{CPXgetrngval} + +\title{ + Accesses Righthand Side Coefficients Range Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrngval}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRngValCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the set of rows for + which RHS range coefficients are returned. + } + \item{end}{ + An integer specifying the end of the set of rows for + which RHS range coefficients are returned. + } +} + +\details{ + Interface to the C function \code{getRngVal} which calls the CPLEX + function \code{CPXgetrngval}. +} + +\value{ + Specified RHS range coefficients if successful, otherwise an instance of + class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRowIndexCPLEX.Rd b/man/getRowIndexCPLEX.Rd new file mode 100644 index 0000000..14af55e --- /dev/null +++ b/man/getRowIndexCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getRowIndexCPLEX} +\alias{getRowIndexCPLEX} +\alias{CPXgetrowindex} + +\title{ + Search for the Index Number of a Specified Row +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrowindex}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRowIndexCPLEX(env, lp, rname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{rname}{ + A row name to search for. + } +} + +\details{ + Interface to the C function \code{getRowIndex} which calls the CPLEX + function \code{CPXgetrowindex}. +} + +\value{ + Specified row index if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRowInfeasCPLEX.Rd b/man/getRowInfeasCPLEX.Rd new file mode 100644 index 0000000..395e2e4 --- /dev/null +++ b/man/getRowInfeasCPLEX.Rd @@ -0,0 +1,64 @@ +\name{getRowInfeasCPLEX} +\alias{getRowInfeasCPLEX} +\alias{CPXgetrowinfeas} + +\title{ + Compute Infeasibility of a Given Solution for a Range of Linear Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrowinfeas}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRowInfeasCPLEX(env, lp, begin, end, sol = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of linear constraints + whose infeasibility is to be returned. + } + \item{end}{ + An integer specifying the beginning of the range of linear constraints + whose infeasibility is to be returned. + } + \item{sol}{ + The solution whose infeasibility is to be computed. + } +} + +\details{ + Interface to the C function \code{getRowInfeas} which calls the CPLEX + function \code{CPXgetrowinfeas}. +} + +\value{ + Infeasibility values if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRowNameCPLEX.Rd b/man/getRowNameCPLEX.Rd new file mode 100644 index 0000000..9c522ad --- /dev/null +++ b/man/getRowNameCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getRowNameCPLEX} +\alias{getRowNameCPLEX} +\alias{CPXgetrowname} + +\title{ + Access a Range of Row Names +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrowname}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRowNameCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of + row names to be returned. + } + \item{end}{ + An integer specifying the end of the range of + row names to be returned. + } +} + +\details{ + Interface to the C function \code{getRowName} which calls the CPLEX + function \code{CPXgetrowname}. +} + +\value{ + Specified row names if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getRowsCPLEX.Rd b/man/getRowsCPLEX.Rd new file mode 100644 index 0000000..5162594 --- /dev/null +++ b/man/getRowsCPLEX.Rd @@ -0,0 +1,68 @@ +\name{getRowsCPLEX} +\alias{getRowsCPLEX} +\alias{CPXgetrows} + +\title{ + Accesses a Range of Rows of the Constraint Matrix +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetrows}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getRowsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of rows to be returned. + } + \item{end}{ + An integer specifying the end of the range of rows to be returned. + } +} + +\details{ + Interface to the C function \code{getRows} which calls the CPLEX + function \code{CPXgetrows}. +} + +\value{ + If successful a list is returned: + \item{matbeg }{Array that specifies the nonzero elements of the rows. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{matind }{Array that specifies the nonzero elements of the rows. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + \item{matval }{Array that specifies the nonzero elements of the rows. + Consult the IBM ILOG CPLEX documentation for more detailed + information.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getSenseCPLEX.Rd b/man/getSenseCPLEX.Rd new file mode 100644 index 0000000..2133d94 --- /dev/null +++ b/man/getSenseCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getSenseCPLEX} +\alias{getSenseCPLEX} +\alias{CPXgetsense} + +\title{ + Access the Sense for a Range of Constraints in a CPLEX Problem Object. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetsense}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSenseCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of constraint + senses to be returned. + } + \item{end}{ + An integer specifying the end of the range of constraint + senses to be returned. + } +} + +\details{ + Interface to the C function \code{getSense} which calls the CPLEX + function \code{CPXgetsense}. +} + +\value{ + Specified constraint senses if successful, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getSiftItCntCPLEX.Rd b/man/getSiftItCntCPLEX.Rd new file mode 100644 index 0000000..0d8e7ed --- /dev/null +++ b/man/getSiftItCntCPLEX.Rd @@ -0,0 +1,52 @@ +\name{getSiftItCntCPLEX} +\alias{getSiftItCntCPLEX} +\alias{CPXgetsiftitcnt} + +\title{ + Access Total Number of Sifting Iterations +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetsiftitcnt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSiftItCntCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getSiftItCnt} which calls the CPLEX + function \code{CPXgetsiftitcnt}. +} + +\value{ + Zero if no solution exists, otherwise nonzero the total iteration count. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getSiftPase1CntCPLEX.Rd b/man/getSiftPase1CntCPLEX.Rd new file mode 100644 index 0000000..dda522d --- /dev/null +++ b/man/getSiftPase1CntCPLEX.Rd @@ -0,0 +1,52 @@ +\name{getSiftPase1CntCPLEX} +\alias{getSiftPase1CntCPLEX} +\alias{CPXgetsiftphase1cnt} + +\title{ + Access Number of Phase I Sifting Iterations +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetsiftphase1cnt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSiftPase1CntCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getSiftPase1Cnt} which calls the CPLEX + function \code{CPXgetsiftphase1cnt}. +} + +\value{ + Zero if no solution exists, otherwise nonzero the Phase I iteration count. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getSlackCPLEX.Rd b/man/getSlackCPLEX.Rd new file mode 100644 index 0000000..dfffa63 --- /dev/null +++ b/man/getSlackCPLEX.Rd @@ -0,0 +1,61 @@ +\name{getSlackCPLEX} +\alias{getSlackCPLEX} +\alias{CPXgetslack} + +\title{ + Accesses Slack Values for a Range of Linear Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetslack}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSlackCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + An integer specifying the beginning of the range of slack + values to be returned. + } + \item{end}{ + An integer specifying the end of the range of slack + values to be returned. + } +} + +\details{ + Interface to the C function \code{getSlack} which calls the CPLEX + function \code{CPXgetslack}. +} + +\value{ + Specified slack or surplus variables if successful, otherwise an instance of + class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getStatCPLEX.Rd b/man/getStatCPLEX.Rd new file mode 100644 index 0000000..b6ba46c --- /dev/null +++ b/man/getStatCPLEX.Rd @@ -0,0 +1,58 @@ +\name{getStatCPLEX} +\alias{getStatCPLEX} +\alias{CPXgetstat} + +\title{ + Access the Solution Status of the Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetstat}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getStatCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getStat} which calls the CPLEX + function \code{CPXgetstat}. +} + +\value{ + A single integer value giving the solution status. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} section \dQuote{Values returned for \code{stat} + by solution}. +} + +\keyword{ optimize } + diff --git a/man/getStatStrCPLEX.Rd b/man/getStatStrCPLEX.Rd new file mode 100644 index 0000000..cca4b31 --- /dev/null +++ b/man/getStatStrCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getStatStrCPLEX} +\alias{getStatStrCPLEX} +\alias{CPXgetstatstring} + +\title{ + Return an Status Message String Corresponding to an Status Code +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetstatstring}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getStatStrCPLEX(env, stat) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{stat}{ + The status code to be translated. + } +} + +\details{ + Interface to the C function \code{getStatStr} which calls the CPLEX + function \code{CPXgetstatstring}. +} + +\value{ + A single character value containing the status message string. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getErrorStrCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getStrParmCPLEX.Rd b/man/getStrParmCPLEX.Rd new file mode 100644 index 0000000..c898333 --- /dev/null +++ b/man/getStrParmCPLEX.Rd @@ -0,0 +1,55 @@ +\name{getStrParmCPLEX} +\alias{getStrParmCPLEX} +\alias{CPXgetstrparam} + +\title{ + Obtain the Current Value of a CPLEX String Parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetstrparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getStrParmCPLEX(env, parm) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getStrParm} which calls the CPLEX + function \code{CPXgetstrparam}. +} + +\value{ + A single character value. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getSubMethodCPLEX.Rd b/man/getSubMethodCPLEX.Rd new file mode 100644 index 0000000..fb9bf13 --- /dev/null +++ b/man/getSubMethodCPLEX.Rd @@ -0,0 +1,56 @@ +\name{getSubMethodCPLEX} +\alias{getSubMethodCPLEX} +\alias{CPXgetsubmethod} + +\title{ + Accesses Solution Method of the Last Subproblem Optimization +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetsubmethod}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSubMethodCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getSubMethod} which calls the CPLEX + function \code{CPXgetsubmethod}. +} + +\value{ + Integer value specifying the solution method. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/getSubStatCPLEX.Rd b/man/getSubStatCPLEX.Rd new file mode 100644 index 0000000..4f2ca49 --- /dev/null +++ b/man/getSubStatCPLEX.Rd @@ -0,0 +1,50 @@ +\name{getSubStatCPLEX} +\alias{getSubStatCPLEX} +\alias{CPXgetsubstat} +\title{ + Access Solution Status of the Last Subproblem Optimization +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetsubstat}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + getSubStatCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{getSubStat} which calls the CPLEX + function \code{CPXgetsubstat}. +} + +\value{ + Zero if no solution exists, nonzero otherwise. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/getTimeCPLEX.Rd b/man/getTimeCPLEX.Rd new file mode 100644 index 0000000..bfea3c4 --- /dev/null +++ b/man/getTimeCPLEX.Rd @@ -0,0 +1,53 @@ +\name{getTimeCPLEX} +\alias{getTimeCPLEX} +\alias{CPXgettime} + +\title{ + Get a Time Stamp +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfclose}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + getTimeCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{getTime} which calls the CPLEX + function \code{CPXgettime}. +} + +\value{ + If successful a single numeric value, otherwise an instance of class + \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{fileputCPLEX}}, \code{\link{openFileCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getUppBndsIdsCPLEX.Rd b/man/getUppBndsIdsCPLEX.Rd new file mode 100644 index 0000000..67c685b --- /dev/null +++ b/man/getUppBndsIdsCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getUppBndsIdsCPLEX} +\alias{getUppBndsIdsCPLEX} + +\title{ + Retrieve Upper Bounds on Variables +} + +\description{ + The function retrieves the upper bounds on specified variables. +} + +\usage{ + getUppBndsIdsCPLEX(env, lp, ind) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ind}{ + Column indices of variables (remember: first index is \code{0}). + } +} + +\value{ + A numeric vector containing the upper bounds on the specified variables. + If not successfull an instance of class \code{"\linkS4class{cplexError}"} is + returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getUpperBndsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/getUpperBndsCPLEX.Rd b/man/getUpperBndsCPLEX.Rd new file mode 100644 index 0000000..27a8acb --- /dev/null +++ b/man/getUpperBndsCPLEX.Rd @@ -0,0 +1,59 @@ +\name{getUpperBndsCPLEX} +\alias{getUpperBndsCPLEX} +\alias{CPXgetub} + +\title{ + Access a Range of Upper Bounds on Variables +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetub}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getUpperBndsCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Beginning of the range of upper bounds to be returned. + } + \item{end}{ + End of the range of upper bounds to be returned. + } +} + +\details{ + Interface to the C function \code{getUpperBnds} which calls the CPLEX + function \code{CPXgetub}. +} + +\value{ + A numeric vector containing the lower bounds on the specified variables. + If not successfull an instance of class \code{"\linkS4class{cplexError}"} is + returned. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/getVersionCPLEX.Rd b/man/getVersionCPLEX.Rd new file mode 100644 index 0000000..4eb1fc5 --- /dev/null +++ b/man/getVersionCPLEX.Rd @@ -0,0 +1,48 @@ +\name{getVersionCPLEX} +\alias{getVersionCPLEX} +\alias{CPXversion} + +\title{ + Get Version Number of the CPLEX Library. +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXversion}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + getVersionCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{getVersion} which calls the CPLEX + function \code{getVersionCPLEX}. +} + +\value{ + Single character string specifying the version of the cplex library or + \code{NULL} if the environment does not exist. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/hybbaroptCPLEX.Rd b/man/hybbaroptCPLEX.Rd new file mode 100644 index 0000000..17f0d8a --- /dev/null +++ b/man/hybbaroptCPLEX.Rd @@ -0,0 +1,62 @@ +\name{hybbaroptCPLEX} +\alias{hybbaroptCPLEX} +\alias{CPXhybbaropt} + +\title{ + Solve the Specified Problem by the CPLEX Barrier Optimizer +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXhybbaropt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + hybbaroptCPLEX(env, lp, method) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{method}{ + A single integer value giving the crossover method to be implemented. + } +} + +\details{ + Interface to the C function \code{hybbaropt} which calls the CPLEX + function \code{CPXhybbaropt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}}, \code{\link{cplexConstants}} section + \dQuote{LP/QP solution algorithms}. +} + +\keyword{ optimize } + diff --git a/man/hybnetoptCPLEX.Rd b/man/hybnetoptCPLEX.Rd new file mode 100644 index 0000000..632933e --- /dev/null +++ b/man/hybnetoptCPLEX.Rd @@ -0,0 +1,63 @@ +\name{hybnetoptCPLEX} +\alias{hybnetoptCPLEX} +\alias{CPXhybnetopt} + +\title{ + Use CPLEX Network Optimizer +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXhybnetopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + hybnetoptCPLEX(env, lp, method) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{method}{ + A single integer value giving the type of simplex method to follow the + network optimization. + } +} + +\details{ + Interface to the C function \code{hybnetopt} which calls the CPLEX + function \code{CPXhybnetopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}}, \code{\link{cplexConstants}} section + \dQuote{LP/QP solution algorithms}. +} + +\keyword{ optimize } + diff --git a/man/initProbCPLEX.Rd b/man/initProbCPLEX.Rd new file mode 100644 index 0000000..1392750 --- /dev/null +++ b/man/initProbCPLEX.Rd @@ -0,0 +1,60 @@ +\name{initProbCPLEX} +\alias{initProbCPLEX} +\alias{CPXcreateprob} + +\title{ + Create a CPLEX Problem Object in the CPLEX Environment +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXcreateprob}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + initProbCPLEX(env, pname = "CPLEX_PROB", ptrtype = "cplex_prob") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{pname}{ + A single character string containing the name of the problem object. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{CPXcreate} which calls the CPLEX + function \code{CPXcreateprob}. +} + +\value{ + If successful, a pointer to the CPLEX problem object is returnd + (an instance of class \code{"\linkS4class{cplexPtr}"}), otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{delProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/lpoptCPLEX.Rd b/man/lpoptCPLEX.Rd new file mode 100644 index 0000000..8ee7b31 --- /dev/null +++ b/man/lpoptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{lpoptCPLEX} +\alias{lpoptCPLEX} +\alias{CPXlpopt} + +\title{ + Find a Solution to a Problem Using One of the CPLEX Linear Optimizers +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXlpopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + lpoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{lpopt} which calls the CPLEX + function \code{CPXlpopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/mipoptCPLEX.Rd b/man/mipoptCPLEX.Rd new file mode 100644 index 0000000..46a2ba7 --- /dev/null +++ b/man/mipoptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{mipoptCPLEX} +\alias{mipoptCPLEX} +\alias{CPXmipopt} + +\title{ + Find a Solution to a Mixed Integer Program +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXmipopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + mipoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{mipopt} which calls the CPLEX + function \code{CPXmipopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/newColsCPLEX.Rd b/man/newColsCPLEX.Rd new file mode 100644 index 0000000..54252dc --- /dev/null +++ b/man/newColsCPLEX.Rd @@ -0,0 +1,77 @@ +\name{newColsCPLEX} +\alias{newColsCPLEX} +\alias{CPXnewcols} + +\title{ + Add Empty Columns to a Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXnewcols}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ +newColsCPLEX(env, lp, ncols, + obj = NULL, lb = NULL, ub = NULL, + xctype = NULL, cnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of variables to add. + } + \item{obj}{ + Objective function coefficients. + } + \item{lb}{ + Lower bounds on the new variables. + } + \item{ub}{ + Upper bounds on the new variables. + } + \item{xctype}{ + Type of the new variables. + } + \item{cnames}{ + Names of the new variables. + } +} + +\details{ + Interface to the C function \code{newCols} which calls the CPLEX + function \code{CPXnewcols}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} section \dQuote{Variable types for ctype array}. +} + +\keyword{ optimize } + diff --git a/man/newRowsCPLEX.Rd b/man/newRowsCPLEX.Rd new file mode 100644 index 0000000..da49d2f --- /dev/null +++ b/man/newRowsCPLEX.Rd @@ -0,0 +1,71 @@ +\name{newRowsCPLEX} +\alias{newRowsCPLEX} +\alias{CPXnewrows} + +\title{ + Add Empty Constraints to a Specified CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXnewrows}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + newRowsCPLEX(env, lp, + nrows, rhs = NULL, sense = NULL, + rngval = NULL, rnames = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nrows}{ + Number of new rows. + } + \item{rhs}{ + Right hand side term for each new constraint. + } + \item{sense}{ + Sense of each new constraint (see IBM ILOG CPLEX documentation for possible + values). + } + \item{rngval}{ + Range values for each new constraint. + } + \item{rnames}{ + Names for the new rows. + } +} + +\details{ + Interface to the C function \code{newRows} which calls the CPLEX + function \code{CPXnewrows}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/objSaCPLEX.Rd b/man/objSaCPLEX.Rd new file mode 100644 index 0000000..131e652 --- /dev/null +++ b/man/objSaCPLEX.Rd @@ -0,0 +1,62 @@ +\name{objSaCPLEX} +\alias{objSaCPLEX} +\alias{CPXobjsa} + +\title{ + Access Upper and Lower Sensitivity Ranges for Objective Function Coefficients +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXobjsa}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + objSaCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Beginning of the range of ranges to be returned. + } + \item{end}{ + End of the range of ranges to be returned. + } +} + +\details{ + Interface to the C function \code{objSa} which calls the CPLEX + function \code{CPXobjsa}. +} + +\value{ + If successful a list is returned: + \item{lower }{lower range values} + \item{upper }{upper range values} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/openEnvCPLEX.Rd b/man/openEnvCPLEX.Rd new file mode 100644 index 0000000..18e8cca --- /dev/null +++ b/man/openEnvCPLEX.Rd @@ -0,0 +1,50 @@ +\name{openEnvCPLEX} +\alias{openEnvCPLEX} +\alias{CPXopenCPLEX} + +\title{ + Initialize a CPLEX Environment +} +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXopenCPLEX}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + openEnvCPLEX(ptrtype = "cplex_env") +} + +\arguments{ + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{openEnv} which calls the CPLEX + function \code{CPXopenCPLEX}. +} + +\value{ + If successful, a pointer to the CPLEX environment is returnd + (an instance of class \code{"\linkS4class{cplexPtr}"}), otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{closeEnvCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/openFileCPLEX.Rd b/man/openFileCPLEX.Rd new file mode 100644 index 0000000..6fd1a64 --- /dev/null +++ b/man/openFileCPLEX.Rd @@ -0,0 +1,58 @@ +\name{openFileCPLEX} +\alias{openFileCPLEX} +\alias{CPXfopen} + +\title{ + Open a File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXfopen}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + openFileCPLEX(fname, ftype = "w", ptrtype = "cplex_file") +} + +\arguments{ + \item{fname}{ + Character string giving the file name to be opened. + } + \item{ftype}{ + Character string according to the syntax of the standard C function + \code{fopen}. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{openFile} which calls the CPLEX + function \code{CPXfopen}. +} + +\value{ + A pointer to the log file (an instance of class + \code{"\linkS4class{cplexPtr}"}) or \code{NULL}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{closeFileCPLEX}}, \code{\link{fileputCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/openProbCPLEX.Rd b/man/openProbCPLEX.Rd new file mode 100644 index 0000000..b8994b4 --- /dev/null +++ b/man/openProbCPLEX.Rd @@ -0,0 +1,63 @@ +\name{openProbCPLEX} +\alias{openProbCPLEX} + +\title{ + Create new CPLEX Environment And New CPLEX Problem Object +} + +\description{ + The function \code{openProbCPLEX} creates a new CPLEX environment and a new + CPLEX problem object. +} + +\usage{ + openProbCPLEX(pname = "CPLEX_PROB", + ptrtypeENV = "cplex_env", + ptrtypePROB = "cplex_prob") +} + +\arguments{ + \item{pname}{ + A single character string containing the name of the problem object. + } + \item{ptrtypeENV}{ + A name for the IBM ILOG CPLEX environment pointer object. + } + \item{ptrtypePROB}{ + A name for the IBM ILOG CPLEX problem pointer object. + } +} + +\details{ + Interface to the C functions \code{openEnv} and \code{initProb} calling CPLEX + functions \code{CPXopenCPLEX} and \code{CPXcreateprob}. +} + +\value{ + \item{env }{A pointer to the CPLEX environment as returned by + \code{\link{openEnvCPLEX}}.} + \item{lp }{A pointer to the CPLEX problem object as returned by + \code{\link{initProbCPLEX}}.} + If \code{openEnvCPLEX()} failes, \code{env} will be of class + \code{"\linkS4class{cplexError}"} and \code{lp} will be \code{NULL}. Each list element is + an object of class \code{"\linkS4class{cplexPtr}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{closeProbCPLEX}}, \code{\link{openEnvCPLEX}}, + \code{\link{initProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/ordWriteCPLEX.Rd b/man/ordWriteCPLEX.Rd new file mode 100644 index 0000000..f64dae3 --- /dev/null +++ b/man/ordWriteCPLEX.Rd @@ -0,0 +1,58 @@ +\name{ordWriteCPLEX} +\alias{ordWriteCPLEX} +\alias{CPXordwrite} + +\title{ + Write Priority Order to ORD File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXordwrite}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + ordWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Filename. + } +} + +\details{ + Interface to the C function \code{ordWrite} which calls the CPLEX + function \code{CPXordwrite}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/preslvWriteCPLEX.Rd b/man/preslvWriteCPLEX.Rd new file mode 100644 index 0000000..4518767 --- /dev/null +++ b/man/preslvWriteCPLEX.Rd @@ -0,0 +1,62 @@ +\name{preslvWriteCPLEX} +\alias{preslvWriteCPLEX} +\alias{CPXpreslvwrite} + +\title{ + Write a Presolved Version of the Problem to File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXpreslvwrite}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + preslvWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the file name to write to. + } +} + +\details{ + Interface to the C function \code{preslvWrite} which calls the CPLEX + function \code{CPXpreslvwrite}. +} + +\value{ + If successful a dingle numeric value containing the objective value difference + between the original problem and the presolved problem, otherwise an instance + of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{readCopyProbCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/presolveCPLEX.Rd b/man/presolveCPLEX.Rd new file mode 100644 index 0000000..47995f1 --- /dev/null +++ b/man/presolveCPLEX.Rd @@ -0,0 +1,61 @@ +\name{presolveCPLEX} +\alias{presolveCPLEX} +\alias{CPXpresolve} + +\title{ + Perform Presolve +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXpresolve}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + presolveCPLEX(env, lp, method) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{method}{ + A single integer value specifying the optimization algorithm to be used to + solve the problem after the presolve is completed. + } +} + +\details{ + Interface to the C function \code{presolve} which calls the CPLEX + function \code{CPXpresolve}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} section \dQuote{LP/QP solution algorithms}. +} + +\keyword{ optimize } + diff --git a/man/primoptCPLEX.Rd b/man/primoptCPLEX.Rd new file mode 100644 index 0000000..8c3c7b4 --- /dev/null +++ b/man/primoptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{primoptCPLEX} +\alias{primoptCPLEX} +\alias{CPXprimopt} + +\title{ + Find a Solution to a Problem Using the Primal Simplex Method +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXprimopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + primoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{primopt} which calls the CPLEX + function \code{CPXprimopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/printTerminateCPLEX.Rd b/man/printTerminateCPLEX.Rd new file mode 100644 index 0000000..f561cff --- /dev/null +++ b/man/printTerminateCPLEX.Rd @@ -0,0 +1,45 @@ +\name{printTerminateCPLEX} +\alias{printTerminateCPLEX} + +\title{ + Print Termination Signal +} + +\description{ + The function \code{chgTerminateCPLEX} prints termination signal. +} + +\usage{ + printTerminateCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{setTerminateCPLEX}}, \code{\link{delTerminateCPLEX}}, + \code{\link{chgTerminateCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/qpoptCPLEX.Rd b/man/qpoptCPLEX.Rd new file mode 100644 index 0000000..fd27cbb --- /dev/null +++ b/man/qpoptCPLEX.Rd @@ -0,0 +1,58 @@ +\name{qpoptCPLEX} +\alias{qpoptCPLEX} +\alias{CPXqpopt} + +\title{ + Find a Solution to a Continuous Quadratic Program +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXqpopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + qpoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{qpopt} which calls the CPLEX + function \code{CPXqpopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{solnInfoCPLEX}}, \code{\link{getStatCPLEX}}, + \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/readCopyBaseCPLEX.Rd b/man/readCopyBaseCPLEX.Rd new file mode 100644 index 0000000..e422cc4 --- /dev/null +++ b/man/readCopyBaseCPLEX.Rd @@ -0,0 +1,55 @@ +\name{readCopyBaseCPLEX} +\alias{readCopyBaseCPLEX} +\alias{CPXreadcopybase} + +\title{ + Read Basis From a BAS File and Copy it Into a CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopybase}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + readCopyBaseCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to read from. + } +} + +\details{ + Interface to the C function \code{readCopyBase} which calls the CPLEX + function \code{CPXreadcopybase}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/readCopyMIPstartsCPLEX.Rd b/man/readCopyMIPstartsCPLEX.Rd new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/man/readCopyMIPstartsCPLEX.Rd @@ -0,0 +1,55 @@ +\name{readCopyMIPstartsCPLEX} +\alias{readCopyMIPstartsCPLEX} +\alias{CPXreadcopymipstarts} + +\title{ + Read a File in the Format MST +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopymipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + readCopyMIPstartsCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Name of the file to read from.s + } +} + +\details{ + Interface to the C function \code{readCopyMIPstarts} which calls the CPLEX + function \code{CPXreadcopymipstarts}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/readCopyOrderCPLEX.Rd b/man/readCopyOrderCPLEX.Rd new file mode 100644 index 0000000..a2bc225 --- /dev/null +++ b/man/readCopyOrderCPLEX.Rd @@ -0,0 +1,55 @@ +\name{readCopyOrderCPLEX} +\alias{readCopyOrderCPLEX} +\alias{CPXreadcopyorder} + +\title{ + Read ORD File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopyorder}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + readCopyOrderCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to read from. + } +} + +\details{ + Interface to the C function \code{readCopyOrder} which calls the CPLEX + function \code{CPXreadcopyorder}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/readCopyParmCPLEX.Rd b/man/readCopyParmCPLEX.Rd new file mode 100644 index 0000000..d6ead72 --- /dev/null +++ b/man/readCopyParmCPLEX.Rd @@ -0,0 +1,54 @@ +\name{readCopyParmCPLEX} +\alias{readCopyParmCPLEX} +\alias{CPXreadcopyparam} + +\title{ + Reads Parameter Names And Settings From a File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopyparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + readCopyParmCPLEX(env, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{fname}{ + Filename. + } +} + +\details{ + Interface to the C function \code{readCopyParm} which calls the CPLEX + function \code{CPXreadcopyparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/readCopyProbCPLEX.Rd b/man/readCopyProbCPLEX.Rd new file mode 100644 index 0000000..acbc1b2 --- /dev/null +++ b/man/readCopyProbCPLEX.Rd @@ -0,0 +1,59 @@ +\name{readCopyProbCPLEX} +\alias{readCopyProbCPLEX} +\alias{CPXreadcopyprob} + +\title{ + Read an MPS, LP, or SAV File Into an Existing CPLEX Problem Object +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopyprob}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + readCopyProbCPLEX(env, lp, fname, ftype = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to read from. + } + \item{ftype}{ + Single character value giving the type of the file to read from. + } +} + +\details{ + Interface to the C function \code{readCopyProb} which calls the CPLEX + function \code{CPXreadcopyprob}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/readCopySolCPLEX.Rd b/man/readCopySolCPLEX.Rd new file mode 100644 index 0000000..0ddf962 --- /dev/null +++ b/man/readCopySolCPLEX.Rd @@ -0,0 +1,56 @@ +\name{readCopySolCPLEX} +\alias{readCopySolCPLEX} +\alias{CPXreadcopysol} + +\title{ + Reads a Solution From a SOL Format File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXreadcopysol}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + readCopySolCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to read from. + } +} + +\details{ + Interface to the C function \code{readCopySol} which calls the CPLEX + function \code{CPXreadcopysol}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/refineConflictCPLEX.Rd b/man/refineConflictCPLEX.Rd new file mode 100644 index 0000000..ddef46a --- /dev/null +++ b/man/refineConflictCPLEX.Rd @@ -0,0 +1,60 @@ +\name{refineConflictCPLEX} +\alias{refineConflictCPLEX} +\alias{CPXrefineconflict} + +\title{ + Identify a Minimal Conflict for the Infeasibility of the Linear Constraints + and the Variable Bounds +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXrefineconflict}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} +\usage{ + refineConflictCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{refineConflict} which calls the CPLEX + function \code{CPXrefineconflict}. +} + +\value{ + If successful a list is returned: + \item{confnumrows }{number of linear constraints in the conflict} + \item{confnumcols }{number of variable bounds in the conflict} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getConflictCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/refineConflictExtCPLEX.Rd b/man/refineConflictExtCPLEX.Rd new file mode 100644 index 0000000..edea62b --- /dev/null +++ b/man/refineConflictExtCPLEX.Rd @@ -0,0 +1,74 @@ +\name{refineConflictExtCPLEX} +\alias{refineConflictExtCPLEX} +\alias{CPXrefineconflictext} + +\title{ + Identify a Minimal Conflict +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXrefineconflictext}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + refineConflictExtCPLEX(env, lp, grpcnt, concnt, + grppref, grpbeg, grpind, grptype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{grpcnt}{ + The number of constraint groups to be considered. + } + \item{concnt}{ + Length of arrays \code{grpind} and \code{grptype}. + } + \item{grppref}{ + Preferences for the groups. + } + \item{grpbeg}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } + \item{grpind}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } + \item{grptype}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } +} + +\details{ + Interface to the C function \code{refineConflictExt} which calls the CPLEX + function \code{CPXrefineconflictext}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/refineMIPstartConflictCPLEX.Rd b/man/refineMIPstartConflictCPLEX.Rd new file mode 100644 index 0000000..b5e16e9 --- /dev/null +++ b/man/refineMIPstartConflictCPLEX.Rd @@ -0,0 +1,63 @@ +\name{refineMIPstartConflictCPLEX} +\alias{refineMIPstartConflictCPLEX} +\alias{CPXrefinemipstartconflict} + +\title{ + Refine a Conflict in Order to Determine Why a Given MIP Start is Not Feasible +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXrefinemipstartconflict}. Consult the IBM ILOG CPLEX documentation + for more detailed information. +} + +\usage{ + refineMIPstartConflictCPLEX(env, lp, mipstartindex) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{mipstartindex}{ + The index of the MIP start. + } +} + +\details{ + Interface to the C function \code{refineMIPstartConflict} which calls the + CPLEX function \code{CPXrefinemipstartconflict}. +} + +\value{ + If successful a list is returned: + \item{confnumrows }{number of linear constraints in the conflict} + \item{confnumcols }{number of variable bounds in the conflict} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getConflictCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/refineMIPstartConflictExtCPLEX.Rd b/man/refineMIPstartConflictExtCPLEX.Rd new file mode 100644 index 0000000..a90965a --- /dev/null +++ b/man/refineMIPstartConflictExtCPLEX.Rd @@ -0,0 +1,77 @@ +\name{refineMIPstartConflictExtCPLEX} +\alias{refineMIPstartConflictExtCPLEX} +\alias{CPXrefinemipstartconflictext} + +\title{ + Identify a Minimal Conflict +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXrefinemipstartconflictext}. Consult the IBM ILOG CPLEX documentation + for more detailed information. +} + +\usage{ + refineMIPstartConflictExtCPLEX(env, lp, mipstartindex, grpcnt, concnt, + grppref, grpbeg, grpind, grptype) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{mipstartindex}{ + The index of the MIP start. + } + \item{grpcnt}{ + The number of constraint groups to be considered. + } + \item{concnt}{ + Length of arrays \code{grpind} and \code{grptype}. + } + \item{grppref}{ + Preferences for the groups. + } + \item{grpbeg}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } + \item{grpind}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } + \item{grptype}{ + The constraint indices. Consult the IBM ILOG CPLEX documentation + for more detailed information. + } +} + +\details{ + Interface to the C function \code{refineMIPstartConflictExt} which calls the + CPLEX function \code{CPXrefinemipstartconflictext}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/return_codeCPLEX.Rd b/man/return_codeCPLEX.Rd new file mode 100644 index 0000000..9331bde --- /dev/null +++ b/man/return_codeCPLEX.Rd @@ -0,0 +1,42 @@ +\name{return_codeCPLEX} +\alias{return_codeCPLEX} + +\title{ + Translates a IBM ILOG CPLEX Return Code into a Human Readable String +} + +\description{ + Translates a IBM ILOG CPLEX return code into a human readable string. +} + +\usage{ + return_codeCPLEX(code) +} + +\arguments{ + \item{code}{ + Return (error) code from IBM ILOG CPLEX. + } +} + +\value{ + An error message string corresponding to an return (error) code. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/rhsSaCPLEX.Rd b/man/rhsSaCPLEX.Rd new file mode 100644 index 0000000..21987e5 --- /dev/null +++ b/man/rhsSaCPLEX.Rd @@ -0,0 +1,63 @@ +\name{rhsSaCPLEX} +\alias{rhsSaCPLEX} +\alias{CPXrhssa} + +\title{ + Access Upper and Lower Sensitivity Ranges for Righthand Side Values of a + Range of Constraints +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXrhssa}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + rhsSaCPLEX(env, lp, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{begin}{ + Beginning of the range of ranges to be returned. + } + \item{end}{ + End of the range of ranges to be returned. + } +} + +\details{ + Interface to the C function \code{rhsSa} which calls the CPLEX + function \code{CPXrhssa}. +} + +\value{ + If successful a list is returned: + \item{lower }{righthand side lower range values} + \item{upper }{righthand side upper range values} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/setDblParmCPLEX.Rd b/man/setDblParmCPLEX.Rd new file mode 100644 index 0000000..239de6a --- /dev/null +++ b/man/setDblParmCPLEX.Rd @@ -0,0 +1,57 @@ +\name{setDblParmCPLEX} +\alias{setDblParmCPLEX} +\alias{CPXsetdblparam} + +\title{ + Set the Value of a CPLEX Parameter of Type Double +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetdblparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + setDblParmCPLEX(env, parm, value) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } + \item{value}{ + The new value of the parameter. + } +} + +\details{ + Interface to the C function \code{setDblParm} which calls the CPLEX + function \code{CPXsetdblparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/setDefaultParmCPLEX.Rd b/man/setDefaultParmCPLEX.Rd new file mode 100644 index 0000000..643bee7 --- /dev/null +++ b/man/setDefaultParmCPLEX.Rd @@ -0,0 +1,50 @@ +\name{setDefaultParmCPLEX} +\alias{setDefaultParmCPLEX} +\alias{CPXsetdefaults} + +\title{ + Reset All CPLEX Parameters And Settings to Default Values +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetdefaults}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + setDefaultParmCPLEX(env) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } +} + +\details{ + Interface to the C function \code{setDefaultParm} which calls the CPLEX + function \code{CPXsetdefaults}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/setIntParmCPLEX.Rd b/man/setIntParmCPLEX.Rd new file mode 100644 index 0000000..973c81b --- /dev/null +++ b/man/setIntParmCPLEX.Rd @@ -0,0 +1,57 @@ +\name{setIntParmCPLEX} +\alias{setIntParmCPLEX} +\alias{CPXsetintparam} + +\title{ + Set the Value of a CPLEX Parameter of Type CPXINT +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetintparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + setIntParmCPLEX(env, parm, value) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } + \item{value}{ + The new value of the parameter (integer value). + } +} + +\details{ + Interface to the C function \code{setIntParm} which calls the CPLEX + function \code{CPXsetintparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/setLogFileCPLEX.Rd b/man/setLogFileCPLEX.Rd new file mode 100644 index 0000000..f06c7dd --- /dev/null +++ b/man/setLogFileCPLEX.Rd @@ -0,0 +1,55 @@ +\name{setLogFileCPLEX} +\alias{setLogFileCPLEX} +\alias{CPXsetlogfile} + +\title{ + Modifies the log file to which Messages are Written +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetlogfile}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + setLogFileCPLEX(env, cpfile = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{cpfile}{ + A pointer to a file as returned by \code{\link{openFileCPLEX}}. + } +} + +\details{ + Interface to the C function \code{getLogFile} which calls the CPLEX + function \code{CPXgetlogfile}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getLogFileCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/setLongParmCPLEX.Rd b/man/setLongParmCPLEX.Rd new file mode 100644 index 0000000..108c884 --- /dev/null +++ b/man/setLongParmCPLEX.Rd @@ -0,0 +1,63 @@ +\name{setLongParmCPLEX} +\alias{setLongParmCPLEX} +\alias{CPXsetlongparam} + +\title{ + Set the Value of a Parameter of Type CPXLONG +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetlongparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} +\usage{ + setLongParmCPLEX(env, parm, value) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } + \item{value}{ + New value for the parameter. + } +} + +\details{ + Interface to the C function \code{setLongParm} which calls the CPLEX + function \code{CPXsetlongparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\note{ + In order to transfer a 64 bit integer value to \code{CPXsetlongparam}, + datatype \code{numeric} is used. Parameter \code{value} is a numeric + value. +} + +\seealso{ + \code{\link{setIntParmCPLEX}}, \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/setObjDirCPLEX.Rd b/man/setObjDirCPLEX.Rd new file mode 100644 index 0000000..bba333a --- /dev/null +++ b/man/setObjDirCPLEX.Rd @@ -0,0 +1,59 @@ +\name{setObjDirCPLEX} +\alias{setObjDirCPLEX} +\alias{CPXchgobjsen} + +\title{ + Change the Sense of the Optimization for a Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXchgobjsen}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + setObjDirCPLEX(env, lp, lpdir) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{lpdir}{ + A single integer value specifying the sense of the problem. + } +} + +\details{ + Interface to the C function \code{setObjDir} which calls the CPLEX + function \code{CPXchgobjsen}. +} + +\value{ + \code{NULL} +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} section \dQuote{Generic constants}. +} + +\keyword{ optimize } diff --git a/man/setStrParmCPLEX.Rd b/man/setStrParmCPLEX.Rd new file mode 100644 index 0000000..d49938f --- /dev/null +++ b/man/setStrParmCPLEX.Rd @@ -0,0 +1,57 @@ +\name{setStrParmCPLEX} +\alias{setStrParmCPLEX} +\alias{CPXsetstrparam} + +\title{ + Set the Value of a CPLEX String Parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetstrparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + setStrParmCPLEX(env, parm, value) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{parm}{ + Constant or reference number of the desired parameter. + } + \item{value}{ + The new value of the parameter (character value). + } +} + +\details{ + Interface to the C function \code{setStrParm} which calls the CPLEX + function \code{CPXsetstrparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/setTerminateCPLEX.Rd b/man/setTerminateCPLEX.Rd new file mode 100644 index 0000000..57d773b --- /dev/null +++ b/man/setTerminateCPLEX.Rd @@ -0,0 +1,56 @@ +\name{setTerminateCPLEX} +\alias{setTerminateCPLEX} + +\title{ + Release Termination Signal +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetterminate} with argument \code{terminate_p} set to \code{NULL}. + Consult the IBM ILOG CPLEX documentation for more detailed information. +} +\usage{ + setTerminateCPLEX(env, ptrtype = "cplex_term") +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{ptrtype}{ + A name for the pointer object. + } +} + +\details{ + Interface to the C function \code{delTerminate} which calls the CPLEX + function \code{CPXsetterminate} with argument \code{terminate_p} set to + \code{NULL}. +} + +\value{ + If successful, a pointer to a termination signal is returned, otherwise an + instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{delTerminateCPLEX}}, \code{\link{printTerminateCPLEX}}, + \code{\link{chgTerminateCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/siftoptCPLEX.Rd b/man/siftoptCPLEX.Rd new file mode 100644 index 0000000..83e9771 --- /dev/null +++ b/man/siftoptCPLEX.Rd @@ -0,0 +1,53 @@ +\name{siftoptCPLEX} +\alias{siftoptCPLEX} +\alias{CPXsiftopt} + +\title{ + Solve a Reduced Model +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsiftopt}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + siftoptCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{siftopt} which calls the CPLEX + function \code{CPXsiftopt}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/solWriteCPLEX.Rd b/man/solWriteCPLEX.Rd new file mode 100644 index 0000000..ffe3eb6 --- /dev/null +++ b/man/solWriteCPLEX.Rd @@ -0,0 +1,61 @@ +\name{solWriteCPLEX} +\alias{solWriteCPLEX} +\alias{CPXsolwrite} + +\title{ + Write a Solution File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsolwrite}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + solWriteCPLEX(env, lp, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the filname to write to. + } +} + +\details{ + Interface to the C function \code{solWrite} which calls the CPLEX + function \code{CPXsolwrite}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{getProbTypeCPLEX}}, + \code{\link{cplexConstants}} section \dQuote{Problem Types}. +} + +\keyword{ optimize } + diff --git a/man/solnInfoCPLEX.Rd b/man/solnInfoCPLEX.Rd new file mode 100644 index 0000000..396814d --- /dev/null +++ b/man/solnInfoCPLEX.Rd @@ -0,0 +1,65 @@ +\name{solnInfoCPLEX} +\alias{solnInfoCPLEX} +\alias{CPXsolninfo} + +\title{ + Access Solution Information +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsolninfo}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + solnInfoCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{solnInfo} which calls the CPLEX + function \code{CPXsolninfo}. +} + +\value{ + If successful a list is returned: + \item{method }{Integer value specifying the method to produce the current + solution.} + \item{type }{Integer value specifying the type of current solution.} + \item{primal_feasible }{Integer value specifying if the current solution + is known to be primal feasible.} + \item{dual_feasible }{Integer value specifying if the current solution + is known to be dual feasible.} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}}, \code{\link{solutionCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/solutionCPLEX.Rd b/man/solutionCPLEX.Rd new file mode 100644 index 0000000..7e4dbd0 --- /dev/null +++ b/man/solutionCPLEX.Rd @@ -0,0 +1,64 @@ +\name{solutionCPLEX} +\alias{solutionCPLEX} +\alias{CPXsolution} + +\title{ + Access Solution Values Produced by Optimization Routines +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsolution}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + solutionCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{solution} which calls the CPLEX + function \code{CPXsolution}. +} + +\value{ + If successful a list is returned: + \item{lpstat }{result of the optimization} + \item{objval }{objective function value} + \item{x }{values of the variables for the problem} + \item{pi }{values of the dual variables} + \item{slack }{values of the slack or surplus variables} + \item{dj }{values of the reduced costs} + otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}}, \code{\link{solnInfoCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/status_codeCPLEX.Rd b/man/status_codeCPLEX.Rd new file mode 100644 index 0000000..f810fe3 --- /dev/null +++ b/man/status_codeCPLEX.Rd @@ -0,0 +1,48 @@ +\name{status_codeCPLEX} +\alias{status_codeCPLEX} + +\title{ + Translates an IBM ILOG CPLEX Status Value into a Human Readable String +} + +\description{ + Translates a IBM ILOG CPLEX status code into a human readable string. +} + +\usage{ + status_codeCPLEX(env, code) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{code}{ + Status code from IBM ILOG CPLEX as returned by \code{\link{getStatCPLEX}}. + } +} + +\value{ + A character string orresponding to the value of an IBM ILOG CPLEX status code + as returned by \code{\link{getStatCPLEX}}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}}, \code{\link{getStatStrCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/tightenBndsCPLEX.Rd b/man/tightenBndsCPLEX.Rd new file mode 100644 index 0000000..f875faa --- /dev/null +++ b/man/tightenBndsCPLEX.Rd @@ -0,0 +1,70 @@ +\name{tightenBndsCPLEX} +\alias{tightenBndsCPLEX} +\alias{CPXtightenbds} + +\title{ + Change the Lower or Upper Bounds on a Set of Variables of a Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXtightenbds}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + tightenBndsCPLEX(env, lp, ncols, ind, lu, bd) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{ncols}{ + Number of bounds to be changed. + } + \item{ind}{ + Indices of bounds to be changed. + } + \item{lu}{ + A character vector, specifying whether an entry in \code{bd} is a upper + or a lower bound on variable \code{ind[j]}. + } + \item{bd}{ + Values of the lower or upper bounds of the variables present in \code{ind}. + } +} + +\details{ + Interface to the C function \code{tightenBnds} which calls the CPLEX + function \code{CPXtightenbds}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{chgBndsCPLEX}} +} + +\keyword{ optimize } + diff --git a/man/tuneParmCPLEX.Rd b/man/tuneParmCPLEX.Rd new file mode 100644 index 0000000..882dee1 --- /dev/null +++ b/man/tuneParmCPLEX.Rd @@ -0,0 +1,83 @@ +\name{tuneParmCPLEX} +\alias{tuneParmCPLEX} +\alias{CPXtuneparam} + +\title{ + Tune Parameters of the Environment For Improved Optimizer Performance +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXtuneparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + tuneParmCPLEX(env, lp, + nIntP = 0, intP = NULL, intPv = NULL, + nDblP = 0, dblP = NULL, dblPv = NULL, + nStrP = 0, strP = NULL, strPv = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{nIntP}{ + Number of integer parameters to be fixed during tuning. + } + \item{intP}{ + Parameter numbers of the integer parameters which remain fixed. + } + \item{intPv}{ + Values for the parameters listed in \code{intP}. + } + \item{nDblP}{ + Number of double parameters to be fixed during tuning. + } + \item{dblP}{ + Parameter numbers of the double parameters which remain fixed. + } + \item{dblPv}{ + Values for the parameters listed in \code{dblP}. + } + \item{nStrP}{ + Number of string parameters to be fixed during tuning. + } + \item{strP}{ + Parameter numbers of the string parameters which remain fixed. + } + \item{strPv}{ + Values for the parameters listed in \code{strP}. + } +} + +\details{ + Interface to the C function \code{tuneParam} which calls the CPLEX + function \code{CPXtuneparam}. +} + +\value{ + Zero if successful, otherwise an instance of class \code{"\linkS4class{cplexError}"}. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/unscaleProbCPLEX.Rd b/man/unscaleProbCPLEX.Rd new file mode 100644 index 0000000..a68ef77 --- /dev/null +++ b/man/unscaleProbCPLEX.Rd @@ -0,0 +1,53 @@ +\name{unscaleProbCPLEX} +\alias{unscaleProbCPLEX} +\alias{CPXunscaleprob} + +\title{ + Remove Any Scaling Applied to the Resident Problem +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXunscaleprob}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + unscaleProbCPLEX(env, lp) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } +} + +\details{ + Interface to the C function \code{unscaleProb} which calls the CPLEX + function \code{CPXunscaleprob}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/man/writeMIPstartsCPLEX.Rd b/man/writeMIPstartsCPLEX.Rd new file mode 100644 index 0000000..b78554c --- /dev/null +++ b/man/writeMIPstartsCPLEX.Rd @@ -0,0 +1,63 @@ +\name{writeMIPstartsCPLEX} +\alias{writeMIPstartsCPLEX} +\alias{CPXwritemipstarts} + +\title{ + Write a Range of MIP Starts to a File in MST Format +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXwritemipstarts}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + writeMIPstartsCPLEX(env, lp, fname, begin, end) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Filename to write to. + } + \item{begin}{ + An integer specifying the beginning of the range of + MIP starts to be written. + } + \item{end}{ + An integer specifying the end of the range of + MIP starts to be written. + } +} + +\details{ + Interface to the C function \code{writeMIPstarts} which calls the CPLEX + function \code{CPXwritemipstarts}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } diff --git a/man/writeParmCPLEX.Rd b/man/writeParmCPLEX.Rd new file mode 100644 index 0000000..b2de243 --- /dev/null +++ b/man/writeParmCPLEX.Rd @@ -0,0 +1,54 @@ +\name{writeParmCPLEX} +\alias{writeParmCPLEX} +\alias{CPXwriteparam} + +\title{ + Write Names and Current Settings of CPLEX Parameters to File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXwriteparam}. Consult the IBM ILOG CPLEX documentation for + more detailed information. +} + +\usage{ + writeParmCPLEX(env, fname) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{fname}{ + Filename. + } +} + +\details{ + Interface to the C function \code{writeParm} which calls the CPLEX + function \code{CPXwriteparam}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } diff --git a/man/writeProbCPLEX.Rd b/man/writeProbCPLEX.Rd new file mode 100644 index 0000000..30a7fd4 --- /dev/null +++ b/man/writeProbCPLEX.Rd @@ -0,0 +1,59 @@ +\name{writeProbCPLEX} +\alias{writeProbCPLEX} +\alias{CPXwriteprob} + +\title{ + Write a CPLEX Problem Object to File +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXwriteprob}. Consult the IBM ILOG CPLEX documentation for more + detailed information. +} + +\usage{ + writeProbCPLEX(env, lp, fname, ftype = NULL) +} + +\arguments{ + \item{env}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{openEnvCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX environment. + } + \item{lp}{ + An object of class \code{"\linkS4class{cplexPtr}"} as returned by + \code{\link{initProbCPLEX}}. This is basically a pointer to an + IBM ILOG CPLEX problem object. + } + \item{fname}{ + Single character value giving the file name to write to. + } + \item{ftype}{ + Single character value giving the type of the file to write to. + } +} + +\details{ + Interface to the C function \code{writeProb} which calls the CPLEX + function \code{CPXwriteprob}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/developerworks/university/academicinitiative/}. +} + +\author{ + Gabriel Gelius-Dietrich + + Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +} + +\keyword{ optimize } + diff --git a/src/Makevars.in b/src/Makevars.in new file mode 100644 index 0000000..f03b4d3 --- /dev/null +++ b/src/Makevars.in @@ -0,0 +1,3 @@ +PKG_CFLAGS=@PKG_CFLAGS@ +PKG_CPPFLAGS=@PKG_CPPFLAGS@ +PKG_LIBS=@PKG_LIBS@ diff --git a/src/Makevars.win b/src/Makevars.win new file mode 100644 index 0000000..1f45e1a --- /dev/null +++ b/src/Makevars.win @@ -0,0 +1,2 @@ +PKG_CPPFLAGS=-g -D_R_=1 -DUSE_R=1 -I"${CPLEX_STUDIO_DIR}\cplex\include" +PKG_LIBS=-L"${CPLEX_STUDIO_LIB}" -lm -lcplex126 diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..716001b --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,7 @@ +/* config.h.in (cplexAPI configuration template file) */ + +#undef USE_CHECK +/* defined if the <check.c> can be used */ + + +/* eof */ diff --git a/src/cplexAPI.c b/src/cplexAPI.c new file mode 100644 index 0000000..fb07b92 --- /dev/null +++ b/src/cplexAPI.c @@ -0,0 +1,6506 @@ +/* cplexAPI.c + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplexAPI.h" + + +int status = 0; +volatile int terminate; + + +/* -------------------------------------------------------------------------- */ +/* finalizer for cplex environments */ +static void cplexEnvFinalizer (SEXP env) { + if (!R_ExternalPtrAddr(env)) { + return; + } + else { + closeEnv(env); + } +} + +/* finalizer for cplex problems + +There is only a finalizer for the CPLEX environment. If the environment is +removed, all memory allocated by CPLEX will be returned to the OS. +Alternative: make the environment a global variable, now you can have +appropiate finalizers for all pointers. Disadvantage: parameter settings +are only valid for a specific environment. So, one can only have one +parameter setting per R session. + +static void cplexProbFinalizer (SEXP lp, SEXP env) { + + if ( (!R_ExternalPtrAddr(lp)) || (!R_ExternalPtrAddr(env)) ) { + return; + } + else { + delProb(env, lp); + } +} +*/ + + +/* -------------------------------------------------------------------------- */ +/* help functions */ +/* -------------------------------------------------------------------------- */ + +/* check for pointer to CPLEX problem object */ +SEXP isCPLEXprobPtr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagCPLEXprob) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for pointer to CPLEX environment */ +SEXP isCPLEXenvPtr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagCPLEXenv) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for pointer to CPLEX file */ +SEXP isCPLEXfilePtr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagCPLEXfile) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for pointer to CPLEX channel */ +SEXP isCPLEXchanPtr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagCPLEXchannel) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for pointer to CPLEX termination signal */ +SEXP isCPLEXtermPtr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagCPLEXtermination) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for NULL pointer */ +SEXP isNULLptr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrAddr(ptr) == NULL) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* API functions */ +/* -------------------------------------------------------------------------- */ + +/* -------------------------------------------------------------------------- */ +/* return error message string */ +SEXP getErrorStr(SEXP env, SEXP err) { + + SEXP out = R_NilValue; + CPXCCHARptr errorString; + CPXENVptr Cenv; + + if (env == R_NilValue) { + Cenv = NULL; + } + else { + checkEnv(env); + Cenv = R_ExternalPtrAddr(env); + } + + errorString = CPXgeterrorstring(Cenv, Rf_asInteger(err), errmsg); + + if (errorString == NULL) { + sprintf(errmsg, + "CPLEX Error %5d: Unknown error code.\n", Rf_asInteger(err)); + } + + out = Rf_mkString(errmsg); + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* return status string */ +SEXP getStatStr(SEXP env, SEXP stat) { + + SEXP out = R_NilValue; + CPXCHARptr statusString; + char statmsg[510]; + + checkEnv(env); + + statusString = CPXgetstatstring(R_ExternalPtrAddr(env), Rf_asInteger(stat), + statmsg + ); + + if (statusString == NULL) { + strcpy(statmsg, "Unknown status code."); + } + + out = Rf_mkString(statmsg); + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* initialize cplex */ +SEXP initCPLEX(void) { + tagCPLEXprob = Rf_install("TYPE_CPLEX_PROB"); + tagCPLEXenv = Rf_install("TYPE_CPLEX_ENV"); + tagCPLEXfile = Rf_install("TYPE_CPLEX_FILE"); + tagCPLEXchannel = Rf_install("TYPE_CPLEX_CHANNEL"); + tagCPLEXtermination = Rf_install("TYPE_CPLEX_TERMINATION"); + return R_NilValue; +} + + +/* -------------------------------------------------------------------------- */ +/* close cplex environment */ +SEXP closeEnv(SEXP env) { + + SEXP out = R_NilValue; + CPXENVptr del = NULL; + + checkEnv(env); + + del = R_ExternalPtrAddr(env); + + status = CPXcloseCPLEX(&del); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + R_ClearExternalPtr(env); + out = Rf_ScalarInteger(status); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* open cplex environment */ +SEXP openEnv(SEXP ptrtype) { + + SEXP envext = R_NilValue; + SEXP ptr, class; + + CPXENVptr env = NULL; + + env = CPXopenCPLEX(&status); + + if (status != 0) { + status_message(env, status); + ptr = cpx_error(status); + } + else { + /* create environment pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_env_ptr")); + + envext = R_MakeExternalPtr(env, tagCPLEXenv, R_NilValue); + PROTECT(envext); + R_RegisterCFinalizerEx(envext, cplexEnvFinalizer, TRUE); + Rf_setAttrib(ptr, class, envext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* remove problem object */ +SEXP delProb(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + CPXLPptr del = NULL; + + checkEnv(env); + checkProb(lp); + + del = R_ExternalPtrAddr(lp); + + status = CPXfreeprob(R_ExternalPtrAddr(env), &del); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + R_ClearExternalPtr(lp); + out = Rf_ScalarInteger(status); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* create new problem object */ +SEXP initProb(SEXP env, SEXP pname, SEXP ptrtype) { + + SEXP lpext = R_NilValue; + SEXP ptr, class; + + CPXLPptr lp = NULL; + + const char *rpname = CHAR(STRING_ELT(pname, 0)); + + checkEnv(env); + + lp = CPXcreateprob(R_ExternalPtrAddr(env), &status, rpname); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + /* create problem pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_prob_ptr")); + + lpext = R_MakeExternalPtr(lp, tagCPLEXprob, R_NilValue); + PROTECT(lpext); + /* R_RegisterCFinalizerEx(lpext, cplexProbFinalizer, TRUE); */ + Rf_setAttrib(ptr, class, lpext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* clone problem object */ +SEXP cloneProb(SEXP env, SEXP lp, SEXP ptrtype) { + + SEXP lpext = R_NilValue; + SEXP ptr, class; + + CPXLPptr clp = NULL; + + checkEnv(env); + checkProb(lp); + + clp = CPXcloneprob(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), &status); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + /* create problem pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_prob_ptr")); + + lpext = R_MakeExternalPtr(clp, tagCPLEXprob, R_NilValue); + PROTECT(lpext); + Rf_setAttrib(ptr, class, lpext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* access the problem type that is currently stored in a problem object */ +SEXP getProbType(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int ptype = -1; + + checkEnv(env); + checkProb(lp); + + ptype = CPXgetprobtype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(ptype); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the current problem to a related problem */ +SEXP chgProbType(SEXP env, SEXP lp, SEXP ptype) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXchgprobtype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ptype)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get cplex version number */ +SEXP getVersion(SEXP env) { + + SEXP out = R_NilValue; + const char *ver; + + checkEnv(env); + + ver = CPXversion(R_ExternalPtrAddr(env)); + + out = Rf_mkString(ver); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set CPLEX default paramters */ +SEXP setDefaultParm(SEXP env) { + + SEXP out = R_NilValue; + + checkEnv(env); + + status = CPXsetdefaults(R_ExternalPtrAddr(env)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set CPLEX paramters of integer type */ +SEXP setIntParm(SEXP env, SEXP parm, SEXP value) { + + SEXP out = R_NilValue; + + checkEnv(env); + + status = CPXsetintparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + Rf_asInteger(value) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get CPLEX paramters of integer type */ +SEXP getIntParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + int value; + + checkEnv(env); + + status = CPXgetintparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), &value); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(value); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the default value and range of a CPLEX prarmeter of type integer */ +SEXP getInfoIntParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + SEXP listv = R_NilValue; + + int defval, minval, maxval; + + checkEnv(env); + + status = CPXinfointparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + &defval, &minval, &maxval + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(defval)); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(minval)); + SET_VECTOR_ELT(out, 2, Rf_ScalarInteger(maxval)); + + PROTECT(listv = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listv, 0, Rf_mkChar("defvalue")); + SET_STRING_ELT(listv, 1, Rf_mkChar("minvalue")); + SET_STRING_ELT(listv, 2, Rf_mkChar("maxvalue")); + Rf_setAttrib(out, R_NamesSymbol, listv); + + UNPROTECT(2); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set CPLEX paramters of double type */ +SEXP setDblParm(SEXP env, SEXP parm, SEXP value) { + + SEXP out = R_NilValue; + + checkEnv(env); + + status = CPXsetdblparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + Rf_asReal(value) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get CPLEX paramters of double type */ +SEXP getDblParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + double value; + + checkEnv(env); + + status = CPXgetdblparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), &value); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(value); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the default value and range of a CPLEX prarmeter of type double */ +SEXP getInfoDblParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + SEXP listv = R_NilValue; + + double defval, minval, maxval; + + checkEnv(env); + + status = CPXinfodblparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + &defval, &minval, &maxval + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, Rf_ScalarReal(defval)); + SET_VECTOR_ELT(out, 1, Rf_ScalarReal(minval)); + SET_VECTOR_ELT(out, 2, Rf_ScalarReal(maxval)); + + PROTECT(listv = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listv, 0, Rf_mkChar("defvalue")); + SET_STRING_ELT(listv, 1, Rf_mkChar("minvalue")); + SET_STRING_ELT(listv, 2, Rf_mkChar("maxvalue")); + Rf_setAttrib(out, R_NamesSymbol, listv); + + UNPROTECT(2); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set CPLEX paramters of string type */ +SEXP setStrParm(SEXP env, SEXP parm, SEXP value) { + + SEXP out = R_NilValue; + const char *rvalue = CHAR(STRING_ELT(value, 0)); + + checkEnv(env); + + status = CPXsetstrparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), rvalue); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get CPLEX paramters of string type */ +SEXP getStrParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + + char strp[CPX_STR_PARAM_MAX]; + + checkEnv(env); + + status = CPXgetstrparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), strp); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_mkString(strp); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the default value of a CPLEX prarmeter of type string */ +SEXP getInfoStrParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + + char strp[CPX_STR_PARAM_MAX]; + + checkEnv(env); + + status = CPXinfostrparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), strp); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_mkString(strp); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get a parameter name */ +SEXP getParmName(SEXP env, SEXP wparm) { + + SEXP out = R_NilValue; + + char nparm[CPX_STR_PARAM_MAX]; + + checkEnv(env); + + status = CPXgetparamname(R_ExternalPtrAddr(env), Rf_asInteger(wparm), + nparm + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_mkString(nparm); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get a parameter reference number */ +SEXP getParmNum(SEXP env, SEXP nparm) { + + SEXP out = R_NilValue; + + const char *rnparm = CHAR(STRING_ELT(nparm, 0)); + int wparm; + + checkEnv(env); + + status = CPXgetparamnum(R_ExternalPtrAddr(env), rnparm, &wparm); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(wparm); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* reads parameter names and settings from a file */ +SEXP readCopyParm(SEXP env, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + + status = CPXreadcopyparam(R_ExternalPtrAddr(env), rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write the name and current setting of CPLEX parameters that are not at their + default setting to a text file */ +SEXP writeParm(SEXP env, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + + status = CPXwriteparam(R_ExternalPtrAddr(env), rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get parameter type */ +SEXP getParmType(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + + int parmT; + + checkEnv(env); + + status = CPXgetparamtype(R_ExternalPtrAddr(env), Rf_asInteger(parm), + &parmT + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(parmT); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get an array of parameter numbers for parameters which are not set at their + default values */ +SEXP getChgParm(SEXP env) { + + SEXP out = R_NilValue; + SEXP parmNum = R_NilValue; + + int sp, ret; + int lg = 0; + + checkEnv(env); + + ret = CPXgetchgparam(R_ExternalPtrAddr(env), &lg, NULL, 0, &sp); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + /* if (sp < 0) { */ + lg -= sp; + PROTECT(parmNum = Rf_allocVector(INTSXP, lg)); + + status = CPXgetchgparam(R_ExternalPtrAddr(env), + &lg, INTEGER(parmNum), lg, &sp + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = parmNum; + } + UNPROTECT(1); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set optimization direction */ +SEXP setObjDir(SEXP env, SEXP lp, SEXP lpdir) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + CPXchgobjsen(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(lpdir) + ); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get optimization direction */ +SEXP getObjDir(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int lpdir = 0; + + checkEnv(env); + + lpdir = CPXgetobjsen(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(lpdir); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy data that define an LP problem to a problem object */ +SEXP copyLp(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval + ) { + + SEXP out = R_NilValue; + + const double *robjf = REAL(objf); + const double *rrhs = REAL(rhs); + const char *rsense = CHAR(STRING_ELT(sense, 0)); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatcnt = INTEGER(matcnt); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb = REAL(lb); + const double *rub = REAL(ub); + const double *rrngval; + + checkEnv(env); + checkProb(lp); + + if (rngval == R_NilValue) { + rrngval = NULL; + } + else { + rrngval = REAL(rngval); + } + + status = CPXcopylp(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nCols), Rf_asInteger(nRows), + Rf_asInteger(lpdir), + robjf, rrhs, rsense, + rmatbeg, rmatcnt, rmatind, rmatval, + rlb, rub, rrngval + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy LP data into a problem object in the same way as the routine CPXcopylp, + but using some additional arguments to specify the names of constraints and + variables in the problem object */ +SEXP copyLpwNames(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval, SEXP cnames, SEXP rnames + ) { + + SEXP out = R_NilValue; + + int k, numcn, numrn; + const double *robjf = REAL(objf); + const double *rrhs = REAL(rhs); + const char *rsense = CHAR(STRING_ELT(sense, 0)); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatcnt = INTEGER(matcnt); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb = REAL(lb); + const double *rub = REAL(ub); + const double *rrngval; + const char **rcnames; + const char ** rrnames; + + checkEnv(env); + checkProb(lp); + + if (rngval == R_NilValue) { + rrngval = NULL; + } + else { + rrngval = REAL(rngval); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + numcn = Rf_length(cnames); + rcnames = R_Calloc(numcn, const char *); + for (k = 0; k < numcn; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + if (rnames == R_NilValue) { + rrnames = NULL; + } + else { + numrn = Rf_length(rnames); + rrnames = R_Calloc(numrn, const char *); + for (k = 0; k < numrn; k++) { + rrnames[k] = CHAR(STRING_ELT(rnames, k)); + } + } + + status = CPXcopylpwnames(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nCols), Rf_asInteger(nRows), + Rf_asInteger(lpdir), robjf, rrhs, rsense, + rmatbeg, rmatcnt, rmatind, rmatval, + rlb, rub, rrngval, + (char **) rcnames, (char **) rrnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + if (rnames != R_NilValue) { + R_Free(rrnames); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy a quadratic objective matrix Q when Q is not diagonal */ +SEXP copyQuad(SEXP env, SEXP lp, + SEXP qmatbeg, SEXP qmatcnt, SEXP qmatind, SEXP qmatval + ) { + + SEXP out = R_NilValue; + + const int *rqmatbeg = INTEGER(qmatbeg); + const int *rqmatcnt = INTEGER(qmatcnt); + const int *rqmatind = INTEGER(qmatind); + const double *rqmatval = REAL(qmatval); + + checkEnv(env); + checkProb(lp); + + status = CPXcopyquad(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rqmatbeg, rqmatcnt, rqmatind, rqmatval + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy the quadratic objective matrix Q for a separable QP problem */ +SEXP copyQPsep(SEXP env, SEXP lp, SEXP qsepvec) { + + SEXP out = R_NilValue; + + const double *rqsepvec = REAL(qsepvec); + + checkEnv(env); + checkProb(lp); + + status = CPXcopyqpsep(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rqsepvec + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a problem as text file */ +SEXP writeProb(SEXP env, SEXP lp, SEXP fname, SEXP ftype) { + + SEXP out = R_NilValue; + + const char *rftype; + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + if (ftype == R_NilValue) { + rftype = NULL; + } + else { + rftype = CHAR(STRING_ELT(ftype, 0)); + } + + status = CPXwriteprob(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname, rftype + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* reads an MPS, LP, or SAV file into an existing problem object */ +SEXP readCopyProb(SEXP env, SEXP lp, SEXP fname, SEXP ftype) { + + SEXP out = R_NilValue; + + const char *rftype; + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkProb(lp); + checkEnv(env); + + if (ftype == R_NilValue) { + rftype = NULL; + } + else { + rftype = CHAR(STRING_ELT(ftype, 0)); + } + + status = CPXreadcopyprob(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname, rftype + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a dual formulation of the current problem object */ +SEXP dualWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + double osh; + + checkEnv(env); + checkProb(lp); + + status = CPXdualwrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname, &osh); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(osh); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* performs presolve on a problem object */ +SEXP presolve(SEXP env, SEXP lp, SEXP method) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXpresolve(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(method)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access presolve status information for the columns and rows of the + presolved problem in the original problem and of the original problem + in the presolved problem */ +SEXP getPreStat(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + SEXP pcstat = R_NilValue; + SEXP prstat = R_NilValue; + SEXP ocstat = R_NilValue; + SEXP orstat = R_NilValue; + + int prestat; + int nrows = 0; + int ncols = 0; + + checkEnv(env); + checkProb(lp); + + nrows = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + ncols = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + if ( (nrows > 0) && (ncols > 0) ) { + + PROTECT(pcstat = Rf_allocVector(INTSXP, ncols)); + PROTECT(prstat = Rf_allocVector(INTSXP, nrows)); + PROTECT(ocstat = Rf_allocVector(INTSXP, ncols)); + PROTECT(orstat = Rf_allocVector(INTSXP, nrows)); + + status = CPXgetprestat(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &prestat, + INTEGER(pcstat), INTEGER(prstat), + INTEGER(ocstat), INTEGER(orstat) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 5)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(prestat)); + SET_VECTOR_ELT(out, 1, pcstat); + SET_VECTOR_ELT(out, 2, prstat); + SET_VECTOR_ELT(out, 3, ocstat); + SET_VECTOR_ELT(out, 4, orstat); + + PROTECT(listn = Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(listn, 0, Rf_mkChar("prestat")); + SET_STRING_ELT(listn, 1, Rf_mkChar("pcstat")); + SET_STRING_ELT(listn, 2, Rf_mkChar("prstat")); + SET_STRING_ELT(listn, 3, Rf_mkChar("ocstat")); + SET_STRING_ELT(listn, 4, Rf_mkChar("orstat")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(4); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* performs bound strengthening and detects redundant rows */ +SEXP basicPresolve(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + SEXP redlb = R_NilValue; + SEXP redub = R_NilValue; + SEXP rstat = R_NilValue; + + int nrows = 0; + int ncols = 0; + + checkEnv(env); + checkProb(lp); + + nrows = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + ncols = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + if ( (nrows > 0) && (ncols > 0) ) { + + PROTECT(redlb = Rf_allocVector(REALSXP, ncols)); + PROTECT(redub = Rf_allocVector(REALSXP, ncols)); + PROTECT(rstat = Rf_allocVector(INTSXP, nrows)); + + status = CPXbasicpresolve(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(redlb), REAL(redub), INTEGER(rstat) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, redlb); + SET_VECTOR_ELT(out, 1, redub); + SET_VECTOR_ELT(out, 2, rstat); + + PROTECT(listn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listn, 0, Rf_mkChar("redlb")); + SET_STRING_ELT(listn, 1, Rf_mkChar("redub")); + SET_STRING_ELT(listn, 2, Rf_mkChar("rstat")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(3); + } + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a presolved version of the problem to a file */ +SEXP preslvWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + double off; + + checkEnv(env); + checkProb(lp); + + status = CPXpreslvwrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname, &off + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(off); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* return a pointer for the presolved problem */ +SEXP getRedLp(SEXP env, SEXP lp, SEXP ptrtype) { + + SEXP lpext = R_NilValue; + SEXP ptr, class; + + CPXCLPptr redlp = NULL; + + checkEnv(env); + checkProb(lp); + + status = CPXgetredlp(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), &redlp); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + if (redlp != NULL) { + /* create problem pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_prob_ptr")); + + lpext = R_MakeExternalPtr(&redlp, tagCPLEXprob, R_NilValue); + PROTECT(lpext); + Rf_setAttrib(ptr, class, lpext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + else { + ptr = R_NilValue; + } + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* return the objective offset between the original problem and + the presolved problem */ +SEXP getObjOffset(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + double ooff; + + checkEnv(env); + checkProb(lp); + + status = CPXgetobjoffset(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &ooff + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(ooff); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* remove any scaling that CPLEX has applied to the resident problem and its + associated data */ +SEXP unscaleProb(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXunscaleprob(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add new empty constraints (rows) to a problem object */ +SEXP newRows(SEXP env, SEXP lp, + SEXP nrows, SEXP rhs, SEXP sense, SEXP rngval, SEXP rnames) { + + SEXP out = R_NilValue; + + int k, nnames; + const double *rrhs; + const double *rrngval; + const char *rsense; + const char **rrnames; + + checkEnv(env); + checkProb(lp); + + if (rhs == R_NilValue) { + rrhs = NULL; + } + else { + rrhs = REAL(rhs); + } + + if (sense == R_NilValue) { + rsense = NULL; + } + else { + rsense = CHAR(STRING_ELT(sense, 0)); + } + + if (rngval == R_NilValue) { + rrngval = NULL; + } + else { + rrngval = REAL(rngval); + } + + if (rnames == R_NilValue) { + rrnames = NULL; + } + else { + nnames = Rf_length(rnames); + rrnames = R_Calloc(nnames, const char *); + for (k = 0; k < nnames; k++) { + rrnames[k] = CHAR(STRING_ELT(rnames, k)); + } + } + + status = CPXnewrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nrows), rrhs, rsense, rrngval, + (char **) rrnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (rnames != R_NilValue) { + R_Free(rrnames); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add constraints to a specified CPLEX problem object */ +SEXP addRows(SEXP env, SEXP lp, SEXP ncols, SEXP nrows, SEXP nnz, + SEXP rhs, SEXP sense, SEXP matbeg, SEXP matind, SEXP matval, + SEXP cnames, SEXP rnames) { + + SEXP out = R_NilValue; + + int k, numcn, numrn; + const int *rmatbeg = INTEGER(matbeg); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rrhs; + const char *rsense; + const char **rcnames; + const char **rrnames; + + checkEnv(env); + checkProb(lp); + + if (rhs == R_NilValue) { + rrhs = NULL; + } + else { + rrhs = REAL(rhs); + } + + if (sense == R_NilValue) { + rsense = NULL; + } + else { + rsense = CHAR(STRING_ELT(sense, 0)); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + numcn = Rf_length(cnames); + rcnames = R_Calloc(numcn, const char *); + for (k = 0; k < numcn; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + if (rnames == R_NilValue) { + rrnames = NULL; + } + else { + numrn = Rf_length(rnames); + rrnames = R_Calloc(numrn, const char *); + for (k = 0; k < numrn; k++) { + rrnames[k] = CHAR(STRING_ELT(rnames, k)); + } + } + + status = CPXaddrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), Rf_asInteger(nrows), + Rf_asInteger(nnz), + rrhs, rsense, rmatbeg, rmatind, rmatval, + (char **) rcnames, (char **) rrnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + if (rnames != R_NilValue) { + R_Free(rrnames); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the number of rows in the constraint matrix */ +SEXP getNumRows(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int nrows = 0; + + checkEnv(env); + checkProb(lp); + + nrows = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(nrows); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a range of rows */ +SEXP delRows(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a set of rows */ +SEXP delSetRows(SEXP env, SEXP lp, SEXP delstat) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelsetrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + INTEGER(delstat) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + else { + out = delstat; + } + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add new empty columns to a problem object */ +SEXP newCols(SEXP env, SEXP lp, + SEXP ncols, SEXP obj, SEXP lb, SEXP ub, SEXP xctype, SEXP cnames) { + + SEXP out = R_NilValue; + + int k, nnames; + const double *robj; + const double *rlb; + const double *rub; + const char *rxctype; + const char **rcnames; + + checkEnv(env); + checkProb(lp); + + if (obj == R_NilValue) { + robj = NULL; + } + else { + robj = REAL(obj); + } + + if (lb == R_NilValue) { + rlb = NULL; + } + else { + rlb = REAL(lb); + } + + if (ub == R_NilValue) { + rub = NULL; + } + else { + rub = REAL(ub); + } + + if (xctype == R_NilValue) { + rxctype = NULL; + } + else { + rxctype = CHAR(STRING_ELT(xctype, 0)); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + nnames = Rf_length(cnames); + rcnames = R_Calloc(nnames, const char *); + for (k = 0; k < nnames; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + status = CPXnewcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), robj, rlb, rub, rxctype, + (char **) rcnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add columns to a specified CPLEX problem object */ +SEXP addCols(SEXP env, SEXP lp, SEXP ncols, SEXP nnz, SEXP objf, + SEXP matbeg, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP cnames + ) { + + SEXP out = R_NilValue; + + int k, nnames; + const double *robjf = REAL(objf); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb, *rub; + const char **rcnames; + + checkEnv(env); + checkProb(lp); + + if (lb == R_NilValue) { + rlb = NULL; + } + else { + rlb = REAL(lb); + } + + if (ub == R_NilValue) { + rub = NULL; + } + else { + rub = REAL(ub); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + nnames = Rf_length(cnames); + rcnames = R_Calloc(nnames, const char *); + for (k = 0; k < nnames; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + status = CPXaddcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), Rf_asInteger(nnz), + robjf, rmatbeg, rmatind, rmatval, + rlb, rub, (char **) rcnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the number of columns in the constraint matrix */ +SEXP getNumCols(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int ncols = 0; + + checkEnv(env); + checkProb(lp); + + ncols = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(ncols); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a range of columns */ +SEXP delCols(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* deletes a set of columns from a problem object */ +SEXP delSetCols(SEXP env, SEXP lp, SEXP delstat) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelsetcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + INTEGER(delstat) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + else { + out = delstat; + } + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the linear objective coefficients */ +SEXP chgObj(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP val) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + double *rval = REAL(val); + + checkEnv(env); + checkProb(lp); + + status = CPXchgobj(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), rind, rval + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the linear objective coefficients */ +SEXP getObj(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP obj = R_NilValue; + + int lgobj = 0; + + checkEnv(env); + checkProb(lp); + + lgobj = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgobj > 0) { + + PROTECT(obj = Rf_allocVector(REALSXP, lgobj)); + + status = CPXgetobj(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(obj), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = obj; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy a name for the objective function into a problem object */ +SEXP copyObjName(SEXP env, SEXP lp, SEXP oname) { + + SEXP out = R_NilValue; + + const char *roname = CHAR(STRING_ELT(oname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXcopyobjname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + roname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the name of the objective row of a problem object */ +SEXP getObjName(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int ret, sp; + int osp = 0; + char *namesp = NULL; + + checkEnv(env); + checkProb(lp); + + ret = CPXgetobjname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + NULL, 0, &sp + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + osp -= sp; + namesp = R_Calloc(osp, char); + + status = CPXgetobjname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + namesp, osp, &sp + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_mkString(namesp); + } + R_Free(namesp); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change a list of matrix coefficients */ +SEXP chgCoefList(SEXP env, SEXP lp, SEXP nnz, SEXP ia, SEXP ja, SEXP ra) { + + SEXP out = R_NilValue; + + const int *ria = INTEGER(ia); + const int *rja = INTEGER(ja); + const double *rra = REAL(ra); + + checkEnv(env); + checkProb(lp); + + status = CPXchgcoeflist(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nnz), ria, rja, rra + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change a single coefficient in the constraint matrix */ +SEXP chgCoef(SEXP env, SEXP lp, SEXP i, SEXP j, SEXP val) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXchgcoef(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(i), Rf_asInteger(j), Rf_asReal(val) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change a single coefficient in the quadratic objective of a quadratic + problem */ +SEXP chgQPcoef(SEXP env, SEXP lp, SEXP i, SEXP j, SEXP val) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXchgqpcoef(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(i), Rf_asInteger(j), Rf_asReal(val) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change a single coefficient in the constraint matrix */ +SEXP getCoef(SEXP env, SEXP lp, SEXP i, SEXP j) { + + SEXP out = R_NilValue; + + double coef = 0; + + checkEnv(env); + checkProb(lp); + + status = CPXgetcoef(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(i), Rf_asInteger(j), &coef + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(coef); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the number of non zero elements in the constraint matrix */ +SEXP getNumNnz(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int nnz = 0; + + checkEnv(env); + checkProb(lp); + + nnz = CPXgetnumnz(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(nnz); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the upper or lower bounds on a set of variables of a problem */ +SEXP chgBnds(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP lu, SEXP bd) { + + SEXP out = R_NilValue; + + const int *rind = INTEGER(ind); + const char *rlu = CHAR(STRING_ELT(lu, 0)); + const double *rbd = REAL(bd); + + checkEnv(env); + checkProb(lp); + + status = CPXchgbds(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), rind, rlu, rbd + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the upper and lower bounds on a set of variables of a problem */ +SEXP chgColsBnds(SEXP env, SEXP lp, SEXP j, SEXP lb, SEXP ub) { + + SEXP out = R_NilValue; + + int *rj = INTEGER(j); + double *rlb = REAL(lb), *rub = REAL(ub); + + int k, nj, nChg, nVar; + + int *eq = 0; + int *pj = 0; + double *pbnds = 0; + char *ptype = NULL; + + checkEnv(env); + checkProb(lp); + + /* PrintValue(j); */ + + nj = Rf_length(j); /* number of variables */ + nVar = nj; /* number of changes */ + eq = R_Calloc(nj, int); /* boolean: fixed variable yes|no */ + + /* Rprintf("%i\n", nj); */ + + for (k = 0; k < nj; k++) { + if (islessgreater(rlb[k], rub[k])) { + nVar++; + eq[k] = 0; + } + else { + eq[k] = 1; + } + } + + nChg = nVar; /* number of changes */ + /* Rprintf("nj: %i\n", nj); */ + /* Rprintf("nVar: %i\n", nVar); */ + + pj = R_Calloc(nVar, int); /* prepare arrays for the */ + pbnds = R_Calloc(nVar, double); /* call to CPXchgbds() */ + ptype = R_Calloc(nVar+1, char); + ptype[nVar] = '\0'; + + /* int dingsbums = strlen(ptype); */ + /* Rprintf("L: %i\n", dingsbums); */ + + /* Rprintf("protect\n"); */ + + for (k = 0; k < nj; k++) { + if (eq[k] == 0) { /* if a variable has upper and */ + nVar--; /* lower bound, put the upper */ + pj[k] = rj[k]; /* bound at the end of the array */ + pj[nVar] = rj[k]; + pbnds[k] = rlb[k]; + pbnds[nVar] = rub[k]; + ptype[k] = 'L'; + ptype[nVar] = 'U'; + } + else { + /* Rprintf("eq %i\n", k); */ + pj[k] = rj[k]; + pbnds[k] = rlb[k]; + ptype[k] = 'B'; + } + } + + /* + Rprintf("nVar: %i\n", nVar); + for (k=0;k<nChg;k++) { + Rprintf("pj: %i ", pj[k]); + Rprintf("ptype: %c ", ptype[k]); + Rprintf("pbnds: %f\n", pbnds[k]); + } + Rprintf("\n"); + Rprintf("done\n"); + */ + + status = CPXchgbds(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + nChg, pj, ptype, pbnds); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + R_Free(eq); + R_Free(pj); + R_Free(pbnds); + R_Free(ptype); + + /* Rprintf("cplex\n\n\n"); */ + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the upper or lower bounds on a set of variables of a problem */ +SEXP tightenBnds(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP lu, SEXP bd) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + const char *rlu = CHAR(STRING_ELT(lu, 0)); + double *rbd = REAL(bd); + + checkEnv(env); + checkProb(lp); + + status = CPXtightenbds(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), rind, rlu, rbd + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change type of column (variable) */ +SEXP chgColType(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP xctype) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + const char *rxctype = CHAR(STRING_ELT(xctype, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXchgctype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), rind, rxctype + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the types for a range of variables in a problem object */ +SEXP getColType(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + int lgxctype; + char *xctype = NULL; + + checkEnv(env); + checkProb(lp); + + lgxctype = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgxctype > 0) { + + xctype = CallocCharBuf(lgxctype); + /* + xctype = R_Calloc(lgxctype+1, char); + xctype[lgxctype] = '\0'; + */ + + status = CPXgetctype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + xctype, Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_mkString(xctype); + } + + R_Free(xctype); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* can be used to copy variable type information into a given problem */ +SEXP copyColType(SEXP env, SEXP lp, SEXP xctype) { + + SEXP out = R_NilValue; + + const char *rxctype = CHAR(STRING_ELT(xctype, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXcopyctype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rxctype + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get a range of lower bounds */ +SEXP getLowerBnds(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP lb = R_NilValue; + + int lglb = 0; + + checkEnv(env); + checkProb(lp); + + lglb = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lglb > 0) { + + PROTECT(lb = Rf_allocVector(REALSXP, lglb)); + + status = CPXgetlb(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(lb), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = lb; + } + + UNPROTECT(1); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get a range of upper bounds */ +SEXP getUpperBnds(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP ub = R_NilValue; + + int lgub = 0; + + checkEnv(env); + checkProb(lp); + + lgub = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgub > 0) { + + PROTECT(ub = Rf_allocVector(REALSXP, lgub)); + + status = CPXgetub(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(ub), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = ub; + } + + UNPROTECT(1); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get lower bounds of columns (variables) */ +SEXP getLowBndsIds(SEXP env, SEXP lp, SEXP ind, SEXP ncols) { + + SEXP out = R_NilValue; + SEXP olb = R_NilValue; + + int k = 0; + double lb[1]; + int nc = Rf_asInteger(ncols); + int *rind = INTEGER(ind); + + int check = 0; + + checkEnv(env); + checkProb(lp); + + PROTECT(olb = Rf_allocVector(REALSXP, nc)); + + while ( (k < nc) && (check == 0) ) { + /* for (k = 0; k < nc; k++) { */ + status = CPXgetlb(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + lb, rind[k], rind[k] + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + check = 1; + } + else { + REAL(olb)[k++] = lb[0]; + } + } + + if (out == R_NilValue) { + out = olb; + } + + UNPROTECT(1); + + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get upper bounds of columns (variables) */ +SEXP getUppBndsIds(SEXP env, SEXP lp, SEXP ind, SEXP ncols) { + + SEXP out = R_NilValue; + SEXP oub = R_NilValue; + + int k = 0; + double ub[1]; + int nc = Rf_asInteger(ncols); + int *rind = INTEGER(ind); + + int check = 0; + + checkEnv(env); + checkProb(lp); + + PROTECT(oub = Rf_allocVector(REALSXP, nc)); + + while ( (k < nc) && (check == 0) ) { + /* for (k = 0; k < nc; k++) { */ + status = CPXgetub(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + ub, rind[k], rind[k] + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + check = 1; + } + else { + REAL(oub)[k++] = ub[0]; + } + } + + if (out == R_NilValue) { + out = oub; + } + + UNPROTECT(1); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the right hand side coefficients of a set of linear constraints */ +SEXP chgRhs(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP val) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + double *rval = REAL(val); + + checkEnv(env); + checkProb(lp); + + status = CPXchgrhs(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nrows), rind, rval + ); + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get right hand side */ +SEXP getRhs(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP rhs = R_NilValue; + + int lgrhs; + + checkEnv(env); + checkProb(lp); + + lgrhs = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgrhs > 0) { + + PROTECT(rhs = Rf_allocVector(REALSXP, lgrhs)); + + status = CPXgetrhs(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(rhs), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = rhs; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the sense of a set of linear constraints */ +SEXP chgSense(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP sense) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + const char *rsense = CHAR(STRING_ELT(sense, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXchgsense(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nrows), rind, rsense + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the sense of a set of linear constraints */ +SEXP getSense(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + int lgsense; + char *sense = NULL; + + checkEnv(env); + checkProb(lp); + + lgsense = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgsense > 0) { + + sense = CallocCharBuf(lgsense); + /* + sense = R_Calloc(lgsense+1, char); + sense[lgsense] = '\0'; + */ + status = CPXgetsense(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + sense, Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_mkString(sense); + } + + R_Free(sense); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* remove all names that have been previously assigned to rows and columns */ +SEXP delNames(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelnames(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the name of the current problem */ +SEXP chgProbName(SEXP env, SEXP lp, SEXP probname) { + + SEXP out = R_NilValue; + + const char *rprobname = CHAR(STRING_ELT(probname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXchgprobname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rprobname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* accesses the name of the problem */ +SEXP getProbName(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int ret, sp; + int bsp = 0; + char *namesp = NULL; + + checkEnv(env); + checkProb(lp); + + ret = CPXgetprobname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + NULL, 0, &sp + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + bsp -= sp; + namesp = R_Calloc(bsp, char); + + status = CPXgetprobname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + namesp, bsp, &sp + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_mkString(namesp); + } + R_Free(namesp); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the name of a constraint or the name of a variable in a + problem object */ +SEXP chgName(SEXP env, SEXP lp, SEXP key, SEXP ij, SEXP name) { + + SEXP out = R_NilValue; + + const char *rkey = CHAR(STRING_ELT(key, 0)); + const char *rname = CHAR(STRING_ELT(name, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXchgname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rkey[0], Rf_asInteger(ij), rname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the names of linear constraints in a problem object */ +SEXP chgRowName(SEXP env, SEXP lp, SEXP nnames, SEXP ind, SEXP names) { + + SEXP out = R_NilValue; + + int k, numn; + const int *rind = INTEGER(ind); + const char **rnames; + /* char **rnames = (char **) CHAR(names); */ + + checkEnv(env); + checkProb(lp); + + numn = Rf_length(names); + rnames = R_Calloc(numn, const char *); + for (k = 0; k < numn; k++) { + rnames[k] = CHAR(STRING_ELT(names, k)); + } + + status = CPXchgrowname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nnames), rind, (char **) rnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + R_Free(rnames); + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* change the names of variables in a problem object */ +SEXP chgColName(SEXP env, SEXP lp, SEXP nnames, SEXP ind, SEXP names) { + + SEXP out = R_NilValue; + + int k, numn; + const int *rind = INTEGER(ind); + const char **rnames; + + checkEnv(env); + checkProb(lp); + + numn = Rf_length(names); + rnames = R_Calloc(numn, const char *); + for (k = 0; k < numn; k++) { + rnames[k] = CHAR(STRING_ELT(names, k)); + } + + status = CPXchgcolname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nnames), rind, (char **) rnames + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + R_Free(rnames); + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of row names or, equivalently, the constraint names of a + problem object */ +SEXP getRowName(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + int ret, sp, k; + int lgname = 0; + int stsp = 0; + char **name = NULL; + char *namesp = NULL; + + checkEnv(env); + checkProb(lp); + + lgname = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgname > 0) { + + ret = CPXgetrowname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + stsp -= sp; + name = R_Calloc(lgname, char *); + namesp = R_Calloc(stsp, char); + status = CPXgetrowname(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + name, namesp, stsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(STRSXP, lgname)); + for (k = 0; k < lgname; k++) { + SET_STRING_ELT(out, k, Rf_mkChar(name[k])); + } + UNPROTECT(1); + } + R_Free(name); + R_Free(namesp); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + } + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of column names or, equivalently, the variable names of a + problem object */ +SEXP getColName(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + int ret, sp, k; + int lgname = 0; + int stsp = 0; + char **name = NULL; + char *namesp = NULL; + + checkEnv(env); + checkProb(lp); + + lgname = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgname > 0) { + + ret = CPXgetcolname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + stsp -= sp; + name = R_Calloc(lgname, char *); + namesp = R_Calloc(stsp, char); + status = CPXgetcolname(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + name, namesp, stsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(STRSXP, lgname)); + for (k = 0; k < lgname; k++) { + SET_STRING_ELT(out, k, Rf_mkChar(name[k])); + } + UNPROTECT(1); + } + R_Free(name); + R_Free(namesp); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* search for the index number of the specified column in a problem object */ +SEXP getColIndex(SEXP env, SEXP lp, SEXP cname) { + + SEXP out = R_NilValue; + + const char *rcname = CHAR(STRING_ELT(cname, 0)); + + int cindex = -1; + + checkEnv(env); + checkProb(lp); + + status = CPXgetcolindex(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rcname, &cindex + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(cindex); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* search for the index number of the specified row in a problem object */ +SEXP getRowIndex(SEXP env, SEXP lp, SEXP rname) { + + SEXP out = R_NilValue; + + const char *rrname = CHAR(STRING_ELT(rname, 0)); + + int rindex = -1; + + checkEnv(env); + checkProb(lp); + + status = CPXgetrowindex(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rrname, &rindex + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(rindex); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change the right hand side coefficients of a set of linear constraints */ +SEXP chgRngVal(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP val) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + double *rval = REAL(val); + + checkEnv(env); + checkProb(lp); + + status = CPXchgrngval(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nrows), rind, rval + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get rhs range coefficients for a set of constraints */ +SEXP getRngVal(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP rngval = R_NilValue; + + int lgrngval = 0; + + checkEnv(env); + checkProb(lp); + + lgrngval = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgrngval > 0) { + + PROTECT(rngval = Rf_allocVector(REALSXP, lgrngval)); + + status = CPXgetrngval(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(rngval), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = rngval; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of rows of the constraint matrix, not including the objective + function nor the bound constraints on the variables of a problem object */ +SEXP getRows(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP matbeg = R_NilValue; + SEXP matind = R_NilValue; + SEXP matval = R_NilValue; + + int ret, sp; + int matsp = 0; + int nnz = 0; + int lgrows = 0; + + checkEnv(env); + checkProb(lp); + + lgrows = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgrows > 0) { + + PROTECT(matbeg = Rf_allocVector(INTSXP, lgrows)); + + ret = CPXgetrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(matbeg), NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + matsp -= sp; + PROTECT(matind = Rf_allocVector(INTSXP, matsp)); + PROTECT(matval = Rf_allocVector(REALSXP, matsp)); + status = CPXgetrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(matbeg), INTEGER(matind), + REAL(matval), matsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, matbeg); + SET_VECTOR_ELT(out, 1, matind); + SET_VECTOR_ELT(out, 2, matval); + + PROTECT(listn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listn, 0, Rf_mkChar("matbeg")); + SET_STRING_ELT(listn, 1, Rf_mkChar("matind")); + SET_STRING_ELT(listn, 2, Rf_mkChar("matval")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(2); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of columns of the constraint matrix of a problem object */ +SEXP getCols(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP matbeg = R_NilValue; + SEXP matind = R_NilValue; + SEXP matval = R_NilValue; + + int ret, sp; + int matsp = 0; + int nnz = 0; + int lgcols = 0; + + checkEnv(env); + checkProb(lp); + + lgcols = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgcols > 0) { + + PROTECT(matbeg = Rf_allocVector(INTSXP, lgcols)); + + ret = CPXgetcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(matbeg), NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + matsp -= sp; + PROTECT(matind = Rf_allocVector(INTSXP, matsp)); + PROTECT(matval = Rf_allocVector(REALSXP, matsp)); + status = CPXgetcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(matbeg), INTEGER(matind), + REAL(matval), matsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, matbeg); + SET_VECTOR_ELT(out, 1, matind); + SET_VECTOR_ELT(out, 2, matval); + + PROTECT(listn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listn, 0, Rf_mkChar("matbeg")); + SET_STRING_ELT(listn, 1, Rf_mkChar("matind")); + SET_STRING_ELT(listn, 2, Rf_mkChar("matval")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(2); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* manage modification steps closely */ +SEXP completelp(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXcompletelp(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change to zero any problem coefficients that are smaller in magnitude than + the tolerance specified in the argument eps */ +SEXP cleanupCoef(SEXP env, SEXP lp, SEXP eps) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXcleanup(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asReal(eps) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* provide starting information for use in a subsequent call + to a simplex optimization routine */ +SEXP copyStart(SEXP env, SEXP lp, + SEXP cstat, SEXP rstat, + SEXP cprim, SEXP rprim, + SEXP cdual, SEXP rdual) { + + SEXP out = R_NilValue; + + int *rcstat; + int *rrstat; + double *rcprim; + double *rrprim; + double *rcdual; + double *rrdual; + + checkEnv(env); + checkProb(lp); + + if (cstat == R_NilValue) { + rcstat = NULL; + } + else { + rcstat = INTEGER(cstat); + } + + if (rstat == R_NilValue) { + rrstat = NULL; + } + else { + rrstat = INTEGER(rstat); + } + + if (cprim == R_NilValue) { + rcprim = NULL; + } + else { + rcprim = REAL(cprim); + } + + if (rprim == R_NilValue) { + rrprim = NULL; + } + else { + rrprim = REAL(rprim); + } + + if (cdual == R_NilValue) { + rcdual = NULL; + } + else { + rcdual = REAL(cdual); + } + + if (rdual == R_NilValue) { + rrdual = NULL; + } + else { + rrdual = REAL(rdual); + } + + status = CPXcopystart(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rcstat, rrstat, rcprim, rrprim, rcdual, rrdual + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy a basis into a problem object */ +SEXP copyBase(SEXP env, SEXP lp, SEXP cstat, SEXP rstat) { + + SEXP out = R_NilValue; + + int *rcstat = INTEGER(cstat); + int *rrstat = INTEGER(rstat); + + checkEnv(env); + checkProb(lp); + + status = CPXcopybase(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rcstat, rrstat + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy a partial basis into an LP problem object */ +SEXP copyPartBase(SEXP env, SEXP lp, + SEXP ncind, SEXP cind, SEXP cstat, + SEXP nrind, SEXP rind, SEXP rstat) { + + SEXP out = R_NilValue; + + int *rcind = INTEGER(cind); + int *rrind = INTEGER(rind); + int *rcstat = INTEGER(cstat); + int *rrstat = INTEGER(rstat); + + checkEnv(env); + checkProb(lp); + + status = CPXcopypartialbase(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncind), rcind, rcstat, + Rf_asInteger(nrind), rrind, rrstat + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the basis resident in a problem object */ +SEXP getBase(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP cstat = R_NilValue; + SEXP rstat = R_NilValue; + + int nc, nr; + + checkEnv(env); + checkProb(lp); + + nc = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + nr = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + PROTECT(cstat = Rf_allocVector(INTSXP, nc)); + PROTECT(rstat = Rf_allocVector(INTSXP, nr)); + + status = CPXgetbase(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + INTEGER(cstat), INTEGER(rstat)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, cstat); + SET_VECTOR_ELT(out, 1, rstat); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("cstat")); + SET_STRING_ELT(listn, 1, Rf_mkChar("rstat")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(2); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write the most current basis associated with a problem object to file */ +SEXP baseWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXmbasewrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* read a basis from a BAS file, and copy that basis into a problem object */ +SEXP readCopyBase(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXreadcopybase(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem (general, use CPX_PARAM_LPMETHOD) */ +SEXP lpopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXlpopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using primal simplex method */ +SEXP primopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXprimopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using dual simplex method */ +SEXP dualopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdualopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using baropt */ +SEXP baropt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXbaropt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using hybbaropt */ +SEXP hybbaropt(SEXP env, SEXP lp, SEXP method) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXhybbaropt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(method) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using hybnetopt */ +SEXP hybnetopt(SEXP env, SEXP lp, SEXP method) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXhybnetopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(method) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using siftopt */ +SEXP siftopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXsiftopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve lp problem using mipopt */ +SEXP mipopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXmipopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* solve qp problem using qpopt */ +SEXP qpopt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXqpopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the MIP cutoff value being used during mixed integer optimization */ +SEXP getCutoff(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + double coff; + + checkEnv(env); + checkProb(lp); + + status = CPXgetcutoff(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), &coff); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(coff); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* provide two arrays that can be used to project the impact of making changes + to optimal variable values or objective function coefficients */ +SEXP getGrad(SEXP env, SEXP lp, SEXP j) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP head = R_NilValue; + SEXP y = R_NilValue; + + int nr = 0; + + checkEnv(env); + checkProb(lp); + + nr = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + PROTECT(head = Rf_allocVector(INTSXP, nr)); + PROTECT(y = Rf_allocVector(REALSXP, nr)); + + status = CPXgetgrad(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(j), INTEGER(head), REAL(y) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, head); + SET_VECTOR_ELT(out, 1, y); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("head")); + SET_STRING_ELT(listn, 1, Rf_mkChar("y")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(2); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the total number of simplex iterations to solve an LP problem, or + the number of crossover iterations in the case that the barrier optimizer + is used */ +SEXP getItCnt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int itcnt = 0; + + checkEnv(env); + checkProb(lp); + + itcnt = CPXgetitcnt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(itcnt); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the number of Phase I iterations to solve a problem using the + primal or dual simplex method */ +SEXP getPhase1Cnt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int pcnt = 0; + + checkEnv(env); + checkProb(lp); + + pcnt = CPXgetphase1cnt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(pcnt); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the total number of sifting iterations to solve an LP problem */ +SEXP getSiftItCnt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int scnt = 0; + + checkEnv(env); + checkProb(lp); + + scnt = CPXgetsiftitcnt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(scnt); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the number of Phase I sifting iterations to solve an LP problem */ +SEXP getSiftPase1Cnt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int spcnt = 0; + + checkEnv(env); + checkProb(lp); + + spcnt = CPXgetsiftphase1cnt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(spcnt); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the number of dual super-basic variables in the current solution */ +SEXP getDbsCnt(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + int dcnt = 0; + + checkEnv(env); + checkProb(lp); + + dcnt = CPXgetdsbcnt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(dcnt); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* computes a minimum-cost relaxation of the righthand side values of + constraints or bounds on variables in order to make an + infeasible problem feasible */ +/* +SEXP feasOpt(SEXP env, SEXP lp, SEXP rhs, SEXP rng, SEXP lb, SEXP ub) { + + SEXP out = R_NilValue; + + double *rrhs; + double *rrng; + double *rlb; + double *rub; + + checkEnv(env); + checkProb(lp); + + if (rhs == R_NilValue) { + rrhs = NULL; + } + else { + rrhs = REAL(rhs); + } + + if (rng == R_NilValue) { + rrng = NULL; + } + else { + rrng = REAL(rng); + } + + if (lb == R_NilValue) { + rlb = NULL; + } + else { + rlb = REAL(lb); + } + + if (ub == R_NilValue) { + rub = NULL; + } + else { + rub = REAL(ub); + } + + status = CPXfeasopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rrhs, rrng, rlb, rub + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} +*/ + +SEXP feasOpt(SEXP env, SEXP lp, SEXP rhs, SEXP rng, SEXP lb, SEXP ub) { + + SEXP out = R_NilValue; + + int nr, nc; + + const double *rrhs; + const double *rrng; + const double *rlb; + const double *rub; + + checkEnv(env); + checkProb(lp); + + nr = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + nc = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + if (Rf_asLogical(rhs) == 0) { + rrhs = NULL; + } + else { + rrhs = R_Calloc(nr, const double); + } + + if (Rf_asLogical(rng) == 0) { + rrng = NULL; + } + else { + rrng = R_Calloc(nr, const double); + } + + if (Rf_asLogical(lb) == 0) { + rlb = NULL; + } + else { + rlb = R_Calloc(nc, const double); + } + + if (Rf_asLogical(ub) == 0) { + rub = NULL; + } + else { + rub = R_Calloc(nc, const double); + } + + status = CPXfeasopt(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rrhs, rrng, rlb, rub + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (Rf_asLogical(rhs) != 0) { + R_Free(rrhs); + } + + if (Rf_asLogical(rng) != 0) { + R_Free(rrng); + } + + if (Rf_asLogical(lb) != 0) { + R_Free(rlb); + } + + if (Rf_asLogical(ub) != 0) { + R_Free(rub); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* compute the infeasibility of a given solution for a range of variables */ +SEXP getColInfeas(SEXP env, SEXP lp, SEXP sol, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP infout = R_NilValue; + + double *rsol; + int lginf = 0; + + checkEnv(env); + checkProb(lp); + + if (sol == R_NilValue) { + rsol = NULL; + } + else { + rsol = REAL(sol); + } + + lginf = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lginf > 0) { + + PROTECT(infout = Rf_allocVector(REALSXP, lginf)); + + status = CPXgetcolinfeas(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rsol, REAL(infout), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = infout; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* compute the infeasibility of a given solution for a range of + linear constraints */ +SEXP getRowInfeas(SEXP env, SEXP lp, SEXP sol, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP infout = R_NilValue; + + double *rsol; + int lginf = 0; + + checkEnv(env); + checkProb(lp); + + if (sol == R_NilValue) { + rsol = NULL; + } + else { + rsol = REAL(sol); + } + + lginf = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lginf > 0) { + + PROTECT(infout = Rf_allocVector(REALSXP, lginf)); + + status = CPXgetrowinfeas(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rsol, REAL(infout), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = infout; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* identify a minimal conflict for the infeasibility of the linear constraints + and the variable bounds in the current problem */ +SEXP refineConflict(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + int ncr = 0, ncc = 0; + + checkEnv(env); + checkProb(lp); + + status = CPXrefineconflict(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &ncr, &ncc + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(ncr)); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(ncc)); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("confnumrows")); + SET_STRING_ELT(listn, 1, Rf_mkChar("confnumcols")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* identify a minimal conflict for the infeasibility of the current problem + or a subset of constraints of the current problem */ +SEXP refineConflictExt(SEXP env, SEXP lp, SEXP grpcnt, SEXP concnt, + SEXP grppref, SEXP grpbeg, SEXP grpind, + SEXP grptype + ) { + + SEXP out = R_NilValue; + + const double *rgrppref = REAL(grppref); + const int *rgrpbeg = INTEGER(grpbeg); + const int *rgrpind = INTEGER(grpind); + const char *rgrptype = CHAR(STRING_ELT(grptype, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXrefineconflictext(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(grpcnt), Rf_asInteger(concnt), + rgrppref, rgrpbeg, rgrpind, rgrptype + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* return the linear constraints and variables belonging to a conflict + previously computed by the routine CPXrefineconflict */ +SEXP getConflict(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + SEXP rind = R_NilValue; + SEXP rstat = R_NilValue; + + SEXP cind = R_NilValue; + SEXP cstat = R_NilValue; + + int costat = 0, cnrows = 0, cncols = 0; + int ret = 0; + int nr = 0; + int nc = 0; + + checkEnv(env); + checkProb(lp); + + /* Calculate the required length of rind, rstat, cind and cstat by calling + CPXgetconflict a first time with NULL -> nr and nc contain the + desired values. */ + + ret = CPXgetconflict(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &costat, NULL, NULL, &nr, NULL, NULL, &nc + ); + + /* + nr = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + nc = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + */ + + /* Rprintf("rows: %i, columns: %i\n", nr, nc); */ + + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(ret); + } + else { + PROTECT(rind = Rf_allocVector(INTSXP, nr)); + PROTECT(rstat = Rf_allocVector(INTSXP, nr)); + PROTECT(cind = Rf_allocVector(INTSXP, nc)); + PROTECT(cstat = Rf_allocVector(INTSXP, nc)); + + status = CPXgetconflict(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &costat, + INTEGER(rind), INTEGER(rstat), &cnrows, + INTEGER(cind), INTEGER(cstat), &cncols + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 7)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(costat)); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(cnrows)); + SET_VECTOR_ELT(out, 2, rind); + SET_VECTOR_ELT(out, 3, rstat); + SET_VECTOR_ELT(out, 4, Rf_ScalarInteger(cncols)); + SET_VECTOR_ELT(out, 5, cind); + SET_VECTOR_ELT(out, 6, cstat); + + PROTECT(listn = Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(listn, 0, Rf_mkChar("confstat")); + SET_STRING_ELT(listn, 1, Rf_mkChar("confnumrows")); + SET_STRING_ELT(listn, 2, Rf_mkChar("rowind")); + SET_STRING_ELT(listn, 3, Rf_mkChar("rowbdstat")); + SET_STRING_ELT(listn, 4, Rf_mkChar("confnumcols")); + SET_STRING_ELT(listn, 5, Rf_mkChar("colind")); + SET_STRING_ELT(listn, 6, Rf_mkChar("colbdstat")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(4); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get conflict status codes of the groups numbered beg (for begin) through end + in the most recent call */ +SEXP getConflictExt(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP grpstat = R_NilValue; + + int lggs = 0; + + checkEnv(env); + checkProb(lp); + + lggs = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lggs > 0) { + + PROTECT(grpstat = Rf_allocVector(INTSXP, lggs)); + + status = CPXgetconflictext(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), INTEGER(grpstat), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = grpstat; + } + + UNPROTECT(1); + } + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write an LP format file containing the identified conflict */ +SEXP cLpWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXclpwrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* free the presolved problem from the LP problem object */ +SEXP freePresolve(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXfreepresolve(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* return an integer specifying the solution algorithm used to solve the + resident LP, QP, or QCP problem */ +SEXP getMethod(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int method; + + checkEnv(env); + checkProb(lp); + + method = CPXgetmethod(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(method); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the solution method of the last subproblem optimization, in the case + of an error termination during mixed integer optimization */ +SEXP getSubMethod(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int submethod; + + checkEnv(env); + checkProb(lp); + + submethod = CPXgetsubmethod(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(submethod); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get double-valued information about the quality of the current + solution of a problem */ +SEXP getDblQual(SEXP env, SEXP lp, SEXP w) { + + SEXP out = R_NilValue; + + double quality; + + checkEnv(env); + checkProb(lp); + + status = CPXgetdblquality(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &quality, Rf_asInteger(w) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(quality); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get integer-valued information about the quality of the current + solution of a problem */ +SEXP getIntQual(SEXP env, SEXP lp, SEXP w) { + + SEXP out = R_NilValue; + + int quality; + + checkEnv(env); + checkProb(lp); + + status = CPXgetintquality(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &quality, Rf_asInteger(w) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(quality); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access solution information */ +SEXP solnInfo(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + int met, type, pfeas, dfeas; + + checkEnv(env); + checkProb(lp); + + status = CPXsolninfo(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &met, &type, &pfeas, &dfeas + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 4)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(met)); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(type)); + SET_VECTOR_ELT(out, 2, Rf_ScalarInteger(pfeas)); + SET_VECTOR_ELT(out, 3, Rf_ScalarInteger(dfeas)); + + PROTECT(listn = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listn, 0, Rf_mkChar("method")); + SET_STRING_ELT(listn, 1, Rf_mkChar("type")); + SET_STRING_ELT(listn, 2, Rf_mkChar("primal_feasible")); + SET_STRING_ELT(listn, 3, Rf_mkChar("dual_feasible")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* accesses the solution values produced by all the optimization routines + except the routine CPXNETprimopt */ +SEXP solution(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + SEXP xvar = R_NilValue; + SEXP pi = R_NilValue; + SEXP slack = R_NilValue; + SEXP dj = R_NilValue; + + int stat = 0; + double objval; + + int nrows = 0, ncols = 0, ptype = 0; + + int nrch = 0; /* number of rows for pi */ + int ncch = 0; /* number of columns for dj */ + + int tcheck = 0; /* 1 for QCP or MIP optimizers */ + int rcheck = 0; /* 1 if nrows is zero */ + int ccheck = 0; /* 1 if ncols is zero */ + + checkEnv(env); + checkProb(lp); + + nrows = CPXgetnumrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + ncols = CPXgetnumcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + ptype = CPXgetprobtype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + if (nrows == 0) { + nrows++; + rcheck = 1; + } + + if (ncols == 0) { + ncols++; + ccheck = 1; + } + + if (ptype == CPXPROB_MILP || ptype == CPXPROB_FIXEDMILP || + ptype == CPXPROB_QCP || ptype == CPXPROB_MIQCP) { + nrch = 1; + ncch = 1; + tcheck = 1; + } + else { + nrch = nrows; + ncch = ncols; + tcheck = 0; + } + + PROTECT(xvar = Rf_allocVector(REALSXP, ncols)); + PROTECT(slack = Rf_allocVector(REALSXP, nrows)); + PROTECT(pi = Rf_allocVector(REALSXP, nrch)); + PROTECT(dj = Rf_allocVector(REALSXP, ncch)); + + if (tcheck == 1) { + REAL(pi)[0] = NA_REAL; + REAL(dj)[0] = NA_REAL; + + status = CPXsolution(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &stat, &objval, REAL(xvar), NULL, REAL(slack), NULL + ); + } else { + status = CPXsolution(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &stat, &objval, + REAL(xvar), REAL(pi), REAL(slack), REAL(dj) + ); + } + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + if (rcheck == 1) { + REAL(pi)[0] = NA_REAL; + REAL(slack)[0] = NA_REAL; + } + if (ccheck == 1) { + REAL(xvar)[0] = NA_REAL; + REAL(dj)[0] = NA_REAL; + } + + PROTECT(out = Rf_allocVector(VECSXP, 6)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(stat)); + SET_VECTOR_ELT(out, 1, Rf_ScalarReal(objval)); + SET_VECTOR_ELT(out, 2, xvar); + SET_VECTOR_ELT(out, 3, pi); + SET_VECTOR_ELT(out, 4, slack); + SET_VECTOR_ELT(out, 5, dj); + + PROTECT(listn = Rf_allocVector(STRSXP, 6)); + SET_STRING_ELT(listn, 0, Rf_mkChar("lpstat")); + SET_STRING_ELT(listn, 1, Rf_mkChar("objval")); + SET_STRING_ELT(listn, 2, Rf_mkChar("x")); + SET_STRING_ELT(listn, 3, Rf_mkChar("pi")); + SET_STRING_ELT(listn, 4, Rf_mkChar("slack")); + SET_STRING_ELT(listn, 5, Rf_mkChar("dj")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(4); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a solution file for the selected problem object */ +SEXP solWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXsolwrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* read a solution from a SOL format file, and copies that basis or solution + into a problem object */ +SEXP readCopySol(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXreadcopysol(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access solution status of optimizations */ +SEXP getStat(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int solstat = 0; + + checkEnv(env); + checkProb(lp); + + solstat = CPXgetstat(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(solstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the solution status of the last subproblem optimization, in the case + of an error termination during mixed integer optimization */ +SEXP getSubStat(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int substat = 0; + + checkEnv(env); + checkProb(lp); + + substat = CPXgetsubstat(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(substat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get solution objective value */ +SEXP getObjVal(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + double obj; + + checkEnv(env); + checkProb(lp); + + status = CPXgetobjval(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), &obj); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(obj); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the currently best known bound of all the remaining open nodes + in a branch-and-cut tree */ +SEXP getBestObjVal(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + double obj; + + checkEnv(env); + checkProb(lp); + + status = CPXgetbestobjval(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), &obj); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(obj); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the relative objective gap for a MIP optimization */ +SEXP getMIPrelGap(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + + double gap; + + checkEnv(env); + checkProb(lp); + + status = CPXgetmiprelgap(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &gap); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(gap); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get solution values for a range of problem variables */ +SEXP getProbVar(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP xval = R_NilValue; + + int lgx = 0; + + checkEnv(env); + checkProb(lp); + + lgx = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgx > 0) { + + PROTECT(xval = Rf_allocVector(REALSXP, lgx)); + + status = CPXgetx(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(xval), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = xval; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get slack values for a range of constraints */ +SEXP getSlack(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP slack = R_NilValue; + + int lgslack = 0; + + checkEnv(env); + checkProb(lp); + + lgslack = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgslack > 0) { + + PROTECT(slack = Rf_allocVector(REALSXP, lgslack)); + + status = CPXgetslack(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(slack), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = slack; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get dual values for a range of constraints */ +SEXP getPi(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP pi = R_NilValue; + + int lgpi = 0; + + checkEnv(env); + checkProb(lp); + + lgpi = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgpi > 0) { + + PROTECT(pi = Rf_allocVector(REALSXP, lgpi)); + + status = CPXgetpi(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(pi), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = pi; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the reduced costs for a range of the variables of a linear + or quadratic program */ +SEXP getDj(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP dj = R_NilValue; + + int lgdj = 0; + + checkEnv(env); + checkProb(lp); + + lgdj = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgdj > 0) { + + PROTECT(dj = Rf_allocVector(REALSXP, lgdj)); + + status = CPXgetdj(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + REAL(dj), Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = dj; + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access upper and lower sensitivity ranges for lower and upper variable + bounds for a specified range of variable indices */ +SEXP boundSa(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP lbl = R_NilValue; + SEXP lbu = R_NilValue; + SEXP ubl = R_NilValue; + SEXP ubu = R_NilValue; + SEXP listn = R_NilValue; + + int lgb = 0; + + checkEnv(env); + checkProb(lp); + + lgb = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgb > 0) { + + PROTECT(lbl = Rf_allocVector(REALSXP, lgb)); + PROTECT(lbu = Rf_allocVector(REALSXP, lgb)); + PROTECT(ubl = Rf_allocVector(REALSXP, lgb)); + PROTECT(ubu = Rf_allocVector(REALSXP, lgb)); + + status = CPXboundsa(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end), + REAL(lbl), REAL(lbu), REAL(ubl), REAL(ubu) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 4)); + SET_VECTOR_ELT(out, 0, lbl); + SET_VECTOR_ELT(out, 1, lbu); + SET_VECTOR_ELT(out, 2, ubl); + SET_VECTOR_ELT(out, 3, ubu); + + PROTECT(listn = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listn, 0, Rf_mkChar("lblower")); + SET_STRING_ELT(listn, 1, Rf_mkChar("lbupper")); + SET_STRING_ELT(listn, 2, Rf_mkChar("ublower")); + SET_STRING_ELT(listn, 3, Rf_mkChar("ubupper")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(4); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access upper and lower sensitivity ranges for objective function + coefficients for a specified range of variable indices */ +SEXP objSa(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP low = R_NilValue; + SEXP upp = R_NilValue; + SEXP listn = R_NilValue; + + int lgo = 0; + + checkEnv(env); + checkProb(lp); + + lgo = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgo > 0) { + + PROTECT(low = Rf_allocVector(REALSXP, lgo)); + PROTECT(upp = Rf_allocVector(REALSXP, lgo)); + + status = CPXobjsa(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end), + REAL(low), REAL(upp) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, low); + SET_VECTOR_ELT(out, 1, upp); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("lower")); + SET_STRING_ELT(listn, 1, Rf_mkChar("upper")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(2); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access upper and lower sensitivity ranges for righthand side values of + a range of constraints */ +SEXP rhsSa(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP low = R_NilValue; + SEXP upp = R_NilValue; + SEXP listn = R_NilValue; + + int lgr = 0; + + checkEnv(env); + checkProb(lp); + + lgr = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgr > 0) { + + PROTECT(low = Rf_allocVector(REALSXP, lgr)); + PROTECT(upp = Rf_allocVector(REALSXP, lgr)); + + status = CPXrhssa(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end), + REAL(low), REAL(upp) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, low); + SET_VECTOR_ELT(out, 1, upp); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("lower")); + SET_STRING_ELT(listn, 1, Rf_mkChar("upper")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + UNPROTECT(2); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* open a file */ +SEXP cplexfopen(SEXP fname, SEXP ftype, SEXP ptrtype) { + + SEXP fileext = R_NilValue; + SEXP ptr, class; + + CPXFILEptr cpfile = NULL; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + const char *rftype = CHAR(STRING_ELT(ftype, 0)); + + cpfile = CPXfopen(rfname, rftype); + + if (cpfile != NULL) { + /* create pointer to file */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_file_ptr")); + + fileext = R_MakeExternalPtr(cpfile, tagCPLEXfile, R_NilValue); + PROTECT(fileext); + Rf_setAttrib(ptr, Rf_install("CPLEXfn"), fname); + Rf_setAttrib(ptr, class, fileext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + else { + ptr = R_NilValue; + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* close a file */ +SEXP cplexfclose(SEXP cpfile) { + + SEXP out = R_NilValue; + CPXFILEptr del = NULL; + + checkFile(cpfile); + + del = R_ExternalPtrAddr(cpfile); + + status = CPXfclose(del); + if (status != 0) { + out = cpx_error(status); + } + else { + R_ClearExternalPtr(cpfile); + } + + return out; +} + +/* -------------------------------------------------------------------------- */ +/* write to file */ +SEXP fileput(SEXP cpfile, SEXP stuff) { + + SEXP out = R_NilValue; + + const char *rstuff = CHAR(STRING_ELT(stuff, 0)); + + checkFile(cpfile); + + status = CPXfputs(rstuff, R_ExternalPtrAddr(cpfile)); + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* modify log file */ +SEXP setLogFile(SEXP env, SEXP cpfile) { + + SEXP out = R_NilValue; + + CPXFILEptr rcpfile; + + if (cpfile == R_NilValue) { + rcpfile = NULL; + } + else { + checkFile(cpfile); + rcpfile = R_ExternalPtrAddr(cpfile); + } + + checkEnv(env); + + status = CPXsetlogfile(R_ExternalPtrAddr(env), rcpfile); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access log file */ +SEXP getLogFile(SEXP env, SEXP ptrtype) { + + SEXP logfout = R_NilValue; + SEXP ptr, class; + + CPXFILEptr logfile = NULL; + + checkEnv(env); + + status = CPXgetlogfile(R_ExternalPtrAddr(env), &logfile); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + /* create pointer to file */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_file_ptr")); + + logfout = R_MakeExternalPtr(logfile, tagCPLEXfile, R_NilValue); + PROTECT(logfout); + Rf_setAttrib(ptr, class, logfout); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* obtain pointers to the four default channels */ +SEXP getChannels(SEXP env, SEXP ptrtype) { + + SEXP resout = R_NilValue; + SEXP warnout = R_NilValue; + SEXP errout = R_NilValue; + SEXP logout = R_NilValue; + + SEXP ptr, class; + + CPXCHANNELptr results = NULL; + CPXCHANNELptr warning = NULL; + CPXCHANNELptr error = NULL; + CPXCHANNELptr log = NULL; + + checkEnv(env); + + status = CPXgetchannels(R_ExternalPtrAddr(env), + &results, &warning, &error, &log + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + /* create channel pointers */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_chan_ptr")); + + resout = R_MakeExternalPtr(results, tagCPLEXchannel, R_NilValue); + PROTECT(resout); + Rf_setAttrib(ptr, Rf_install("cpxresults"), resout); + + warnout = R_MakeExternalPtr(warning, tagCPLEXchannel, R_NilValue); + PROTECT(warnout); + Rf_setAttrib(ptr, Rf_install("cpxwarning"), warnout); + + errout = R_MakeExternalPtr(error, tagCPLEXchannel, R_NilValue); + PROTECT(errout); + Rf_setAttrib(ptr, Rf_install("cpxerror"), errout); + + logout = R_MakeExternalPtr(log, tagCPLEXchannel, R_NilValue); + PROTECT(logout); + Rf_setAttrib(ptr, Rf_install("cpxlog"), logout); + + Rf_classgets(ptr, class); + UNPROTECT(6); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* flush the output buffers of the four standard channels */ +SEXP flushStdChannels(SEXP env) { + + SEXP out = R_NilValue; + + checkEnv(env); + + status = CPXflushstdchannels(R_ExternalPtrAddr(env)); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* instantiate a new channel object */ +SEXP addChannel(SEXP env, SEXP ptrtype) { + + SEXP chout = R_NilValue; + SEXP ptr, class; + + CPXCHANNELptr newch = NULL; + + checkEnv(env); + + newch = CPXaddchannel(R_ExternalPtrAddr(env)); + + if (newch != NULL) { + /* create channel pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_chan_ptr")); + + chout = R_MakeExternalPtr(newch, tagCPLEXchannel, R_NilValue); + PROTECT(chout); + Rf_setAttrib(ptr, class, chout); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + else { + ptr = R_NilValue; + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* flush all message destinations for a channel, ... */ +SEXP delChannel(SEXP env, SEXP newch) { + + SEXP out = R_NilValue; + CPXCHANNELptr delch = NULL; + + checkEnv(env); + checkChannel(newch); + + delch = R_ExternalPtrAddr(newch); + + CPXdelchannel(R_ExternalPtrAddr(env), &delch); + + R_ClearExternalPtr(newch); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* flush all message destinations associated with a channel */ +SEXP disconnectChannel(SEXP env, SEXP newch) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkChannel(newch); + + CPXdisconnectchannel(R_ExternalPtrAddr(env), R_ExternalPtrAddr(newch)); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* flush all message destinations associated with a channel */ +SEXP flushChannel(SEXP env, SEXP newch) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkChannel(newch); + + CPXflushchannel(R_ExternalPtrAddr(env), R_ExternalPtrAddr(newch)); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add a file to the list of message destinations for a channel */ +SEXP addFpDest(SEXP env, SEXP newch, SEXP cpfile) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkChannel(newch); + checkFile(cpfile); + + status = CPXaddfpdest(R_ExternalPtrAddr(env), R_ExternalPtrAddr(newch), + R_ExternalPtrAddr(cpfile) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* remove a file to the list of message destinations for a channel */ +SEXP delFpDest(SEXP env, SEXP newch, SEXP cpfile) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkChannel(newch); + checkFile(cpfile); + + status = CPXdelfpdest(R_ExternalPtrAddr(env), R_ExternalPtrAddr(newch), + R_ExternalPtrAddr(cpfile) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* This routine returns a time stamp */ +SEXP getTime(SEXP env) { + + SEXP out = R_NilValue; + + double timest = 0; + + checkEnv(env); + + status = CPXgettime(R_ExternalPtrAddr(env), ×t); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(timest); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* tune the parameters of the environment for improved optimizer performance on + the specified problem object */ +SEXP tuneParam(SEXP env, SEXP lp, + SEXP nIntP, SEXP intP, SEXP intPv, + SEXP nDblP, SEXP dblP, SEXP dblPv, + SEXP nStrP, SEXP strP, SEXP strPv) { + + SEXP out = R_NilValue; + + int k, numstrP, tstat; + + const int *rintP, *rintPv, *rdblP, *rstrP; + const double *rdblPv; + const char **rstrPv; + + checkEnv(env); + checkProb(lp); + + if (intP == R_NilValue) { + rintP = NULL; + } + else { + rintP = INTEGER(intP); + } + + if (intPv == R_NilValue) { + rintPv = NULL; + } + else { + rintPv = INTEGER(intPv); + } + + if (dblP == R_NilValue) { + rdblP = NULL; + } + else { + rdblP = INTEGER(dblP); + } + + if (dblPv == R_NilValue) { + rdblPv = NULL; + } + else { + rdblPv = REAL(dblPv); + } + + if (strP == R_NilValue) { + rstrP = NULL; + } + else { + rstrP = INTEGER(strP); + } + + if (strPv == R_NilValue) { + rstrPv = NULL; + } + else { + numstrP = Rf_length(strPv); + rstrPv = R_Calloc(numstrP, const char *); + for (k = 0; k < numstrP; k++) { + rstrPv[k] = CHAR(STRING_ELT(strPv, k)); + } + } + + status = CPXtuneparam(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nIntP), rintP, rintPv, + Rf_asInteger(nDblP), rdblP, rdblPv, + Rf_asInteger(nStrP), rstrP, (char **) rstrPv, &tstat + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(tstat); + } + + if (strPv != R_NilValue) { + R_Free(rstrPv); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* set termination signal */ +SEXP setTerminate(SEXP env, SEXP ptrtype) { + + SEXP termext = R_NilValue; + SEXP ptr, class; + + checkEnv(env); + + status = CPXsetterminate(R_ExternalPtrAddr(env), &terminate); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + ptr = cpx_error(status); + } + else { + /* create termination signal pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cplex_term_ptr")); + + termext = R_MakeExternalPtr((void *) &terminate, + tagCPLEXtermination, R_NilValue + ); + PROTECT(termext); + Rf_setAttrib(ptr, class, termext); + Rf_classgets(ptr, class); + UNPROTECT(3); + } + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* release termination signal */ +SEXP delTerminate(SEXP env, SEXP tsig) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkTermination(tsig); + + status = CPXsetterminate(R_ExternalPtrAddr(env), NULL); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + else { + R_ClearExternalPtr(tsig); + terminate = 0; + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* change termination signal */ +SEXP chgTerminate(SEXP env, SEXP tval) { + + SEXP out = R_NilValue; + + checkEnv(env); + + terminate = Rf_asInteger(tval); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* print termination signal */ +SEXP printTerminate(SEXP env) { + + SEXP out = R_NilValue; + + checkEnv(env); + + Rprintf("%i\n", terminate); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add multiple MIP starts to a CPLEX problem object */ +SEXP addMIPstarts(SEXP env, SEXP lp, SEXP mcnt, SEXP nzcnt, + SEXP beg, SEXP varindices, SEXP values, + SEXP effortlevel, SEXP mipstartname + ) { + + SEXP out = R_NilValue; + + int k, nnames; + const int *rbeg = INTEGER(beg); + const int *rvarindices = INTEGER(varindices); + const double *rvalues = REAL(values); + const int *reffortlevel = INTEGER(effortlevel); + const char ** rmipstartname; + + checkEnv(env); + checkProb(lp); + + if (mipstartname == R_NilValue) { + rmipstartname = NULL; + } + else { + nnames = Rf_length(mipstartname); + rmipstartname = R_Calloc(nnames, const char *); + for (k = 0; k < nnames; k++) { + rmipstartname[k] = CHAR(STRING_ELT(mipstartname, k)); + } + } + + status = CPXaddmipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(mcnt), Rf_asInteger(nzcnt), + rbeg, rvarindices, rvalues, reffortlevel, + (char **) rmipstartname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + if (mipstartname != R_NilValue) { + R_Free(rmipstartname); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* modify or extend multiple MIP starts */ +SEXP chgMIPstarts(SEXP env, SEXP lp, SEXP mcnt, SEXP mipstartindices, + SEXP nzcnt, SEXP beg, SEXP varindices, + SEXP values, SEXP effortlevel + ) { + + SEXP out = R_NilValue; + + const int *rmipstartindices = INTEGER(mipstartindices); + const int *rbeg = INTEGER(beg); + const int *rvarindices = INTEGER(varindices); + const double *rvalues = REAL(values); + const int *reffortlevel = INTEGER(effortlevel); + + checkEnv(env); + checkProb(lp); + + status = CPXchgmipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(mcnt), rmipstartindices, + Rf_asInteger(nzcnt), + rbeg, rvarindices, rvalues, reffortlevel + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of MIP starts of a CPLEX problem object */ +SEXP getMIPstarts(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP beg = R_NilValue; + SEXP varindices = R_NilValue; + SEXP values = R_NilValue; + SEXP effortlevel = R_NilValue; + + int ret, sp; + int lgbeg = 0; + int stsp = 0; + int nzcnt = 0; + + SEXP TMPa = R_NilValue; + SEXP TMPb = R_NilValue; + + checkEnv(env); + checkProb(lp); + + lgbeg = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgbeg > 0) { + + PROTECT(beg = Rf_allocVector(INTSXP, lgbeg)); + PROTECT(effortlevel = Rf_allocVector(INTSXP, lgbeg)); + + PROTECT(TMPa = Rf_allocVector(INTSXP, 0)); + PROTECT(TMPb = Rf_allocVector(REALSXP, 0)); + + ret = CPXgetmipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nzcnt, INTEGER(beg), INTEGER(TMPa), REAL(TMPb), + INTEGER(effortlevel), 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + /* Rprintf("ret %i\n", sp); */ + UNPROTECT(2); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + stsp -= sp; + PROTECT(varindices = Rf_allocVector(INTSXP, stsp)); + PROTECT(values = Rf_allocVector(REALSXP, stsp)); + status = CPXgetmipstarts(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), &nzcnt, + INTEGER(beg), INTEGER(varindices), + REAL(values), INTEGER(effortlevel), + stsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 4)); + SET_VECTOR_ELT(out, 0, beg); + SET_VECTOR_ELT(out, 1, varindices); + SET_VECTOR_ELT(out, 2, values); + SET_VECTOR_ELT(out, 3, effortlevel); + + PROTECT(listn = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listn, 0, Rf_mkChar("beg")); + SET_STRING_ELT(listn, 1, Rf_mkChar("varindices")); + SET_STRING_ELT(listn, 2, Rf_mkChar("values")); + SET_STRING_ELT(listn, 3, Rf_mkChar("effortlevel")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(2); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + UNPROTECT(2); + } + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* access the number of MIP starts in the CPLEX problem object */ +SEXP getNumMIPstarts(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int nmips; + + checkEnv(env); + checkProb(lp); + + nmips = CPXgetnummipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(nmips); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a range MIP starts */ +SEXP delMIPstarts(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelmipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a range of MIP starts of a CPLEX problem object to a file + in MST format */ +SEXP writeMIPstarts(SEXP env, SEXP lp, SEXP fname, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXwritemipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname, Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + +/* -------------------------------------------------------------------------- */ +/* read a file in the format MST and copy the information of all the MIP starts + contained in that file into a CPLEX problem object */ +SEXP readCopyMIPstarts(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXreadcopymipstarts(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of names of MIP starts */ +SEXP getMIPstartName(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + int ret, sp, k; + int lgname = 0; + int stsp = 0; + char **name = NULL; + char *store = NULL; + + checkEnv(env); + checkProb(lp); + + lgname = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgname > 0) { + + ret = CPXgetmipstartname(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + stsp -= sp; + name = R_Calloc(lgname, char *); + store = R_Calloc(stsp, char); + status = CPXgetmipstartname(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + name, store, stsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(STRSXP, lgname)); + for (k = 0; k < lgname; k++) { + SET_STRING_ELT(out, k, Rf_mkChar(name[k])); + } + UNPROTECT(1); + } + R_Free(name); + R_Free(store); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + } + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* search for the index number of the specified MIP start */ +SEXP getMIPstartIndex(SEXP env, SEXP lp, SEXP iname) { + + SEXP out = R_NilValue; + + const char *riname = CHAR(STRING_ELT(iname, 0)); + + int rindex = -1; + + checkEnv(env); + checkProb(lp); + + status = CPXgetmipstartindex(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + riname, &rindex + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarInteger(rindex); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* refine a conflict in order to determine why a given MIP start is not + feasible */ +SEXP refineMIPstartConflict(SEXP env, SEXP lp, SEXP mipstartindex) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + + int ncr = 0, ncc = 0; + + checkEnv(env); + checkProb(lp); + + status = CPXrefinemipstartconflict(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + Rf_asInteger(mipstartindex), + &ncr, &ncc + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(ncr)); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(ncc)); + + PROTECT(listn = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listn, 0, Rf_mkChar("confnumrows")); + SET_STRING_ELT(listn, 1, Rf_mkChar("confnumcols")); + + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* identify a minimal conflict for the infeasibility of the MIP start or a + subset of the constraints in the model */ +SEXP refineMIPstartConflictExt(SEXP env, SEXP lp, SEXP mipstartindex, + SEXP grpcnt, SEXP concnt, SEXP grppref, + SEXP grpbeg, SEXP grpind, SEXP grptype + ) { + + SEXP out = R_NilValue; + + const double *rgrppref = REAL(grppref); + const int *rgrpbeg = INTEGER(grpbeg); + const int *rgrpind = INTEGER(grpind); + const char *rgrptype = CHAR(STRING_ELT(grptype, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXrefinemipstartconflictext(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + Rf_asInteger(mipstartindex), + Rf_asInteger(grpcnt), + Rf_asInteger(concnt), + rgrppref, rgrpbeg, rgrpind, rgrptype + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* return the number of nonzeros in the Q matrix */ +SEXP getNumQPnz(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int nnz; + + checkEnv(env); + checkProb(lp); + + nnz = CPXgetnumqpnz(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(nnz); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* return the number of variables that have quadratic objective coefficients */ +SEXP getNumQuad(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + int nq; + + checkEnv(env); + checkProb(lp); + + nq = CPXgetnumquad(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp)); + + out = Rf_ScalarInteger(nq); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access the quadratic coefficient in the matrix Q */ +SEXP getQPcoef(SEXP env, SEXP lp, SEXP i, SEXP j) { + + SEXP out = R_NilValue; + + double coef; + + checkEnv(env); + checkProb(lp); + + status = CPXgetqpcoef(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(i),Rf_asInteger(j), &coef + ); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + out = Rf_ScalarReal(coef); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a range of columns of the matrix Q of a model with a quadratic + objective function */ +SEXP getQuad(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP qmatbeg = R_NilValue; + SEXP qmatind = R_NilValue; + SEXP qmatval = R_NilValue; + + int ret, sp; + int qmatsp = 0; + int nnz = 0; + int lgcols = 0; + + checkEnv(env); + checkProb(lp); + + lgcols = Rf_asInteger(end) - Rf_asInteger(begin) + 1; + + if (lgcols > 0) { + + PROTECT(qmatbeg = Rf_allocVector(INTSXP, lgcols)); + + ret = CPXgetquad(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(qmatbeg), NULL, NULL, 0, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + qmatsp -= sp; + PROTECT(qmatind = Rf_allocVector(INTSXP, qmatsp)); + PROTECT(qmatval = Rf_allocVector(REALSXP, qmatsp)); + status = CPXgetcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nnz, INTEGER(qmatbeg), INTEGER(qmatind), + REAL(qmatval), qmatsp, &sp, + Rf_asInteger(begin), Rf_asInteger(end) + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, qmatbeg); + SET_VECTOR_ELT(out, 1, qmatind); + SET_VECTOR_ELT(out, 2, qmatval); + + PROTECT(listn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listn, 0, Rf_mkChar("qmatbeg")); + SET_STRING_ELT(listn, 1, Rf_mkChar("qmatind")); + SET_STRING_ELT(listn, 2, Rf_mkChar("qmatval")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(2); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + UNPROTECT(1); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* copy a priority order to a CPLEX problem object */ +SEXP copyOrder(SEXP env, SEXP lp, SEXP cnt, SEXP ind, SEXP prior, SEXP dir) { + + SEXP out = R_NilValue; + + int *rind = INTEGER(ind); + const int *rprior; + const int *rdir; + + checkEnv(env); + checkProb(lp); + + if (prior == R_NilValue) { + rprior = NULL; + } + else { + rprior = INTEGER(prior); + } + + if (dir == R_NilValue) { + rdir = NULL; + } + else { + rdir = INTEGER(dir); + } + + status = CPXcopyorder(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(cnt), rind, rprior, rdir + ); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access all the MIP priority order information */ +SEXP getOrder(SEXP env, SEXP lp) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP ind = R_NilValue; + SEXP prior = R_NilValue; + SEXP dir = R_NilValue; + + int ret, sp; + int nentr = 0; + int ordsp = 0; + + checkEnv(env); + checkProb(lp); + + ret = CPXgetorder(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nentr, NULL, NULL, NULL, 0, &sp); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + ordsp -= sp; + PROTECT(ind = Rf_allocVector(INTSXP, ordsp)); + PROTECT(prior = Rf_allocVector(INTSXP, ordsp)); + PROTECT(dir = Rf_allocVector(INTSXP, ordsp)); + status = CPXgetorder(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &nentr, INTEGER(ind), INTEGER(prior), INTEGER(dir), + ordsp, &sp); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, ind); + SET_VECTOR_ELT(out, 1, prior); + SET_VECTOR_ELT(out, 2, dir); + + PROTECT(listn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listn, 0, Rf_mkChar("indices")); + SET_STRING_ELT(listn, 1, Rf_mkChar("priority")); + SET_STRING_ELT(listn, 2, Rf_mkChar("direction")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(2); + } + UNPROTECT(3); + } + else { + if (ret != 0) { + status_message(R_ExternalPtrAddr(env), ret); + out = cpx_error(ret); + } + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* write a priority order to an ORD file */ +SEXP ordWrite(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkEnv(env); + checkProb(lp); + + status = CPXordwrite(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* read ORD file and copy priority order information into a problem object */ +SEXP readCopyOrder(SEXP env, SEXP lp, SEXP fname) { + + SEXP out = R_NilValue; + + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + checkProb(lp); + checkEnv(env); + + status = CPXreadcopyorder(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rfname); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add quadratic constraint to a specified CPLEX problem object */ +SEXP addQConstr(SEXP env, SEXP lp, SEXP lzn, SEXP qzn, + SEXP rhs, SEXP sense, + SEXP lind, SEXP lval, + SEXP qrow, SEXP qcol, SEXP qval, SEXP qname) { + + SEXP out = R_NilValue; + + /* const char *rsense = CHAR(STRING_ELT(sense, 0)); */ + const int *rlind; + const double *rlval; + const int *rqrow = INTEGER(qrow); + const int *rqcol = INTEGER(qcol); + const double *rqval = REAL(qval); + const char *rqname; + + + if (lind == R_NilValue) { + rlind = NULL; + } + else { + rlind = INTEGER(lind); + } + + if (lval == R_NilValue) { + rlval = NULL; + } + else { + rlval = REAL(lval); + } + + if (qname == R_NilValue) { + rqname = NULL; + } + else { + rqname = CHAR(STRING_ELT(qname, 0)); + } + + checkProb(lp); + checkEnv(env); + + /* CHAR(STRING_ELT(VECTOR_ELT(sense, 0), 0))[0], */ + status = CPXaddqconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(lzn), Rf_asInteger(qzn), Rf_asReal(rhs), + CHAR(STRING_ELT(sense, 0))[0], + rlind, rlval, rqrow, rqcol, rqval, rqname); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a range of quadratic constraints */ +SEXP delQConstrs(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelqconstrs(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end)); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access a quadratic constraint on the variables of a problem object */ +SEXP getQConstr(SEXP env, SEXP lp, SEXP which) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP linind = R_NilValue; + SEXP linval = R_NilValue; + SEXP quadrow = R_NilValue; + SEXP quadcol = R_NilValue; + SEXP quadval = R_NilValue; + SEXP senseo = R_NilValue; + + int ret, lsp, qsp, rlc, rqc; + double rrhs; + char rsense; + + int linsp = 0; + int qadsp = 0; + + checkEnv(env); + checkProb(lp); + + ret = CPXgetqconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &rlc, &rqc, &rrhs, &rsense, NULL, NULL, linsp, &lsp, + NULL, NULL, NULL, qadsp, &qsp, Rf_asInteger(which)); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + linsp -= lsp; + qadsp -= qsp; + PROTECT(linind = Rf_allocVector(INTSXP, linsp)); + PROTECT(linval = Rf_allocVector(REALSXP, linsp)); + PROTECT(quadrow = Rf_allocVector(INTSXP, qadsp)); + PROTECT(quadcol = Rf_allocVector(INTSXP, qadsp)); + PROTECT(quadval = Rf_allocVector(REALSXP, qadsp)); + + status = CPXgetqconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &rlc, &rqc, &rrhs, &rsense, INTEGER(linind), REAL(linval), + linsp, &lsp, INTEGER(quadrow), INTEGER(quadcol), + REAL(quadval), qadsp, &qsp, Rf_asInteger(which)); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + + PROTECT(senseo = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(senseo, 0, Rf_mkChar(&rsense)); + + PROTECT(out = Rf_allocVector(VECSXP, 7)); + SET_VECTOR_ELT(out, 0, Rf_ScalarReal(rrhs)); + SET_VECTOR_ELT(out, 1, senseo); + SET_VECTOR_ELT(out, 2, linind); + SET_VECTOR_ELT(out, 3, linval); + SET_VECTOR_ELT(out, 4, quadrow); + SET_VECTOR_ELT(out, 5, quadcol); + SET_VECTOR_ELT(out, 6, quadval); + + PROTECT(listn = Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(listn, 0, Rf_mkChar("rhs")); + SET_STRING_ELT(listn, 1, Rf_mkChar("sense")); + SET_STRING_ELT(listn, 2, Rf_mkChar("linind")); + SET_STRING_ELT(listn, 3, Rf_mkChar("linval")); + SET_STRING_ELT(listn, 4, Rf_mkChar("quadrow")); + SET_STRING_ELT(listn, 5, Rf_mkChar("quadcol")); + SET_STRING_ELT(listn, 6, Rf_mkChar("quadval")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(3); + } + UNPROTECT(5); + + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* add an indicator constraint to the specified problem object */ +SEXP addIndConstr(SEXP env, SEXP lp, SEXP indvar, SEXP complemented, + SEXP nzcnt, SEXP rhs, SEXP sense, SEXP linind, SEXP linval, + SEXP indname) { + + SEXP out = R_NilValue; + + const int *rlinind = INTEGER(linind); + const double *rlinval = REAL(linval); + const char * rindname; + + checkEnv(env); + checkProb(lp); + + if (indname == R_NilValue) { + rindname = NULL; + } + else { + rindname = CHAR(STRING_ELT(indname, 0)); + } + + status = CPXaddindconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(indvar), Rf_asInteger(complemented), + Rf_asInteger(nzcnt), Rf_asReal(rhs), + CHAR(STRING_ELT(sense, 0))[0], + rlinind, rlinval, rindname); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* delete a range of indicator constraints */ +SEXP delIndConstrs(SEXP env, SEXP lp, SEXP begin, SEXP end) { + + SEXP out = R_NilValue; + + checkEnv(env); + checkProb(lp); + + status = CPXdelindconstrs(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(begin), Rf_asInteger(end)); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* access an indicator constraint on the variables of a problem object */ +SEXP getIndConstr(SEXP env, SEXP lp, SEXP which) { + + SEXP out = R_NilValue; + SEXP listn = R_NilValue; + SEXP linind = R_NilValue; + SEXP linval = R_NilValue; + SEXP senseo = R_NilValue; + + int ret, sp, ind, comp, nnz; + double rrhs; + char rsense; + + int linsp = 0; + + checkEnv(env); + checkProb(lp); + + ret = CPXgetindconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &ind, &comp, &nnz, &rrhs, &rsense, NULL, NULL, linsp, + &sp, Rf_asInteger(which)); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + linsp -= sp; + PROTECT(linind = Rf_allocVector(INTSXP, linsp)); + PROTECT(linval = Rf_allocVector(REALSXP, linsp)); + + status = CPXgetindconstr(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + &ind, &comp, &nnz, &rrhs, &rsense, + INTEGER(linind), REAL(linval), linsp, + &sp, Rf_asInteger(which)); + + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + out = cpx_error(status); + } + else { + + PROTECT(senseo = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(senseo, 0, Rf_mkChar(&rsense)); + + PROTECT(out = Rf_allocVector(VECSXP, 6)); + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(ind)); + SET_VECTOR_ELT(out, 1, Rf_ScalarLogical(comp)); + SET_VECTOR_ELT(out, 2, Rf_ScalarReal(rrhs)); + SET_VECTOR_ELT(out, 3, senseo); + SET_VECTOR_ELT(out, 4, linind); + SET_VECTOR_ELT(out, 5, linval); + + PROTECT(listn = Rf_allocVector(STRSXP, 6)); + SET_STRING_ELT(listn, 0, Rf_mkChar("indvar")); + SET_STRING_ELT(listn, 1, Rf_mkChar("complemented")); + SET_STRING_ELT(listn, 2, Rf_mkChar("rhs")); + SET_STRING_ELT(listn, 3, Rf_mkChar("sense")); + SET_STRING_ELT(listn, 4, Rf_mkChar("linind")); + SET_STRING_ELT(listn, 5, Rf_mkChar("linval")); + Rf_setAttrib(out, R_NamesSymbol, listn); + + UNPROTECT(3); + } + UNPROTECT(2); + + } + + return out; +} diff --git a/src/cplexAPI.h b/src/cplexAPI.h new file mode 100644 index 0000000..ccfd9cf --- /dev/null +++ b/src/cplexAPI.h @@ -0,0 +1,702 @@ +/* cplexAPI.h + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplexR.h" + + +extern SEXP tagCPLEXprob; +extern SEXP tagCPLEXenv; +extern SEXP tagCPLEXfile; +extern SEXP tagCPLEXchannel; +extern SEXP tagCPLEXtermination; + +extern char errmsg[CPLEXAPIMSGBUFF]; + + +/* -------------------------------------------------------------------------- */ +/* help functions */ +/* -------------------------------------------------------------------------- */ + +/* check for pointer to CPLEX problem object */ +SEXP isCPLEXprobPtr(SEXP ptr); + +/* check for pointer to CPLEX environment */ +SEXP isCPLEXenvPtr(SEXP ptr); + +/* check for pointer to CPLEX file */ +SEXP isCPLEXfilePtr(SEXP ptr); + +/* check for pointer to CPLEX channel */ +SEXP isCPLEXchanPtr(SEXP ptr); + +/* check for pointer to CPLEX termination signal */ +SEXP isCPLEXtermPtr(SEXP ptr); + +/* check for NULL pointer */ +SEXP isNULLptr(SEXP ptr); + + +/* -------------------------------------------------------------------------- */ +/* API functions */ +/* -------------------------------------------------------------------------- */ + +/* return error message string */ +SEXP getErrorStr(SEXP env, SEXP err); + +/* return status string */ +SEXP getStatStr(SEXP env, SEXP stat); + +/* initialize cplex */ +SEXP initCPLEX(void); + +/* close cplex environment */ +SEXP closeEnv(SEXP env); + +/* open cplex environment */ +SEXP openEnv(SEXP ptrtype); + +/* remove problem object */ +SEXP delProb(SEXP env, SEXP lp); + +/* create new problem object */ +SEXP initProb(SEXP env, SEXP pname, SEXP ptrtype); + +/* clone problem object */ +SEXP cloneProb(SEXP env, SEXP lp, SEXP ptrtype); + +/* access the problem type that is currently stored in a problem object */ +SEXP getProbType(SEXP env, SEXP lp); + +/* change the current problem to a related problem */ +SEXP chgProbType(SEXP env, SEXP lp, SEXP ptype); + +/* get cplex version number */ +SEXP getVersion(SEXP env); + +/* set CPLEX default paramters */ +SEXP setDefaultParm(SEXP env); + +/* set CPLEX paramters of integer type */ +SEXP setIntParm(SEXP env, SEXP parm, SEXP value); + +/* get CPLEX paramters of integer type */ +SEXP getIntParm(SEXP env, SEXP parm); + +/* get the default value and range of a CPLEX prarmeter of type integer */ +SEXP getInfoIntParm(SEXP env, SEXP parm); + +/* set CPLEX paramters of double type */ +SEXP setDblParm(SEXP env, SEXP parm, SEXP value); + +/* get CPLEX paramters of double type */ +SEXP getDblParm(SEXP env, SEXP parm); + +/* get the default value and range of a CPLEX prarmeter of type double */ +SEXP getInfoDblParm(SEXP env, SEXP parm); + +/* set CPLEX paramters of string type */ +SEXP setStrParm(SEXP env, SEXP parm, SEXP value); + +/* get CPLEX paramters of string type */ +SEXP getStrParm(SEXP env, SEXP parm); + +/* get the default value of a CPLEX prarmeter of type string */ +SEXP getInfoStrParm(SEXP env, SEXP parm); + +/* get a parameter name */ +SEXP getParmName(SEXP env, SEXP wparm); + +/* get a parameter reference number */ +SEXP getParmNum(SEXP env, SEXP nparm); + +/* reads parameter names and settings from a file */ +SEXP readCopyParm(SEXP env, SEXP fname); + +/* write the name and current setting of CPLEX parameters that are not at their */ +/* default setting to a text file */ +SEXP writeParm(SEXP env, SEXP fname); + +/* get parameter type */ +SEXP getParmType(SEXP env, SEXP parm); + +/* get an array of parameter numbers for parameters which are not set at their */ +/* default values */ +SEXP getChgParm(SEXP env); + +/* set optimization direction */ +SEXP setObjDir(SEXP env, SEXP lp, SEXP lpdir); + +/* get optimization direction */ +SEXP getObjDir(SEXP env, SEXP lp); + +/* copy data that define an LP problem to a problem object */ +SEXP copyLp(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval); + +/* copy LP data into a problem object in the same way as the routine CPXcopylp, + but using some additional arguments to specify the names of constraints and + variables in the problem object */ +SEXP copyLpwNames(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval, SEXP cnames, SEXP rnames); + +/* copy a quadratic objective matrix Q when Q is not diagonal */ +SEXP copyQuad(SEXP env, SEXP lp, + SEXP qmatbeg, SEXP qmatcnt, SEXP qmatind, SEXP qmatval); + +/* copy the quadratic objective matrix Q for a separable QP problem */ +SEXP copyQPsep(SEXP env, SEXP lp, SEXP qsepvec); + +/* write a problem as text file */ +SEXP writeProb(SEXP env, SEXP lp, SEXP fname, SEXP ftype); + +/* reads an MPS, LP, or SAV file into an existing problem object */ +SEXP readCopyProb(SEXP env, SEXP lp, SEXP fname, SEXP ftype); + +/* write a dual formulation of the current problem object */ +SEXP dualWrite(SEXP env, SEXP lp, SEXP fname); + +/* performs presolve on a problem object */ +SEXP presolve(SEXP env, SEXP lp, SEXP method); + +/* access presolve status information for the columns and rows of the + presolved problem in the original problem and of the original problem + in the presolved problem */ +SEXP getPreStat(SEXP env, SEXP lp); + +/* performs bound strengthening and detects redundant rows */ +SEXP basicPresolve(SEXP env, SEXP lp); + +/* write a presolved version of the problem to a file */ +SEXP preslvWrite(SEXP env, SEXP lp, SEXP fname); + +/* return a pointer for the presolved problem */ +SEXP getRedLp(SEXP env, SEXP lp, SEXP ptrtype); + +/* return the objective offset between the original problem and + the presolved problem */ +SEXP getObjOffset(SEXP env, SEXP lp); + +/* remove any scaling that CPLEX has applied to the resident problem and its + associated data */ +SEXP unscaleProb(SEXP env, SEXP lp); + +/* add new empty constraints (rows) to a problem object */ +SEXP newRows(SEXP env, SEXP lp, + SEXP nrows, SEXP rhs, SEXP sense, SEXP rngval, SEXP rnames); + +/* add constraints to a specified CPLEX problem object */ +SEXP addRows(SEXP env, SEXP lp, SEXP ncols, SEXP nrows, SEXP nnz, + SEXP rhs, SEXP sense, SEXP matbeg, SEXP matind, SEXP matval, + SEXP cnames, SEXP rnames); + +/* get the number of rows in the constraint matrix */ +SEXP getNumRows(SEXP env, SEXP lp); + +/* delete a range of rows */ +SEXP delRows(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* delete a set of rows */ +SEXP delSetRows(SEXP env, SEXP lp, SEXP delstat); + +/* add new empty columns to a problem object */ +SEXP newCols(SEXP env, SEXP lp, + SEXP ncols, SEXP obj, SEXP lb, SEXP ub, SEXP xctype, SEXP cnames); + +/* add columns to a specified CPLEX problem object */ +SEXP addCols(SEXP env, SEXP lp, SEXP ncols, SEXP nnz, SEXP objf, + SEXP matbeg, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP cnames); + +/* get the number of columns in the constraint matrix */ +SEXP getNumCols(SEXP env, SEXP lp); + +/* delete a range of columns */ +SEXP delCols(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* deletes a set of columns from a problem object */ +SEXP delSetCols(SEXP env, SEXP lp, SEXP delstat); + +/* change the linear objective coefficients */ +SEXP chgObj(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP val); + +/* get the linear objective coefficients */ +SEXP getObj(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* copy a name for the objective function into a problem object */ +SEXP copyObjName(SEXP env, SEXP lp, SEXP oname); + +/* access the name of the objective row of a problem object */ +SEXP getObjName(SEXP env, SEXP lp); + +/* change a list of matrix coefficients */ +SEXP chgCoefList(SEXP env, SEXP lp, SEXP nnz, SEXP ia, SEXP ja, SEXP ar); + +/* change a single coefficient in the constraint matrix */ +SEXP chgCoef(SEXP env, SEXP lp, SEXP i, SEXP j, SEXP val); + +/* change a single coefficient in the quadratic objective of a quadratic + problem */ +SEXP chgQPcoef(SEXP env, SEXP lp, SEXP i, SEXP j, SEXP val); + +/* change a single coefficient in the constraint matrix */ +SEXP getCoef(SEXP env, SEXP lp, SEXP i, SEXP j); + +/* get the number of non zero elements in the constraint matrix */ +SEXP getNumNnz(SEXP env, SEXP lp); + +/* change the upper or lower bounds on a set of variables of a problem */ +SEXP chgBnds(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP lu, SEXP bd); + +/* change the upper and lower bounds on a set of variables of a problem */ +SEXP chgColsBnds(SEXP env, SEXP lp, SEXP j, SEXP lb, SEXP ub); + +/* change the upper or lower bounds on a set of variables of a problem */ +SEXP tightenBnds(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP lu, SEXP bd); + +/* change type of column (variable) */ +SEXP chgColType(SEXP env, SEXP lp, SEXP ncols, SEXP ind, SEXP xctype); + +/* get the types for a range of variables in a problem object */ +SEXP getColType(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* can be used to copy variable type information into a given problem */ +SEXP copyColType(SEXP env, SEXP lp, SEXP xctype); + +/* get a range of lower bounds */ +SEXP getLowerBnds(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* get a range of upper bounds */ +SEXP getUpperBnds(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* get lower bounds of columns (variables) */ +SEXP getLowBndsIds(SEXP env, SEXP lp, SEXP ind, SEXP ncols); + +/* get upper bounds of columns (variables) */ +SEXP getUppBndsIds(SEXP env, SEXP lp, SEXP ind, SEXP ncols); + +/* change the right hand side coefficients of a set of linear constraints */ +SEXP chgRhs(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP val); + +/* get right hand side */ +SEXP getRhs(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* change the sense of a set of linear constraints */ +SEXP chgSense(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP sense); + +/* get the sense of a set of linear constraints */ +SEXP getSense(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* remove all names that have been previously assigned to rows and columns */ +SEXP delNames(SEXP env, SEXP lp); + +/* change the name of the current problem */ +SEXP chgProbName(SEXP env, SEXP lp, SEXP probname); + +/* accesses the name of the problem */ +SEXP getProbName(SEXP env, SEXP lp); + +/* change the name of a constraint or the name of a variable in a + problem object */ +SEXP chgName(SEXP env, SEXP lp, SEXP key, SEXP ij, SEXP name); + +/* change the names of linear constraints in a problem object */ +SEXP chgRowName(SEXP env, SEXP lp, SEXP nnames, SEXP ind, SEXP names); + +/* change the names of variables in a problem object */ +SEXP chgColName(SEXP env, SEXP lp, SEXP nnames, SEXP ind, SEXP names); + +/* access a range of row names or, equivalently, the constraint names of a + problem object */ +SEXP getRowName(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access a range of column names or, equivalently, the variable names of a */ +/* problem object */ +SEXP getColName(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* search for the index number of the specified column in a problem object */ +SEXP getColIndex(SEXP env, SEXP lp, SEXP cname); + +/* search for the index number of the specified row in a problem object */ +SEXP getRowIndex(SEXP env, SEXP lp, SEXP rname); + +/* change the right hand side coefficients of a set of linear constraints */ +SEXP chgRngVal(SEXP env, SEXP lp, SEXP nrows, SEXP ind, SEXP val); + +/* get rhs range coefficients for a set of constraints */ +SEXP getRngVal(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access a range of rows of the constraint matrix, not including the objective + function nor the bound constraints on the variables of a problem object */ +SEXP getRows(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access a range of columns of the constraint matrix of a problem object */ +SEXP getCols(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* manage modification steps closely */ +SEXP completelp(SEXP env, SEXP lp); + +/* change to zero any problem coefficients that are smaller in magnitude than + the tolerance specified in the argument eps */ +SEXP cleanupCoef(SEXP env, SEXP lp, SEXP eps); + +/* provide starting information for use in a subsequent call + to a simplex optimization routine */ +SEXP copyStart(SEXP env, SEXP lp, + SEXP cstat, SEXP rstat, + SEXP cprim, SEXP rprim, + SEXP cdual, SEXP rdual); + +/* copy a basis into a problem object */ +SEXP copyBase(SEXP env, SEXP lp, SEXP cstat, SEXP rstat); + +/* copy a partial basis into an LP problem object */ +SEXP copyPartBase(SEXP env, SEXP lp, + SEXP ncind, SEXP cind, SEXP cstat, + SEXP nrind, SEXP rind, SEXP rstat); + +/* access the basis resident in a problem object */ +SEXP getBase(SEXP env, SEXP lp); + +/* write the most current basis associated with a problem object to file */ +SEXP baseWrite(SEXP env, SEXP lp, SEXP fname); + +/* read a basis from a BAS file, and copy that basis into a problem object */ +SEXP readCopyBase(SEXP env, SEXP lp, SEXP fname); + +/* solve lp problem (general, use CPX_PARAM_LPMETHOD) */ +SEXP lpopt(SEXP env, SEXP lp); + +/* solve lp problem using primal simplex method */ +SEXP primopt(SEXP env, SEXP lp); + +/* solve lp problem using dual simplex method */ +SEXP dualopt(SEXP env, SEXP lp); + +/* solve lp problem using baropt */ +SEXP baropt(SEXP env, SEXP lp); + +/* solve lp problem using hybbaropt */ +SEXP hybbaropt(SEXP env, SEXP lp, SEXP method); + +/* solve lp problem using hybnetopt */ +SEXP hybnetopt(SEXP env, SEXP lp, SEXP method); + +/* solve lp problem using siftopt */ +SEXP siftopt(SEXP env, SEXP lp); + +/* solve lp problem using mipopt */ +SEXP mipopt(SEXP env, SEXP lp); + +/* solve qp problem using qpopt */ +SEXP qpopt(SEXP env, SEXP lp); + +/* access the MIP cutoff value being used during mixed integer optimization */ +SEXP getCutoff(SEXP env, SEXP lp); + +/* provide two arrays that can be used to project the impact of making changes + to optimal variable values or objective function coefficients */ +SEXP getGrad(SEXP env, SEXP lp, SEXP j); + +/* access the total number of simplex iterations to solve an LP problem, or + the number of crossover iterations in the case that the barrier optimizer + is used */ +SEXP getItCnt(SEXP env, SEXP lp); + +/* access the number of Phase I iterations to solve a problem using the + primal or dual simplex method */ +SEXP getPhase1Cnt(SEXP env, SEXP lp); + +/* access the total number of sifting iterations to solve an LP problem */ +SEXP getSiftItCnt(SEXP env, SEXP lp); + +/* access the number of Phase I sifting iterations to solve an LP problem */ +SEXP getSiftPase1Cnt(SEXP env, SEXP lp); + +/* access the number of dual super-basic variables in the current solution */ +SEXP getDbsCnt(SEXP env, SEXP lp); + +/* computes a minimum-cost relaxation of the righthand side values of + constraints or bounds on variables in order to make an + infeasible problem feasible */ +SEXP feasOpt(SEXP env, SEXP lp, SEXP rhs, SEXP rng, SEXP lb, SEXP ub); + +/* compute the infeasibility of a given solution for a range of variables */ +SEXP getColInfeas(SEXP env, SEXP lp, SEXP sol, SEXP begin, SEXP end); + +/* compute the infeasibility of a given solution for a range of + linear constraints */ +SEXP getRowInfeas(SEXP env, SEXP lp, SEXP sol, SEXP begin, SEXP end); + +/* identify a minimal conflict for the infeasibility of the linear constraints + and the variable bounds in the current problem */ +SEXP refineConflict(SEXP env, SEXP lp); + +/* identify a minimal conflict for the infeasibility of the current problem + or a subset of constraints of the current problem */ +SEXP refineConflictExt(SEXP env, SEXP lp, SEXP grpcnt, SEXP concnt, + SEXP grppref, SEXP grpbeg, SEXP grpind, + SEXP grptype); + +/* return the linear constraints and variables belonging to a conflict + previously computed by the routine CPXrefineconflict */ +SEXP getConflict(SEXP env, SEXP lp); + +/* get conflict status codes of the groups numbered beg (for begin) through end + in the most recent call */ +SEXP getConflictExt(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* write an LP format file containing the identified conflict */ +SEXP cLpWrite(SEXP env, SEXP lp, SEXP fname); + +/* free the presolved problem from the LP problem object */ +SEXP freePresolve(SEXP env, SEXP lp); + +/* return an integer specifying the solution algorithm used to solve the + resident LP, QP, or QCP problem */ +SEXP getMethod(SEXP env, SEXP lp); + +/* access the solution method of the last subproblem optimization, in the case + of an error termination during mixed integer optimization */ +SEXP getSubMethod(SEXP env, SEXP lp); + +/* get double-valued information about the quality of the current + solution of a problem */ +SEXP getDblQual(SEXP env, SEXP lp, SEXP w); + +/* get integer-valued information about the quality of the current + solution of a problem */ +SEXP getIntQual(SEXP env, SEXP lp, SEXP w); + +/* access solution information */ +SEXP solnInfo(SEXP env, SEXP lp); + +/* accesses the solution values produced by all the optimization routines + except the routine CPXNETprimopt */ +SEXP solution(SEXP env, SEXP lp); + +/* write a solution file for the selected problem object */ +SEXP solWrite(SEXP env, SEXP lp, SEXP fname); + +/* read a solution from a SOL format file, and copies that basis or solution + into a problem object */ +SEXP readCopySol(SEXP env, SEXP lp, SEXP fname); + +/* access solution status of optimizations */ +SEXP getStat(SEXP env, SEXP lp); + +/* access the solution status of the last subproblem optimization, in the case + of an error termination during mixed integer optimization */ +SEXP getSubStat(SEXP env, SEXP lp); + +/* get solution objective value */ +SEXP getObjVal(SEXP env, SEXP lp); + +/* access the currently best known bound of all the remaining open nodes + in a branch-and-cut tree */ +SEXP getBestObjVal(SEXP env, SEXP lp); + +/* access the relative objective gap for a MIP optimization */ +SEXP getMIPrelGap(SEXP env, SEXP lp); + +/* get solution values for a range of problem variables */ +SEXP getProbVar(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* get slack values for a range of constraints */ +SEXP getSlack(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* get dual values for a range of constraints */ +SEXP getPi(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access the reduced costs for a range of the variables of a linear + or quadratic program */ +SEXP getDj(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access upper and lower sensitivity ranges for lower and upper variable + bounds for a specified range of variable indices */ +SEXP boundSa(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access upper and lower sensitivity ranges for objective function + coefficients for a specified range of variable indices */ +SEXP objSa(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access upper and lower sensitivity ranges for righthand side values of + a range of constraints */ +SEXP rhsSa(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* open a file */ +SEXP cplexfopen(SEXP fname, SEXP ftype, SEXP ptrtype); + +/* close a file */ +SEXP cplexfclose(SEXP cpfile); + +/* write to file */ +SEXP fileput(SEXP cpfile, SEXP stuff); + +/* modify log file */ +SEXP setLogFile(SEXP env, SEXP cpfile); + +/* access log file */ +SEXP getLogFile(SEXP env, SEXP ptrtype); + +/* obtain pointers to the four default channels */ +SEXP getChannels(SEXP env, SEXP ptrtype); + +/* flush the output buffers of the four standard channels */ +SEXP flushStdChannels(SEXP env); + +/* instantiate a new channel object */ +SEXP addChannel(SEXP env, SEXP ptrtype); + +/* flush all message destinations for a channel, ... */ +SEXP delChannel(SEXP env, SEXP newch); + +/* flush all message destinations associated with a channel */ +SEXP disconnectChannel(SEXP env, SEXP newch); + +/* flush all message destinations associated with a channel */ +SEXP flushChannel(SEXP env, SEXP newch); + +/* add a file to the list of message destinations for a channel */ +SEXP addFpDest(SEXP env, SEXP newch, SEXP cpfile); + +/* remove a file to the list of message destinations for a channel */ +SEXP delFpDest(SEXP env, SEXP newch, SEXP cpfile); + +/* This routine returns a time stamp */ +SEXP getTime(SEXP env); + +/* tune the parameters of the environment for improved optimizer performance on + the specified problem object */ +SEXP tuneParam(SEXP env, SEXP lp, + SEXP nIntP, SEXP intP, SEXP intPv, + SEXP nDblP, SEXP dblP, SEXP dblPv, + SEXP nStrP, SEXP strP, SEXP strPv); + +/* set termination signal */ +SEXP setTerminate(SEXP env, SEXP ptrtype); + +/* release termination signal */ +SEXP delTerminate(SEXP env, SEXP tsig); + +/* change termination signal */ +SEXP chgTerminate(SEXP env, SEXP tval); + +/* print termination signal */ +SEXP printTerminate(SEXP env); + +/* add multiple MIP starts to a CPLEX problem object */ +SEXP addMIPstarts(SEXP env, SEXP lp, SEXP mcnt, SEXP nzcnt, + SEXP beg, SEXP varindices, SEXP values, + SEXP effortlevel, SEXP cmipstartname); + +/* modify or extend multiple MIP starts */ +SEXP chgMIPstarts(SEXP env, SEXP lp, SEXP mcnt, SEXP mipstartindices, + SEXP nzcnt, SEXP beg, SEXP varindices, + SEXP values, SEXP effortlevel); + +/* access a range of MIP starts of a CPLEX problem object */ +SEXP getMIPstarts(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access the number of MIP starts in the CPLEX problem object */ +SEXP getNumMIPstarts(SEXP env, SEXP lp); + +/* delete a range MIP starts */ +SEXP delMIPstarts(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* write a range of MIP starts of a CPLEX problem object to a file + in MST format */ +SEXP writeMIPstarts(SEXP env, SEXP lp, SEXP fname, SEXP begin, SEXP end); + +/* read a file in the format MST and copy the information of all the MIP starts + contained in that file into a CPLEX problem object */ +SEXP readCopyMIPstarts(SEXP env, SEXP lp, SEXP fname); + +/* access a range of names of MIP starts */ +SEXP getMIPstartName(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* search for the index number of the specified MIP start */ +SEXP getMIPstartIndex(SEXP env, SEXP lp, SEXP iname); + +/* refine a conflict in order to determine why a given MIP start is not + feasible */ +SEXP refineMIPstartConflict(SEXP env, SEXP lp, SEXP mipstartindex); + +/* identify a minimal conflict for the infeasibility of the MIP start or a + subset of the constraints in the model */ +SEXP refineMIPstartConflictExt(SEXP env, SEXP lp, SEXP mipstartindex, + SEXP grpcnt, SEXP concnt, SEXP grppref, + SEXP grpbeg, SEXP grpind, SEXP grptype); + +/* return the number of nonzeros in the Q matrix */ +SEXP getNumQPnz(SEXP env, SEXP lp); + +/* return the number of variables that have quadratic objective coefficients */ +SEXP getNumQuad(SEXP env, SEXP lp); + +/* access the quadratic coefficient in the matrix Q */ +SEXP getQPcoef(SEXP env, SEXP lp, SEXP i, SEXP j); + +/* access a range of columns of the matrix Q of a model with a quadratic + objective function */ +SEXP getQuad(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* copy a priority order to a CPLEX problem object */ +SEXP copyOrder(SEXP env, SEXP lp, SEXP cnt, SEXP ind, SEXP prior, SEXP dir); + +/* access all the MIP priority order information */ +SEXP getOrder(SEXP env, SEXP lp); + +/* write a priority order to an ORD file */ +SEXP ordWrite(SEXP env, SEXP lp, SEXP fname); + +/* read ORD file and copy priority order information into a problem object */ +SEXP readCopyOrder(SEXP env, SEXP lp, SEXP fname); + +/* add quadratic constraint to a specified CPLEX problem object */ +SEXP addQConstr(SEXP env, SEXP lp, SEXP lzn, SEXP qzn, + SEXP rhs, SEXP sense, + SEXP lind, SEXP lval, + SEXP qrow, SEXP qcol, SEXP qval, SEXP qname); + +/* delete a range of quadratic constraints */ +SEXP delQConstrs(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access a quadratic constraint on the variables of a problem object */ +SEXP getQConstr(SEXP env, SEXP lp, SEXP which); + +/* add an indicator constraint to the specified problem object */ +SEXP addIndConstr(SEXP env, SEXP lp, SEXP indvar, SEXP complemented, + SEXP nzcnt, SEXP rhs, SEXP sense, SEXP linind, SEXP linval, + SEXP indname); + +/* delete a range of indicator constraints */ +SEXP delIndConstrs(SEXP env, SEXP lp, SEXP begin, SEXP end); + +/* access an indicator constraint on the variables of a problem object */ +SEXP getIndConstr(SEXP env, SEXP lp, SEXP which); diff --git a/src/cplexR.c b/src/cplexR.c new file mode 100644 index 0000000..83e0eae --- /dev/null +++ b/src/cplexR.c @@ -0,0 +1,138 @@ +/* cplexR.c + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplexR.h" + + +SEXP tagCPLEXprob; +SEXP tagCPLEXenv; +SEXP tagCPLEXfile; +SEXP tagCPLEXchannel; +SEXP tagCPLEXtermination; + + +/* -------------------------------------------------------------------------- */ +/* check status of ILOG CPLEX functions */ +/* -------------------------------------------------------------------------- */ + +char errmsg[CPLEXAPIMSGBUFF]; + +void status_message (CPXENVptr env, int status) { + + CPXCCHARptr errorString; + errorString = CPXgeterrorstring(env, status, errmsg); + + if (errorString != NULL) { + REprintf("\n%s\n", errmsg); + } + else { + REprintf("\nCPLEX Error %5d: Unknown error code.\n", status); + } + +} + +/* user messages */ +void user_message (void *handle, char *message) { + + FILE *fl; + fl = (FILE *)handle; + fprintf(fl, "%s\n", message); + +} + + +/* set a status value (SEXP) to class 'cpxerr' */ +void set_to_CPXERR (SEXP stat) { + + SEXP class = R_NilValue; + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("cpxerr")); + Rf_classgets(stat, class); + UNPROTECT(1); + +} + + +/* cplex errors */ +SEXP cpx_error (int errv) { + + SEXP out = R_NilValue; + + PROTECT(out = Rf_allocVector(INTSXP, 1)); + INTEGER(out)[0] = errv; + set_to_CPXERR(out); + + UNPROTECT(1); + + return out; + +} + + +/* cplex return value of a function (integer) */ +SEXP cpx_ret_intval (int value) { + + SEXP out = R_NilValue; + + PROTECT(out = Rf_allocVector(INTSXP, 1)); + INTEGER(out)[0] = value; + UNPROTECT(1); + + return out; + +} + + +/* cplex return value of a function (double) */ +SEXP cpx_ret_dblval (double value) { + + SEXP out = R_NilValue; + + PROTECT(out = Rf_allocVector(REALSXP, 1)); + REAL(out)[0] = value; + UNPROTECT(1); + + return out; + +} + + +/* cplex return value of a function (string) */ +SEXP cpx_ret_strval (const char *value) { + + SEXP out = R_NilValue; + + PROTECT(out = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(out, 0, Rf_mkChar(value)); + UNPROTECT(1); + + return out; + +} + + + + diff --git a/src/cplexR.h b/src/cplexR.h new file mode 100644 index 0000000..6243381 --- /dev/null +++ b/src/cplexR.h @@ -0,0 +1,165 @@ +/* cplexR.h + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include <stdlib.h> + + +/* avoid remapping of Rf_<function> to <function> in R header files */ +#ifndef R_NO_REMAP +#define R_NO_REMAP +#endif /* R_NO_REMAP */ + +/* use strict R headers */ +#ifndef STRICT_R_HEADERS +#define STRICT_R_HEADERS +#endif /* STRICT_R_HEADERS */ + +#include <R.h> +#include <Rinternals.h> + + +/* http://www.stats.ox.ac.uk/~ripley/Win64/W64porting.html */ + +#if defined(WIN64) && !defined(_MSC_VER) +#define CHECK_FOR_WIN64 +#define _MSC_VER +#endif + +#include <ilcplex/cplex.h> + +#ifdef CHECK_FOR_WIN64 +#undef _MSC_VER +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12030000) +# define CPLEXAPIMSGBUFF CPXMESSAGEBUFSIZE +#else +# define CPLEXAPIMSGBUFF 4096 +#endif + + +/* -------------------------------------------------------------------------- */ +/* NULL */ +#define checkIfNil(cp) do { \ + if (R_ExternalPtrAddr(cp) == NULL) \ + Rf_error("You passed a nil value!"); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* problem */ +#define checkTypeOfProb(cp) do { \ + if ( (TYPEOF(cp) != EXTPTRSXP) || (R_ExternalPtrTag(cp) != tagCPLEXprob) ) \ + Rf_error("You must pass a pointer to an ILOG CPLEX problem!"); \ +} while (0) + +#define checkProb(p) do { \ + checkIfNil(p); \ + checkTypeOfProb(p); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* environment */ +#define checkTypeOfEnv(ce) do { \ + if ( (TYPEOF(ce) != EXTPTRSXP) || (R_ExternalPtrTag(ce) != tagCPLEXenv) ) \ + Rf_error("You must pass a pointer to an ILOG CPLEX environment!"); \ +} while (0) + +#define checkEnv(e) do { \ + checkIfNil(e); \ + checkTypeOfEnv(e); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* file */ +#define checkTypeOfFile(fl) do { \ + if ( (TYPEOF(fl) != EXTPTRSXP) || (R_ExternalPtrTag(fl) != tagCPLEXfile) ) \ + Rf_error("You must pass a pointer to an ILOG CPLEX file!"); \ +} while (0) + +#define checkFile(f) do { \ + checkIfNil(f); \ + checkTypeOfFile(f); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* channel */ +#define checkTypeOfChannel(ch) do { \ + if ( (TYPEOF(ch) != EXTPTRSXP) || \ + (R_ExternalPtrTag(ch) != tagCPLEXchannel) ) \ + Rf_error("You must pass a pointer to an ILOG CPLEX channel!"); \ +} while (0) + +#define checkChannel(h) do { \ + checkIfNil(h); \ + checkTypeOfChannel(h); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* termination signal */ +#define checkTypeOfTermination(te) do { \ + if ( (TYPEOF(te) != EXTPTRSXP) || \ + (R_ExternalPtrTag(te) != tagCPLEXtermination) ) \ + Rf_error("You must pass a pointer to a termination signal!"); \ +} while (0) + +#define checkTermination(ter) do { \ + checkIfNil(ter); \ + checkTypeOfTermination(ter); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* check status of ILOG CPLEX functions */ +void status_message(CPXENVptr env, int status); + +/* user messages */ +void user_message (void *handle, char *message); + +/* set a status value (SEXP) to class 'cpxerr' */ +void set_to_CPXERR (SEXP stat); + +/* cplex errors */ +SEXP cpx_error (int errv); + +/* cplex return value of a function (integer) */ +SEXP cpx_ret_intval (int value); + +/* cplex return value of a function (double) */ +SEXP cpx_ret_dblval (double value); + +/* cplex return value of a function (string) */ +SEXP cpx_ret_strval (const char *value); + + diff --git a/src/cplex_checkAPI.c b/src/cplex_checkAPI.c new file mode 100644 index 0000000..196cc44 --- /dev/null +++ b/src/cplex_checkAPI.c @@ -0,0 +1,459 @@ +/* cplex_checkAPI.c + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplex_checkAPI.h" + + +int chkstat = 0; + + +/* -------------------------------------------------------------------------- */ +/* diagnostic routines for debugging */ +/* -------------------------------------------------------------------------- */ + +#ifdef USE_CHECK + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXcopylp routine */ +SEXP checkCopyLp(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval) { + + SEXP out = R_NilValue; + + const double *robjf = REAL(objf); + const double *rrhs = REAL(rhs); + const char *rsense = CHAR(STRING_ELT(sense, 0)); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatcnt = INTEGER(matcnt); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb = REAL(lb); + const double *rub = REAL(ub); + const double *rrngval; + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + if (rngval == R_NilValue) { + rrngval = NULL; + } + else { + rrngval = REAL(rngval); + } + + chkstat = CPXcheckcopylp(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nCols), Rf_asInteger(nRows), + Rf_asInteger(lpdir), robjf, rrhs, rsense, + rmatbeg, rmatcnt, rmatind, rmatval, + rlb, rub, rrngval + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXcopylpwnames routine */ +SEXP checkCopyLpwNames(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval, + SEXP cnames, SEXP rnames) { + + SEXP out = R_NilValue; + + int k, numcn, numrn; + const double *robjf = REAL(objf); + const double *rrhs = REAL(rhs); + const char *rsense = CHAR(STRING_ELT(sense, 0)); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatcnt = INTEGER(matcnt); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb = REAL(lb); + const double *rub = REAL(ub); + const double *rrngval; + const char **rcnames; + const char ** rrnames; + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + if (rngval == R_NilValue) { + rrngval = NULL; + } + else { + rrngval = REAL(rngval); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + numcn = Rf_length(cnames); + rcnames = R_Calloc(numcn, const char *); + for (k = 0; k < numcn; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + if (rnames == R_NilValue) { + rrnames = NULL; + } + else { + numrn = Rf_length(rnames); + rrnames = R_Calloc(numrn, const char *); + for (k = 0; k < numrn; k++) { + rrnames[k] = CHAR(STRING_ELT(rnames, k)); + } + } + + chkstat = CPXcheckcopylpwnames(R_ExternalPtrAddr(env), + R_ExternalPtrAddr(lp), + Rf_asInteger(nCols), Rf_asInteger(nRows), + Rf_asInteger(lpdir), robjf, rrhs, rsense, + rmatbeg, rmatcnt, rmatind, rmatval, + rlb, rub, rrngval, + (char **) rcnames, (char **) rrnames + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + if (rnames != R_NilValue) { + R_Free(rrnames); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXcopyquad routine */ +SEXP checkCopyQuad(SEXP env, SEXP lp, + SEXP qmatbeg, SEXP qmatcnt, SEXP qmatind, SEXP qmatval) { + + SEXP out = R_NilValue; + + const int *rqmatbeg = INTEGER(qmatbeg); + const int *rqmatcnt = INTEGER(qmatcnt); + const int *rqmatind = INTEGER(qmatind); + const double *rqmatval = REAL(qmatval); + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + chkstat = CPXcheckcopyquad(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rqmatbeg, rqmatcnt, rqmatind, rqmatval + ); + + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXcopyqpsep routine */ +SEXP checkCopyQPsep(SEXP env, SEXP lp, SEXP qsepvec) { + + SEXP out = R_NilValue; + + const double *rqsepvec = REAL(qsepvec); + + checkEnv(env); + checkProb(lp); + + chkstat = CPXcheckcopyqpsep(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rqsepvec + ); + + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXaddrows routine */ +SEXP checkAddRows(SEXP env, SEXP lp, SEXP ncols, SEXP nrows, SEXP nnz, + SEXP rhs, SEXP sense, SEXP matbeg, SEXP matind, SEXP matval, + SEXP cnames, SEXP rnames) { + + SEXP out = R_NilValue; + + int k, numcn, numrn; + const int *rmatbeg = INTEGER(matbeg); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rrhs; + const char *rsense; + const char **rcnames; + const char **rrnames; + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + if (rhs == R_NilValue) { + rrhs = NULL; + } + else { + rrhs = REAL(rhs); + } + + if (sense == R_NilValue) { + rsense = NULL; + } + else { + rsense = CHAR(STRING_ELT(sense, 0)); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + numcn = Rf_length(cnames); + rcnames = R_Calloc(numcn, const char *); + for (k = 0; k < numcn; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + if (rnames == R_NilValue) { + rrnames = NULL; + } + else { + numrn = Rf_length(rnames); + rrnames = R_Calloc(numrn, const char *); + for (k = 0; k < numrn; k++) { + rrnames[k] = CHAR(STRING_ELT(rnames, k)); + } + } + + chkstat = CPXcheckaddrows(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), Rf_asInteger(nrows), + Rf_asInteger(nnz), rrhs, rsense, + rmatbeg, rmatind, rmatval, + (char **) rcnames, (char **) rrnames + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + if (rnames != R_NilValue) { + R_Free(rrnames); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXaddcols routine */ +SEXP checkAddCols(SEXP env, SEXP lp, SEXP ncols, SEXP nnz, SEXP objf, + SEXP matbeg, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP cnames) { + + SEXP out = R_NilValue; + + int k, nnames; + const double *robjf = REAL(objf); + const int *rmatbeg = INTEGER(matbeg); + const int *rmatind = INTEGER(matind); + const double *rmatval = REAL(matval); + const double *rlb, *rub; + const char **rcnames; + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + if (lb == R_NilValue) { + rlb = NULL; + } + else { + rlb = REAL(lb); + } + + if (ub == R_NilValue) { + rub = NULL; + } + else { + rub = REAL(ub); + } + + if (cnames == R_NilValue) { + rcnames = NULL; + } + else { + nnames = Rf_length(cnames); + rcnames = R_Calloc(nnames, const char *); + for (k = 0; k < nnames; k++) { + rcnames[k] = CHAR(STRING_ELT(cnames, k)); + } + } + + chkstat = CPXcheckaddcols(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(ncols), Rf_asInteger(nnz), + robjf, rmatbeg, rmatind, rmatval, + rlb, rub, (char **) rcnames + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + if (cnames != R_NilValue) { + R_Free(rcnames); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXchgcoeflist routine */ +SEXP checkChgCoefList(SEXP env, SEXP lp, SEXP nnz, SEXP ia, SEXP ja, SEXP ra) { + + SEXP out = R_NilValue; + + const int *ria = INTEGER(ia); + const int *rja = INTEGER(ja); + const double *rra = REAL(ra); + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + chkstat = CPXcheckchgcoeflist(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nnz), ria, rja, rra + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate the arguments of the corresponding CPXcopyctype routine */ +SEXP checkCopyColType(SEXP env, SEXP lp, SEXP xctype) { + + SEXP out = R_NilValue; + + const char *rxctype = CHAR(STRING_ELT(xctype, 0)); + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + chkstat = CPXcheckcopyctype(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + rxctype + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* check an array of indices and a corresponding array of values + for input errors */ +SEXP checkVals(SEXP env, SEXP lp, SEXP nval, SEXP rind, SEXP cind, SEXP val) { + + SEXP out = R_NilValue; + + const int *rrind; + const int *rcind; + const double *rval; + + checkTypeOfEnv(env); + checkTypeOfProb(lp); + + if (rind == R_NilValue) { + rrind = NULL; + } + else { + rrind = INTEGER(rind); + } + + if (cind == R_NilValue) { + rcind = NULL; + } + else { + rcind = INTEGER(cind); + } + + if (val == R_NilValue) { + rval = NULL; + } + else { + rval = REAL(val); + } + + chkstat = CPXcheckvals(R_ExternalPtrAddr(env), R_ExternalPtrAddr(lp), + Rf_asInteger(nval), rrind, rcind, rval + ); + if (chkstat != 0) { + status_message(R_ExternalPtrAddr(env), chkstat); + } + + out = Rf_ScalarInteger(chkstat); + + return out; +} + +#endif + diff --git a/src/cplex_checkAPI.h b/src/cplex_checkAPI.h new file mode 100644 index 0000000..9cec72a --- /dev/null +++ b/src/cplex_checkAPI.h @@ -0,0 +1,83 @@ +/* cplex_checkAPI.h + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplexR.h" + + +extern SEXP tagCPLEXprob; +extern SEXP tagCPLEXenv; + + +/* -------------------------------------------------------------------------- */ +/* diagnostic routines for debugging */ +/* -------------------------------------------------------------------------- */ + +#ifdef USE_CHECK + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12030000) +# include <ilcplex/cplexcheck.h> +#endif + +/* validate the arguments of the corresponding CPXcopylp routine */ +SEXP checkCopyLp(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval); + +/* validate the arguments of the corresponding CPXcopylpwnames routine */ +SEXP checkCopyLpwNames(SEXP env, SEXP lp, SEXP nCols, SEXP nRows, SEXP lpdir, + SEXP objf, SEXP rhs, SEXP sense, + SEXP matbeg, SEXP matcnt, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP rngval, + SEXP cnames, SEXP rnames); + +/* validate the arguments of the corresponding CPXcopyquad routine */ +SEXP checkCopyQuad(SEXP env, SEXP lp, + SEXP qmatbeg, SEXP qmatcnt, SEXP qmatind, SEXP qmatval); + +/* validate the arguments of the corresponding CPXcopyqpsep routine */ +SEXP checkCopyQPsep(SEXP env, SEXP lp, SEXP qsepvec); + +/* validate the arguments of the corresponding CPXaddrows routine */ +SEXP checkAddRows(SEXP env, SEXP lp, SEXP ncols, SEXP nrows, SEXP nnz, + SEXP rhs, SEXP sense, SEXP matbeg, SEXP matind, SEXP matval, + SEXP cnames, SEXP rnames); + +/* validate the arguments of the corresponding CPXaddcols routine */ +SEXP checkAddCols(SEXP env, SEXP lp, SEXP ncols, SEXP nnz, SEXP objf, + SEXP matbeg, SEXP matind, SEXP matval, + SEXP lb, SEXP ub, SEXP cnames); + +/* validate the arguments of the corresponding CPXchgcoeflist routine */ +SEXP checkChgCoefList(SEXP env, SEXP lp, SEXP nnz, SEXP ia, SEXP ja, SEXP ar); + +/* validate the arguments of the corresponding CPXcopyctype routine */ +SEXP checkCopyColType(SEXP env, SEXP lp, SEXP xctype); + +/* check an array of indices and a corresponding array of values + for input errors */ +SEXP checkVals(SEXP env, SEXP lp, SEXP nval, SEXP rind, SEXP cind, SEXP val); + +#endif diff --git a/src/cplex_longparamAPI.c b/src/cplex_longparamAPI.c new file mode 100644 index 0000000..c512eda --- /dev/null +++ b/src/cplex_longparamAPI.c @@ -0,0 +1,131 @@ +/* cplex_longparamAPI.c + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplex_longparamAPI.h" + +int longsstat = 0; + +/* -------------------------------------------------------------------------- */ +/* routines handling paramters of type CPX_PARAMTYPE_LONG (new in 12.3.0.0) */ +/* -------------------------------------------------------------------------- */ + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12030000) + +/* -------------------------------------------------------------------------- */ +/* set CPLEX paramters of type CPXLONG */ +SEXP setLongParm(SEXP env, SEXP parm, SEXP value) { + + SEXP out = R_NilValue; + + checkTypeOfEnv(env); + + /* + longsstat = CPXsetlongparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + (CPXLONG) Rf_asInteger(value) + ); + */ + longsstat = CPXsetlongparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + (CPXLONG) Rf_asReal(value) + ); + + if (longsstat != 0) { + status_message(R_ExternalPtrAddr(env), longsstat); + } + + out = Rf_ScalarInteger(longsstat); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get CPLEX paramters of type CPXLONG */ +SEXP getLongParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + CPXLONG value; + + checkTypeOfEnv(env); + + longsstat = CPXgetlongparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + &value + ); + if (longsstat != 0) { + status_message(R_ExternalPtrAddr(env), longsstat); + out = cpx_error(longsstat); + } + else { + /* out = Rf_ScalarInteger( (int) value ); */ + out = Rf_ScalarReal( (double) value ); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get the default value and range of a CPLEX prarmeter of type CPXLONG */ +SEXP getInfoLongParm(SEXP env, SEXP parm) { + + SEXP out = R_NilValue; + SEXP listv = R_NilValue; + + CPXLONG defval, minval, maxval; + + checkTypeOfEnv(env); + + longsstat = CPXinfolongparam(R_ExternalPtrAddr(env), Rf_asInteger(parm), + &defval, &minval, &maxval + ); + if (longsstat != 0) { + status_message(R_ExternalPtrAddr(env), longsstat); + out = cpx_error(longsstat); + } + else { + PROTECT(out = Rf_allocVector(VECSXP, 3)); + /* + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger( (int) defval) ); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger( (int) minval) ); + SET_VECTOR_ELT(out, 2, Rf_ScalarInteger( (int) maxval) ); + */ + SET_VECTOR_ELT(out, 0, Rf_ScalarReal( (double) defval) ); + SET_VECTOR_ELT(out, 1, Rf_ScalarReal( (double) minval) ); + SET_VECTOR_ELT(out, 2, Rf_ScalarReal( (double) maxval) ); + + PROTECT(listv = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listv, 0, Rf_mkChar("defvalue")); + SET_STRING_ELT(listv, 1, Rf_mkChar("minvalue")); + SET_STRING_ELT(listv, 2, Rf_mkChar("maxvalue")); + Rf_setAttrib(out, R_NamesSymbol, listv); + + UNPROTECT(2); + } + + return out; +} + + +#endif + diff --git a/src/cplex_longparamAPI.h b/src/cplex_longparamAPI.h new file mode 100644 index 0000000..ea419c4 --- /dev/null +++ b/src/cplex_longparamAPI.h @@ -0,0 +1,48 @@ +/* cplex_longparamAPI.h + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "cplexR.h" + + +extern SEXP tagCPLEXprob; +extern SEXP tagCPLEXenv; + + +/* -------------------------------------------------------------------------- */ +/* routines handling paramters of type CPX_PARAMTYPE_LONG (new in 12.3.0.0) */ +/* -------------------------------------------------------------------------- */ + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12030000) + +/* set CPLEX paramters of type CPXLONG */ +SEXP setLongParm(SEXP env, SEXP parm, SEXP value); + +/* get CPLEX paramters of type CPXLONG */ +SEXP getLongParm(SEXP env, SEXP parm); + +/* get the default value and range of a CPLEX prarmeter of type CPXLONG */ +SEXP getInfoLongParm(SEXP env, SEXP parm); + +#endif diff --git a/src/init.c b/src/init.c new file mode 100644 index 0000000..daddb10 --- /dev/null +++ b/src/init.c @@ -0,0 +1,266 @@ +/* init.c + R Interface to C API of IBM ILOG CPLEX Version 12.1 to 12.6. + + Copyright (C) 2011-2014 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of cplexAPI. + + CplexAPI 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. + + CplexAPI 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 cplexAPI. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <R.h> +#include <Rinternals.h> + +#include "cplexAPI.h" +#include "cplex_checkAPI.h" +#include "cplex_longparamAPI.h" + +#include <R_ext/Rdynload.h> + + +static const R_CallMethodDef callMethods[] = { + {"isCPLEXprobPtr", (DL_FUNC) &isCPLEXprobPtr, 1}, + {"isCPLEXenvPtr", (DL_FUNC) &isCPLEXenvPtr, 1}, + {"isCPLEXfilePtr", (DL_FUNC) &isCPLEXfilePtr, 1}, + {"isCPLEXchanPtr", (DL_FUNC) &isCPLEXchanPtr, 1}, + {"isCPLEXtermPtr", (DL_FUNC) &isCPLEXtermPtr, 1}, + {"isNULLptr", (DL_FUNC) &isNULLptr, 1}, + {"initCPLEX", (DL_FUNC) &initCPLEX, 0}, + {"getErrorStr", (DL_FUNC) &getErrorStr, 2}, + {"getStatStr", (DL_FUNC) &getStatStr, 2}, + {"closeEnv", (DL_FUNC) &closeEnv, 1}, + {"openEnv", (DL_FUNC) &openEnv, 1}, + {"delProb", (DL_FUNC) &delProb, 2}, + {"initProb", (DL_FUNC) &initProb, 3}, + {"cloneProb", (DL_FUNC) &cloneProb, 3}, + {"getProbType", (DL_FUNC) &getProbType, 2}, + {"chgProbType", (DL_FUNC) &chgProbType, 3}, + {"getVersion", (DL_FUNC) &getVersion, 1}, + {"setDefaultParm", (DL_FUNC) &setDefaultParm, 1}, + {"setIntParm", (DL_FUNC) &setIntParm, 3}, + {"getIntParm", (DL_FUNC) &getIntParm, 2}, + {"getInfoIntParm", (DL_FUNC) &getInfoIntParm, 2}, + {"setDblParm", (DL_FUNC) &setDblParm, 3}, + {"getDblParm", (DL_FUNC) &getDblParm, 2}, + {"getInfoDblParm", (DL_FUNC) &getInfoDblParm, 2}, + {"setStrParm", (DL_FUNC) &setStrParm, 3}, + {"getStrParm", (DL_FUNC) &getStrParm, 2}, + {"getInfoStrParm", (DL_FUNC) &getInfoStrParm, 2}, + {"getParmName", (DL_FUNC) &getParmName, 2}, + {"getParmNum", (DL_FUNC) &getParmNum, 2}, + {"readCopyParm", (DL_FUNC) &readCopyParm, 2}, + {"writeParm", (DL_FUNC) &writeParm, 2}, + {"getParmType", (DL_FUNC) &getParmType, 2}, + {"getChgParm", (DL_FUNC) &getChgParm, 1}, + {"setObjDir", (DL_FUNC) &setObjDir, 3}, + {"getObjDir", (DL_FUNC) &getObjDir, 2}, + {"copyLp", (DL_FUNC) ©Lp, 15}, + {"copyLpwNames", (DL_FUNC) ©LpwNames, 17}, + {"copyQuad", (DL_FUNC) ©Quad, 6}, + {"copyQPsep", (DL_FUNC) ©QPsep, 3}, + {"writeProb", (DL_FUNC) &writeProb, 4}, + {"readCopyProb", (DL_FUNC) &readCopyProb, 4}, + {"dualWrite", (DL_FUNC) &dualWrite, 3}, + {"presolve", (DL_FUNC) &presolve, 3}, + {"getPreStat", (DL_FUNC) &getPreStat, 2}, + {"basicPresolve", (DL_FUNC) &basicPresolve, 2}, + {"preslvWrite", (DL_FUNC) &preslvWrite, 3}, + {"getRedLp", (DL_FUNC) &getRedLp, 3}, + {"getObjOffset", (DL_FUNC) &getObjOffset, 2}, + {"unscaleProb", (DL_FUNC) &unscaleProb, 2}, + {"newRows", (DL_FUNC) &newRows, 7}, + {"addRows", (DL_FUNC) &addRows, 12}, + {"getNumRows", (DL_FUNC) &getNumRows, 2}, + {"delRows", (DL_FUNC) &delRows, 4}, + {"delSetRows", (DL_FUNC) &delSetRows, 3}, + {"newCols", (DL_FUNC) &newCols, 8}, + {"addCols", (DL_FUNC) &addCols, 11}, + {"getNumCols", (DL_FUNC) &getNumCols, 2}, + {"delCols", (DL_FUNC) &delCols, 4}, + {"delSetCols", (DL_FUNC) &delSetCols, 3}, + {"chgObj", (DL_FUNC) &chgObj, 5}, + {"getObj", (DL_FUNC) &getObj, 4}, + {"copyObjName", (DL_FUNC) ©ObjName, 3}, + {"getObjName", (DL_FUNC) &getObjName, 2}, + {"chgCoefList", (DL_FUNC) &chgCoefList, 6}, + {"chgCoef", (DL_FUNC) &chgCoef, 5}, + {"chgQPcoef", (DL_FUNC) &chgQPcoef, 5}, + {"getCoef", (DL_FUNC) &getCoef, 4}, + {"getNumNnz", (DL_FUNC) &getNumNnz, 2}, + {"chgBnds", (DL_FUNC) &chgBnds, 6}, + {"chgColsBnds", (DL_FUNC) &chgColsBnds, 5}, + {"tightenBnds", (DL_FUNC) &tightenBnds, 6}, + {"chgColType", (DL_FUNC) &chgColType, 5}, + {"getColType", (DL_FUNC) &getColType, 4}, + {"copyColType", (DL_FUNC) ©ColType, 3}, + {"getLowerBnds", (DL_FUNC) &getLowerBnds, 4}, + {"getUpperBnds", (DL_FUNC) &getUpperBnds, 4}, + {"getLowBndsIds", (DL_FUNC) &getLowBndsIds, 4}, + {"getUppBndsIds", (DL_FUNC) &getUppBndsIds, 4}, + {"chgRhs", (DL_FUNC) &chgRhs, 5}, + {"getRhs", (DL_FUNC) &getRhs, 4}, + {"chgSense", (DL_FUNC) &chgSense, 5}, + {"getSense", (DL_FUNC) &getSense, 4}, + {"delNames", (DL_FUNC) &delNames, 2}, + {"chgProbName", (DL_FUNC) &chgProbName, 3}, + {"getProbName", (DL_FUNC) &getProbName, 2}, + {"chgName", (DL_FUNC) &chgName, 5}, + {"chgRowName", (DL_FUNC) &chgRowName, 5}, + {"chgColName", (DL_FUNC) &chgColName, 5}, + {"getRowName", (DL_FUNC) &getRowName, 4}, + {"getColName", (DL_FUNC) &getColName, 4}, + {"getColIndex", (DL_FUNC) &getColIndex, 3}, + {"getRowIndex", (DL_FUNC) &getRowIndex, 3}, + {"chgRngVal", (DL_FUNC) &chgRngVal, 5}, + {"getRngVal", (DL_FUNC) &getRngVal, 4}, + {"getRows", (DL_FUNC) &getRows, 4}, + {"getCols", (DL_FUNC) &getCols, 4}, + {"completelp", (DL_FUNC) &completelp, 2}, + {"cleanupCoef", (DL_FUNC) &cleanupCoef, 3}, + {"copyStart", (DL_FUNC) ©Start, 8}, + {"copyBase", (DL_FUNC) ©Base, 4}, + {"copyPartBase", (DL_FUNC) ©PartBase, 8}, + {"getBase", (DL_FUNC) &getBase, 2}, + {"baseWrite", (DL_FUNC) &baseWrite, 3}, + {"readCopyBase", (DL_FUNC) &readCopyBase, 3}, + {"lpopt", (DL_FUNC) &lpopt, 2}, + {"primopt", (DL_FUNC) &primopt, 2}, + {"dualopt", (DL_FUNC) &dualopt, 2}, + {"baropt", (DL_FUNC) &baropt, 2}, + {"hybbaropt", (DL_FUNC) &hybbaropt, 3}, + {"hybnetopt", (DL_FUNC) &hybnetopt, 3}, + {"siftopt", (DL_FUNC) &siftopt, 2}, + {"mipopt", (DL_FUNC) &mipopt, 2}, + {"qpopt", (DL_FUNC) &qpopt, 2}, + {"getCutoff", (DL_FUNC) &getCutoff, 2}, + {"getGrad", (DL_FUNC) &getGrad, 3}, + {"getItCnt", (DL_FUNC) &getItCnt, 2}, + {"getPhase1Cnt", (DL_FUNC) &getPhase1Cnt, 2}, + {"getSiftItCnt", (DL_FUNC) &getSiftItCnt, 2}, + {"getSiftPase1Cnt", (DL_FUNC) &getSiftPase1Cnt, 2}, + {"getDbsCnt", (DL_FUNC) &getDbsCnt, 2}, + {"feasOpt", (DL_FUNC) &feasOpt, 6}, + {"getColInfeas", (DL_FUNC) &getColInfeas, 5}, + {"getRowInfeas", (DL_FUNC) &getRowInfeas, 5}, + {"refineConflict", (DL_FUNC) &refineConflict, 2}, + {"refineConflictExt", (DL_FUNC) &refineConflictExt, 8}, + {"getConflict", (DL_FUNC) &getConflict, 2}, + {"getConflictExt", (DL_FUNC) &getConflictExt, 4}, + {"cLpWrite", (DL_FUNC) &cLpWrite, 3}, + {"freePresolve", (DL_FUNC) &freePresolve, 2}, + {"getMethod", (DL_FUNC) &getMethod, 2}, + {"getSubMethod", (DL_FUNC) &getSubMethod, 2}, + {"getDblQual", (DL_FUNC) &getDblQual, 3}, + {"getIntQual", (DL_FUNC) &getIntQual, 3}, + {"solnInfo", (DL_FUNC) &solnInfo, 2}, + {"solution", (DL_FUNC) &solution, 2}, + {"solWrite", (DL_FUNC) &solWrite, 3}, + {"readCopySol", (DL_FUNC) &readCopySol, 3}, + {"getStat", (DL_FUNC) &getStat, 2}, + {"getSubStat", (DL_FUNC) &getSubStat, 2}, + {"getObjVal", (DL_FUNC) &getObjVal, 2}, + {"getBestObjVal", (DL_FUNC) &getBestObjVal, 2}, + {"getMIPrelGap", (DL_FUNC) &getMIPrelGap, 2}, + {"getProbVar", (DL_FUNC) &getProbVar, 4}, + {"getSlack", (DL_FUNC) &getSlack, 4}, + {"getPi", (DL_FUNC) &getPi, 4}, + {"getDj", (DL_FUNC) &getDj, 4}, + {"boundSa", (DL_FUNC) &boundSa, 4}, + {"objSa", (DL_FUNC) &objSa, 4}, + {"rhsSa", (DL_FUNC) &rhsSa, 4}, + {"cplexfopen", (DL_FUNC) &cplexfopen, 3}, + {"cplexfclose", (DL_FUNC) &cplexfclose, 1}, + {"fileput", (DL_FUNC) &fileput, 2}, + {"setLogFile", (DL_FUNC) &setLogFile, 2}, + {"getLogFile", (DL_FUNC) &getLogFile, 2}, + {"getChannels", (DL_FUNC) &getChannels, 2}, + {"flushStdChannels", (DL_FUNC) &flushStdChannels, 1}, + {"addChannel", (DL_FUNC) &addChannel, 2}, + {"delChannel", (DL_FUNC) &delChannel, 2}, + {"disconnectChannel", (DL_FUNC) &disconnectChannel, 2}, + {"flushChannel", (DL_FUNC) &flushChannel, 2}, + {"addFpDest", (DL_FUNC) &addFpDest, 3}, + {"delFpDest", (DL_FUNC) &delFpDest, 3}, + {"getTime", (DL_FUNC) &getTime, 1}, + {"tuneParam", (DL_FUNC) &tuneParam, 11}, + {"setTerminate", (DL_FUNC) &setTerminate, 2}, + {"delTerminate", (DL_FUNC) &delTerminate, 2}, + {"chgTerminate", (DL_FUNC) &chgTerminate, 2}, + {"printTerminate", (DL_FUNC) &printTerminate, 1}, + {"addMIPstarts", (DL_FUNC) &addMIPstarts, 9}, + {"chgMIPstarts", (DL_FUNC) &chgMIPstarts, 9}, + {"getMIPstarts", (DL_FUNC) &getMIPstarts, 4}, + {"getNumMIPstarts", (DL_FUNC) &getNumMIPstarts, 2}, + {"delMIPstarts", (DL_FUNC) &delMIPstarts, 4}, + {"writeMIPstarts", (DL_FUNC) &writeMIPstarts, 5}, + {"readCopyMIPstarts", (DL_FUNC) &readCopyMIPstarts, 3}, + {"getMIPstartName", (DL_FUNC) &getMIPstartName, 4}, + {"getMIPstartIndex", (DL_FUNC) &getMIPstartIndex, 3}, + {"refineMIPstartConflict", (DL_FUNC) &refineMIPstartConflict, 3}, + {"refineMIPstartConflictExt", (DL_FUNC) &refineMIPstartConflictExt, 9}, + {"getNumQPnz", (DL_FUNC) &getNumQPnz, 2}, + {"getNumQuad", (DL_FUNC) &getNumQuad, 2}, + {"getQPcoef", (DL_FUNC) &getQPcoef, 4}, + {"getQuad", (DL_FUNC) &getQuad, 4}, + {"copyOrder", (DL_FUNC) ©Order, 6}, + {"getOrder", (DL_FUNC) &getOrder, 2}, + {"ordWrite", (DL_FUNC) &ordWrite, 3}, + {"readCopyOrder", (DL_FUNC) &readCopyOrder, 3}, + {"addQConstr", (DL_FUNC) &addQConstr, 12}, + {"delQConstrs", (DL_FUNC) &delQConstrs, 4}, + {"getQConstr", (DL_FUNC) &getQConstr, 3}, + {"addIndConstr", (DL_FUNC) &addIndConstr, 10}, + {"delIndConstrs", (DL_FUNC) &delIndConstrs, 4}, + {"getIndConstr", (DL_FUNC) &getIndConstr, 3}, + +/* -------------------------------------------------------------------------- */ +/* check */ +/* -------------------------------------------------------------------------- */ +#ifdef USE_CHECK + {"checkCopyLp", (DL_FUNC) &checkCopyLp, 15}, + {"checkCopyLpwNames", (DL_FUNC) &checkCopyLpwNames, 17}, + {"checkCopyQuad", (DL_FUNC) &checkCopyQuad, 6}, + {"checkCopyQPsep", (DL_FUNC) &checkCopyQPsep, 3}, + {"checkAddRows", (DL_FUNC) &checkAddRows, 12}, + {"checkAddCols", (DL_FUNC) &checkAddCols, 11}, + {"checkChgCoefList", (DL_FUNC) &checkChgCoefList, 6}, + {"checkCopyColType", (DL_FUNC) &checkCopyColType, 3}, + {"checkVals", (DL_FUNC) &checkVals, 6}, +#endif + +/* -------------------------------------------------------------------------- */ +/* longparam */ +/* -------------------------------------------------------------------------- */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12030000) + {"setLongParm", (DL_FUNC) &setLongParm, 3}, + {"getLongParm", (DL_FUNC) &getLongParm, 2}, + {"getInfoLongParm", (DL_FUNC) &getInfoLongParm, 2}, +#endif + {NULL, NULL, 0} +}; + + +/* -------------------------------------------------------------------------- */ + +void R_init_cplexAPI(DllInfo *info) { + R_registerRoutines(info, NULL, callMethods, NULL, NULL); + R_useDynamicSymbols(info, FALSE); +} + + + + diff --git a/vignettes/cplexAPI.Rnw b/vignettes/cplexAPI.Rnw new file mode 100644 index 0000000..68d9c86 --- /dev/null +++ b/vignettes/cplexAPI.Rnw @@ -0,0 +1,362 @@ +\documentclass[a4paper,headings=small]{scrartcl} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\usepackage{textcomp,lmodern} +\typearea[current]{last} +\usepackage{fixltx2e,mparhack,mathdots} + +\usepackage{natbib} +\usepackage{hyperref} +\bibliographystyle{abbrvnat} + +\usepackage{microtype} + +\newcommand{\Comp}[1]{\texttt{#1}} + +\addtolength{\skip\footins}{0.5\baselineskip} + +\usepackage{fnpos} + + +\hypersetup{ + pdftitle = {cplexAPI -- Quick Start}, + pdfauthor = {Gabriel Gelius-Dietrich}, + pdfsubject = {R Interface to C API of IBM ILOG CPLEX}, + pdfkeywords = {Optimization, IBM ILOG CPLEX}, + pdfborder = {0 0 0}, + pdfhighlight = {/N} +} + + +\newcommand{\pkg}[1]{\emph{#1}} +\newcommand{\pkgname}{\pkg{cplexAPI}} +\newcommand{\prgname}[1]{\textsc{#1}} + +% \newcommand{\cplex}{IBM\textregistered{} % +% ILOG\textregistered{} CPLEX\textregistered{}% +% } +\newcommand{\cplex}{IBM ILOG CPLEX} + + +\begin{document} + +\title{cplexAPI -- Quick Start} +%\VignetteIndexEntry{Package cplexAPI -- Quick Start} +\author{Gabriel Gelius-Dietrich} + +\maketitle + +\section{Introduction} +The package \pkgname{} provides a low level interface to the C~API of +\prgname{\cplex}\footnote{\cplex{} version $\geq 12.1$ from +the IBM Academic Ini\-tia\-tive + +\url{https://www.ibm.com/developerworks/university/academicinitiative/}}. +The package \pkgname{} requires a working installation of \prgname{\cplex}. + +\section{Installation} +The package \pkgname{} depends on a working installation of \prgname{\cplex}. +See \Comp{INSTALL} for installation instructions and platform specific details. + +\section{Usage} +\noindent +At first, load the library. +<<>>= +library(cplexAPI) +@ + +\subsection{Creating and solving a linear optimization problem} + +In the following, an example linear programming problem will be created and +solved: +\vspace{1em} + +\noindent +\hspace{.5in} maximize +\[ +z = 5 x_1 + 4 x_2 + 3 x_3 +\] +\hspace{.5in} subject to +\[ +\begin{array}{r@{\:}c@{\:}r@{\:}c@{\:}r@{\:}c@{\:}r} +2 x_1 &+& 3 x_2 &+& x_3 & \leq & 5 \\ +4 x_1 &+& x_2 &+& 2 x_3 & \leq &11 \\ +3 x_1 &+& 4 x_2 &+& 2 x_3 & \leq & 8 \\ +\end{array} +\] +With all variables being non-negative. + +\newpage +\noindent +Open a \prgname{\cplex{}} environment. +<<>>= +env <- openEnvCPLEX() +@ +Create a problem object. +<<>>= +prob <- initProbCPLEX(env) +@ +Assign a name to the problem object. +<<>>= +chgProbNameCPLEX(env, prob, "sample") +@ +Prepare data structures for the problem object. +Number of columns and rows. +<<>>= +nc <- 3 +nr <- 3 +@ +Objective function. +<<>>= +obj <- c(5, 4, 3) +@ +Right hand side. +<<>>= +rhs <- c(5, 11, 8) +@ +Sense of the right hand side. +<<>>= +sense <- rep("L", 3) +@ +Variable lower bounds. +<<>>= +lb <- rep(0, 3) +@ +Variable upper bounds. +<<>>= +ub <- rep(CPX_INFBOUND, 3) +@ +Column and row names. +<<>>= +cn <- c("x1", "x2", "x3") +rn <- c("q1", "q2", "q3") +@ +The constraint matrix is passed in column major order format. \textbf{Be +careful here:} all indices start with 0! Begin indices of rows. +<<>>= +beg <- c(0, 3, 6) +@ +Number of non-zero elements per row. +<<>>= +cnt <- rep(3, 3) +@ +Column indices. +<<>>= +ind <- c(0, 1, 2, 0, 1, 2, 0, 1, 2) +@ +Non-zero elements. +<<>>= +val <- c(2, 4, 3, 3, 1, 4, 1, 2, 2) +@ +Load problem data. +<<>>= +copyLpwNamesCPLEX(env, prob, nc, nr, CPX_MAX, obj, rhs, sense, + beg, cnt, ind, val, lb, ub, NULL, cn, rn) +@ +Solve the problem using the simplex algorithm. +<<>>= +lpoptCPLEX(env, prob) +@ +Retrieve solution after optimization. +<<>>= +solutionCPLEX(env, prob) +@ +Write the problem to file \texttt{prob.lp} in lp format. +<<>>= +writeProbCPLEX(env, prob, "prob.lp") +@ +Read problem from file \texttt{prob.lp} in lp format. +<<>>= +lp <- initProbCPLEX(env) +readCopyProbCPLEX(env, lp, "prob.lp") +@ +Free memory, allacated to the problem object. +<<>>= +delProbCPLEX(env, prob) +@ +Close \prgname{\cplex{}} environment. +<<>>= +closeEnvCPLEX(env) +@ + +\subsection{Creating and solving a mixed integer programming (MIP) problem} + +In the following, an example MIP will be created and solved: +\footnote{Taken from \prgname{\cplex{}} example file \texttt{mipex1.c}.} +\vspace{1em} + +\noindent +\hspace{.5in} maximize +\[ +z = x_1 + 2 x_2 + 3 x_3 + x_4 +\] +\hspace{.5in} subject to +\[ +\begin{array}{r@{\:}c@{\:}r@{\:}c@{\:}r@{\:}c@{\:}r@{\:}c@{\:}r} +- x_1 &+& x_2 &+& x_3 &+& 10 x_4 & \leq & 20 \\ + x_1 &-& 3 x_2 &+& x_3 & & & \leq & 30 \\ + & & x_2 & & &-& 3.5 x_4 & = & 0 \\ +\end{array} +\] +With all variables being non-negative, $x_1 \leq 40$ and +$x_4 \in \{2, 3, 4\}$ ($x_4$ is integer). + +\vspace{1em} +\noindent +Open a \prgname{\cplex{}} environment. +<<>>= +env <- openEnvCPLEX() +@ +Create a problem object. +<<>>= +prob <- initProbCPLEX(env, pname = "example") +@ +Prepare data structures for the problem object. +Number of columns, rows and non-zero elements. +<<>>= +nc <- 4 +nr <- 3 +nz <- 9 +@ +Objective function. +<<>>= +obj <- c(1.0, 2.0, 3.0, 1.0) +@ +Right hand side. +<<>>= +rhs <- c(20.0, 30.0, 0.0) +@ +Sense of the right hand side. +<<>>= +sense <- c("L", "L", "E") +@ +Vatiable types. +<<>>= +ctype <- c("C", "C", "C", "I") +@ +Variable lower bounds. +<<>>= +lb <- c(0.0, 0.0, 0.0, 2.0) +@ +Variable upper bounds. +<<>>= +ub <- c(40.0, CPX_INFBOUND, CPX_INFBOUND, 3.0) +@ +The constraint matrix is passed in column major order format. \textbf{Be +careful here:} all indices start with 0! Begin indices of rows. +<<>>= +beg <- c(0, 2, 5, 7) +@ +Number of non-zero elements per row. +<<>>= +cnt <- c(2, 3, 2, 2) +@ +Column indices. +<<>>= +ind <- c(0, 1, 0, 1, 2, 0, 1, 0, 2) +@ +Non-zero elements. +<<>>= +val <- c(-1.0, 1.0, 1.0, -3.0, 1.0, 1.0, 1.0, 10.0, -3.5) +@ +Load problem data. +<<>>= +copyLpCPLEX(env, prob, nc, nr, CPX_MAX, obj, rhs, sense, + beg, cnt, ind, val, lb, ub) +@ +Set Variable types. +<<>>= +copyColTypeCPLEX(env, prob, ctype) +@ +Solve the problem using MIP. +<<>>= +mipoptCPLEX(env, prob) +@ +Retrieve solution after optimization. +<<>>= +solutionCPLEX(env, prob) +@ +Free memory, allacated to the problem object. +<<>>= +delProbCPLEX(env, prob) +@ +Close \prgname{\cplex{}} environment. +<<>>= +closeEnvCPLEX(env) +@ + +\newpage +\subsection{Setting control prarmeters} +Open a new environment. +<<>>= +pe <- openEnvCPLEX() +@ +All parameters and possible values are described in the \prgname{\cplex} +documentation. All parameters can be set in \pkgname{}; the parameters names +are the same as in \prgname{\cplex}. For example, if one wants to use the +debugging routines, the `messages to screen switch' must be set to 1. +<<>>= +setIntParmCPLEX(pe, CPX_PARAM_SCRIND, CPX_ON) +@ +Do not use advanced start information. +<<>>= +setIntParmCPLEX(pe, CPX_PARAM_ADVIND, 0) +@ +Lower the feasibility tolerance. +<<>>= +setDblParmCPLEX(pe, CPX_PARAM_EPRHS, 1E-09) +@ +Retrieve parameters which are not set at their default values. +<<>>= +(param <- getChgParmCPLEX(pe)) +@ +Retrieve names of these parameters. +<<>>= +mapply(getParmNameCPLEX, param, MoreArgs = list(env = pe)) +@ +Close the envoronment. +<<>>= +closeEnvCPLEX(pe) +@ + +\section{Function names} + +\subsection{Searching} + +The function names in \pkgname{} are different from the names in +\prgname{\cplex}, e.\,g. the function \texttt{addColsCPLEX} in \pkgname{} is +called \texttt{CPXaddcols} in \prgname{\cplex}. The directory \texttt{inst/} +containes a file \texttt{c2r.map} which maps a \prgname{\cplex} function name to +the corresponding \pkgname{} function name. Additionally, all man-pages contain +an alias to the \prgname{\cplex} function name. The call +<<>>= +help("CPXaddcols") +@ +will bring up the man-page of \texttt{addColsCPLEX}. + +\subsection{Mapping} + +The file \texttt{c2r.map} in \texttt{inst/} maps the \pkgname{} function names +to the orininal \prgname{\cplex} function names of its C-API. To use the latter, +run +<<>>= +c2r <- system.file(package = "cplexAPI", "c2r.map") +source(c2r) +@ +now either +<<>>= +pr1 <- openEnvCPLEX() +closeEnvCPLEX(pr1) +@ +or the original functions +<<>>= +pr2 <- CPXopenCPLEX() +CPXcloseCPLEX(pr2) +@ +work both. Keep in mind that the mapping only affects the function names not the +arguments of a function. +\end{document} + + +\end{document} -- GitLab