If you want that the parameter alpha depends on the number of nodes "n" in the graph associated with an instance in parameter.txt, then define a dummy parameter in parameters.txt, for example:
alpha_factor "--alpha-factor " r (1,10)
Then, calculate alpha = alpha_factor n or alpha = int(alpha_factor n) if you want alpha to be an integer, within target-runner.
To get the value of "n", either:
Within target-runner, calculate "n" given the instance file.
Alternatively, define the instances in a file "train-instances.txt" such as:
in scenario.txt. Now target-runner will receive an additional parameter "--n" with the value that corresponds to each instance. You'll need to handle that extra parameter.
The first approach is probably simpler in your case. The second approach is better when the instance feature takes long to compute (so it is better to precompute it and save its value in train-instances.txt) or it cannot be computed just from the instance data available in the input file.
A first draft is given below:
If you want that the parameter alpha depends on the number of nodes "n" in the graph associated with an instance in parameter.txt, then define a dummy parameter in parameters.txt, for example:
alpha_factor "--alpha-factor " r (1,10)
Then, calculate alpha = alpha_factor n or alpha = int(alpha_factor n) if you want alpha to be an integer, within target-runner.
To get the value of "n", either:
Within target-runner, calculate "n" given the instance file.
Alternatively, define the instances in a file "train-instances.txt" such as:
instance-file-1.txt --n 12 instance-file-2.txt --n 15 instance-file-3.txt --n 19 ...
and set
trainInstancesFile="train-instances.txt"
in scenario.txt. Now target-runner will receive an additional parameter "--n" with the value that corresponds to each instance. You'll need to handle that extra parameter.
The first approach is probably simpler in your case. The second approach is better when the instance feature takes long to compute (so it is better to precompute it and save its value in train-instances.txt) or it cannot be computed just from the instance data available in the input file.