Syntax Error in .dat file

You can’t use set-expressions like 1..8 in a .dat file. (See the discussion of a similar situation in Why does “set S := 50 … 70” give me a set of only 3 members? in our FAQ section.) In the .dat file, you can write out the sets explicitly:

# In .dat file:
set AgeClass := 1 2 3 4 5 6 7 8 ;
set Fleet := 1 2 ;
set Year := 2023 2024 2025 ;

But I have shown only three of the years here, and you will have to actually write out 50 of them, which is prone to errors. If the membership of these sets is not going to change much, you can instead define the sets using expressions like 1..8 in the .mod file:

# In .mod file:
set AgeClass := 1..8;
set Fleet := 1..2;
set Year := 2023..2072;

Alternatively, it you want to be able to have different data files with different members for these sets, you can write the model like this:

#In .mod file:
param nAgeClasses integer > 0;
param nFleets integer > 0;
param firstYear integer > 0;
param lastYear integer > firstYear;

set AgeClass := 1..nAgeClasses;
set Fleet := 1..nFleets;
set Year := firstYear..lastYear;

Then you have just four parameters — nAgeClasses, nFleets, firstYear, and lastYear — to give values for in the in data:

# In .dat file:
param nAgeClasses := 8;
param nFleets := 2;
param firstYear := 2023;
param lastYear := 2072;