diff --git a/DESCRIPTION b/DESCRIPTION index ca1a4599dc8ddf1c23f4c5ea45108be55340f7ea..30c1c98cecfd3a28390753983f42d0393297fe23 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: cplexAPI Type: Package Title: R Interface to C API of IBM ILOG CPLEX -Version: 1.3.5 -Date: 2018-09-03 +Version: 1.3.6 +Date: 2019-06-21 Authors@R: c(person("Mayo", "Roettger", role = "cre", email = "mayo.roettger@hhu.de"), person("Gabriel", "Gelius-Dietrich", role = "aut", email = "geliudie@uni-duesseldorf.de"), person(c("C.", "Jonathan"), "Fritzemeier", role = c("ctb"), email = "clausjonathan.fritzemeier@uni-duesseldorf.de")) @@ -14,7 +14,7 @@ License: GPL-3 | file LICENSE LazyLoad: yes Collate: generics.R cplexConst.R cplexErrorClass.R cplexPtrClass.R cplex.R cplexAPI.R cplex_checkAPI.R cplex_longparamAPI.R zzz.R -Packaged: 2018-09-03 11:36:00 UTC; jonathan +Packaged: 2019-06-21 11:35:00 UTC; mayo NeedsCompilation: yes Repository: CRAN -Date/Publication: 2018-09-03 11:36:00 +Date/Publication: 2019-06-21 11:35:00 diff --git a/NAMESPACE b/NAMESPACE index 55473c32d5442d40d515c64439e20f778b6e6911..4b1244efe6880e20068038f3d2a551d19b5f089e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -259,8 +259,10 @@ CPX_BRDIR_AUTO, CPX_BRDIR_DOWN, CPX_BRDIR_UP, CPX_CON_ABS, +# removed in CPLEX 12.9.0 begin CPX_CON_DISJCST, CPX_CON_INDDISJCST, +# removed in CPLEX 12.9.0 end CPX_CON_INDICATOR, CPX_CON_LAST_CONTYPE, CPX_CON_LINEAR, @@ -269,6 +271,7 @@ CPX_CON_MAXEXPR, CPX_CON_MINEXPR, CPX_CON_PWL, CPX_CON_QUADRATIC, +# removed in CPLEX 12.9.0 begin CPX_CON_SETVAR, CPX_CON_SETVARCARD, CPX_CON_SETVARDOMAIN, @@ -284,6 +287,7 @@ CPX_CON_SETVARNULLINTERSECT, CPX_CON_SETVARSUBSET, CPX_CON_SETVARSUM, CPX_CON_SETVARUNION, +# removed in CPLEX 12.9.0 end CPX_CON_SOS, CPX_CON_UPPER_BOUND, CPX_CONFLICT_EXCLUDED, @@ -534,7 +538,9 @@ CPX_PARAM_STARTALG, CPX_PARAM_STRONGCANDLIM, CPX_PARAM_STRONGITLIM, CPX_PARAM_SUBALG, +# removed in CPLEX 12.9.0 begin CPX_PARAM_SUBMIPNODELIM, +# removed in CPLEX 12.9.0 end CPX_PARAM_SYMMETRY, CPX_PARAM_THREADS, CPX_PARAM_TILIM, @@ -877,5 +883,48 @@ CPXPROB_NODELP, CPXPROB_NODEQCP, CPXPROB_NODEQP, CPXPROB_QCP, -CPXPROB_QP +CPXPROB_QP, + +# new in CPLEX 12.8.0 begin +CPX_PARAM_PARAMDISPLAY, +CPXPARAM_MIP_Strategy_SubMIPScale, +CPXPARAM_MIP_Strategy_SubMIPStartAlg, +CPXPARAM_MIP_Strategy_SubMIPSubAlg, +CPXPARAM_Record, +CPXMI_SAMECOEFF_ROW, +CPXMI_SAMECOEFF_COL, +CPXMI_SAMECOEFF_IND, +CPXMI_SAMECOEFF_QLIN, +CPXMI_SAMECOEFF_QUAD, +CPXMI_SAMECOEFF_LAZY, +CPXMI_SAMECOEFF_UCUT, +CPXMI_SAMECOEFF_RHS, +CPXMI_SAMECOEFF_OBJ, +CPXERR_CALLBACK_INCONSISTENT, +CPXERR_CAND_NOT_RAY, +CPXERR_CAND_NOT_POINT, +CPX_CALLBACKCONTEXT_CANDIDATE, +CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS, +CPX_CALLBACKCONTEXT_LOCAL_PROGRESS, +CPX_CALLBACKCONTEXT_RELAXATION, +CPX_CALLBACKCONTEXT_THREAD_DOWN, +CPX_CALLBACKCONTEXT_THREAD_UP, +setLogFileNameCPLEX, +getLogFileNameCPLEX, +# new in CPLEX 12.8.0 end + +# new in CPLEX 12.9.0 begin +CPX_MAX_PWLSLACK_INFEAS, +CPX_SUM_PWLSLACK_INFEAS, +CPXERR_BAD_MULTIOBJ_ATTR, +CPXERR_MULTIOBJ_SUBPROB_SOLVE, +CPXERR_NO_OBJ_NAME, +CPXERR_NOT_FOR_MULTIOBJ, +CPXPARAM_MultiObjective_Display, +CPXPARAM_ParamDisplay, +CPXPARAM_Preprocessing_Folding, +CPXPARAM_Read_WarningLimit, +getParmHierNameCPLEX +# new in CPLEX 12.9.0 end + ) diff --git a/R/cplexAPI.R b/R/cplexAPI.R index 774c0316c97b3cd32a2e3443f79c4a5f2f5958e0..c60856bd8f4f4de418f5b9b33d6d4932aade0994 100644 --- a/R/cplexAPI.R +++ b/R/cplexAPI.R @@ -2429,6 +2429,7 @@ rhsSaCPLEX <- function(env, lp, begin, end) { } +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# openFileCPLEX <- function(fname, ftype = "w", ptrtype = "cplex_file") { @@ -2443,8 +2444,10 @@ openFileCPLEX <- function(fname, ftype = "w", ptrtype = "cplex_file") { return(cpfileP) } +# removed in CPLEX 12.9.0 end +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# closeFileCPLEX <- function(cpfile) { @@ -2456,7 +2459,10 @@ closeFileCPLEX <- function(cpfile) { return(cplexError(status)) } +# removed in CPLEX 12.9.0 end + +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# fileputCPLEX <- function(cpfile, stuff = "") { @@ -2468,8 +2474,10 @@ fileputCPLEX <- function(cpfile, stuff = "") { return(status) } +# removed in CPLEX 12.9.0 end +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# setLogFileCPLEX <- function(env, cpfile = NULL) { @@ -2488,8 +2496,10 @@ setLogFileCPLEX <- function(env, cpfile = NULL) { return(status) } +# removed in CPLEX 12.9.0 end +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# getLogFileCPLEX <- function(env, ptrtype = "cplex_file") { @@ -2504,6 +2514,7 @@ getLogFileCPLEX <- function(env, ptrtype = "cplex_file") { return(cplexError(cpfileP)) } +# removed in CPLEX 12.9.0 end #------------------------------------------------------------------------------# @@ -2593,6 +2604,7 @@ flushChannelCPLEX <- function(env, newch) { } +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# addFpDestCPLEX <- function(env, newch, cpfile) { @@ -2605,8 +2617,10 @@ addFpDestCPLEX <- function(env, newch, cpfile) { return(status) } +# removed in CPLEX 12.9.0 end +# removed in CPLEX 12.9.0 begin #------------------------------------------------------------------------------# delFpDestCPLEX <- function(env, newch, cpfile) { @@ -2619,6 +2633,7 @@ delFpDestCPLEX <- function(env, newch, cpfile) { return(status) } +# removed in CPLEX 12.9.0 end #------------------------------------------------------------------------------# @@ -3211,3 +3226,60 @@ getIndConstrCPLEX <- function(env, lp, which) { return(cplexError(ic)) } + + +# new in CPLEX 12.8.0 begin +#------------------------------------------------------------------------------# + +setLogFileNameCPLEX <- function(env, filename = "cpx.log", mode = "w") { + + if (is.null(filename)) { + Cfilename <- as.null(filename) + } + else { + Cfilename <- as.character(filename) + } + + if (is.null(mode)) { + Cmode <- as.null(mode) + } + else { + Cmode <- as.character(mode) + } + + status <- .Call("setLogFileName", PACKAGE = "cplexAPI", + cplexPointer(env), + Cfilename, + Cmode + ) + + return(status) +} + + +#------------------------------------------------------------------------------# + +getLogFileNameCPLEX <- function(env) { + + status <- .Call("getLogFileName", PACKAGE = "cplexAPI", + cplexPointer(env) + ) + + return(status) +} +# new in CPLEX 12.8.0 end + + +# new in CPLEX 12.9.0 begin +#------------------------------------------------------------------------------# + +getParmHierNameCPLEX <- function(env, whichparam) { + + value <- .Call("getParmHierName", PACKAGE = "cplexAPI", + cplexPointer(env), + as.integer(whichparam) + ) + + return(value) +} +# new in CPLEX 12.9.0 end diff --git a/R/cplexConst.R b/R/cplexConst.R index 0f79cacbeff99f5f92a076827767a1bc6cb96a2d..8110c91591e69a3bb87c2fc6c1491b9f56873095 100644 --- a/R/cplexConst.R +++ b/R/cplexConst.R @@ -301,6 +301,7 @@ 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 @@ -378,6 +379,12 @@ CPX_KAPPA_MAX <- 56L CPX_KAPPA_ATTENTION <- 57L +#------------------------------------------------------------------------------# +# Solution quality symbols new in CPLEX 12.9.0 +CPX_MAX_PWLSLACK_INFEAS <- 58L +CPX_SUM_PWLSLACK_INFEAS <- 59L + + #------------------------------------------------------------------------------# # feasopt options CPX_FEASOPT_MIN_SUM <- 0L @@ -575,7 +582,9 @@ CPX_PARAM_MIPEMPHASIS <- 2058L CPX_PARAM_SYMMETRY <- 2059L CPX_PARAM_DIVETYPE <- 2060L CPX_PARAM_RINSHEUR <- 2061L +# removed in CPLEX 12.9.0 begin CPX_PARAM_SUBMIPNODELIM <- 2062L +# removed in CPLEX 12.9.0 end CPX_PARAM_LBHEUR <- 2063L CPX_PARAM_REPEATPRESOLVE <- 2064L CPX_PARAM_PROBETIME <- 2065L @@ -633,6 +642,7 @@ CPX_CON_MINEXPR <- 7L CPX_CON_MAXEXPR <- 8L CPX_CON_PWL <- 9L CPX_CON_ABS <- 9L # same as PWL since using it +# removed in CPLEX 12.9.0 begin CPX_CON_DISJCST <- 10L CPX_CON_INDDISJCST <- 11L CPX_CON_SETVAR <- 12L @@ -650,6 +660,7 @@ CPX_CON_SETVARINTERSECT <- 23L CPX_CON_SETVAREQ <- 24L CPX_CON_SETVARNEQ <- 25L CPX_CON_SETVARNEQCST <- 26L +# removed in CPLEX 12.9.0 end CPX_CON_LAST_CONTYPE <- 27L @@ -694,6 +705,25 @@ CPXERR_NEGATIVE_SURPLUS <- 1207L CPXERR_NO_SENSIT <- 1260L +#------------------------------------------------------------------------------# +# Error codes new in CPLEX 12.8.0 + +# Callable library miscellaneous routines +CPXERR_CALLBACK_INCONSISTENT <- 1060L +CPXERR_CAND_NOT_RAY <- 3026L +CPXERR_CAND_NOT_POINT <- 3025L + + +#------------------------------------------------------------------------------# +# Error codes new in CPLEX 12.9.0 + +# Callable library miscellaneous routines +CPXERR_BAD_MULTIOBJ_ATTR <- 1488L +CPXERR_MULTIOBJ_SUBPROB_SOLVE <- 1300L +CPXERR_NO_OBJ_NAME <- 1486L +CPXERR_NOT_FOR_MULTIOBJ <- 1070L + + #------------------------------------------------------------------------------# # new parameter names introduced in IBM ILOG CPLEX version 12.6 @@ -859,3 +889,37 @@ CPXPARAM_Tune_Repeat <- 1111L CPXPARAM_Tune_TimeLimit <- 1112L CPXPARAM_WorkDir <- 1064L CPXPARAM_WorkMem <- 1065L + + +#------------------------------------------------------------------------------# +# new parameter names introduced in IBM ILOG CPLEX version 12.8.0 +CPXPARAM_Record <- 1162L +CPXPARAM_MIP_Strategy_SubMIPScale <- 2207L +CPXPARAM_MIP_Strategy_SubMIPStartAlg <- 2205L +CPXPARAM_MIP_Strategy_SubMIPSubAlg <- 2206L +CPXPARAM_ParamDisplay <- 1163L +CPX_PARAM_PARAMDISPLAY <- 1163L +CPXMI_SAMECOEFF_ROW <- 1049L +CPXMI_SAMECOEFF_COL <- 1050L +CPXMI_SAMECOEFF_IND <- 1051L +CPXMI_SAMECOEFF_QLIN <- 1052L +CPXMI_SAMECOEFF_QUAD <- 1053L +CPXMI_SAMECOEFF_LAZY <- 1054L +CPXMI_SAMECOEFF_UCUT <- 1055L +CPXMI_SAMECOEFF_RHS <- 1056L +CPXMI_SAMECOEFF_OBJ <- 1057L +# contexts to support new callbacks +CPX_CALLBACKCONTEXT_CANDIDATE <- 0x0020L +CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS <- 0x0010L +CPX_CALLBACKCONTEXT_LOCAL_PROGRESS <- 0x0008L +CPX_CALLBACKCONTEXT_RELAXATION <- 0x0040L +CPX_CALLBACKCONTEXT_THREAD_DOWN <- 0x0004L +CPX_CALLBACKCONTEXT_THREAD_UP <- 0x0002L + + +#------------------------------------------------------------------------------# +# new parameter names introduced in IBM ILOG CPLEX version 12.9.0 + +CPXPARAM_MultiObjective_Display <- 1600L +CPXPARAM_Preprocessing_Folding <- 1164L +CPXPARAM_Read_WarningLimit <- 1157L diff --git a/configure b/configure index 9243ab79ce1f992193f7a8d252491e143250dcc9..5672c3d113769600cd3a8ccaba5313253d7bfdcd 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cplexAPI 1.2.11. +# Generated by GNU Autoconf 2.69 for cplexAPI 1.3.6. # -# Report bugs to <geliudie@uni-duesseldorf.de>. +# Report bugs to <mayo.roettger@hhu.de>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -267,10 +267,10 @@ fi $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." +$0: mayo.roettger@hhu.de about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." fi exit 1 fi @@ -580,9 +580,9 @@ 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_VERSION='1.3.6' +PACKAGE_STRING='cplexAPI 1.3.6' +PACKAGE_BUGREPORT='mayo.roettger@hhu.de' PACKAGE_URL='' # Factoring default headers for most tests. @@ -657,6 +657,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -733,6 +734,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -985,6 +987,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1122,7 +1133,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1235,7 +1246,7 @@ 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. +\`configure' configures cplexAPI 1.3.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1275,6 +1286,7 @@ Fine tuning of the installation directories: --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] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1296,7 +1308,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cplexAPI 1.2.11:";; + short | recursive ) echo "Configuration of cplexAPI 1.3.6:";; esac cat <<\_ACEOF @@ -1324,7 +1336,7 @@ Some influential environment variables: 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>. +Report bugs to <mayo.roettger@hhu.de>. _ACEOF ac_status=$? fi @@ -1387,7 +1399,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cplexAPI configure 1.2.11 +cplexAPI configure 1.3.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1546,9 +1558,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $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 ## -## ------------------------------------------ ##" +( $as_echo "## ----------------------------------- ## +## Report this to mayo.roettger@hhu.de ## +## ----------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1689,7 +1701,7 @@ 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 +It was created by cplexAPI $as_me 1.3.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4215,7 +4227,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 +This file was extended by cplexAPI $as_me 1.3.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4271,13 +4283,13 @@ $config_files Configuration headers: $config_headers -Report bugs to <geliudie@uni-duesseldorf.de>." +Report bugs to <mayo.roettger@hhu.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 +cplexAPI config.status 1.3.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 3f7e66eae3e87a46bcdf8cfc6fdc22538e0a7c09..397fdc819804160f96171651e954556b5169e3e8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([cplexAPI], [1.2.11], [geliudie@uni-duesseldorf.de]) +AC_INIT([cplexAPI], [1.3.6], [mayo.roettger@hhu.de]) ## adopted from configure.ac in Rcplex_0.3-0 diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index b3843c85be98f462b177b7ea612830deb7a9db51..4b769ce093393968ff07979ac0102f64ccef3677 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -4,19 +4,37 @@ \title{cplexAPI News} \encoding{UTF-8} % ---------------------------------------------------------------------------- % +\section{Changes in version 1.3.6 2019-06-21}{ + \itemize{ + \item Added functions \code{setLogFileNameCPLEX} and \code{getLogFileName} for interfacing CPLEX functions \code{CPXsetlogfilename} and + \code{CPXgetlogfilename} if building package with CPLEX Version >= 12.8.0. + \item Added funtion \code{getParmHierNameCPLEX} for interfacing CPLEX funtion \code{CPXgetparamhiername} if building with CPLEX Version 12.9.0. + \item Interface Functions \code{openFileCPLEX}, \code{closeFileCPLEX}, \code{addFpDestCPLEX}, \code{delFpDestCPLEX}, \code{fileputCPLEX}, + \code{setLogFileCPLEX}, and \code{getLogFileCPLEX} will have no functionality and return NULL, if building with CPLEX version >= 12.9.0, + because related CPLEX functions \code{CPXfopen}, \code{CPXfclose}, \code{CPXaddfpdest}, \code{CPXdelfpdest}, \code{CPXfputs}, \code{CPXsetlogfile}, + and \code{CPXgetlogfile} had been removed in CPLEX Version >= 12.9.0. For using logfiles, use \code{setLogFileNameCPLEX} and \code{getLogFileName} + instead. + } +} + +% ---------------------------------------------------------------------------- % \section{Changes in version 1.3.5 2018-09-03}{ \itemize{ \item maintainer change } } + +% ---------------------------------------------------------------------------- % \section{Changes in version 1.3.4 2017-07-26}{ \itemize{ \item The function \code{solution} should avoid returning the dual solution if solved \code{FIXEDMILP}, \code{MILP}, \code{QCP}, \code{MIQCP}, \code{MIQP}, and \code{FIXEDMIQP}. } } + +% ---------------------------------------------------------------------------- % \section{Changes in version 1.3.3 2017-01-18}{ \itemize{ \item In CPLEX Version 1270 are the functions \code{CPXaddchannel} and @@ -24,6 +42,7 @@ } } + % ---------------------------------------------------------------------------- % \section{Changes in version 1.3.2 2016-11-16}{ \itemize{ @@ -33,6 +52,7 @@ } } + % ---------------------------------------------------------------------------- % \section{Changes in version 1.2.11 2014-07-28}{ \itemize{ diff --git a/inst/c2r.map b/inst/c2r.map index 304bae01f350b347c9048c832ea7db2a7f19529b..56b4c0ceff9c318afe5730f03b44541dd09ba685 100644 --- a/inst/c2r.map +++ b/inst/c2r.map @@ -6,7 +6,9 @@ #CPXaddchannel <- cplexAPI::addChannelCPLEX CPXaddcols <- cplexAPI::addColsCPLEX +# removed in CPLEX 12.9.0 begin CPXaddfpdest <- cplexAPI::addFpDestCPLEX +# removed in CPLEX 12.9.0 end CPXaddindconstr <- cplexAPI::addIndConstrCPLEX CPXaddmipstarts <- cplexAPI::addMIPstartsCPLEX CPXaddrows <- cplexAPI::addRowsCPLEX @@ -43,7 +45,9 @@ CPXchgsense <- cplexAPI::chgSenseCPLEX CPXcleanup <- cplexAPI::cleanupCoefCPLEX CPXcloneprob <- cplexAPI::cloneProbCPLEX CPXcloseCPLEX <- cplexAPI::closeEnvCPLEX +# removed in CPLEX 12.9.0 begin CPXfclose <- cplexAPI::closeFileCPLEX +# removed in CPLEX 12.9.0 end CPXcompletelp <- cplexAPI::completelpCPLEX CPXcopybase <- cplexAPI::copyBaseCPLEX CPXcopyctype <- cplexAPI::copyColTypeCPLEX @@ -57,7 +61,9 @@ CPXcopyquad <- cplexAPI::copyQuadCPLEX CPXcopystart <- cplexAPI::copyStartCPLEX #CPXdelchannel <- cplexAPI::delChannelCPLEX CPXdelcols <- cplexAPI::delColsCPLEX +# removed in CPLEX 12.9.0 begin CPXdelfpdest <- cplexAPI::delFpDestCPLEX +# removed in CPLEX 12.9.0 end CPXdelindconstrs <- cplexAPI::delIndConstrsCPLEX CPXdelmipstarts <- cplexAPI::delMIPstartsCPLEX CPXdelnames <- cplexAPI::delNamesCPLEX @@ -71,7 +77,9 @@ CPXdisconnectchannel <- cplexAPI::disconnectChannelCPLEX CPXdualwrite <- cplexAPI::dualWriteCPLEX CPXdualopt <- cplexAPI::dualoptCPLEX CPXfeasopt <- cplexAPI::feasOptCPLEX +# removed in CPLEX 12.9.0 begin CPXfputs <- cplexAPI::fileputCPLEX +# removed in CPLEX 12.9.0 end CPXflushchannel <- cplexAPI::flushChannelCPLEX CPXflushstdchannels <- cplexAPI::flushStdChannelsCPLEX CPXfreepresolve <- cplexAPI::freePresolveCPLEX @@ -103,7 +111,9 @@ CPXinfostrparam <- cplexAPI::getInfoStrParmCPLEX CPXgetintparam <- cplexAPI::getIntParmCPLEX CPXgetintquality <- cplexAPI::getIntQualCPLEX CPXgetitcnt <- cplexAPI::getItCntCPLEX +# removed in CPLEX 12.9.0 begin CPXgetlogfile <- cplexAPI::getLogFileCPLEX +# removed in CPLEX 12.9.0 end CPXgetlongparam <- cplexAPI::getLongParmCPLEX CPXgetlb <- cplexAPI::getLowerBndsCPLEX CPXgetmiprelgap <- cplexAPI::getMIPrelGapCPLEX @@ -163,7 +173,9 @@ CPXnewcols <- cplexAPI::newColsCPLEX CPXnewrows <- cplexAPI::newRowsCPLEX CPXobjsa <- cplexAPI::objSaCPLEX CPXopenCPLEX <- cplexAPI::openEnvCPLEX +# removed in CPLEX 12.9.0 begin CPXfopen <- cplexAPI::openFileCPLEX +# removed in CPLEX 12.9.0 end CPXordwrite <- cplexAPI::ordWriteCPLEX CPXpreslvwrite <- cplexAPI::preslvWriteCPLEX CPXpresolve <- cplexAPI::presolveCPLEX @@ -183,7 +195,9 @@ CPXrhssa <- cplexAPI::rhsSaCPLEX CPXsetdblparam <- cplexAPI::setDblParmCPLEX CPXsetdefaults <- cplexAPI::setDefaultParmCPLEX CPXsetintparam <- cplexAPI::setIntParmCPLEX +# removed in CPLEX 12.9.0 begin CPXsetlogfile <- cplexAPI::setLogFileCPLEX +# removed in CPLEX 12.9.0 end CPXsetlongparam <- cplexAPI::setLongParmCPLEX CPXchgobjsen <- cplexAPI::setObjDirCPLEX CPXsetstrparam <- cplexAPI::setStrParmCPLEX @@ -197,3 +211,12 @@ CPXunscaleprob <- cplexAPI::unscaleProbCPLEX CPXwritemipstarts <- cplexAPI::writeMIPstartsCPLEX CPXwriteparam <- cplexAPI::writeParmCPLEX CPXwriteprob <- cplexAPI::writeProbCPLEX + +# new in CPLEX 12.8.0 begin +CPXsetlogfilename <- cplexAPI::setLogFileNameCPLEX +CPXgetlogfilename <- cplexAPI::getLogFileNameCPLEX +# new in CPLEX 12.8.0 end + +# new in CPLEX 12.9.0 begin +CPXgetparamhiername <- cplexAPI::getParmHierNameCPLEX +# new in CPLEX 12.9.0 end diff --git a/man/addFpDestCPLEX.Rd b/man/addFpDestCPLEX.Rd index 08493402c0124330349030140103af6bfbf2c1ac..cb3191ca8ab7fa50d5915c0ad698ebf197799062 100644 --- a/man/addFpDestCPLEX.Rd +++ b/man/addFpDestCPLEX.Rd @@ -7,8 +7,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXaddfpdest}. Consult the IBM ILOG CPLEX documentation for more - detailed information. + \code{CPXaddfpdest}. Consult the IBM ILOG CPLEX documentation for more + detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXaddfpdest} has + been removed. } \usage{ diff --git a/man/closeFileCPLEX.Rd b/man/closeFileCPLEX.Rd index 9179d1b6a2c769a99c69592f7641af7b0fabb9d7..d19f01116a41556551c0147f8db1eabc93ad9a62 100644 --- a/man/closeFileCPLEX.Rd +++ b/man/closeFileCPLEX.Rd @@ -8,8 +8,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXfclose}. Consult the IBM ILOG CPLEX documentation for - more detailed information. + \code{CPXfclose}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXfclose} has + been removed. } \usage{ @@ -23,7 +25,7 @@ } \details{ - Interface to the C function \code{closeFile} which calls the CPLEX + Interface to the C function \code{cplexfclose} which calls the CPLEX function \code{CPXfclose}. } diff --git a/man/cplexConstants.Rd b/man/cplexConstants.Rd index ae1ad83e9886644d3624a2463d49f219fa166523..c45824730201ea2af0c6572fe6252b57c1fee99b 100644 --- a/man/cplexConstants.Rd +++ b/man/cplexConstants.Rd @@ -34,8 +34,10 @@ \alias{CPX_BRDIR_DOWN} \alias{CPX_BRDIR_UP} \alias{CPX_CON_ABS} +% removed in CPLEX 12.9.0 begin \alias{CPX_CON_DISJCST} \alias{CPX_CON_INDDISJCST} +% removed in CPLEX 12.9.0 end \alias{CPX_CON_INDICATOR} \alias{CPX_CON_LAST_CONTYPE} \alias{CPX_CON_LINEAR} @@ -44,6 +46,7 @@ \alias{CPX_CON_MINEXPR} \alias{CPX_CON_PWL} \alias{CPX_CON_QUADRATIC} +% removed in CPLEX 12.9.0 begin \alias{CPX_CON_SETVAR} \alias{CPX_CON_SETVARCARD} \alias{CPX_CON_SETVARDOMAIN} @@ -59,6 +62,7 @@ \alias{CPX_CON_SETVARSUBSET} \alias{CPX_CON_SETVARSUM} \alias{CPX_CON_SETVARUNION} +% removed in CPLEX 12.9.0 end \alias{CPX_CON_SOS} \alias{CPX_CON_UPPER_BOUND} \alias{CPX_CONFLICT_EXCLUDED} @@ -307,7 +311,9 @@ \alias{CPX_PARAM_STRONGCANDLIM} \alias{CPX_PARAM_STRONGITLIM} \alias{CPX_PARAM_SUBALG} +% removed in CPLEX 12.9.0 begin \alias{CPX_PARAM_SUBMIPNODELIM} +% removed in CPLEX 12.9.0 end \alias{CPX_PARAM_SYMMETRY} \alias{CPX_PARAM_THREADS} \alias{CPX_PARAM_TILIM} @@ -658,6 +664,46 @@ \alias{CPXPARAM_WorkDir} \alias{CPXPARAM_WorkMem} +% new in CPLEX 12.8.0 begin +\alias{CPXPARAM_Record} +\alias{CPXPARAM_MIP_Strategy_SubMIPScale} +\alias{CPXPARAM_MIP_Strategy_SubMIPStartAlg} +\alias{CPXPARAM_MIP_Strategy_SubMIPSubAlg} +\alias{CPXPARAM_ParamDisplay} +\alias{CPX_PARAM_PARAMDISPLAY} +\alias{CPXMI_SAMECOEFF_ROW} +\alias{CPXMI_SAMECOEFF_COL} +\alias{CPXMI_SAMECOEFF_IND} +\alias{CPXMI_SAMECOEFF_QLIN} +\alias{CPXMI_SAMECOEFF_QUAD} +\alias{CPXMI_SAMECOEFF_LAZY} +\alias{CPXMI_SAMECOEFF_UCUT} +\alias{CPXMI_SAMECOEFF_RHS} +\alias{CPXMI_SAMECOEFF_OBJ} +\alias{CPXERR_CALLBACK_INCONSISTENT} +\alias{CPXERR_CAND_NOT_RAY} +\alias{CPXERR_CAND_NOT_POINT} +\alias{CPX_CALLBACKCONTEXT_CANDIDATE} +\alias{CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS} +\alias{CPX_CALLBACKCONTEXT_LOCAL_PROGRESS} +\alias{CPX_CALLBACKCONTEXT_RELAXATION} +\alias{CPX_CALLBACKCONTEXT_THREAD_DOWN} +\alias{CPX_CALLBACKCONTEXT_THREAD_UP} +% new in CPLEX 12.8.0 end + +% new in CPLEX 12.9.0 begin +\alias{CPX_MAX_PWLSLACK_INFEAS} +\alias{CPX_SUM_PWLSLACK_INFEAS} +\alias{CPXPARAM_MultiObjective_Display} +\alias{CPXPARAM_Preprocessing_Folding} +\alias{CPXPARAM_Read_WarningLimit} +\alias{CPXERR_BAD_MULTIOBJ_ATTR} +\alias{CPXERR_MULTIOBJ_SUBPROB_SOLVE} +\alias{CPXERR_NOT_FOR_MULTIOBJ} +\alias{CPXERR_NO_OBJ_NAME} +% new in CPLEX 12.9.0 end + + \title{ Constants, Parameters, Return and Status Codes of IBM ILOG CPLEX } @@ -1077,6 +1123,15 @@ Types \code{4}, \code{9}, and \code{12} are internal, the others are for users. } +%------------------------------------------------------------------------------ +\section{Solution quality symbols new in CPLEX 12.9.0}{ + \tabular{ll}{ + \code{CPX_MAX_PWLSLACK_INFEAS} \tab \code{58} \cr + \code{CPX_SUM_PWLSLACK_INFEAS} \tab \code{59} \cr + } +} + + %------------------------------------------------------------------------------ \section{feasopt options}{ \tabular{ll}{ @@ -1325,7 +1380,9 @@ Types \code{4}, \code{9}, and \code{12} are internal, the others are for users. \code{CPX_PARAM_SYMMETRY} \tab \code{2059} \cr \code{CPX_PARAM_DIVETYPE} \tab \code{2060} \cr \code{CPX_PARAM_RINSHEUR} \tab \code{2061} \cr + % removed in CPLEX 12.9.0 begin \code{CPX_PARAM_SUBMIPNODELIM} \tab \code{2062} \cr + % removed in CPLEX 12.9.0 end \code{CPX_PARAM_LBHEUR} \tab \code{2063} \cr \code{CPX_PARAM_REPEATPRESOLVE} \tab \code{2064} \cr \code{CPX_PARAM_PROBETIME} \tab \code{2065} \cr @@ -1392,6 +1449,7 @@ Types \code{4}, \code{9}, and \code{12} are internal, the others are for users. \code{CPX_CON_MAXEXPR} \tab \code{8} \cr \code{CPX_CON_PWL} \tab \code{9} \cr \code{CPX_CON_ABS} \tab \code{9} \cr + % removed in CPLEX 12.9.0 begin \code{CPX_CON_DISJCST} \tab \code{10} \cr \code{CPX_CON_INDDISJCST} \tab \code{11} \cr \code{CPX_CON_SETVAR} \tab \code{12} \cr @@ -1409,6 +1467,7 @@ Types \code{4}, \code{9}, and \code{12} are internal, the others are for users. \code{CPX_CON_SETVAREQ} \tab \code{24} \cr \code{CPX_CON_SETVARNEQ} \tab \code{25} \cr \code{CPX_CON_SETVARNEQCST} \tab \code{26} \cr + % removed in CPLEX 12.9.0 end \code{CPX_CON_LAST_CONTYPE} \tab \code{27} \cr } } @@ -1472,6 +1531,29 @@ Callable library miscellaneous routines } +%------------------------------------------------------------------------------ +\section{Error codes new in CPLEX 12.8.0}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXERR_CALLBACK_INCONSISTENT} \tab \code{1060} \cr + \code{CPXERR_CAND_NOT_RAY} \tab \code{3026} \cr + \code{CPXERR_CAND_NOT_POINT} \tab \code{3025} \cr + } +} + + +%------------------------------------------------------------------------------ +\section{Error codes new in CPLEX 12.9.0}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXERR_BAD_MULTIOBJ_ATTR} \tab \code{1488} \cr + \code{CPXERR_MULTIOBJ_SUBPROB_SOLVE} \tab \code{1300} \cr + \code{CPXERR_NO_OBJ_NAME} \tab \code{1486} \cr + \code{CPXERR_NOT_FOR_MULTIOBJ} \tab \code{1070} \cr + } +} + + %------------------------------------------------------------------------------ \section{new parameter names introduced in IBM ILOG CPLEX version 12.6}{ Callable library miscellaneous routines @@ -1641,7 +1723,45 @@ Callable library miscellaneous routines } } +%------------------------------------------------------------------------------ +\section{new parameter names introduced in IBM ILOG CPLEX version 12.8.0}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXPARAM_Record} \tab \code{1162} \cr + \code{CPXPARAM_MIP_Strategy_SubMIPScale} \tab \code{2207} \cr + \code{CPXPARAM_MIP_Strategy_SubMIPStartAlg} \tab \code{2205} \cr + \code{CPXPARAM_MIP_Strategy_SubMIPSubAlg} \tab \code{2206} \cr + \code{CPXPARAM_ParamDisplay} \tab \code{1163} \cr + \code{CPX_PARAM_PARAMDISPLAY} \tab \code{1163} \cr + \code{CPXMI_SAMECOEFF_ROW} \tab \code{1049} \cr + \code{CPXMI_SAMECOEFF_COL} \tab \code{1050} \cr + \code{CPXMI_SAMECOEFF_IND} \tab \code{1051} \cr + \code{CPXMI_SAMECOEFF_QLIN} \tab \code{1052} \cr + \code{CPXMI_SAMECOEFF_QUAD} \tab \code{1053} \cr + \code{CPXMI_SAMECOEFF_LAZY} \tab \code{1054} \cr + \code{CPXMI_SAMECOEFF_UCUT} \tab \code{1055} \cr + \code{CPXMI_SAMECOEFF_RHS} \tab \code{1056} \cr + \code{CPXMI_SAMECOEFF_OBJ} \tab \code{1057} \cr + + \code{CPX_CALLBACKCONTEXT_CANDIDATE} \tab \code{0x0020} \cr + \code{CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS} \tab \code{0x0010} \cr + \code{CPX_CALLBACKCONTEXT_LOCAL_PROGRESS} \tab \code{0x0008} \cr + \code{CPX_CALLBACKCONTEXT_RELAXATION} \tab \code{0x0040} \cr + \code{CPX_CALLBACKCONTEXT_THREAD_DOWN} \tab \code{0x0004} \cr + \code{CPX_CALLBACKCONTEXT_THREAD_UP} \tab \code{0x0002} \cr + } +} +%------------------------------------------------------------------------------ +\section{new parameter names introduced in IBM ILOG CPLEX version 12.9.0}{ +Callable library miscellaneous routines + \tabular{ll}{ + \code{CPXPARAM_Read_WarningLimit} \tab \code{1157} \cr + \code{CPXPARAM_MultiObjective_Display} \tab \code{1600} \cr + \code{CPXPARAM_Preprocessing_Folding} \tab \code{1164} \cr + } +} + \references{ The IBM ILOG CPLEX home page at \url{https://www.ibm.com/support/knowledgecenter/SSSA5P}. diff --git a/man/delFpDestCPLEX.Rd b/man/delFpDestCPLEX.Rd index d3ec6f6689d9feb52062c893664652568901bf42..876da7085b267888ef0f7a06477d4102109a71b6 100644 --- a/man/delFpDestCPLEX.Rd +++ b/man/delFpDestCPLEX.Rd @@ -8,8 +8,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXdelfpdest}. Consult the IBM ILOG CPLEX documentation for - more detailed information. + \code{CPXdelfpdest}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXdelfpdest} has + been removed. } \usage{ diff --git a/man/fileputCPLEX.Rd b/man/fileputCPLEX.Rd index 21b7ddc88a856a95ee1a3a5f196e362f24edab33..ed527c086256608a13d610fc69d8f8f20a93a560 100644 --- a/man/fileputCPLEX.Rd +++ b/man/fileputCPLEX.Rd @@ -8,8 +8,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXfputs}. Consult the IBM ILOG CPLEX documentation for - more detailed information. + \code{CPXfputs}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXfputs} has + been removed. } \usage{ diff --git a/man/getLogFileCPLEX.Rd b/man/getLogFileCPLEX.Rd index 98a237b1bf04c43abffc50b0601cdae28a19113e..43352ce2c04528984bb97b65be46a4b937d34b73 100644 --- a/man/getLogFileCPLEX.Rd +++ b/man/getLogFileCPLEX.Rd @@ -9,7 +9,9 @@ \description{ Low level interface function to the IBM ILOG CPLEX function \code{CPXgetlogfile}. Consult the IBM ILOG CPLEX documentation for - more detailed information. + more detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXgetlogfile} has + been removed. } \usage{ diff --git a/man/getLogFileNameCPLEX.Rd b/man/getLogFileNameCPLEX.Rd new file mode 100644 index 0000000000000000000000000000000000000000..a217f664d3ce8e0a0978282128a01aed02953dbb --- /dev/null +++ b/man/getLogFileNameCPLEX.Rd @@ -0,0 +1,54 @@ +\name{getLogFileNameCPLEX} +\alias{getLogFileNameCPLEX} +\alias{CPXgetlogfilename} + +\title{ + Get the name of the current logfile +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetlogfilename}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + for IBM ILOG CPLEX < 12.8.0, where \code{CPXgetlogfilename} was not included. +} + +\usage{ + getLogFileNameCPLEX(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{getLogFileName} which calls the CPLEX + function \code{CPXgetlogfilename}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/support/knowledgecenter/SSSA5P}. +} + +\author{ + Mayo Roettger <mayo.roettger@hhu.de> + + Maintainer: Mayo Roettger <mayo.roettger@hhu.de> +} + + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/getParmHierNameCPLEX.Rd b/man/getParmHierNameCPLEX.Rd new file mode 100644 index 0000000000000000000000000000000000000000..7b043df531fb59760cedbdf908d2e3843d7a6ac9 --- /dev/null +++ b/man/getParmHierNameCPLEX.Rd @@ -0,0 +1,57 @@ +\name{getParmHierNameCPLEX} +\alias{getParmHierNameCPLEX} +\alias{CPXgetparamhiername} + +\title{ + Obtain the hierarchy name string of a CPLEX parameter +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXgetparamhiername}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + for IBM ILOG CPLEX < 12.9.0 on, where \code{CPXgetparamhiername} was not included. +} + +\usage{ + getParmHierNameCPLEX(env, whichparam) +} + +\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{whichparam}{ + An integer specifying the symbolic constant (or reference number) of the desired parameter. + } +} + +\details{ + Interface to the C function \code{getParmHierName} which calls the CPLEX + function \code{CPXgetparamhiername}. +} + +\value{ + A single character value. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/support/knowledgecenter/SSSA5P}. +} + +\author{ + Mayo Roettger <mayo.roettger@hhu.de> + + Maintainer: Mayo Roettger <mayo.roettger@hhu.de> +} + + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/man/openFileCPLEX.Rd b/man/openFileCPLEX.Rd index d8f148e0da9570e49f3f29417ba15b9fd068f7d1..593aa33691fd0b7ab821f8fd9a3c8d581482fecf 100644 --- a/man/openFileCPLEX.Rd +++ b/man/openFileCPLEX.Rd @@ -8,8 +8,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXfopen}. Consult the IBM ILOG CPLEX documentation for more - detailed information. + \code{CPXfopen}. Consult the IBM ILOG CPLEX documentation for more + detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXfopen} has + been removed. } \usage{ @@ -30,7 +32,7 @@ } \details{ - Interface to the C function \code{openFile} which calls the CPLEX + Interface to the C function \code{cplexfopen} which calls the CPLEX function \code{CPXfopen}. } diff --git a/man/setLogFileCPLEX.Rd b/man/setLogFileCPLEX.Rd index 862fcf761709d3c5c8d363a8da733b8499f1537e..aa70d088fd36189bf8fa57c2597f12522fdd93e6 100644 --- a/man/setLogFileCPLEX.Rd +++ b/man/setLogFileCPLEX.Rd @@ -8,8 +8,10 @@ \description{ Low level interface function to the IBM ILOG CPLEX function - \code{CPXsetlogfile}. Consult the IBM ILOG CPLEX documentation for - more detailed information. + \code{CPXsetlogfile}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + from IBM ILOG CPLEX >= 12.9.0 on, where \code{CPXsetlogfile} has + been removed. } \usage{ diff --git a/man/setLogFileNameCPLEX.Rd b/man/setLogFileNameCPLEX.Rd new file mode 100644 index 0000000000000000000000000000000000000000..cca9464b4076cea2938b231b53744d473ab570f1 --- /dev/null +++ b/man/setLogFileNameCPLEX.Rd @@ -0,0 +1,66 @@ +\name{setLogFileNameCPLEX} +\alias{setLogFileNameCPLEX} +\alias{CPXsetlogfilename} + +\title{ + Set and open a log file +} + +\description{ + Low level interface function to the IBM ILOG CPLEX function + \code{CPXsetlogfilename}. Consult the IBM ILOG CPLEX documentation for + more detailed information. This funtion has no functionality + for IBM ILOG CPLEX < 12.8.0, where \code{CPXsetlogfilename} was not included. +} + +\usage{ + setLogFileNameCPLEX(env, filename = "cpx.log", mode = "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{filename}{ + The name of the log file to open. + } + \item{mode}{ + The mode in which CPLEX should open the file. The specification is + the same as that for the C library function fopen. For example, use + a quoted character, such as "w" to write or "a" to append. Make sure + you open the file for writing; otherwise, CPLEX writes nothing to the + log file, and CPLEX can produce an error every time it attempts to + write. If filename is NULL, then this argument is ignored and can be + NULL, too. + } +} + +\details{ + Interface to the C function \code{setLogFileName} which calls the CPLEX + function \code{CPXsetlogfilename}. +} + +\value{ + Zero if successful, otherwise nonzero. +} + +\references{ + The IBM ILOG CPLEX home page at + \url{https://www.ibm.com/support/knowledgecenter/SSSA5P}. +} + +\author{ + Mayo Roettger <mayo.roettger@hhu.de> + + Maintainer: Mayo Roettger <mayo.roettger@hhu.de> +} + + +\seealso{ + \code{\link{cplexConstants}} +} + +\keyword{ optimize } + diff --git a/src/cplexAPI.c b/src/cplexAPI.c index fb398980905464ca89f896ee0f88dc9d1a6405e9..283d8cd9eb43e6435920a72bedc46e61e446601f 100644 --- a/src/cplexAPI.c +++ b/src/cplexAPI.c @@ -4967,6 +4967,12 @@ SEXP rhsSa(SEXP env, SEXP lp, SEXP begin, SEXP end) { } +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP cplexfopen(SEXP fname, SEXP ftype, SEXP ptrtype) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* open a file */ SEXP cplexfopen(SEXP fname, SEXP ftype, SEXP ptrtype) { @@ -5002,8 +5008,15 @@ SEXP cplexfopen(SEXP fname, SEXP ftype, SEXP ptrtype) { return ptr; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP cplexfclose(SEXP cpfile) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* close a file */ SEXP cplexfclose(SEXP cpfile) { @@ -5025,7 +5038,15 @@ SEXP cplexfclose(SEXP cpfile) { return out; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP fileput(SEXP cpfile, SEXP stuff) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* write to file */ SEXP fileput(SEXP cpfile, SEXP stuff) { @@ -5042,8 +5063,15 @@ SEXP fileput(SEXP cpfile, SEXP stuff) { return out; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP setLogFile(SEXP env, SEXP cpfile) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* modify log file */ SEXP setLogFile(SEXP env, SEXP cpfile) { @@ -5071,8 +5099,15 @@ SEXP setLogFile(SEXP env, SEXP cpfile) { return out; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP getLogFile(SEXP env, SEXP ptrtype) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* access log file */ SEXP getLogFile(SEXP env, SEXP ptrtype) { @@ -5107,6 +5142,7 @@ SEXP getLogFile(SEXP env, SEXP ptrtype) { return ptr; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ /* -------------------------------------------------------------------------- */ @@ -5198,9 +5234,9 @@ SEXP flushStdChannels(SEXP env) { newch = CPXaddchannel(R_ExternalPtrAddr(env)); - if (newch != NULL) { - /* create channel pointer *//* - PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + 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)); @@ -5270,6 +5306,12 @@ SEXP flushChannel(SEXP env, SEXP newch) { } +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP addFpDest(SEXP env, SEXP newch, SEXP cpfile) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* add a file to the list of message destinations for a channel */ SEXP addFpDest(SEXP env, SEXP newch, SEXP cpfile) { @@ -5291,8 +5333,15 @@ SEXP addFpDest(SEXP env, SEXP newch, SEXP cpfile) { return out; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +SEXP delFpDest(SEXP env, SEXP newch, SEXP cpfile) { + SEXP out = R_NilValue; + return out; +} +#else /* -------------------------------------------------------------------------- */ /* remove a file to the list of message destinations for a channel */ SEXP delFpDest(SEXP env, SEXP newch, SEXP cpfile) { @@ -5314,6 +5363,7 @@ SEXP delFpDest(SEXP env, SEXP newch, SEXP cpfile) { return out; } +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ /* -------------------------------------------------------------------------- */ @@ -6524,3 +6574,125 @@ SEXP getIndConstr(SEXP env, SEXP lp, SEXP which) { return out; } + + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12080000) +/* -------------------------------------------------------------------------- */ +/* sets and opens a logfile */ +SEXP setLogFileName(SEXP env, SEXP filename, SEXP mode) { + + SEXP out = R_NilValue; + const char *rfilename; + const char *rmode; + + if (filename == R_NilValue) { + rfilename = NULL; + } + else { + rfilename = CHAR(STRING_ELT(filename, 0)); + } + + if (mode == R_NilValue) { + rmode = NULL; + } + else { + rmode = CHAR(STRING_ELT(mode, 0)); + } + + checkEnv(env); + + status = CPXsetlogfilename(R_ExternalPtrAddr(env), rfilename, rmode); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_ScalarInteger(status); + + return out; +} +#else +SEXP setLogFileName(SEXP env, SEXP filename, SEXP mode) { + SEXP out = R_NilValue; + return out; +} +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12080000) */ + + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12080000) +/* -------------------------------------------------------------------------- */ +/* get the name of the current logfile */ +SEXP getLogFileName(SEXP env) { + + SEXP out = R_NilValue; + + int ret, sp; + int osp = 0; + char *namesp = NULL; + + checkEnv(env); + + ret = CPXgetlogfilename(R_ExternalPtrAddr(env), + NULL, 0, &sp + ); + + if (ret == CPXERR_NEGATIVE_SURPLUS) { + osp -= sp; + namesp = R_Calloc(osp, char); + + status = CPXgetlogfilename(R_ExternalPtrAddr(env), + 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; +} +#else +SEXP getLogFileName(SEXP env) { + SEXP out = R_NilValue; + return out; +} +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12080000) */ + + +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) +/* -------------------------------------------------------------------------- */ +/* get CPLEX parameter hierarchy name */ +SEXP getParmHierName(SEXP env, SEXP whichparam) { + + SEXP out = R_NilValue; + + char strp[CPX_STR_PARAM_MAX]; + + checkEnv(env); + + status = CPXgetparamhiername(R_ExternalPtrAddr(env), Rf_asInteger(whichparam), strp); + if (status != 0) { + status_message(R_ExternalPtrAddr(env), status); + } + + out = Rf_mkString(strp); + + return out; +} +#else +SEXP getParamHierName(SEXP env, SEXP whichparam) { + SEXP out = R_NilValue; + return out; +} +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ + diff --git a/src/cplexAPI.h b/src/cplexAPI.h index fa75a0e451c3fcdcb0c479a23df284855859cb7e..da268430d5c470adcd7109b8639324c1e8318974 100644 --- a/src/cplexAPI.h +++ b/src/cplexAPI.h @@ -703,3 +703,16 @@ 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); + +/* new in CPLEX 12.8.0 begin */ +/* sets and opens a log file */ +SEXP setLogFileName(SEXP env, SEXP filename, SEXP mode); + +/* get the name of the current logfile */ +SEXP getLogFileName(SEXP env); +/* new in CPLEX 12.8.0 end */ + +/* new in CPLEX 12.9.0 begin */ +/* get CPLEX parameter hierarchy name */ +SEXP getParmHierName(SEXP env, SEXP whichparam); +/* new in CPLEX 12.9.0 end */ diff --git a/src/init.c b/src/init.c index 5349d0a849417e056f021acdeaf184be14ce090b..23c18533c787dc0dcc8a11329d88a69ce4e9521b 100644 --- a/src/init.c +++ b/src/init.c @@ -60,6 +60,7 @@ static const R_CallMethodDef callMethods[] = { {"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}, @@ -251,10 +252,24 @@ static const R_CallMethodDef callMethods[] = { {"getLongParm", (DL_FUNC) &getLongParm, 2}, {"getInfoLongParm", (DL_FUNC) &getInfoLongParm, 2}, #endif + +/* -------------------------------------------------------------------------- */ +/* setLogFileName, getLogFilename */ +/* -------------------------------------------------------------------------- */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12080000) + {"setLogFileName", (DL_FUNC) &setLogFileName, 3}, + {"getLogFileName", (DL_FUNC) &getLogFileName, 1}, +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12080000) */ + +/* -------------------------------------------------------------------------- */ +/* getParmHierName */ +/* -------------------------------------------------------------------------- */ +#if defined(CPX_VERSION) && (CPX_VERSION >= 12090000) + {"getParmHierName", (DL_FUNC) &getParmHierName, 2}, +#endif /* defined(CPX_VERSION) && (CPX_VERSION >= 12090000) */ {NULL, NULL, 0} }; - /* -------------------------------------------------------------------------- */ void R_init_cplexAPI(DllInfo *info) {