# Operations Research Stack Exchange Community Digest

## Top new questions this week:

### Where can I find documentation on good practices for efficient formulations of a problem?

I am sort of new to mathematical optimization and have to build some fairly complicated models for my thesis. I was wondering where I could find literature to help me develop more efficient versions ...

mixed-integer-programming modeling reference-request

### How to prove pseudo-convexity of a discrete function?

Given a general function $f:\Bbb Z\to\Bbb R$ is there a simple way to verify whether $f(x)$ is pseudo-convex or not?

combinatorial-optimization convex-optimization optimality-conditions

### Control & Experimental Group Selection Methodology using STDEV and T-Test?

I would like to know if my methodology was 'correct': I am trying to conduct an experiment on my stores. I would like to find out the effect of a marketing campaign on the number of transactions. Only ...

optimization modeling python

### Model if-else statement

I need to build a if-else constraint for this statement, where $x_P$ and $x_I$ are decision variables, and $C$ is a constant: if $x_P \ge C$ then $x_I = x_P - C$ else $x_I = 0$. Any help is greatly ...

optimization modeling

### How to find range of values for the first-stage decisions resulting in the same cuts in two-stage stochastic programming?

Suppose we have a two-stage stochastic program as follows: \begin{split} \min \ & c^Tx + \mathbb{E}_\xi[Q(x,\xi)] \\ & \text{where}\\ &Q(x,\xi)=\min q(\xi)^Ty\\ &Tx+...

stochastic-programming

### warmstarting simplex algorithm- how much can problems differ from each other?

I'm working on an implementation of the simplex algorithm. I want to solve problems in real time every 30 minutes. They could be interpreted as a classic transportation problem. I couldn't really say ...

optimization linear-programming python simplex dual-simplex

### Is the Dynamic programming in Operations Research book the same dynamic programming in software industry?

Mostly when I search dynamic programming in google I get : dynamic programming (DP) in python, in C++, in java from web pages like geekforgeeks, litecode, codechef, and so on. But in the operation ...

python dynamic-programming

## Greatest hits from previous weeks:

### Solving a knapsack problem with a lot of items

I am wondering what are the fastest ways(faster than classical dynamic programming) to solve the knapsack problem (to optimality) with $n$ items when $n$ is nearly equal to $10000$ ? Apart from ...

dynamic-programming knapsack

### Linear Programming with additional "if-then"/"Default to zero" constraints?

What approaches can I use for a Linear Programming problem with the additional constraint that if a decision variable falls below a certain threshold, then it should just be forced to 0. I'm ...

linear-programming convexity

### Shortest path problem with boxes

A company sells seven types of boxes, ranging in volume from 17 to 33 cubic feet. The demand and size of each box is given in the following table. The variable cost (in dollars) of producing each box ...

optimization

### Does adding constraint to an optimization model make it solve faster?

Some say adding constraints cuts the feasible region smaller hence the same solver terminates faster due to the less search effort. Others say it adds more complexity to the problem and it may take ...

optimization modeling

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

I'm new to the OR world, and trying to learn the various tools available. I originally thought that Pyomo and Google OR tools were open source alternatives to commercial solvers like Gurobi or CPLEX. ...

cplex pyomo gurobi modeling-languages

### How to linearize min function as a constraint?

I'm trying to solve an optimization problem including following constraint, and I need to linearize it in a maximization nonlinear programming model. Please help me to reformulate it with mixed ...

mixed-integer-programming optimization linearization logical-constraints

### MATLAB vs. Python in industry

I am a beginning PhD student in math, and I would like to focus on optimization. I am learning programming for the first time, and I have written out some rudimentary optimization algorithms in both ...

optimization python matlab industry

## Can you answer this question?

### Gurobi c++: Getting constraint matrix

I'm trying to get the constraint matrix from a Gurobi model in C++. In Python, one can get this by simply calling a method that will populate a scipy object (see this post). However, in a C++ fashion, ...

solver gurobi c++