Hot answers tagged

21 votes

What is the purpose of libraries like Pyomo and Google OR tools?

Pyomo is an algebraic modeling language and allows users to easily represent optimization problems at a high-level (by defining variables, constraints, objective, etc.). Pyomo then provides interfaces ...
17 votes

What is the purpose of libraries like Pyomo and Google OR tools?

OR-Tools is a set of solver: A very popular Routing Library built on top of a traditional constraint programming solver An award winning ...
15 votes
Accepted

Is Apple's M1 suitable for Operations Research?

One problem you might encounter is that the many solvers are either not available for M1 like CPLEX[1]. M1 support for Gurobi might be mixed in general due to issue like "Only use single-threaded ...
12 votes

Modeling and solvers

I can't address the specifics of Python, Pyomo, Gurobi or GAMS, but I can address the general question of using a modeling language (such as GAMS) versus building the model directly in a general ...
  • 35.6k
12 votes

What is the best open source solver for large scale LP optimization in pyomo?

There is a new open source solver that looks quite promising, HiGHS: https://www.maths.ed.ac.uk/hall/HiGHS/ But as pointed out by others, for mixed-integer programming problems, at the moment, open-...
12 votes
Accepted

CPLEX gives different solutions of MILP every run

There are a number of decisions CPLEX makes that can be affected by "randomness". In some cases, CPLEX is actually using a random number generator to make decisions (such as breaking ties). ...
  • 35.6k
10 votes
Accepted

Reading an LP/MPS file using Pyomo software

According to this link on Pyomo forum from 2016 about LP files, and this one from 2018 about MPS file, this functionality doesn't exist yet. To quote from the first link: LP files are “flat” ...
  • 5,786
10 votes
Accepted

Termination Criteria of Solver in Pyomo

If the IPOPT termination condition is Optimal Solution Found then the returned solution is locally optimal. IPOPT is, by design, not a global solver and therefore ...
10 votes

Is Apple's M1 suitable for Operations Research?

We at Mosek has started porting Mosek to the Apple M1 CPU so the upcoming version 10 will support it. Here is an initial thought. Normally optimization software links to a BLAS/LAPACK library such as ...
  • 2,816
10 votes

Problem is infeasible with Gurobi, feasible with cbc (but can't access objective value)

If I read the lp file and try solving with CPLEX: So I think your assumption is correct: the bug comes from CBC, as CPLEX and GUROBI both return infeasible. The CPLEX log also tells you which row is ...
  • 11.8k
9 votes

What is the purpose of libraries like Pyomo and Google OR tools?

Different solvers have their own interfaces (for example Cplex studio by IBM). You can use the specific syntax for those IDE or interfaces to input your model and then use the solver to solve it. ...
  • 8,463
9 votes

NLP solvers in pyomo other than ipopt?

I think it is a good idea to have a look at this question on StackOverflow. In addition to that, in the Pyomo manual, it is stated that: "Pyomo supports a wide variety of solvers. Pyomo has ...
  • 8,463
8 votes

NLP solvers in pyomo other than ipopt?

APOPT is another NLP (and MINLP) solver that works with Pyomo by reading .nl files and producing .sol files. The solver is ...
8 votes
Accepted

Modeling and solvers

In a production environment, I have found code APIs to be superior to modelling languages in the long run. Nowadays, we also have Pyomo so we don't even need to compromise between the two. The ...
8 votes
Accepted

What is the best open source solver for large scale LP optimization in pyomo?

The Mittlemann benchmarks are an excellent benchmark as ever in particular these two: Benchmark of Barrier LP solvers Large Network-LP Benchmark (commercial vs free) Note that Pyomo doesn't have ...
7 votes

What Exactly Is A Warm Start?

There is a difference between an initial condition and initial values. Initial conditions in the context of differential equations fix the values of dynamic variables at the initial point. When you ...
7 votes

pyomo - pass time limit to NEOS

complex Pyomo MINLP to NEOS using Couenne. So, I had to Google a bit to understand this part as I am not familiar with the package nor the NEOS service. It would be beneficial as to where in the ...
7 votes
Accepted

pyomo/ipopt: nonlinear network optimization not converging

That IPOPT message means that IPOPT could not find a feasible solution to your problem. The reason could be either that: Once you set that value below 30, IPOPT can no longer find that basin of ...
7 votes
Accepted

Why is Gurobi output in Pyomo returning floating-point values rather than optimal integer solution?

I suspect Gurobi actually only gets passed floating point values from the Python API and it only works with floating point values internally so Python or the Python API might implictly convert your ...
6 votes

NLP solvers in pyomo other than ipopt?

Pyomo has an ASL interface, hence any solver that is equipped with one will work out of the box. Commercial options that have free variable limited demos would be KNITRO, BARON, or Octeract Engine, ...
6 votes
Accepted

NLP solvers in pyomo other than ipopt?

This post is of my interest. I also required a global solver for my problem. I found out that Pyomo has python interface for an opensource global solver called SCIP for nonlinear optimization problems....
6 votes
Accepted

Pyomo: Building Up A Constraint Over An Index

You just need to sum over another index variable than $t$. Here is the correct code: ...
  • 2,707
6 votes

Understanding why this MINLP formulation is infeasible

There is a systematic way of finding the infeasibility of your problem. You would like to find the Irreducibly Inconsistent System (IIS) of your model. This technology is available in CPLEX and Gurobi ...
  • 1,055
6 votes
Accepted

knapsack problem with non-linear constraint

Hold the phone... You can keep this linear. Just sum the selection variables and multiply by the min average requirement. No division required. ...
  • 250
6 votes
Accepted

Constraintlist with two Options Pyomo

A variable that can assume values of zero or between some lower and upper bound is called a semi-continuous variable. Most high-end solvers have direct support for this type of variable. If not ...
6 votes
Accepted

No executable found for solver 'ipopt

One of the most important things to keep in mind is that we should install Pyomo in another environment than the base environment together with its solvers. However, this is not enough to use Pyomo ...
  • 133
6 votes
Accepted

Of what size should I expect to be able to solve an integer linear program with Pyomo?

This very much depends on the solver (glpk) and not so much on the modelling language (Pyomo). In my experience, glpk is not among the best free ILP solvers. You may try cbc, which I think is somewhat ...
  • 5,954
5 votes
Accepted

Pyomo: Looping Over A Variable Method

v represent each of your variables. I assume that your model is called 'model': ...
  • 8,463
5 votes

Integer Decision Variables Always Forced to Zero in Minimization Problem (MINLP)

You can try adding a constraint forcing one of the affected variable to be nonzero. If the model becomes infeasible, you can try to find the conflicting constraints. If the model stays feasible, this ...
  • 1,122
5 votes

Problems Installing APOPT in Pyomo

It sounds like the APOPT executable is not in your system's PATH. From your description, I suspect that the solver's name should be --solver=apopt.py instead of <...

Only top scored, non community-wiki answers of a minimum length are eligible