pyomo

Constraint 'feasibility_cut[1]' does not have a proper value. Found 'True'

Constraint 'feasibility_cut[1]' does not have a proper value. Found 'True' Question: I’m new to python and pyomo, so I would kindly appreciate your help, I’m currently having trouble trying to add a constraint to my mathematical model in Pyomo, the problem is while I try to add the "feasibility_cut", it says "Constraint ‘feasibility_cut[1]’ does not …

Total answers: 1

Pyomo create a constraint based on an indexed set

Pyomo create a constraint based on an indexed set Question: I have a set of constraint that is given as follows: for all n in N, for all i in l(n): … N is a set of nodes, in a concrete model in Pyomo: model.Nodes = pyo.Set(initialize = range(len(nodes))) Each node has a different length. …

Total answers: 1

How do you write Ranged Inequality Constraint in Pyomo

How do you write Ranged Inequality Constraint in Pyomo Question: I’m new to Pyomo and I need help writing this equation in Pyomo. I’m trying to write a (ranged inequality) constraint equation in Pyomo. Here is the equation: So far I wrote these 2 versions: Version 1: Not sure if this correct model.amount_of_energy_con = pe.ConstraintList() …

Total answers: 1

How can I run a model multiple times changing the parameter value in pyomo?

How can I run a model multiple times changing the parameter value in pyomo? Question: I am working with a MIP model with multiple parameters and I’d like to test different scenarios (with different parameter values). I’ve created a df with the parameter values that need to be changed and did a loop where the …

Total answers: 1

How do I dynamically add variables to list in Pyomo?

How do I dynamically add variables to list in Pyomo? Question: As part of a BuildAction rule that gets triggered on creation of a concrete model, I am dynamically creating additional "internal" decision variables (dependent on data supplied at construction time). As well as creating these variables (which get used in constraint expressions), I know …

Total answers: 1

Using NEOS as a Pyomo solver

Using NEOS as a Pyomo solver Question: I have recently started in doing some OR, and have been trying to use Pyomo and NEOS to do some optimation problems. I have been following along with one of the UT Austin Pyomo lectures, and when my GLPT was being difficult to be installed, I moved on …

Total answers: 2

Proper way to define a matrix using pyomo's sets

Proper way to define a matrix using pyomo's sets Question: I have been given a pyomo deterministic optimization model which I have transformed in a stochastic one using stochastic colocation methods. However, I am having issues to save the output. I have defined the number of stochastic nodes (number of values of the state variables) …

Total answers: 2

Problems in Interfacing Scip with Pyomo

Problems in Interfacing Scip with Pyomo Question: I am trying to solve a nonlinear optimization problem using Pyomo. At first, I tried the Ipopt solver and I got the things running. I then wanted to try the solver Scip to try for global optimization since Ipopt is a local solver. However, I get an error …

Total answers: 2

Python doesn't find Pyomo

Python doesn't find Pyomo Question: I’m stumped on why Python won’t import pyomo. I can find the directory and see it is installed: 234:pyomo user$ pip show pyomo Name: Pyomo Version: 5.1.1 Summary: Pyomo: Python Optimization Modeling Objects Home-page: http://pyomo.org Author: William E. Hart Author-email: [email protected] License: BSD Location: /Users/user/anaconda/lib/python2.7/site-packages Requires: appdirs, PyUtilib, six, ply …

Total answers: 3