Problems in Interfacing Scip with Pyomo

Question:

I am trying to solve a nonlinear optimization problem using Pyomo. At first, I tried the Ipopt solver and I got the things running. I then wanted to try the solver Scip to try for global optimization since Ipopt is a local solver. However, I get an error that I can not understand while using it.

Getting Scip working with Pyomo was not straightforward, however through some help on internet and through some trial and error, I was able to get scip executable for windows from here. I named the executable as scipampl and added it to my PATH.

Pyomo is able to see the solver as when I run the following command, it returns True.

SolverFactory('scip').available() 

Feeling confident that I got the things working, I then tried to run my code. I setup my Solverfactory as follows:

solver     =  'scip'               
solver_io  =  'nl'                  
opt        =   SolverFactory(solver, solver_io = solver_io)

But to my disappointment, I receive the following error in the end:

[Errno 2] No such file or directory: 'C:\Users\NITINN~1.SIN\AppData\Local\Temp\tmpc0hzo5_7.pyomo.sol'

I have tried to look on the internet as to what does this mean, but so far I have been out of luck. I would appreciate if anyone can throw some light over what the possible cause for this might be ?

Thanks.

Asked By: your_boy_gorja

||

Answers:

You need an executable of the SCIP/AMPL interface. The normal SCIP executable, which is probably the one you got, doesn’t contain one.
Currently, the last available one for Windows on the SCIP download page is this one: https://scip.zib.de/download.php?fname=scipampl-6.0.0.win.x86_64.intel.opt.spx2.exe.zip

Answered By: stefan

Aam also facing the same problem but still no solution found, i have tried the above download and exeicuted after adding it to the PATH, but the same error is coming again !

pleas help me:

[src/reader_nl.c:785] ERROR: AMPL operand number OP_cos not supported so far.
[src/reader_nl.c:1687] ERROR: No AMPL problem read, cannot write AMPL solution then.
SCIP version 6.0.0 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: SoPlex 4.0.0] [GitHash: 77d3bc8]
Copyright (C) 2002-2018 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)

External codes:
SoPlex 4.0.0 Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 82cab95]
CppAD 20180000.0 Algorithmic Differentiation of C++ algorithms developed by B. Bell (www.coin-or.org/CppAD)
Ipopt 3.12.12 Interior Point Optimizer developed by A. Waechter et.al. (www.coin-or.org/Ipopt)
ASL AMPL Solver Library developed by D. Gay (www.netlib.com/ampl)

number of parameters = 2428
non-default parameter settings

read problem <C:UsersfurquAppDataLocalTemptmpsult72kp.pyomo.nl>

error reading file <C:UsersfurquAppDataLocalTemptmpsult72kp.pyomo.nl>

no problem exists

FileNotFoundError: [Errno 2] No such file or directory: ‘C:UsersfurquAppDataLocalTemptmpsult72kp.pyomo.sol’

Answered By: nadeem