Questions tagged [pyomo]

For questions related to the Python optimization modeling package Pyomo. Pyomo is a Python-based open-source software package that supports a diverse set of optimization capabilities for formulating, solving, and analyzing optimization models. Pyomo allows users to formulate optimization problems in Python in a manner that is similar to the notation commonly used in mathematical optimization.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
105 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 ...
2
votes
0answers
51 views

CPLEX callback in pyomo

I am trying to figure out what is the correct use of cplex callbacks in pyomo. In particular I am looking for the translation of the following example from gurobi to cplex: ...
2
votes
0answers
66 views

Pyomo Trouble - Number of Constraints in Output is 0 When It Should Be > 5000

I have an MILP program written in Pyomo and I am using CBC as a solver. Below is a description of my problem: The model works fine when it is run on my local computer The output is the following in ...
2
votes
0answers
67 views

How to assign a single value to Pyomo parameter without a dictionary

I would like to assign a single value to a paramter that depends on a created set in Pyomo. I have the following code: ...
2
votes
0answers
82 views

PYOMO - Optimization for the daily production of a products demand minimizing the production cost

I am trying to build an optimization model using PYOMO for the daily production of a product demand, minimizing the production cost. I have demand, production capacity (by machine by day), production ...
2
votes
0answers
79 views

Find multiple solutions in Pyomo with Gurobi

I am fairly new to Pyomo and Gurobi. I'd like to find 20 sets of different solutions that meet the following constraints. ...
1
vote
0answers
24 views

How to count the number of Stale variables in Pyomo?

How to check if a variable is Stale or not? How to count them? For example let's have a variable like instance.x[i] (i in instance.i set). Let's assume some of ...
1
vote
0answers
28 views

Run Pyomo model with externally assigned variables

I have several (large) Pyomo models with about 20 variables and parameters (as time series). Out of these variables and parameters I have 3 decision variables. Now my question is whether I can use ...
1
vote
0answers
61 views

How do I write the following constraints in Pyomo?

I'm currently trying to replicate a vehicle routing problem paper, and I'm facing trouble writing the said constraints in the paper in Pyomo. I've been able to generate the data as required by the ...
1
vote
0answers
60 views

Solver issue? Xpress (slp) - Nonlinear - Python - Pyomo

I tried solving my model with xpress: pip install xpress And then in the model: ...
1
vote
0answers
55 views

How to deal with hourly and annually constraints in Pyomo?

I am wondering whether it is possible to create constraints over years and hours at the same time in Pyomo. For example, my current time variable is: ...
1
vote
0answers
124 views

Value Error in Pyomo: Constraint rule returned None

I get an error in Pyomo that I do not understand. I habe 288 timeslots t and a binary variable y (which I call here ...
1
vote
0answers
56 views

CPLEX keeps restarting in Pyomo

I tried running my model by adding the following settings to CPLEX. ...
1
vote
0answers
75 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 ...
0
votes
0answers
366 views

Use if-statements when defining a constraint in Pyomo

I would like to define the value of a variable model.variable_costsPerTimeSlot [t] in pyomo and I would like to use if-statements. Depending on the value of the if-...
0
votes
0answers
27 views

Correct way to define constraints in Pyomo

Can I know if the constraint below can be defined as follows in Pyomo for convex optimization. W and G are arrays of dimension M x N. ...