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
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
This topic has been locked.
3 replies Latest Post - 2013-01-06T17:51:06Z by SystemAdmin
Pinned topic fill parameters reading from a file .dat
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-06T17:51:06Z at 2013-01-06T17:51:06Z by SystemAdmin
Re: fill parameters reading from a file .dat2013-01-02T07:28:38Z in response to SystemAdminI 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?
Re: fill parameters reading from a file .dat2013-01-06T16:32:26Z in response to SystemAdminYes, 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
Re: fill parameters reading from a file .dat2013-01-06T17:51:06Z in response to SystemAdminDo 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.