Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to code a loop for changing the whole excel data file?

    Posted 10/19/15 10:14 PM

    Originally posted by: Kei1


    I have 720 data files (excel files) from which my model should read data and solve a single model.

     

    I have searched the forum and all I have found are loops about reading data from a single excel file or changing cells/rows in one single excel file.

     

    I would really appreciate it if you could help me with a loop  changing the data files and writing the objective value and cpu time.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: How to code a loop for changing the whole excel data file?

    Posted 10/20/15 04:55 AM

    Hi,

    You will have to write 720 SheetConnection and SheetRead in the .dat so what I suggest is to generate this .dat through scripting.

    And then you call this .dat in a main block.

    See http://www-01.ibm.com/support/docview.wss?uid=swg21508158

    for how to use IloOplOutputFile

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: How to code a loop for changing the whole excel data file?

    Posted 10/20/15 10:06 AM

    Originally posted by: Kei1


    Well, changing the file manually by changing the name would be easier than writing 720 sheet connections.

    Isn't there a way to do this without a person doing this tedious and time consuming things?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: How to code a loop for changing the whole excel data file?

    Posted 10/20/15 12:37 PM

    Hi,

    yes the simpler way is to generate this .dat through scripting as I suggested.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: How to code a loop for changing the whole excel data file?

    Posted 10/20/15 10:33 PM

    Originally posted by: Kei1


    Would you kindly elaborate on this scripting you are referring to?

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer