## Read the parameters directly from text
pcs_table <- '
# name domain
algorithm {as,mmas,eas,ras,acs}[as]
localsearch {0, 1, 2, 3}[0]
alpha [0.00, 5.00][1]
beta [0.00, 10.00][1]
rho [0.01, 1.00][0.95]
ants [1, 100][10]il
q0 [0.0, 1.0][0]
rasrank [1, 100][1]i
elitistants [1, 750][1]i
nnls [5, 50][5]i
dlb {0, 1}[1]
Conditionals:
q0 | algorithm in {acs}
rasrank | algorithm in {ras}
elitistants | algorithm in {eas}
nnls | localsearch in {1,2,3}
dlb | localsearch in {1,2,3}
{alpha=0, beta=0}'
parameters_table <- read_pcs_file(text=pcs_table)
cat(parameters_table)
parameters <- readParameters(text=parameters_table)
str(parameters)
Run the code above in your browser using DataLab