Search code examples
pythonwindowsdistributed-computingcplexpyomo

How to read cplex virtual machine configuration file through Pyomo in windows?


I am setting up cplex distributed computing over two machines (windows system) in Pyomo. How can I do that in a python script?

I have already set up the cplex distributed computing connection through tcp/ip and can do parallel computing using Cplex Interactive Optimizer as instructed here: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.1/ilog.odms.cplex.help/CPLEX/UsrMan/topics/parallel_optim/distribMIP/09_tcp_ip.html

I don't know how to do the same thing in Pyomo API. Based on my research, pyomo's SolverFactory can only change the settings of solver parameters. What I want to do is to change the vmc settings through Pyomo API.


Solution

  • It may not be possible to do this through pyomo, but you can certainly do it using the CPLEX Python API directly. See the documentation for Cplex.copy_vmconfig, Cplex.read_copy_vmconfig, etc. Also, CPLEX comes with the distmipex1.py and distmipex2.py examples (you can find these under COS_INSTALL_DIR/cplex/examples/src/distmippython).