Hello,
In the code below, I'm importing the data for the parameter C_link from excel...and it's working well. But now I want to define the sets ORIG and DEST in the excel file and then import them to AMPL. In that way, I won't have to write "{"n1","n2","n3","n4","n5","n6"}" in the .mod file. Is this possible? How can I do this?
Thank you in advance for your help.
---------------------------------------------------------------------
reset;
set ORIG={"n1","n2","n3","n4","n5","n6"};
set DEST={"n1","n2","n3","n4","n5","n6"};
set link within {ORIG,DEST};
param C_link{link}>=0;
table LINKS IN "ODBC" "BBDD_Modelo_Basico_v00.xls" "LINKS":
link<-[ORIG,DEST], C_link;
read table LINKS;
var x{link}>=0;