cplex built-in feature

253 views
Skip to first unread message

hosein.h...@gmail.com

unread,
Apr 3, 2017, 10:00:55 AM4/3/17
to AMPL Modeling Language
hello,
I am solving a mixed integer second-order cone program (MISOCP) with cplex. I am wondering if cplex has any built-in decomposition feature (like Benders) to invoke to solve such hard problems?   

Robert Fourer

unread,
Apr 5, 2017, 2:21:16 PM4/5/17
to am...@googlegroups.com
There is a Benders decomposition option in the recently released CPLEX 12.7. I have copied below the AMPL options for using it (taken from http://ampl.com/products/solvers/solvers-we-sell/cplex/options/). You can let CPLEX decompose the problem, or specify the decomposition yourself using the .benders suffix; if the latter, you will need to specify "suffix benders IN;" and all integer variables will need to be put in the master problem.

I do not know whether this feature works with MISOCP problems, but you can experiment with it. In general, decomposition is not always helpful, but it doesn't hurt to try it out.

Bob Fourer
am...@googlegroups.com

///////////

benders_feascut_tol Tolerance for violations of feasibility cuts in Benders
algorithm.

benders_optcut_tol Tolerance for violations of optimality cuts in Benders
algorithm.

benders_strategy How to decompose the problem for Benders algorithm:
-1 = do not apply Benders algorithm
0 = automatic choice (default): if suffix benders
is present on variables, variables that have
.benders = 0 go into the master and CPLEX
assigns other variables to workers; otherwise
integer variables go into the master and
continuous variables into workers
1 = use suffix benders to determine which variables
are for the master (.benders = 0) and which
for workers (.benders = n > 0 ==> worker n
2 = similar to 0, but suffix benders is required
3 = similar to 0, but ignore suffix benders (if
present).

bendersopt Single-word phrase: use Benders algorithm.
Both integer and continuous variables must be present.

=======

hosein.h...@gmail.com

unread,
Apr 6, 2017, 10:55:40 AM4/6/17
to AMPL Modeling Language, hosein.h...@gmail.com
Thank you for reminding me on this new feature. two more questions:
- as a user of AMPL, can this feature be used in AMPL-CPLEX?  
- if the problem is stochastic MISOCP, does cplex run the model for each scenario separately? can CPLEX handle such a stochastic case? 

Robert Fourer

unread,
Apr 6, 2017, 8:47:06 PM4/6/17
to am...@googlegroups.com
To access CPLEX's Benders Decomposition features from AMPL, use the cplex_options directives described in my previous post. Some of the settings for the "benders_strategy" directive also require setting the suffix .benders on the variables, to specify which are in the master and which are in subproblems. If you use these settings then you will need to give the AMPL command "suffix benders IN;" and then use "let" statements to set the suffix values on all the variables; for example,

let {i in ORIG, j in DEST} Use[i,j].benders := 0;
let {i in ORIG, j in DEST, p in PROD} Trans[i,j,p].benders := 1;

It is not clear from the CPLEX 12.7 documentation whether the Benders Decomposition feature works with MISOCP problems; you'll have to try it, or ask on the CPLEX forum (https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002059).

Also IBM has provided few details of how CPLEX is implementing Benders Decomposition. You can use different cplex_options settings to tell CPLEX which variables are in the master problem and which are in the different subproblems, or you can let CPLEX decide based on its own analysis of your problem, but then you just have to wait and see how well the decomposition scheme works for your problems.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of hosein.h...@gmail.com
Sent: Thursday, April 6, 2017 7:11 AM
To: AMPL Modeling Language

hosein.h...@gmail.com

unread,
Apr 14, 2017, 10:27:49 AM4/14/17
to AMPL Modeling Language, hosein.h...@gmail.com
hello,
I have just renewed my AMPL software (2 days ago). I see that CPLEX version is 12.6.3. I expected to get CPLEX version 12.7 which implements Benders decomposition. Can you please tell me why the latest version of CPLEX is not included in this new AMPL? 

 

On Monday, April 3, 2017 at 6:30:55 PM UTC+4:30, hosein.h...@gmail.com wrote:

Robert Fourer

unread,
Apr 15, 2017, 11:28:40 AM4/15/17
to am...@googlegroups.com
We have been distributing CPLEX 12.7 for many months now. You can download this new version of CPLEX from your account at http://www.ampl.com/dl/ampl-download.html, using the appropriate "cplex" link; then install the new files cplex.exe and cplex1270.dll in your AMPL folder (or wherever you keep your solver files). After that, when you specify "option solver cplex;" you should find that AMPL is using CPLEX 12.7.

AMPL Licensing Services
lice...@ampl.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of hosein.h...@gmail.com
Sent: Friday, April 14, 2017 1:23 AM
To: AMPL Modeling Language
Cc: hosein.h...@gmail.com

hosein.h...@gmail.com

unread,
Apr 16, 2017, 1:04:14 AM4/16/17
to AMPL Modeling Language, hosein.h...@gmail.com
I do not see that version in the link. can you please advise me how to download that?


On Monday, April 3, 2017 at 6:30:55 PM UTC+4:30, hosein.h...@gmail.com wrote:

Robert Fourer

unread,
Apr 16, 2017, 10:46:33 PM4/16/17
to am...@googlegroups.com

When you log in at http://www.ampl.com/dl/ampl-download.html with username hosein.h...@gmail.com and your previously chosen password, you will see a download page that begins like this:



The "cplex" link for "mswin64" will get you a 64-bit version of CPLEX 12.7.  However IBM did not release a 32-bit version of CPLEX 12.7; thus the "cplex" link for "mswin32" will only get you a 32-bit version of CPLEX 12.6.3.  Currently we do not expect that IBM will release 32-bit versions of CPLEX 12.7 or later CPLEX releases.
     
You can tell that you have downloaded the 64-bit version of CPLEX 12.7, because you will have files cplex.exe and cplex1270.dll.  If you have these files but you are still seeing CPLEX 12.6.3 when you solve using AMPL, then somewhere else on your computer there must be another folder containing cplex.exe and cplex1263.dll, and you will need to move them where AMPL does not find them.  (You can delete them but it is prudent to try 12.7 first.)

Bob Fourer
am...@googlegroups.com


From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of hosein.h...@gmail.com


Sent: Saturday, April 15, 2017 9:01 PM
To: AMPL Modeling Language
Cc: hosein.h...@gmail.com

Subject: [AMPL 13864] Re: cplex built-in feature

image003.jpg

Hossein Haghighat

unread,
Apr 16, 2017, 11:06:16 PM4/16/17
to am...@googlegroups.com
hello,
thank you. my platform is win32. I see that CPLEX 12.7 is provided only for win64 platform. is there any solution to this problem? 

--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/vDszz1MP6Sw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+unsubscribe@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Robert Fourer

unread,
Apr 17, 2017, 5:32:55 PM4/17/17
to am...@googlegroups.com
We build CPLEX for AMPL using libraries compiled by IBM. Effective with version 12.7, IBM dropped CPLEX support for 32-bit platforms and stopped supplying us with 32-bit libraries. Thus it is not possible for us to offer a 32-bit version of CPLEX 12.7 for AMPL; we still offer an older 32-bit CPLEX for AMPL download, but it is stuck at version 12.6.3. The only way to use newer versions of CPLEX is to switch to a computer that is running a 64-bit version of its operating system.

Bob Fourer
am...@googlegroups.com

=======

hosein.h...@gmail.com

unread,
Apr 22, 2017, 8:27:16 AM4/22/17
to AMPL Modeling Language, hosein.h...@gmail.com
I am running my model with CPLEX 12.7. with benders suffix defined for master and sub-problem. I get the following error: 

unrecoverable failure: CPLEX error # 2004.






On Monday, April 3, 2017 at 6:30:55 PM UTC+4:30, hosein.h...@gmail.com wrote:

AMPL Support

unread,
Apr 22, 2017, 8:34:14 AM4/22/17
to am...@googlegroups.com
CPLEX error 2004 is documented at:

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.cplex.help/refcallablelibrary/macros/CPXERR_NOT_FOR_BENDERS.html

AMPL Support Services
sup...@ampl.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of hosein.h...@gmail.com
Sent: Saturday, April 22, 2017 12:22 AM
To: AMPL Modeling Language
Cc: hosein.h...@gmail.com
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages