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.
1 reply Latest Post - 2013-01-08T09:49:39Z 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-08T09:49:39Z at 2013-01-08T09:49:39Z by SystemAdmin
SystemAdmin 110000D4XK2130 PostsACCEPTED ANSWER
Re: fill parameters reading from a file .dat2013-01-08T09:49:39Z in response to SystemAdminHi,
in a.mod file you can write
range T=1..9; int costPTi[T]=...;
and then in a.dat file
costPTi=[ 9, 10, 5, 1, 11, 19, 6, 17, 7];
oplrun a.mod a.dat will link the 2