Questions tagged [pyomo]

For questions related to the Python optimization modeling package Pyomo.

Filter by
Sorted by
Tagged with
2
votes
2answers
108 views

Pyomo + Ipopt. Speed Issue

I am using Pyomo + Ipopt as solver to solve a NLP problem. The problem is not extremely complex in terms of dimensionality and ...
5
votes
2answers
192 views

Can I use 'SCIP' solver for PYOMO?

I have an MINLP problem to solve where I was initially using 'ipopt' solver but the solution was not sticking to 'binary/boolean/integer' domain type for a variable. I am not sure which free solver ...
0
votes
1answer
41 views

Pyomo variable creation dilemma

I am working on a pyomo model, and need to create a few different sets of variables that are dependent on a solution from a master model. I need the variables to be indexed variables however the ...
4
votes
1answer
104 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: ...
5
votes
2answers
302 views

Failing to meet a constraint in a NLP problem

I have a NLP problem at hand, which I am trying to solve via Pyomo + ipopt. I try to run several different instances of the optimizer with different conditions, out ...
5
votes
1answer
236 views

Can GLPK be used to solve an optimal team selection problem?

My Problem I am quite new to optimisation, so any advice is appreciated. I am currently trying to solve a problem as follows: Given a pool of people, we want to create n teams such to find the optimal ...
7
votes
0answers
74 views

Provide basic solution to CLP

I'm using Pyomo to formulate an LP with approx 500,000 constraints and 200,000 decision variables. The LP is solved using CLP. Some instances fail to return even a feasible solution after many ...
5
votes
1answer
102 views

Does pyomo support column generation?

I want to use column generation technique to solve cutting stock problem. Is there any other python modeling library that supports column generation?
1
vote
0answers
43 views

CPLEX keeps restarting in Pyomo

I tried running my model by adding the following settings to CPLEX. ...
8
votes
2answers
334 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
115 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
78 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
88 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
69 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
739 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 ...
10
votes
1answer
290 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 ...
2
votes
1answer
200 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
120 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
80 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 ...
9
votes
2answers
628 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
1answer
92 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
47 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
79 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 ...
7
votes
1answer
181 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 ...
9
votes
1answer
172 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 ...
7
votes
1answer
263 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 ...
9
votes
2answers
963 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?
8
votes
1answer
436 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
228 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 ...
9
votes
1answer
240 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
626 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: ...
16
votes
3answers
4k 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
167 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
249 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/...
6
votes
2answers
590 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
205 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 ...
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
444 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 ...
8
votes
1answer
469 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
135 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 ...
5
votes
2answers
245 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.) ...