Topic
  • 3 replies
  • Latest Post - ‏2013-01-06T17:51:06Z by SystemAdmin
SystemAdmin
SystemAdmin
754 Posts

Pinned topic fill parameters reading from a file .dat

‏2012-12-26T15:40:23Z |
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
Updated on 2013-01-06T17:51:06Z at 2013-01-06T17:51:06Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    754 Posts

    Re: fill parameters reading from a file .dat

    ‏2013-01-02T07:28:38Z  
    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?
  • SystemAdmin
    SystemAdmin
    754 Posts

    Re: fill parameters reading from a file .dat

    ‏2013-01-06T16:32:26Z  
    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
  • SystemAdmin
    SystemAdmin
    754 Posts

    Re: fill parameters reading from a file .dat

    ‏2013-01-06T17:51:06Z  
    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
    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.