Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  doopl - Unable to redirect log

    Posted 02/05/19 11:25 AM

    Originally posted by: abalkum


    Hi,

    I've been working with the new python doopl library for running opl models.  I'm trying to redirect the engine log to a file but the method doesn't seem seem to do anything.  After I run the following code:

    from doopl.factory import *
    with create_opl_model("C:\\Program Files\\IBM\\ILOG\\CPLEX_Studio128\\opl\\examples\\opl\\euler\\euler.mod") as opl:
            opl.redirect_engine_log("D:\\test.txt")
            opl.run()
    

    I get the output (expected from euler.mod):

    [[64 13 60 11 58 9 30 27]
             [61 6 63 8 29 26 57 38]
             [14 1 12 59 10 39 28 31]
             [5 62 7 40 25 56 37 46]
             [2 15 4 51 36 47 32 55]
             [19 22 17 24 41 52 45 48]
             [16 3 20 35 50 43 54 33]
             [21 18 23 42 53 34 49 44]]

     

    but "text.txt" is just an empty file.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: doopl - Unable to redirect log



  • 3.  Re: doopl - Unable to redirect log

    Posted 02/06/19 10:21 AM

    Originally posted by: abalkum


    Sorry about that.  I was getting errors during posting but did not realize that they posted anyway.  Subsequently, I got an error when I tried to delete the duplicate topic.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer