Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  fill parameters reading from a file .dat

    Posted 12/26/12 10:40 AM

    Originally posted by: SystemAdmin


    Hi, I have a problem with these two variables:
    int costPTi in T=...;
    int costSTi in T=...;

    if I have two .dat files with the values I want to put in these parameters

    procs.dat

    example:
    procs =

    9
    10
    5
    1
    11
    19
    6
    17
    7

    and
    slots.dat
    how can I do it? is there any function in cplex that opens a file and assigns line values to vector values? I wouldn't like to use any random function from cplex as I want to use these values with other programs

    thank you
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: fill parameters reading from a file .dat

    Posted 01/02/13 02:29 AM

    Originally posted by: SystemAdmin


    I don't quite get what you want to do. Do you want to read this data in OPL (in which case you better turn to the OPL forum)? Or do you want to read the data in some programming language like C++ or Java?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: fill parameters reading from a file .dat

    Posted 01/06/13 11:32 AM

    Originally posted by: SystemAdmin


    Yes, I want to read some data generated in Matlab, and stored in a .dat file, from the OPL without using any programing interface such as C++
    I've posted the same thread in the OPL forum

    thank you
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: fill parameters reading from a file .dat

    Posted 01/06/13 12:51 PM

    Originally posted by: SystemAdmin


    Do you have control over how this .dat file is created?
    If so then you could write it so that it conforms to standard OPL data files. For more details about how to use those files see for example the short tour in the reference model.
    A formal description of the OPL data file format can be found here.
    #DecisionOptimization
    #MathematicalProgramming-General