About using the irace for algorithms calling cplex solver

49 views
Skip to first unread message

istenç Tarhan

unread,
Nov 13, 2020, 7:31:23 AM11/13/20
to The irace package: Iterated Racing for Automatic Configuration
Hi,

I want to configure the parameters of a matheuristic in which ILOG Cplex solver  is frequently called.  I read the user guide of the irace package yet I could not understand if it can be used for this kind of algorithms or not.

I would be very glad if you can help me on this issue.

Cheers,
Istenc

Manuel López-Ibáñez

unread,
Nov 13, 2020, 8:11:27 AM11/13/20
to The irace package: Iterated Racing for Automatic Configuration
Dear Istenc,

It can be and it has been used for tuning cplex many times. There are many ways to do it:

* One way is via an R package: https://CRAN.R-project.org/package=Rcplex See the examples in the user-guide about using an R function as the targetRunner.

* or creating your own executable (target-runner) with command-line parameters that uses the Cplex API (for example, C++) to change parameters, load problems and collect results.

* or you can create a target-runner script (window powershell, bash, python, etc) that calls the cplex command-line executable. I attach an example of the latter using BASH, but it will need to be customized for your application. I also attach an example of parameters description file.

* another option is to run irace with the option "aclib=1" and use the wrapper available here as the target-runner: https://bitbucket.org/mlindauer/aclib2/src/master/target_algorithms/mip/cplex12.6/wrapper.py

It would be nice to have more examples about this, hence, let us know which method you end up using.

Best,

Manuel.
target-runner
cplex12-parameters-num.txt

istenç Tarhan

unread,
Nov 13, 2020, 8:36:17 AM11/13/20
to Manuel López-Ibáñez, The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thanks for your prompt and informative response. I will check the options you listed at the first opportunity and when I hopefully make progress and have some results, I can of course let you know.

Cheers,
Istenc

--
You received this message because you are subscribed to a topic in the Google Groups "The irace package: Iterated Racing for Automatic Configuration" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/irace-package/ludVkF4GD7c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to irace-packag...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/irace-package/9985668c-d2cd-4761-b783-8243934a53c6n%40googlegroups.com.

istenç Tarhan

unread,
Dec 17, 2020, 4:59:23 AM12/17/20
to Manuel López-Ibáñez, The irace package: Iterated Racing for Automatic Configuration
Hi Manuel,

I applied the irace package successfully, thanks for your help. I was planning to use it to configure cplex options in my matheuristic algorithm yet instead, I did use it to configure its other parameters. 

I am not sure if it is an important feedback but I would like to share my struggle to follow the tutorial as a windows user. The tutorial I read is linux-orieented. I tried to execute corresponding steps in windows yet I couldn't succeed somehow. Therefore, I had to resort to linux and run the irace in a linux environment. 

My another observation is regarding the configurations generated/tried. I have given quite wide ranges for numerical parameters yet the configurations suggested by irace at the end are very similar. Of course, it is expected to observe similarities in best configurations but the point I am surprised is as to irace generating so many similar configurations in the first place. For my algorithm, small changes in parameters do not have substantial impacts therefore, configurations with slight differences are expected to yield very similar results. To this end, I would prefer an irace option to determine how distinct configurations should be (I am sorry if there is already such an option and I miss it). "Forbidden values" can be used for this aim yet a simpler option for configuration distinctness would may be more preferrable.

I just wanted to share my experience if it is of any help.

Thanks very much again.

Cheers,
Istenc

Manuel López-Ibáñez

unread,
Dec 17, 2020, 5:01:25 AM12/17/20
to The irace package: Iterated Racing for Automatic Configuration
Thanks for the feedback. It is useful to know these things.

You may wish to give a try to the iraceStudio tool we are developing: https://github.com/mrbarrientosg/iraceStudio

Hopefully, it is easier to use for Windows users. Leslie wrote a message recently to this list about it.
Reply all
Reply to author
Forward
0 new messages