
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]CPLEX Version 4.0 is available on the ECN-supported Solaris and HPUX platforms in /usr/new. (The exact version we have installed is Version 4.0.8, but, in this article, I'll use just the base version number of "4.0".) Current plans are to make CPLEX Version 4.0 the default version in /usr/opt during the summer of 1997.
Those people who use CPLEX in the interactive mode (by invoking the command cplex ) should see little difference between version 3.0 (in /usr/opt/bin) and version 4.0 (in /usr/new/bin). Differences there are described at the beginning of the "CPLEX V4.0 Conversion Notes". A copy of the notes is available in /package/cplex/4.0.8/common/conversion.notes on the Solaris and HP systems.
The Version 4.0 change that will have the most impact on user programs is that all subroutine names and number of calling parameters have changed. For most subroutines, the new name is the V3.0 name with "CPX" prepended, and the new subroutine calling parameters are the same as the V3.0 parameters with one additional argument added as the first parameter. For example, if the V3.0 routine was: .ce function(arg1, arg2, arg3)
the V4.0 routine usually is:
CPXfunction(env, arg1, arg2, arg3)
where "env" is a pointer to a "CPLEX environment," a concept new with CPLEX Version 4.0. Also, in Version 4.0, the routines for loading problems have been simplified (as well as being renamed). For more information and helpful advice on converting from the CPLEX V3.0 Callable Library to V4.0, see the CPLEX V4.0 Conversion Notes (in /package/cplex/4.0.8/common/conversion.notes).
As an aside, it should be mentioned that the user's manual for CPLEX, Using the CPLEX Callable Library, does not include the version number on the title page of the manual. However, the version number is on the back of the title page. When consulting the CPLEX user's manual, people should check the back of the title page to verify which version of the manual they are using. Since Version 4.0 is such a radical change from Version 3.0, it is important to know that the manual is for the appropriate version.
cc $CPLX_CFLAGS program_name.c $CPX_LFLAGS
The output file from the above command line would be a.out, and, since the $CPLEXLICENSE variable is set, typing a.out will execute the program and access the CPLEX license server correctly. If a person has a previously compiled and linked program that uses the CPLEX Callable Library, sourcing the appropriate cplexlic shell script will set up only the $CPLEXLICENSE environment variable, allowing execution of the file by accessing the CPLEX license server correctly.
People are strongly urged to start using the cplex_setup and cplexlic shell scripts now. Sourcing the scripts should make it easier to migrate to new versions of CPLEX as they become available. Since the shell scripts will automatically be updated to the new versions, users will not have to modify their own private files.
For "sh" and "ksh" shell users, to set up the environment scripts variables described above for compiling, linking, and running routines that use the CPLEX library, type /usr/opt/bin/cplex_setup.sh for the V3.0 library, or, /usr/new/bin/cplex_setup.sh for the V4.0 library. (Note the "." before the usr/opt/bin/cplex_setup.sh. It must be there.) For a routine that is already compiled and linked, only the $CPLEXLICENSE variable is needed; typing /usr/opt/bin/cplexlic.sh will set it up for V3.0, or, /usr/new/bin/cplexlic.sh for V4.0. (Again note the "." before the usr/opt/bin/cplex_setup.sh. It must be there.) Any of these commands may be added to your .profile.
For users of "csh" and "tcsh," there is a comparable set of shell scripts. To set up the variables for compiling, linking, and running routines that use the CPLEX library, type "source /usr/opt/bin/cplex_setup.csh" for the V3.0 library, or, for the V4.0 library, "source /usr/new/bin/cplex_setup.csh". For a routine that is already compiled and linked, only the $CPLEXLICENSE variable is needed; to set it up type source /usr/opt/bin/cplexlic.csh for V3.0, or, source /usr/new/bin/cplexlic.csh for V4.0. Any of these commands may be added to your .cshrc.
All of the information given in this section about the shell scripts is also available in the CPLEX man page, which can be displayed by typing man cplex for the V3.0 man page, or, man -M /usr/new/man cplex for the V4.0 man page.