Comments (9)
Please see the online documentation for setting solver options:
Using the Pyomo command: https://software.sandia.gov/downloads/pub/pyomo/PyomoOnlineDocs.html#_passing_options_to_a_solver
Using a script: https://software.sandia.gov/downloads/pub/pyomo/PyomoOnlineDocs.html#SolverOpts
In general you can specify any option a solver accepts, you just have to make sure you are setting the appropriate option name for a particular solver.
from pyomo.
I get the following error if I try running the command --solver-options='limits/gap=0.01'
ERROR: cannot open file <limits/gap=0.01> for reading
I've been able to add a mipgap with glpk and gurobi, but not scip
from pyomo.
Our solver plugin to SCIP uses the ASL interface. You need to have the scipampl executable built, and you need to be using option names that are available through that interface. You can see the list of available options for most ASL based solvers using a command like:
scipampl -=
Gabe
On Sep 27, 2016, at 11:44 AM, Dheepak Krishnamurthy [email protected] wrote:
I get the following error if I try running the command --solver-options='limits/gap=0.01'
ERROR: cannot open file <limits/gap=0.01> for reading
I've been able to add a mipgap with glpk and gurobi, but not scip—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from pyomo.
This post seems to suggest that scipampl does not support solver options. And when I run scipampl -=
I get the following. I'm not sure if that's what you supposed it'd say? Thoughts?
SCIP version 3.2.1 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: SoPlex 2.2.1] [GitHash: c7c6c02]
Copyright (c) 2002-2016 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)
External codes:
Readline EditLine w GNU library for command line editing (gnu.org/s/readline)
SoPlex 2.2.1 Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 267a44a]
cppad-20140000.3 Algorithmic Differentiation of C++ algorithms developed by B. Bell (www.coin-or.org/CppAD)
ZLIB 1.2.5 General purpose compression library by J. Gailly and M. Adler (zlib.net)
GMP 6.1.1 GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
ZIMPL 3.3.3 Zuse Institute Mathematical Programming Language developed by T. Koch (zimpl.zib.de)
ASL AMPL Solver Library developed by D. Gay (www.netlib.com/ampl)
number of parameters = 1886
non-default parameter settings:
file <-=.nl> not found
no problem exists
[src/reader_nl.c:1694] ERROR: No AMPL problem read, cannot write AMPL solution then.
from pyomo.
According to this post, another way to set options is to write a 'scip.set' file and specify options using the scip parameter names. Just make sure this file is in the same directory as your model file.
I'm pretty sure there is a way to set the options directly from the Pyomo command line but this might be a good work around in the meantime. It also might be a better solution if you plan on changing many of the options or repeatedly specifying certain options.
from pyomo.
Great! That works. However, (as I understand it) this will not work if I want to do the following, is that correct?
from pyomo.environ import * # import pyomo environment
from ReferenceModel import model # import model
instance = model.create_instance('model.dat')
solver = SolverFactory('scip') # create the scip solver
results = solver.solve(instance) # solve
from pyomo.
It should work in that case as well. I've never tried it with scip but I've done the exact same thing with an ipopt options file.
from pyomo.
If SCIP doesn't accept command-line options like other solvers compiled against ASL, we should consider writing this file for the user. The current SCIP plugin is simply going to confuse people if setting any options on the solver plugin just causes the solver to fail (because we try to set them on the command-line).
This also brings up the question of whether or not we should do the same thing for Ipopt. I know that the set of options exposed through the command-line for the Ipopt executable is a subset of the options that can be set using an options file (some of the options have different names as well). I think it would make a lot of sense to make the full set of options available to the user through Pyomo. This would involve creating a very lightweight Ipopt solver plugin that changes how the solver options are handled.
On the other hand, I know many users that expect the options file to work independent of Pyomo, so this might break their workflow. @carldlaird: What do you think?
from pyomo.
I like this suggestion. Add a ticket!
On Wed, Sep 28, 2016 at 7:51 PM, Gabriel Hackebeil <[email protected]
wrote:
If SCIP doesn't accept command-line options like other solvers compiled
against ASL, we should consider writing this file for the user. The current
SCIP plugin is simply going to confuse people if setting any options on
the solver plugin just causes the solver to fail (because we try to set
them on the command-line).This also brings up the question of whether or not we should do the same
thing for Ipopt. I know that the set of options exposed through the
command-line for the Ipopt executable is a subset of the options that can
be set using an options file (some of the options have different names as
well). I think it would make a lot of sense to make the full set of options
available to the user through Pyomo. This would involve creating a very
lightweight Ipopt solver plugin that changes how the solver options are
handled.On the other hand, I know many users that expect the options file to work
independent of Pyomo, so this might break their workflow. @carldlaird
https://github.com/carldlaird: What do you think?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#48 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAsb-G67ClQlFxUVmPSVLyXQxTtywhzCks5quv2TgaJpZM4KHwC3
.
from pyomo.
Related Issues (20)
- Issue with Piecewise constraint and GLPK HOT 1
- Missing documentation for cython-based builds
- External Function addfunc: duplicate: HOT 1
- Reference Pyomo book table of contents HOT 1
- Capture Highs output when solving
- No value for uninitialized NumericValue object HOT 3
- Broken link in Examples page HOT 1
- Poor use of a SolverFactory? HOT 2
- Whether pyomo supports reading .lp or .mps files, HOT 1
- Unable to install pyomo solvers in macos HOT 1
- errors during tests: RecursionError: maximum recursion depth exceeded in comparison HOT 2
- SCIPAMPL failing to read solving time from log file
- Pyomo Versions > 6.4.4 result in crashes for several ASL-based MINLP solvers (believed to be related to NL Writer) HOT 8
- REMINDER: Unpin `mpi4py` once fix is released HOT 2
- LP writer dies given a Var with an empty domain
- Sometimes constraints are not satisfied with NL Writer V2 with export_defined_variables=True
- Defer processing ConfigDict's handling of default values until they are needed
- Pyomo can't solve cubic or higher order polynomials with Gurobi 11
- Clean up Experiment List Parmest Code
- Pure Python wheel of Pyomo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyomo.