New answers tagged

3 votes

Can docplex solve a mixed integer quadratic programming (MIQP) problem?

In OPL You can write ...
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
2 votes

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
1 vote

Passing exact number of allocations as constraint to pyomo in a sourcing problem

I will first formalize the described problem in mathematical notations, I think it is more suitable, rather than a piece of code, for providing a better understanding. So, let $B$ be the brands set; $...
user avatar

Top 50 recent answers are included