Hi! I have a siimilar problem but this solution seems not to wok.
I have two nested LP problems: in the first problem AMPL calculates the solution that I want to use as parameter in the second problem, with its name changed.
The solution at the end of the first problem is the following, with "total_time" as variable:
total_time [*] :=
ALPHA 0.066
BRAVO 0.082
CHARLIE 0.082
DELTA 0.082
ECHO 0.232
FOXTROT 0.182
GOLF 0.166
HOTEL 0.266
INDIA 0.332
;
Now I save this solution as the following, and seems to work infact I have the same "total_time" written above:
remove taxi_time_step1.dat;
display total_time >taxi_time_step1.dat;
In the second problem I have in the model file:
and in the data file
param TX include "taxi_time_step1.dat"; # From Step 1 solution
in which I would rename "total_time" as "TX", hope it is clear.
I get the error in the data file of the second problem:
taxi_time_step1.dat, line 1 (offset 11):
1 item(s) missing in last line of table, which starts with "total_time"
context: total_time >>> [ <<< *] :=
I could I fix it?
Thank you!
Giovanni