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
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
1 reply Latest Post - 2013-01-08T09:49:39Z by AlexFleischer
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
AlexFleischer 270002VCBK1130 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
regardsUpdated on 2014-03-26T05:51:21Z at 2014-03-26T05:51:21Z by AlexFleischer