Comments (2)
It is less than ideal (as a solver instance is created upon import), but there is actually very little overhead in creating the interface. Ideally, I have wanted to do an overhaul of ConfigDict
's implementation of default
to defer the processing of the `default value until the first time the value is requested. That would allow something like:
CONFIG.declare(
'solver',
ConfigValue(
domain=SolverFactory,
default='gurobi',
description="A solver to use to solve the continuous subproblems for "
"calculating the M values",
),
)
...and the actual solver object would not be created until the first time the value was accessed.
The advantage of holding the solver instance as part of the transformation configuration is that a user can both set and configure the solver before calling the transformation and those options will persist through all the solves in the transformation.
from pyomo.
I think John's suggestion is what we need in the long run here. Just opened it as a separate issue in #3244
from pyomo.
Related Issues (20)
- 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
- Units not consistent when differentiate returns zero HOT 8
- NameError in pyomo when import pertpy HOT 6
- Pyomo.DAE Simulator support for PDAEs HOT 7
- Pyomo hangs when running MAiNGO solver HOT 6
- NL writer linear presolver not detecting infeasibility HOT 1
- Unscaling model after solving using propagate_solution(scaled_model, original_model) throws error HOT 4
- Tests fail: RecursionError: maximum recursion depth exceeded in comparison 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.