Hi irace team!
My name is Luciano and I'm a master student at Universidade Federal de Ouro Preto. I am studying the schedulling jobs problem and will use the BRKGA to resolve it. To parameterize I pretend to use the irace, but some problems are coming up and now I came across one that I can't solve myself.
The execution of the target-runner.bat can't recognize the executable of my code, but when i run it from command prompt it runs without errors. Follow the target-runner.bat:
#!/bin/bash
###############################################################################
# This script is the command that is executed every run.
# Check the examples in examples/
#
# This script is run in the execution directory (execDir, --exec-dir).
#
# PARAMETERS:
# %1 is the candidate configuration number
# %2 is the instance ID
# %3 is the seed
# %4 is the instance name
# The rest (%* after `shift 4') are parameters to the run
#
# RETURN VALUE:
# This script should print one numerical value: the cost that must be minimized.
# Exit with 0 if no error, with 1 in case of error
###############################################################################
#@echo off
# Please change the path to the correct one
EXE=cmake-build-debug/brkga-sjp
FIXED_PARAMS=" --tries 1 --time 10 --quiet "
CANDIDATE="$1"
INSTANCE_ID="$2"
SEED="$3"
INSTANCE="$4"
shift 4 || error "Not enough parameters."
CANDIDATE_PARAMETERS=$*
STDOUT=c${CANDIDATE}-${INSTANCE_ID}.stdout
STDERR=c${CANDIDATE}-${INSTANCE_ID}.stderr
#if not exist %exe% error "%exe%: not found or not executable (pwd: %(pwd))"
# If the program just prints a number, we can use 'exec' to avoid
# creating another process, but there can be no other commands after exec.
#exec %exe %FIXED_PARAMS% -i %instance %candidate_parameters%
# exit 1
#
# Otherwise, save the output to a file, and parse the result from it.
# (If you wish to ignore segmentation faults you can use '{}' around
# the command.)
$EXE ${FIXED_PARAMS} -i ${INSTANCE} --seed ${CANDIDATE_PARAMETERS}
#if %errorlevel% neq 0 exit /b %errorlevel%
# # This may be used to introduce a delay if there are filesystem
# # issues.
# SLEEPTIME=1
# while [ ! -s "%stdout%" ]; do
# sleep %SLEEPTIME
# let "SLEEPTIME += 1"
# done
#
# This is an example of reading a number from the output.
# It assumes that the objective value is the first number in
# the first column of the last line of the output.
#if exist %stdout% (
#SETLOCAL EnableDelayedExpansion
#SET "CMD=findstr /R /N "^^" %STDOUT% | find /C ":""
COST=$(cat ${STDOUT} | grep -o -E 'Best [-+0-9.e]+' | cut -d ' ' -f2)
echo "$COST"
#echo %CMD%
#del %stdout% %stderr%
exit 0
#) ELSE (
#exit /b
#)
After to run it, is presented the following message:
Can someone help me? I would be really grateful.
Best regards.
Luciano Alves Corrêa
Mestrando em Engenharia de Produção
UFOP