<div dir="ltr"><div dir="ltr"><div>Dear Stefan,</div><div>besides "single-threaded" SCIP/SCIPAMPL we use ParaSCIP and/or FiberSCIP.</div><div><br></div><div>In the previous versions parallel solvers did not read AMPL NL-files. <br></div><div>So we used interactive shell of SCIPAMPL for conversion (see <a href="http://listserv.zib.de/pipermail/scip/2020-February/003876.html">http://listserv.zib.de/pipermail/scip/2020-February/003876.html</a>): <br></div><div>1. NL-files to CIP-files (to pass them to Para/FiberSCIP);</div><div>2. CIP SOL-files (from parallel solvers) to AMPL SOL-files (to read them by Pyomo) <br>    BTW, since SCIP v7, the last conversion doesn't need patch, which was required for SCIP v6.<br></div><div><br></div><div>Can you, please, tell me if Para/FiberSCIP v8 support AMPL NL/SOL formats? </div><div><br></div><div>If not, I see two ways:<br>1) to use SCIPAMPL v7 as format converter;</div><div>2) to patch SCIP as you wrote in the previous email. <br>BUT, besides activating interactive shell option for "AMPL mode" we'll need to add "write/amplsol" command to the shell.</div><div><br></div><div>Am I right?</div><div><br></div><div>Vladimir.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 14, 2022 at 11:42 AM Stefan Vigerske <<a href="mailto:svigerske@gams.com">svigerske@gams.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On 3/13/22 23:41, Vladimir V. Voloshinov wrote:<br>
> Sorry,<br>
> when I read the Section 7.1 of "The SCIP Optimization Suite 8.0" again I<br>
> understood that I did not follow your instructions.<br>
> I erroneously have run SCIP by interactive shell:<br>
> "SCIP> read <a href="http://problem.nl" rel="noreferrer" target="_blank">problem.nl</a> optimize write/solution"...<br>
> <br>
> The command<br>
> $ scip <a href="http://problem.nl" rel="noreferrer" target="_blank">problem.nl</a> -AMPL<br>
> gave the AMPL SOL-file as I expected.<br>
> <br>
> And still the question remains: is it possible to get AMPL SOL via SCIP<br>
> interactive shell?<br>
> I see the function SCIPwriteSolutionNl() in SCIP API (<br>
> <a href="https://scipopt.org/doc/html/reader__nl_8h.php)." rel="noreferrer" target="_blank">https://scipopt.org/doc/html/reader__nl_8h.php).</a>..<br>
<br>
No.<br>
<br>
There is no shell command that would trigger SCIPwriteSolutionNl(). I <br>
also think it isn't a good idea to have this in general, as we can write <br>
AMPL .sol files only when the problem has been read from an AMPL .nl <br>
file. If the problem was read from somewhere else, bad things could <br>
happen when attempting to write an AMPL .sol file.<br>
<br>
I don't know (or better, I forgot) what you need the interactive shell <br>
for when running from Pyomo.<br>
With this change, you will get a shell when running scip problem -AMPL:<br>
--- a/src/scip/scipshell.c<br>
+++ b/src/scip/scipshell.c<br>
@@ -192,7 +192,7 @@ SCIP_RETCODE fromAmpl(<br>
     SCIPinfoMessage(scip, NULL, "\nsolve problem\n");<br>
     SCIPinfoMessage(scip, NULL, "=============\n\n");<br>
<br>
-   SCIP_CALL( SCIPsolve(scip) );<br>
+   SCIP_CALL( SCIPstartInteraction(scip) );<br>
<br>
     SCIP_CALL( SCIPgetBoolParam(scip, "display/statistics", &printstat) );<br>
     if( printstat )<br>
<br>
<br>
The shell would be called after the .nl file has been read. After the <br>
shell is closed, SCIPwriteSolutionNl() is called. If you used the shell <br>
to read a problem from a different file format in the meanwhile, things <br>
may crash.<br>
But I think we can bring back the -i option to switch between <br>
SCIPsolve() and SCIPstartInteraction() at this point.<br>
<br>
Stefan<br>
<br>
> <br>
> Yours, Vladimir.<br>
> <br>
> On Sun, Mar 13, 2022 at 10:36 PM Vladimir V. Voloshinov <<br>
> <a href="mailto:vladimir.voloshinov@gmail.com" target="_blank">vladimir.voloshinov@gmail.com</a>> wrote:<br>
> <br>
>> Hi,<br>
>> I tried SCIP-application (v8) with some AMPL NL-file as input problem<br>
>> data. It was accepted, the problem has been solved.<br>
>> But the command "write/solution" wrote the solution in CIP-format !<br>
>> Is it possible to get the solution in AMPL SOL-format ? (We use Python<br>
>> Pyomo package to write NL-files and read solutions in AMPL SOL-formats)<br>
>> I can not find the "write/amplsol" command in SCIP v8 (as it was in<br>
>> SCIPAMPL application in previous versions)...<br>
>><br>
>> Sincerely yours,<br>
>> Vladimir<br>
>><br>
> <br>
> <br>
> _______________________________________________<br>
> Scip mailing list<br>
> <a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
> <a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
<br>
</blockquote></div></div>