New answers tagged

3 votes
Accepted

Project task scheduling based on available budget per period

Define a binary variable $x_{it}$ that takes value $1$ if and only if work package $i$ is assigned to period $t$ (i.e., work package starts at time period $t$). If there is a cost $c_{it}$ per couple $...
user avatar
  • 10.1k
3 votes
Accepted

Help with dual of a problem

Looks almost correct to me. Two issues: Your $ \le$ dual constraints suggest that you omitted $X_a \ge 0$ in the primal. If instead $X_a$ is free, then your dual constraints should be $=$. Your ...
user avatar
  • 21.7k
4 votes

What would be a representative/appropriate name for operations research?

You could use a less technical term, such as the old "efficiency expert". Even if they don't know what it actually means, most people will at least think that they know what it means. You're ...
user avatar
8 votes

What would be a representative/appropriate name for operations research?

I normally answer the "what's your field?" question with "operations research" and then follow up with a quick definition: "using mathematics and statistics to make decisions&...
user avatar
  • 28.8k
1 vote

How to input this LP model of a buffer allocation problem in Gurobi?

Using a dynamic approach like simulation optimization is still one of the best ways to tackle such a problem instead of applying an LP/MIP. Based on what you mentioned, the problem you have faced ...
user avatar
  • 5,705
4 votes

How to input this LP model of a buffer allocation problem in Gurobi?

You correctly identified that this a linear program. You could either specify this problem in the .lp file format see the Gurobi documenation and consult the syntax rules if you have questions or you ...
user avatar
5 votes

How to use condition in cplex?

In OPL CPLEX you can use if then logical constraints. For instance ...
user avatar
6 votes

How to put this restriction using Gurobi in python

Firstly, your constraint should rather look this this: $$\sum_{j=0}^{i}X_j \leq H_i \quad \forall i \in I$$ $$\sum_{j=0}^{i}X_j \geq L_i \quad \forall i \in I$$ In your code this should translate to: <...
user avatar
  • 564
3 votes

On the non-sufficiency of total unimodularity of the constraint matrix in the definition of an integer polytope

You might want to look at MRP(Material Requirements Planning)/Leontief matrices. In an MRP/Leontief matrix/model: Each constraint is an equality, Every column has exactly one positive coefficient and ...
user avatar
2 votes

Methods to solve integer linear inequalities with products of two variables

One classic technique is to reformulate the integer variables as a bunch of binary variables. In this case i would use a encoding with powers of 2 and then use a multiplier circuit to express the ...
user avatar
5 votes
Accepted

On the non-sufficiency of total unimodularity of the constraint matrix in the definition of an integer polytope

The answer is yes, and the proof is trivial. Recall that a TUM matrix has all coefficients in $\lbrace -1, 0, 1\rbrace.$ Start with any $P := \{ x\in \mathbb {R}^{n} \mid A x \leq b\}$ that is integer....
user avatar
  • 28.8k
2 votes
Accepted

How to formulate cumulative sum of LpVariable in Pulp Python

This is one way you can formulate/model the problem: $$ \begin{align*} x_{i,t} &\in R^{+} \text{ variable denoting amount of raw material $i$ processed/out in time $t$}\\ q_{i,t} &\in R^{+} \...
user avatar
  • 959
3 votes

How to use condition in cplex?

It looks like you want to enforce $h_i = \max(\sum_{k,l} x_{i,j,k,l}-7, 0)$. Some solvers will automatically linearize this. Depending on where $h_i$ appears elsewhere in the problem, you might be ...
user avatar
  • 21.7k
1 vote

How to use condition in cplex?

Below is one way to formulate it. Need to introduce another binary variable ($\delta_{i,j}$). $M$ depends on bounds of $h_{i}$ and $x_{i,j,k,l}$ : $$ \begin{align} \sum_{k,l} x_{i,j,k,l}-7 &\le h_{...
user avatar
  • 959
8 votes

Application of complex numbers in Linear Programming?

In 1965 I published a paper where I used linear optimization of a complex variable to analyze the complex dielectric behavior of an organic liquid. Wish I could give more details, but it's been a long ...
user avatar
1 vote

Common problems/puzzles that can creatively be solved with linear programming?

You can formulate construction of latin squares as an (integer) linear programming problem. Extending that, you can get sudokus this way. I have some code for the latin square part, which I will dig ...
user avatar
3 votes
Accepted

Solving Graph Partitioning Problems with Gurobi and Pyomo

I would like to ensure that the optimal solutions that are solved within this small amount of times are still solved with optimal solutions while the MIPGap only applies to those slow problems. I ...
user avatar

Top 50 recent answers are included