Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Python-MIP and Python DOcplex solving time

    Posted Wed March 12, 2025 10:19 AM

    Hi,

    I am solving an optimization problem and I am using Python DOcplex lbrary which uses IBM ILOG CPLEX Optimization Studio academic version.  It solves my problem in 14 seconds. However, I need to use Python-MIP which uses CBC solver but it solves the same problem in 16 minutes. I was wondering if there is a way to reduce this simulation time when I use Python-MIP. I know Python-MIP also works with CPLEX. I tried it and the simulation still takes a long time to run. I really appreciate it if you could help me with this.

    Thank you.



    ------------------------------
    Seyed Mohammad Javad Hosseini
    ------------------------------


  • 2.  RE: Python-MIP and Python DOcplex solving time

    Posted Thu March 13, 2025 10:11 AM
    Edited by PhR Thu March 13, 2025 10:54 AM

    The Python-MIP web site does not mention that their solver can run on the top of CPLEX. 
    How did you manage to try it ? 




  • 3.  RE: Python-MIP and Python DOcplex solving time

    Posted Fri March 14, 2025 02:34 AM

    with python-MIP you can export mps file with

    m.write('model.mps')

    and then use cplex through import mps in docplex

    mdl = ModelReader.read('c:/temp/model.mps', ignore_names=False)
    
    mdl.solve(log_output=True,)

    from example



    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------