also, if you have time to look it.. the algorithm has as inputs -i ( the instances) -t time and -n the number of trials. i have defined all these as:
Code:
void read_parameters(int argc, char **argv)
{
int iarg=1;
while (iarg < argc) {
if (strcmp(argv[iarg],"-i")==0) {
inputFile = argv[++iarg];
}
if (strcmp(argv[iarg],"-t")==0) {
tmax = atoi(argv[++iarg]);
}
if (strcmp(argv[iarg],"-n")==0) {
num_trials = atoi(argv[++iarg]);
}
iarg++;
}
}
But i dont know how to write, make a loop maybe so that in every trial it gives me the value, #of this trial and the time to compute this value. Because if i write to run for example:
./ig.exe -i instances/scp51.txt -t ( this must me the maximum time i want to put for the iteration) -n 5 it gives me sth like this:
Code:
value 289 trial 5 time 0.157
value 256 trial 5 time 0.157
value 239 trial 5 time 0.157
value 228 trial 5 time 0.157
value 220 trial 5 time 0.157