[SCIP] Conversion of CIP.sol to NL.sol

Vladimir V. Voloshinov vladimir.voloshinov at gmail.com
Mon Feb 10 00:05:40 CET 2020


Dear SCIP developers,
can you recommend some way to convert solution in CIP format to AMPL
SOL-file (in the presence of corresponding NL-file in AMPL format)?

I found that the following trick helps, but may be there is another way?
Suppose we have: problem.nl, appropriate problem.nl.cip and problem.cip.sol
(returned, e.g. by FiberSCIP, for problem.nl.cip as an input model).
1. Start SCIPAMPL console and load problem.nl as model
$ scipampl problem.nl -i
2. Read problem.cip.sol from SCIPAMPL console (outputs presented below)
SCIP> read problem.cip.sol
primal solution from solution file <problem.cip.sol> was accepted as
candidate, will be checked when solving starts
3. Load some limits to stop optimization process just after beginning, e.g.
SCIP> set limits nodes 2
4. Start optimization and wait a few seconds
SCIP> optimize
5. Write AMPL SOL-file
SCIP> write amplsol
Now we get problem.sol containing the solution in AMPL format.
The only drawback is the first string with solver status "node limit
reached" in problem.sol, but it may be "manually" replaced with "optimal
solution found" to get correct SOL-file with appropriate status.

See some additional notes below.
We use Pyomo Python package to prepare optimization model and write it to
NL-file (AMPL format). Usually we use SCIPAMPL to read NL-file and to get
solution as SOL-file (AMPL format), which may be loaded "back" to the model
by Pyomo tools to analyse  results.
But for hard problems we need to use ParaSCIP or FiberSCIP. For that we use
SCIPAMPL console to convert NL-file to CIP-file,
https://scip.zib.de/doc-6.0.2/html/reader__cip_8h.php, because ParaSCIP and
FiberSCIP does not accept AMPL-formats. So, we get solutions also in
CIP-format, but Pyomo does not provide tool to load solutions from CIP.sol !
Up to now,  for special cases, homebred "readers" have been used, but we
need more universal approach.

Sincerely yours,
Vladimir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20200210/cbcd40d7/attachment.html>


More information about the Scip mailing list