siman_test_driver.sh

来自「This library is distributed in the hope 」· Shell 代码 · 共 23 行

SH
23
字号
#! /bin/sh# assume good result from tests; increment it if any test failsEXIT_STATUS=0for seed in "" 12345 ;do ./siman_test > siman_test.out 2>&1SECOND_LAST_ENERGY=`tail -2 siman_test.out1 | head -1 | awk '{print $4}'`LAST_ENERGY=`tail -1 siman_test.out1 | awk '{print $4}'`# echo " " $SECOND_LAST_ENERGY $LAST_ENERGYif [ $SECOND_LAST_ENERGY = $LAST_ENERGY ];then    echo -n "PASS: "else    echo -n "FAIL: "    EXIT_STATUS=`expr $EXIT_STATUS + 1`fiecho "simulated annealing test (travelling salesman problem) seed=${seed:-default}"doneexit $EXIT_STATUS

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?