Pyomo is a Python-based open-source software package that supports a diverse set of optimization capabilities for formulating, solving, and analyzing optimization models.
Questions tagged [pyomo]
1504 questions
4
votes
1 answer
PYOMO: How to create constraint relaxation? (Rewrite constraint from CPLEX in Pyomo)
I am trying to transfer a model written in GAMS using CPLEX solver to Pyomo. CPLEX has a feature allowing modelers to relax constraints & decision variables if a model is infeasible - FeasOpt (for Feasible Optimization). I am having trouble…

Steve
- 135
- 1
- 10
4
votes
3 answers
pyomo seems very slow to write models
I have a pretty big model (around 5 million variables and constraints).
The building time is a few minutes and the solving time is a few minutes too (with gurobi)
But it takes very long to write the model (about 2 hours)
This is the time if I use…

Nank
- 159
- 1
- 4
4
votes
0 answers
Migrating from HDF5 to NetCDF for storing pyomo model results
I am getting problems when migrating to a NetCDF data format from HDF5 for storing a dictionary of pandas DataFrames, which contain the data and results of a pyomo model.
The current HDF5 saving script, which functions without a problem is as…

scandas
- 71
- 4
4
votes
1 answer
Install Ipopt solver to use with Pyomo in ubuntu
How can I install ipopt solver to use it with pyomo in ubuntu???
I have already download the zip file of ipopt
but I don'n find any specific instructions how to install it and use it with pyomo.

Filippos Ser
- 366
- 1
- 6
- 16
3
votes
2 answers
Not able to install pyomo solver ipopt on databricks
Successfully installed pyomo on databricks using the collowing command -
pip install 'pyomo[optional]'
Output -
Successfully installed algopy-0.5.7 casadi-3.5.5 dill-0.3.5.1 et-xmlfile-1.1.0 mpmath-1.2.1 networkx-2.8.5 numdifftools-0.9.40…

user22
- 112
- 1
- 9
3
votes
1 answer
Can Pyomo use Google's GLOP or CP-SAT solvers?
Pyomo can be linked with several solvers
Open source and commercial ones.
I was wondering if Pyomo can be linked with Google's GLOP or CP-SAT solvers?
Thanks

Optimization team
- 145
- 5
3
votes
1 answer
Pyomo not returning optimum
I'm trying to solve the following problem in pyomo:
For that, I've defined the following model, which I solve with MindtPy:
import pyomo.environ as pyo
model = pyo.ConcreteModel()
model.x = pyo.Var(domain=pyo.NonNegativeIntegers)
model.y =…

Seon
- 3,332
- 8
- 27
3
votes
0 answers
Possibility to obtain iterations data in SCIP .sol file
I am using SCIP solver (with AMPL executable file) in PYOMO for an optimization problem. Unfortunately the output file in .sol format doesn't contain the iterations data. The information available in the solution file is shown below.
SCIP version…

Wilson Mendes
- 139
- 8
3
votes
2 answers
Pyomo | Couenne solver | restrict indexed variable domain to two integer values
I'm a newbie to Pyomo and struggling with understanding the intuition behind Pyomo's syntax and how it builds its models. This may be why I cannot figure out how to define and solve a 'binary' problem where N variables must take only ±1 values using…

MaxMa
- 33
- 3
3
votes
1 answer
Parameter Estimation with mle in pyomo
I want to estimate the parameters of an RL model from a behavioral dataset with pyomo.
#dummy data
dis_data = pd.DataFrame([0,1,0,0,0,1], columns=['reward'])
dis_data['Expt']=str(1)
dis_data = dis_data.set_index('Expt')
def…

faraa
- 575
- 3
- 14
- 42
3
votes
1 answer
TypeError PYOMO: Defining constraints based on pandas dataframe
For an optimization problem, I am trying to define a constraint in PYOMO, where the the constraint expression includes some specific values from a pandas DataFrame.
I will try to explain my problem in a concise way.
Following are the imports.
from…

Wilson Mendes
- 139
- 8
3
votes
1 answer
PYOMO: Defining dataset using Sets and Parameters for solving an optimization problem
I am trying to formulate some data into a PYOMO model for an optimization problem.
materials = ['steel', 'alum', 'carbon', 'cheese']
Each material has 2 properties - density and conductivity and their values are defined as follows.
density = { …

Rua Goa
- 127
- 9
3
votes
5 answers
ApplicationError: No executable found for solver 'ipopt' in Pyomo
I am learning Pyomo and trying to use ipopt to solve an example question. but initially, I have installed package, then it always shows that there is not a ipopt found. After that, I reinstalled many time, now it shows that
'''WARNING: Could not…

ZHEHAN ZHAO
- 37
- 1
- 1
- 5
3
votes
2 answers
Keeping variable names when exporting Pyomo into a .mps file
So, i'm currently working with a pyomo model with multiple instances that are being solved in parallel. Issue is, solving them takes pyomo quite a long time (like 2 to 3 secs, even though the solving part by gurobi takes about 0.08s). I've found out…

Pablo Pablo
- 165
- 10
3
votes
1 answer
How to set initial values for decision variables in Pyomo model
I am working on a Mixed Integer Programming Model in Pyomo and hope to set initial values for my decision variables (which is a matrix in my case). How can I do that?
To be more specific, the following can succeed in setting a initial guess of 2 on…

Wilson
- 125
- 8