Skip to main content
6 votes
Accepted

Gurobipy MILP model comes infeasible yet can't compute IIS because "the model is feasible"

This model is likely on the borderline between feasibility and infeasibility. The algorithm used to determine feasibility in the solver is different than the algorithm used in IIS, and may reach a ...
Mark L. Stone's user avatar
6 votes

What are some of the key features that are currently absent in open-source AMLs like Pyomo, JuMP, Gurobipy

Pulp is missing the Python Cplex Piecewize feature, and IF/ELSE features. Caylie Cincera has a nice video about this, she does a Piecewize included constraints optimization using Pulp: https://www....
estelle derrien's user avatar
5 votes
Accepted

GLPK solver with Pyomo, not recognizing infeasibility

This is indeed a little weird! When I run your example, I get the output from GLPK: ...
Sune's user avatar
  • 6,562
1 vote

Using CPLEX academic version with Pyomo on MacOS

To run CPLEX on MacOS use the code: solver = SolverFactory('cplex', executable = '/Applications/CPLEX_Studio2211/cplex/bin/x86-64_osx/cplex')
Maria Chedzoy's user avatar
1 vote

How does pyomo handle constraints with equal index

Pyomo loops through every combination of indices in model.SKU and model.T for each constraint.
Bethany Nicholson's user avatar
1 vote

OPL Constraint to pyomo ConstraintList constraint for concrete model

I think this is a perfect task for e.g. chatGPT: Prompt: Could you translate the following OPL constraints to Pyomo using pyomo’s ConstraintList: forall(j in suppliers){ ct_c_f1: x["F"][j]&...
Sune's user avatar
  • 6,562
1 vote

In Pyomo, how do I modify the Variable if the value is less than 0?

Suppose, the variables ($x$, $z$) $\in \mathbb{R}^+$. To enforce the first conditional expression, you have to define an auxiliary binary variable $w_1$ and the following constraints: $$ x \leq Mw_1 - ...
A.Omidi's user avatar
  • 8,940
1 vote
Accepted

Pyomo disjunction

The error is because you are passing IndexedDisjuncts to the Model.rotate disjunction. The "disjunction expression" ...
jsiirola's user avatar
  • 291
1 vote

Pyomo sensitivity report access

Here is a simple example of how one can access the suffix needed for printing the dual information of the constraints and also the reduced cost of the variables: ...
A.Omidi's user avatar
  • 8,940

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