Questions tagged [pyomo]

For questions related to the Python optimization modeling package Pyomo.

Filter by
Sorted by
Tagged with
1
vote
0answers
42 views

CPLEX keeps restarting in Pyomo

I tried running my model by adding the following settings to CPLEX. ...
8
votes
2answers
289 views

knapsack problem with non-linear constraint

I have a basic knapsack problem where I need to fit the most weight possible in a bin: ...
3
votes
3answers
66 views

Possibility of indexing decision variables with 2 indices using a set of tuples in Pyomo

I am currently attempting to solve a network problem that is not fully connected.Thus, I have attempted to do some preprocessing of data so as to form a set of tuples, e.g. $\{(a,b), (c,e),\ldots\}$, ...
3
votes
1answer
55 views

View of Constraints and Decision Variables in Pyomo

I have just attempted to construct my first Pyomo model. However, I was unable to locate any documentation that shows how to view constraints, decision variables. As my model is big, I need to see ...
3
votes
1answer
83 views

Pyomo: Help setting up my model

I have been working with a model for the past couple of weeks, but I am not sure what am I doing wrong as every time Pyomo returns that is infeasible or ...
1
vote
1answer
64 views

Pyomo: Struggling to get a constraint to work

I am trying to model an Electric Vehicle scheduling to minimise the electricity bill. Of course, the EV will only be able to charge every time that is plugged into a charging station (i.e. it cannot ...
1
vote
2answers
202 views

Downloading and setting up CPLEX for Pyomo

I have just installed Anaconda and am intending to use Spyder as it is able to display variable, parameter values for debugging. After which, I am planning to use Pyomo to code my MIP model and invoke ...
2
votes
1answer
66 views

how to implement a constraint with max/min function in pyomo

I am implementing a NLP problem in pyomo, and I am getting some issues for this constraint: \begin{equation} \forall i \in \lbrace 1, N \rbrace , \forall j \in \left\{1, M \right\}: Y_{i,j} \cdot ...
3
votes
1answer
61 views

Pyomo add constraint error: Rule failed when generation expression for constraint

I am trying to solve a model with Pyomo and struggling with indexing. Below is a simple problem instance, where you can also see the error. The message is straightforward and self-explanatory but ...
1
vote
1answer
54 views

Model Simulation in PYOMO

I have an optimization model that I have developed within the PYOMO framework and I am unable to solve the model in a reasonable amount of time using the BARON solver. I have been instructed not to ...
3
votes
1answer
66 views

How to define hybrid variables without using additional binary variables?

I am working on a large NLP model with equilibrium equations in which the variables are defined in the following form: $$x_i \in [L_B, U_B] \cup\{0\} \quad \text{where} \quad L_B \ \& \ U_B \in\...
1
vote
0answers
39 views

Rolling Horizon in Pyomo

I am trying to figure out how one could write a rolling horizon algorithm in PYOMO to speed up the solution of a model that I am building. My understanding of the Rolling Horizon Algorithm is that you ...
4
votes
1answer
55 views

BARON Error: variables/rows fixed as scaled bounds too close

I am trying to build my model up and keep running into this output from BARON: Clp0019I {x} variables/rows fixed as scaled bounds too close. I checked the BARON ...
9
votes
2answers
598 views

Modeling and solvers

I have just started to dive into OR world on my work. Currently we are using GAMS with Gurobi but some of us have strong programming background and would like to have more programmatic approach to OR. ...
3
votes
0answers
62 views

Pyomo CBC 1.#j error

I am using to solve my model Pyomo/CBC combination. But rarely, CBC Gap shows 1.#j and pyomo generate an error. Hence, it doesn't get solution. How can I solve this problem? Screen output: ...
9
votes
2answers
715 views

Reading an LP/MPS file using Pyomo software

I would like to know is it possible to read an LP/MPS file into the Pyomo software and solve the problem? If so, how can I do that?
7
votes
1answer
228 views

Understanding why this MINLP formulation is infeasible

Algebraic Formulation - Note: All parameter values are subject to change, I have just used the numbers you see here as place holders for the time being. Additionally, there are a few other equations ...
8
votes
1answer
313 views

Pyomo: Looping Over A Variable Method

I am trying to extract my variable values into unique lists so that I can pass them to a panadas dataframe and eventually export the dataframe to Excel after I solve my model. The idea is to have the ...
7
votes
2answers
167 views

Pyomo: Building Up A Constraint Over An Index

I am trying to create a constraint for model.z that builds up as a summation during a new time index. I tried to use the += but this does not work with Constraints ...
7
votes
1answer
135 views

Pyomo: Is this triple summation objective function formatted correctly?

I am writing a Pyomo model and trying to code the following mathematical constraint: $$ \sum_{i=1}^I\sum_{j=1}^J\sum_{t=1}^T 5I_{ijt} + 10L_{ijt}I_{ijt} $$ where $L_{ijt}$ is binary. However, I am ...
6
votes
2answers
227 views

What Exactly Is A Warm Start? [duplicate]

I am fairly new to optimization modelling but I am encountering a situation in which I supply initial values to my problem and then after I run my optimization those initial values change. This seems ...
9
votes
2answers
176 views

Integer Decision Variables Always Forced to Zero in Minimization Problem (MINLP)

I am trying to write out a MINLP problem of optimal control for an invasive species and the code that I have for my PYOMO model is below. Some of the initialization values take from an Excel ...
15
votes
3answers
3k views

What is the purpose of libraries like Pyomo and Google OR tools?

I'm new to the OR world, and trying to learn the various tools available. I originally thought that Pyomo and Google OR tools were open source alternatives to commercial solvers like Gurobi or CPLEX. ...
8
votes
1answer
130 views

Understanding the AMPL Solver LIbrary within Pyomo

For anyone familiar with the Pyomo book, it occasionally makes reference to the AMPL Solver Library, and to my understanding, if you can manage to hook up to the solver library then you are able to ...
7
votes
1answer
216 views

Problems Installing APOPT in Pyomo

I am trying to install the solver "APOPT" in Pyomo by following the guidelines laid out below: *Instructions for usage: Place apopt.py in an appropriate folder in the system path (e.g. Linux, /usr/...
8
votes
1answer
341 views

Formulating a MINLP for CPLEX in PYOMO

I am trying to do my first MINLP problem using PYOMO and CPLEX - although I am not committed to using CPLEX, but it was recommended to me. To my understanding you need to formulate your problem in ...
9
votes
1answer
181 views

How to get solver time from CPLEX when using the NEOS server through Pyomo?

I've been using CPLEX on the NEOS server, via Pyomo, to solve a binary program I'm working on. NEOS is amazing, but the documentation is somewhat lacking on the Pyomo side, so I haven't been able to ...
10
votes
2answers
506 views

How to get GAMS's solvers to work from Pyomo?

I want to run a model written in Pyomo language with CPLEX solver of GAMS. However I get the following error: ...
14
votes
4answers
2k views

NLP solvers in pyomo other than ipopt?

I am solving a highly constrained (large number of constraints and large number of variables, but small degree of freedom) NLP problem, and for start, I was using Matlab's ...
8
votes
1answer
370 views

How to set a maximum time to improve a solution with Pyomo and CBC

In relation to using CBC via Pyomo: I was wondering if anyone knew if it was possible to set a maximum allowed time to improve a solution, rather than a maximum total time. This way, if you've been ...
1
vote
0answers
134 views

Optimal value exceeds actual value for a minimization problem [closed]

I am solving a nonlinear numerical optimization problem in Pyomo using Scip as a solver. The goal is to minimize a certain objective function. For certain input conditions, I notice that the solver ...
10
votes
1answer
224 views

Termination Criteria of Solver in Pyomo

I am solving a nonlinear optimization problem using Pyomo with Ipopt as solver. The solver exits with the status: EXIT: Optimal Solution Found. This I can cross ...
5
votes
2answers
232 views

Installing COIN-OR solvers in Ubuntu (Azure)

For a side project, I'm looking to install COIN-OR project solvers on a Microsoft Azure Ubuntu VM. (I will be running Pyomo optimization models on this VM as well; using NEOS isn't cutting it.) ...
9
votes
1answer
160 views

pyomo - pass time limit to NEOS

I am sending a pretty complex Pyomo MINLP to NEOS using Couenne. I'm getting an error message that the solve time is too long (sorry, I don't have it still in my Python console). Is there a way to set ...