Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Ignore some data in dat file

    Posted 12/02/17 02:38 PM

    Originally posted by: FrankCAU


    Hi,

     

    I have a large dat file and two models. The first model needs all the data provided by the dat file but the second model needs only parts of it. However, if the second model does not have import statements for all the data objects in the dat file, I get the error 'the element [name of element] is not defined'.

     

    Small example:

    --- dat file --- 

    X = {0, 3, 4};

    Y = {1, 2};

    --- import statements of model 1 ---

    {int} X = ...;

    {int} Y = ...;

    --- import statements of model 2 (which only needs the set X) ---

    {int} X = ...;

     

    For model 2 I get the error 'the element Y is not defined' because the data for Y is in the dat file but not read by the model file. I know I could handle this by having a second dat file without the Y data. But isn't there an option to have CPLEX accept that not all the data from the dat file needs to be loaded? This would be more convenient than handling different data files.

     

    Thank you for your support.

     

    Frank


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Ignore some data in dat file

    Posted 12/03/17 06:00 AM

    Hi,

    All data in the .dat should be déclared in the .mod but what you do:

     

    • Add some déclare un your .mod
    • Use OPL to generate a new .dat out of the first one 

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Ignore some data in dat file

    Posted 12/07/17 01:21 AM

    Originally posted by: FrankCAU


    I understand. This would create a customized .dat file. But that's actually not what I am looking for. I want to get rid of those data declarations in my mod file that is for data items that I actually do not need. Is this possible?

     

    Best regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Ignore some data in dat file

    Posted 12/07/17 02:54 AM

    I do not think so.

    All data in the .dat should be in the .mod

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer