Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Speed up model reading with ModelReader.read?

    Posted 11/06/20 03:39 PM
    Hi,
    I have a customer evaluating CPLEX and he had the following question:  I have another technical question. I have divided my project into two scripts, one "prepare" script that generates and saves a base model, and a second "main" script that loads the base model, populates it with additional constraints and objective coefficients for a specific scenario, and then solves it. I was originally saving the model using the LP format, but I found that the SAV format was a lot faster. However, reading the model (with ModelReader.read) is still much slower than writing it (with Model.export_as_sav): reading takes almost 6 minutes whereas writing only takes 10 seconds. What can I do to speed up the reading? If it helps, I could send you my SAV file and my Python code.

    Thank you.
    Hunter

    ------------------------------
    Hunter Ambach
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Speed up model reading with ModelReader.read?

    Posted 11/06/20 05:16 PM
    Reading a model should be slower than writing it, since reading the model causes the model structures to be built in memory. A better comparison would be the time required to read the SAV file versus the time required to build the model prior to exporting it.

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 3.  RE: Speed up model reading with ModelReader.read?

    Posted 11/06/20 05:48 PM

    Hi Paul,

    I'm that customer :-)

    I am finding that loading from a SAV file is significantly slower than creating the model from scratch. See this thread:

    https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer/viewthread?GroupId=5557&MessageKey=855c3554-2c67-460e-b4b4-f9f07de68827&CommunityKey=ab7de0fd-6f43-47a9-8261-33578a231bb7

    Thanks,

    Leo



    ------------------------------
    Leo Singer
    ------------------------------