# Tag Info

Accepted

### When are Jupyter Notebooks used to solve optimization problems in Operations Research?

TLDR: Jupyter Notebooks are a nice tool for proof of concepts (early stages of a project) + playing around + for teaching purposes (tutorials). They should not be used for industrial production. ...
• 13.6k

### Algorithm needed to find optimum area of 2-dimensional data set

Expressed via Iverson bracket notation, your problem is to maximize $$\sum_i z_i [x_\min \le x_i \le x_\max][y_\min \le y_i \le y_\max].$$ You can linearize the problem as follows. Introduce five ...
• 33.1k

### When are Jupyter Notebooks used to solve optimization problems in Operations Research?

The only use case where I find notebooks to be suitable is as an "interactive whitepaper" where explanatory formatted prose can be nicely interspersed with graphical content, equations, etc.,...
• 484
Accepted

### Scipy.optimize can't get correct answer when objective is Piecewise Linear Function and Equality Constraint

You are trying to minimize a concave function, and minimize finds only a local minimum. To find a global minimum, use one of the methods under "Global ...
• 33.1k
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 ...
• 13.5k

### Quadratic optimisation with $\ell_1$ constraints with CVXPY

cp.norm(w, 1) == 1 is a nonlinear equality constraint, hence violates DCP rules. It is a non-convex constraint. Unless there is some special CVXPY mode or add-on to ...
• 13.5k
Accepted

### Non-proprietary (Python friendly) alternatives to Cplex and Gurobi

You can use HiGHS, SCIP and CBC solvers with using PYOMO or other Pyomo supported solvers. Also you can use google or-tools CP solver if you write CP model, google CP solver is very powerfull. PYOMO ...
• 825

### YALMIP-like modeling environment in Python

Pyomo can do a lot. CVXPY is good for convex problems which can be modeled using DCP (Disciplined Convex Programming), including Linear SDPs, and does have certain extensions for certain non-convex ...
• 13.5k

### When are Jupyter Notebooks used to solve optimization problems in Operations Research?

I want to expand on the point by @kuifje, based on your comments on their answer. I know your library (OptaPlanner, now Timefold)...
• 151

### Minimal example using MOSEK API in python

First observe problems that are not robust feasible or robust infeasible by by definition are nasty. Since you are testing feasibility of your system, then it is likely to be the case sometimes, ...
• 3,206
Accepted

### CPLEX 20.1.0.0 and python version 3.10

No. This is not possible. You could check the detailed system requirements of CPLEX from this page. There is a pre-requisites tab after selecting the version and OS. There you would find the python ...
• 46

### Algorithm needed to find optimum area of 2-dimensional data set

Let's say that $\hat{x}_1 \lt \cdots \lt \hat{x}_M$ are the distinct values of $x$ in the data, sorted into ascending order, and similarly $\hat{y}_1 < \cdots \lt \hat{y}_N$ are the sorted distinct ...
• 39.9k

### Non integer linear objective in or-tools CP-SAT

CP-SAT accepts floating point coefficients in the objective. It applies the necessary scaling to do all computation with integers, and report the unscaled objective. It also displays in the log some ...
• 2,885

### How to obtain nodes count and nodes left in docplex (using CPLEX 12.20 and Python 3.8)

I think what you want can be seen in the CPLEX log as follows: ...
• 9,123

### Doesn't Pyscipopt handle nonlinear objective functions?

As of April 1st 2024, it is now possible to use nonlinear objective functions directly on pyscipopt. To do this, you need to do the following: ...
• 638

### How to maximise black-box function defined on a subset of integers, with access to its derivative?

For the modelling question, I would say that if there is really more difference between $x_i = 1$ and $x_i = 20$ than between $x_i = 19$ and $x_i = 20$, then using integers might be more relevant. On ...
• 2,643
1 vote

### Improve a heuristic to solve the MS-RCPSP

Check this review. There are several papers referenced that could help you to find a good method to solve it. This is also a good paper to check.
1 vote

### Unique values constraint in Pulp

Will this work as intended? No. Try it out and use model.writeLP("nonsense.lp") to verify what PuLP does with this. This is a good debugging tool in ...
• 2,830
1 vote
Accepted

### A tool for finding integer solutions to linear systems

By scaling invariance, finding a nonzero integer solution to $Ax = 0$ is the same as finding any rational solution to $$\begin{bmatrix} A\\ e^T \end{bmatrix} x = \begin{bmatrix} 0\\ 1 \end{bmatrix}$$...
1 vote

### How to maximise black-box function defined on a subset of integers, with access to its derivative?

Let me start with a bit of terminology: we will say $x^{(1)}$ dominates $x^{(2)}$ if $x^{(1)}_i \ge x^{(2)}_i$ for all $i$ and $x^{(1)}_i \gt x^{(2)}_i$ for some value of $i.$ Since $f()$ is ...
• 39.9k
1 vote
Accepted

### How to describe nonlinear programming in gurobipy?

You can apply gurobipy, you just need to approach it differently. How would you code this up for a 100x100 matrix? The current approach using a hardcoded formula is impractical. Instead use the ...
• 165
1 vote

### Algorithm needed to find optimum area of 2-dimensional data set

If you care about performance, I think it makes more sense to implement this in custom code rather than try to solve it with a solver. There is a straightforward algorithm. Let $x_1<\dots<x_m$ ...
• 230
1 vote
Accepted

### Creating a decision variable that is the sum of other variables in PuLP

Yes, you can model each package with a new decision variable. For your example, introduce $x_{234}$ with objective coefficient $125$ and constraint coefficient $3$ because that package uses $3$ cars ...
• 33.1k
1 vote
Accepted

### Partially modify LHS of a constraint set?

The most computationally expensive aspect of this algorithm is the reconstruction of the master problem when a column is added (or sometimes removed) By "reconstruction", do you mean that ...
• 668
1 vote

### Is there existing code for the set partitioning formulation of routing problems?

Python is not an efficient language, and solving the resource constrained shortest path is the bottleneck of the branch-and-cut-and-price algorithms for routing problems. Therefore, you won't find a ...
• 2,643
1 vote

### Starting with HiGHS

Sorry for the confusion, we're currently clarifying things. Here are some observations: The HiGHS C++ class contains addVar - inherited in highspy - so that folk building models row-wise don't have ...
• 372
1 vote
Accepted

### Starting with HiGHS

With version 1.5.3 you should add constraints using the addRow(...) method in the format lhs <= constraint <= rhs ...
1 vote
Accepted

### How to get hypervolume calculation for Pareto Front in python?

It seems the Pymoo package has the machinery to compute the hypervolume. From the documentation, in the "Performance indicator" section, they describe several performance indicators (...
• 6,657
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')
1 vote

### Apply Benders decomposition approach in CPLEX with python while using docplex class

For the implementation issue in UserCutCallback & LazyConstraintCallback, you might refer this github Python Example For technique detail between both Callback functions, you also can refer CPLEX ...
• 411

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