Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Avoiding Absolute Class Paths in OPL Script

  • 1.  Avoiding Absolute Class Paths in OPL Script

    Posted 03/24/15 05:25 PM

    Originally posted by: mathygirl


    I'm loading a model with OPL script as follows:

    var source = new IloOplModelSource("myModel.mod");

    This type of implementation accesses the model with respect to the current working directory.

    The OPL script handles the control flow of the application and is run by a Java wrapper. The entire application will be packaged as a war and run on an app server, so finding the model with respect to the current working directory will not work. Is there a way to specify the directory of the model not with respect to the current working directory and not as an absolute path inside the OPL scipt?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Avoiding Absolute Class Paths in OPL Script

    Posted 03/25/15 02:55 AM

    Hi

    have you had a look at resolvePath(name) in the class IloOplModel ?

    Plus do not forget that in

    var source = new IloOplModelSource("myModel.mod");

    you use a string and you could use there any string that you compute, so any path.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer