-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathejecuciones_windows.bat
48 lines (40 loc) · 1.4 KB
/
ejecuciones_windows.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
cd REM Añadir aquí el directorio donde se encuentran vuestros archivos
REM Lee la lista de valores desde el archivo inputs.txt
setlocal ENABLEDELAYEDEXPANSION
set /p inputs=<inputs.txt
REM Crea o sobrescribe el archivo output.txt
echo. > output.txt
javac -cp AIMA.jar;Comparticion.jar *.java
REM Itera a través de cada línea en la lista de valores
for /F "tokens=1,2,3,4,5" %%a in ("%inputs%") do (
set "N=%%a"
set "M=%%b"
set "seed=%%c"
set "alg=%%d"
set "h=%%e"
echo ++++++++++++++++++++++++++++++++++++++++++++++++++ >> output.txt
echo Ejeciones con los valores de entrada: >> output.txt
echo N = !N! >> output.txt
echo M = !M! >> output.txt
echo seed = !seed! >> output.txt
if !alg! == 1 (
echo alg = Hill Climbing >> output.txt
) else (
echo alg = Simulated Annealing >> output.txt
)
if !h! == 1 (
echo h = Heuristica 1 >> output.txt
) else (
echo h = Heuristica 2 >> output.txt
)
echo ++++++++++++++++++++++++++++++++++++++++++++++++++ >> output.txt
echo. >> output.txt
for /l %%i in (1,1,10) do (
echo. >> output.txt
echo ------------Ejecución %%i------------ >> output.txt
echo. >> output.txt
REM Ejecuta el programa con los valores como argumentos
java -cp .;AIMA.jar;Comparticion.jar Lab1Experimentos !N! !M! !seed! !alg! !h! >> output.txt
)
)