Dear Fourer,
I hope you are doing well.
I have a question about the F and Fprime. After creating copies of set F, we’ll get the same values for each copy. I want to put the values only for set F and make the AMPL read the same value for each copy. Can we do that? I tried to give an example of my question briefly,
Let us say we have 5 customers and 2 charging stations. The model has 3 copies of each charging station (CS). As you explained in the previous email;
set F := 7 8 9;
set Fprime := '71' '72' '73' '81' '82' '83' '91' '92' '93' ;
param nCopies integer > 0;
set F;
set Fprime = setof {f in F, i in 1..nCopies} f & i;
param nCopies := 3 ;
set F := 7 8 9 ;
While creating the data file, I wrote all CS’s copies’ locations one by one, like below. It does not seem the proper way to me. For larger data sizes, it increased the computation time. Could you please let me know if there is a way?
param: xcoord ycoord:= #location of each point
0 40.0 50.0
1 8.0 40.0
2 40.0 15.0
3 30.0 60.0
4 27.0 43.0
5 65.0 85.0
6 40.0 50.0
‘71’ 57.0 82.0
‘72’ 57.0 82.0
‘73’ 14.0 82.0
‘81’ 14.0 59.0
‘82’ 14.0 59.0
‘83’ 14.0 59.0
‘91’ 39.0 26.0
‘92’ 39.0 26.0
‘93’ 39.0 26.0
;
Thank you so much in advance.
Best regards,
Mertcan