Skip to contents

Returns the pairs of instance IDs and seeds used as instances in the race (and optionally the actual instances).

Usage

get_instanceID_seed_pairs(iraceResults, index, instances = FALSE)

Arguments

iraceResults

list()|character(1)
Object created by irace and typically saved in the log file irace.Rdata. If a character string is given, then it is interpreted as the path to the log file from which the iraceResults object will be loaded.

index

(integer())
Indexes of the (instanceID,seed) pairs to be returned. The default returns everything.

instances

(logical(1))
Whether to add the actual instances as an additional column (only if the instances are of atomic type).

Value

data.table()
With default arguments, a data.table containing two columns "instanceID" and "seed". With instances=TRUE and if the instances are of atomic type (see is.atomic()) type, another column instance is added that contains the actual instance.

Author

Manuel López-Ibáñez

Examples

log_file <- system.file("exdata/irace-acotsp.Rdata", package="irace", mustWork=TRUE)
head(get_instanceID_seed_pairs(log_file))
#>    instanceID       seed
#>         <int>      <int>
#> 1:        119  120344916
#> 2:        112 1498426593
#> 3:        113 1324006684
#> 4:        137  156117387
#> 5:         97 2123556176
#> 6:         31  975149182
# Add the instance names
get_instanceID_seed_pairs(log_file, index=1:10, instances=TRUE)
#>     instanceID       seed                 instance
#>          <int>      <int>                   <char>
#>  1:        119  120344916 ./instances/2000-539.tsp
#>  2:        112 1498426593 ./instances/2000-532.tsp
#>  3:        113 1324006684 ./instances/2000-533.tsp
#>  4:        137  156117387 ./instances/2000-637.tsp
#>  5:         97 2123556176 ./instances/2000-437.tsp
#>  6:         31  975149182  ./instances/2000-22.tsp
#>  7:        130  657774990 ./instances/2000-630.tsp
#>  8:         25 1688886839 ./instances/2000-224.tsp
#>  9:        183 1722597766 ./instances/2000-923.tsp
#> 10:         22  545710096 ./instances/2000-221.tsp