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.

1504 questions
-1
votes
1 answer

How get a better infeasible solution cplex?

Problem with Infesiable result Cplex Hi, I have a iterable problem using a few mutable param, en some case the first result if infeseable. I have the problem that when the problem made the first iteration it stars a while and the result doesnt…
-1
votes
1 answer

Using Python to optimize a linear programming problem with a fraction as a constraint

I am trying to solve the following linear programming problem with a constraint that requires at least 10% of each ingredient. The problem is asking that the solution consists of at least 10% seeds, 10% raisins, 10% flakes, 10% pecans, and 10%…
-1
votes
1 answer

Optaplanner and Pyomo

I'm currently using pyomo environment to solve optimization problems. I have used different solvers (Ipopt, glpk, cbc, couenne) in order to solve my problems. Actually I need to solve a non-linear problem with a global solver. I've already tried…
-1
votes
1 answer

Linear problem for chemical composition of a formulation

Dears, I´m writing a Linear Program for optimization. One of my goals is to recommend to my supplier which raw material mix to use in its product formulation in order to optimally fulfill my nutrient needs in several locations.…
-1
votes
1 answer

Prediction models, Objective functions and Optimization in Python

How do we define objective functions while doing optimization in Python. We have defined Prediction models separately. Next step is to bring objective functions from prediction models (Gradient boosting, Random forest , Linear regression etc) and…
suresh hp
  • 11
  • 1
  • 2
-1
votes
1 answer

Prediction models, Objective functions and Optimization

How do we define objective functions while doing optimization using pyomo in Python. We have defined Prediction models separately. Next step is to bring objective functions from prediction models (Gradient boosting, Random forest , Linear regression…
suresh hp
  • 11
  • 1
  • 2
-1
votes
1 answer

AllDifferent Constraint in Pyomo

I am trying to run a MINLP problem on Pyomo. I have formulated an objective function and one of my constraints is this: model.c2 = Constraint(expr = sum(model.x[i] for i in blocks) <= 4560) I want something like this: x+y+z<=3 with x not equal to y…
-1
votes
4 answers

How to include a if check into a for loop

I try add a constraint expressions to a python/pyomo model: the code I tried is this: for r_k in VAR1: for p_v in VAR2: for b_n in VAR3: IF mix[b_n][p_v]() >= 0: …
Perry Hall
  • 11
  • 5
-1
votes
1 answer

Initializing IPOPT when using pyomo parmest

I am learning to use pyomo parmest. I am trying to recreate the following parameter estimation example. The code that I created is in the following jupyter notebook. IPOPT stops with the message of maximum iterations exceeded when using collocation…
-1
votes
1 answer

Iterating of Dictionary

Panda Excel File Reading I am attempting to try and access an excel files rows and columns and do some basic distance calculations, but I keep getting the same values> i am attempting to find the distance from any two points of the map by iterating…
-1
votes
1 answer

Pyomo DAE optimal control problem with FREE end points

I use pyomo.dae to solve differential equation optimization I defined a set m.e = ContinuousSet(bounds=(e0, ef)) But I want ef to be free as variable. It's a flexible end points differential problem. How can I accomplish it?
htam_ujn
  • 23
  • 5
-1
votes
1 answer

'SumExpression' object is not iterable

i am trying an opimization problem in pyomo...i get 'SumExpression' object is not iterable error at line(model.nt[j] = model.ntm1[j] + ....)... as shown in below code R_2_j(), R_1_j() function outputs depend on decision variables...if i make…
-1
votes
1 answer

Is it possible to engage multiple cores (like gcc -j8) when solving with Pyomo?

The power flow library PyPSA uses Pyomo. I am trying to reduce the cost of each linear optimal power flow simulation. I read through the Pyomo docs. Nothing sticks out at me yet. Perhaps it is not possible to split up the processing when solving…
mbards
  • 43
  • 3
  • 10
-1
votes
1 answer

How to formulate constraints in linear programming so that a set of consecutive variables are forced to be equal?

Let's say we are optimizing over 2 variables, each a vector of 6. That is, Y=[y0,y1,...y5], and X=[x0, x1, ..., x5]. How do I formulate a constraint in linear programming so that it forces the following solutions: x0=x1=x2=x3 & x4=x5. Or is it…
-1
votes
1 answer

Pyomo Model LP file with variable values

I've build a pyomo model, and via following I am writing the lp file of the model: # write LP file filename = os.path.join(os.path.dirname(__file__), 'model.lp') model.write(filename, io_options={'symbolic_solver_labels': True}) I am getting the…
oakca
  • 1,408
  • 1
  • 18
  • 40
1 2 3
99
100