Questions tagged [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
1,578
questions
0
votes
0
answers
6
views
Pyomo, file path issue
I have the current code provided to me by my thesis supervisor. he advised me that the code should run without any changes. i have the file and code saved in the same folders and have edited the excel ...
0
votes
0
answers
9
views
In a MINLP optimization, how can I ensure that a variable is set to 0 by constraint instead of a really low value in pyomo?
I have been trying my hand at a MINLP process synthesis problem that has been running into numerical difficulties due to small non-zero values.
In essence, the model contains continuous flow variables ...
-2
votes
0
answers
32
views
Wrong sign in the dual variable of a constraint
I am pretty new to Pyomo. I am sorry if the question is trivial, but I do not understand.
I have the following LP:
S = pyo.ConcreteModel()
S.dual = pyo.Suffix(direction=Suffix.IMPORT_EXPORT)
S.x = pyo....
0
votes
1
answer
33
views
Pyomo- adding in export limitation constraints into pyomo optimization for battery energy storage optimization model
I've been bashing my head up against a wall trying to add additional constraints into the battery energy flow model:
https://github.com/cwkcodes/lockbox/tree/7943fb664e808c0ba1bcb11a81f6180b34e1a623/...
0
votes
2
answers
61
views
Limit the sum of param and var at any timestep
I'm currently writing a Python/Pyomo script that optimizes the combined usage of a battery storage system and a solar power plant.
I want to constrain the combined energy output of the solar power ...
0
votes
0
answers
13
views
Pyomo did not find license for solvers
I worked with pyomo to solve MINLP.
After i updated pyomo to the latest version pyomo-6.7.3, i get the error:
ValueError: gams is not licensed.
I checked, if gams is an environment variable. If i type ...
0
votes
1
answer
40
views
How to create a binary on-off switch for 2 variables using glpk linear programming?
I have created a contrived example of my problem in an example here. It involves 2 water pipes which lead from a dam to a town. I want only 1 pipe to carry water over each timestamp, t.
I have created ...
0
votes
0
answers
29
views
GLPK solver in Azure
I want to resolve a problem in Python with Pyomo modules. and I can resolve it locally with my laptop because I installed GLPK as a solver. I would want to know how to upload GLPK to my repository in ...
0
votes
0
answers
26
views
How to read the .smps file in pyomo or pysp
I want to utilize pyomo to solve 2stage stochastic programs (achieved from SIPLIB, which is in smps format), but how to make the smps file compatible with pyomo?
Is there any implementation? I found ...
0
votes
0
answers
23
views
Duplicates Found in CBC
Pyomo generated this CBC file, which CBC says is not valid because contains duplicates. How to found these duplicates?
Solver command line: ['/usr/bin/cbc', '-printingOptions', 'all', '-import', '/tmp/...
0
votes
2
answers
38
views
Pyomo + IPOPT Max Iterations reached without optimality
I have been working on an optimal control problem using Pyomo + IPOPT, but I just cannot find an optimal solution. It is a 3 phase trajectory problem with an objective of minimizing mass flow rate(...
1
vote
0
answers
32
views
Issue with calling Knitro
I use pyomo to formulate my problem and then use ampl to call knitro to solve my problem, as show in code below:
self.solver_pyo = pyo.SolverFactory(modules.find(“Knitro”), solve_io = “nl”)
My ...
0
votes
1
answer
39
views
How to implement a logical condition based on two variables with pyomo
I'm modeling a PV + BESS system to find the optimum size that will meet a certain demand profile. I'm trying to model a condition for the charging of the BESS whereby charging occur when the output of ...
0
votes
0
answers
78
views
network optimisation supply planning is not generating weekly plan
I am working on Production planning optimization where I have three stages of planning
Production plan
Packaging plan
Dispatch plan
for each stage I have its capacity and lead time it takes for each ...
1
vote
1
answer
35
views
Why pyomo unpack namedtuples in constraints?
I am new to pyomo and I want to understand why it works with namedtuple the way it works.
There is a code sample:
from collections import namedtuple
import pyomo.environ as pyo
Product = namedtuple(&...