SCIP在自动化测试中编写最佳可行解决方案 [英] SCIP write best feasible solution in automated test
问题描述
基于 http://scip.zib.de/doc/html/中的步骤TEST.php ,我设法使用SCIP设置了自动化测试.但是,我想将解决方案(最可行的解决方案)写到文件中,而不是仅仅获得目标值.无论如何,在自动化测试中有做吗?
Based on steps in http://scip.zib.de/doc/html/TEST.php, I have managed to set up an automated test using SCIP. However, I'd like to write the solution (best feasible solution) to a file, instead of just getting the objective value. Is there anyway to do it in the automated test?
我通过替换
OPTCOMMAND=optimize; write solution myfilename.sol;
但是很糟糕,它似乎不起作用,当我尝试进行TEST = mytest测试时,从输出中看到了这一行
But too bad, it doesn't seem to work, when I tried to make TEST=mytest test, this line is observed from the output
bash ./check.sh mytest bin/scip-3.1.0.linux.x86_64.gnu.opt.spx default scip-3.1.0.linux.x86_64.gnu.opt.spx 3600 2100000000 6144 1 default 10000 false false 3.1.0 spx false /tmp optimize;
write: solution is not logged in on myfilename.sol
我知道可以通过交互式shell编写解决方案,但是我正在尝试使测试自动化以检索解决方案和obj值.任何帮助或澄清将不胜感激!
I know it is possible to write the solution via interactive shell, but I am trying to automate the test in order to retrieve both solution and obj value. Any help or clarification will be much appreciated!
推荐答案
由于使用的语法,由于分号,您试图调用一个名为"write"的bash命令,因此出现错误:
You are getting an error because with the syntax you are using, you try to invoke a bash command called "write" because of the semicolon:
write实用程序允许您通过以下方式与其他用户进行通信 将线路从终端复制到终端.
The write utility allows you to communicate with other users, by copying lines from your terminal to theirs.
只需尝试不使用分号;)
Just try without semicolon ;)
更清洁的解决方案是修改文件"check/configuration_tmpfile_setup_scip.sh" 并添加行
The cleaner solution would be to modify the file "check/configuration_tmpfile_setup_scip.sh" and add the line
echo write solution /absolute/path/to/solutions/${INSTANCE}.sol >> $TMPFILE
在退出命令之前.此配置文件设置了一个批处理文件,以向SCIP提供交互式外壳程序应执行的所有命令,并且您可以对任意用户的行为进行建模.
before the quit command. This configuration file sets up a batch file to feed SCIP with all commands that the interactive shell should execute, and you can model arbitrary user behavior.
这篇关于SCIP在自动化测试中编写最佳可行解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!